Skip to content
This repository was archived by the owner on Jan 17, 2025. It is now read-only.

berzdev/ansible-fai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible-FAI - Fully Automatic Installation

Description

I created this project for an automated FAI installation with Ansible on a multi location environment. So that I’m able to install Debian everywhere in a few minutes, fully automatically.

FAI is a tool for unattended mass deployment of Debian machines (fai-project.org).

Features

  • Distributed Setup (Multi Location)
  • UEFI and Legacy PXE Boot

Deployment Types

Local Setup

(Default Setup of the project)

  • FAI is installed on a Debian Host
  • Good for simple deployments (without multiple locations)
  • PXE is preconfigured from FAI (all in one machine)

Distributed Setup

This method is for scale in a multi site environment.

  • The FAI configuration is on a central git repository
  • The FAI Root Filesystem is stored on S3 (.img)
  • Multiple TFTP servers are deployed via Docker (on any site), the PXE Folder is on S3 as tar.xz.

./docs/distributed.svg

Get started (Local Setup)

0. Requirements

  • Clone this repository
  • Ansible
  • A clean debian host (for FAI installation)
  • Configure your DHCP Server for PXE boot (see Heading DHCP configuration)

1. Configure your deployment

a) Edit your Ansible hosts.yml (change faitmp Host IP).

b) Configure your Variables playbooks/vars.yml (change fai_server_ip).

2. Deploy FAI

Now you can run the fai.yml playbook! This will install FAI on your fresh Debian host.

ansible-playbook playbooks/fai.yml

3. Test the setup

If no error occurs, FAI should now be installed! You can check if the FAI folder exist under /srv/fai.

When your DHCP server is configured for PXE boot, you can check if PXE boot works.

Get started (Distributed Setup)

./docs/distributed-deployment.svg

0. Requirements

  • Clone this repository
  • Ansible
  • A clean debian host (for temporary FAI installation, until everything is published)
  • Configure your DHCP Server for PXE boot (see Heading DHCP configuration)
  • Docker Host(s) on your edge site (for TFTP container)
  • S3 Bucket (FAI Root and FAI TFTP directory)
  • Git Repository (for FAI config), with README file (repo must be initialized)

1. Configure your deployment

a) Edit your Ansible hosts.yml b) Configure your Variables playbooks/vars.yml

  • Add your git & S3 credentials (consider Ansible Vault for this)

2. Deploy FAI

Now you can run the fai.yml playbook! This will install FAI on your fresh Debian host.

The git repository should now receive new files. Your Root Image + PXE archive should be uploaded to the S3 Bucket.

ansible-playbook playbooks/fai.yml

3. Deploy a TFTP Server (on docker)

Edit the file pxe.yml and probably change the container_directory variable at the beginning. This is the place, where the TFTP server and all files will be installed.

The TFTP container will be exposed to port 69/udp of the docker host. You should configure your DHCP server for this. See heading DHCP configuration for examples.

4. Test the setup

If everything is successfully uploaded & configured, check if you can boot over PXE.

DHCP configuration

You must configure PXE Boot on the DHCP Server, so that PCs can find your FAI Server. The following examples are tested & used in my setup.

kea dhcp

  • Support UEFI and Legacy Boot

docs/kea_dhcp/kea-dhcp4.conf

References / Thanks to

https://fai-project.org/fai-guide/ https://fai-project.org/

  • FAI Mailing List
  • Thomas Lange

About

Moved to: https://codeberg.org/berzdev/ansible-fai ; Install FAI with Ansible.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages