Joshua Boniface
bbfd587cd6
Adds the PVC Bootstrap system, which allows the automated deployment of one or more PVC clusters. |
||
---|---|---|
bootstrap-daemon | ||
docs | ||
.gitignore | ||
LICENSE | ||
README.md | ||
gen-api-doc | ||
install-pvcbootstrapd.sh |
README.md
PVC Bootstrap System
The PVC bootstrap system provides a convenient way to deploy PVC clusters. Rather than manual node installation, this system provides a fully-automated deployment from node powering to cluster readiness, based on pre-configured values. It is useful if an administrator will deploy several PVC clusters or for repeated re-deployment for testing purposes.
Setup
Setting up the PVC bootstrap system is fairly complicated and is mostly manual. This is due both to some requirements that cannot be satisfied by Debian packaging, and also to provide maximum flexibility to the administrator. However, some helper scripts are provided to automate some aspects, and the entire setup process is documented here.
Preparing to use the PVC Bootstrap system
-
Prepare a Git repository to store cluster configurations. This can be done automatically with the
create-local-repo.sh
script in the PVC Ansible repository. -
Create
group_vars
for each cluster you plan to bootstrap. Additionally, ensure you configure thebootstrap.yml
file for each cluster with the relevant details of the hardware you will be using. This step can be repeated for each cluster in the future as new clusters are required, and the system will automatically pull changes to the local PVC repository once configured.
Preparing a PVC Bootstrap host
-
The recommended OS for a PVC Bootstrap host is Debian GNU/Linux or a similar derivative. In terms of hardware, a small single-board computer like a Raspberry Pi or small desktop will work, as the host does not require significant CPU, memory, or disk resources.
-
Install the required dependencies for the following steps: python3, python3-pip, and Ansible.
-
Set up the network as detailed in the "Networking for Bootstrap" section.
-
Create a working directory for
pvcbootstrapd
, usually/srv/tftp
or something similar. -
Clone this repository under the working directory.
-
Run the
./install-pvcbootstrapd.sh
script from the root of the repository to install the required systemd units and template configuration files. It will prompt for several configuration parameters.
Running the PVC Bootstrap daemon
-
Edit the
/etc/pvc/pvcbootstrapd.yaml
configuration file to suit your needs. -
Start the
pvcbootstrapd.service
andpvcbootstrapd-worker.service
units. -
Observe the logs for each service.
Networking for Bootstrap
When using the pvcbootstrapd system, a dedicated network is required to provide bootstrap DHCP and TFTP to the cluster. This network can either have a dedicated, upstream router that does not provide DHCP, or the network can be routed with network address translation (NAT) through the bootstrap host.
In bootstrap mode (as opposed to manual install mode), new nodes are configured with their interfaces as follows:
- BMC: bootstrap
- Interface 1 (first among all LOM ports): bootstrap
- Interface 2+ (all other ports): LACP (802.3ad) bond0
The Bootstrap interfaces do DHCP from the bootstrap host, and are thus responsible for autoconfiguration. The remaining interfaces, in an LACP bond, are used to underlay the various standard PVC networks.
Care must therefore be taken to ensure that the BMC and first lan-on-motherboard interface are connected as vLAN access ports in the bootstrap network, and that the remaining ports have some connectivity along the various configured PVC networks, before proceeding.
Consider the following diagram for reference:
Deploying a Cluster
-
Ensure the cluster configuration is committed to the repository, including the BMC MAC addresses, default IPMI credentials, and all other cluster configurations.
-
Connect the network ports as outlined above.
-
Connect power to the servers, but do not power on.
-
Wait for the cluster bootstrapping to complete.
-
Power off the servers and put them into production.