Host Provisioning (Archived 2024-04-14) #
THIS IS AN OLD GUIDE. PLEASE REFER TO THE NEW GUIDE HERE
The workflow to provision a new host is mostly automated using PXE-booting using MaaS together with cloud init. But there are some steps that are manual.
Installation #
This guide will go through the entire workflow to setup up a brand new host. Keep in mind that credentials to each subsystem used in the guide are assumed to be available.
- Prerequisites
- Access to the GitHub Admin repository
- Name and FQDN
- Password
- Static IP-address
- MaaS Zone (Check the available zones in MaaS)
- CloudStack Zone (Check the available zones in CloudStack, this should match with the MaaS Zone)
- CloudStack Pod (Check the available pods in CloudStack)
- CloudStack Cluster (Clusters are hardware homogeneous, create a new one if there isn’t a match in CloudStack)
Steps #
- Configure BIOS and find MAC-address
- Turn on the machine and enter BIOS
- Go to the network cards in the BIOS to find the network card that is used.
- Note the MAC-address (take a photo!)
- Go to the Boot-order
- Set the connected network card to be first in the list
- Turn off the machine
- Generate a cloud-init file
- Go to the admin GitHub repository
- Go to cloud-init folder
- Run
generate.py
and follow the instructions in the terminal
- Register the machine in MaaS
- Go to MAAS
- Go to Machines | Add hadware | Machine
- Enter Machine name and Zone
- Enter MAC address from BIOS
- Select Power type to Manual (this will be edited in the future)
- Click Save machine
- Refresh the page and ensure that the machine is under the category New
- (The following steps are necessary until IPMI is fixed)
- Go to the machine in MaaS
- Click ‘Take action’ and ‘Abort’ the commissioning
- Click ‘Take action’ and ‘Commission’ again, but with “Skip configuring supported BMC controllers…” ticked
- Click ‘Start commissioning for machine’
- Commission the machine
- Turn on the machine
- Wait for it to boot and ensure that it picks up the boot image from MaaS
- Wait for the machine to turn it self off
- Deploy the machine
- Ensure the machine is turned off
- Go to the machine in MaaS
- Go to the ‘Network Tab’
- Tick the connected network card and Click ‘Create bridge’
- Enter ‘cloudbr0’ in ‘Bridge name’
- Select ‘Subnet’ for the zone, eg. 172.31.0.0/16
- Select ‘Static assign’ in ‘IP mode’
- Enter the statis IP address of the host in ‘IP address’
- Click ‘Save interface’
- Click ‘Take action’ and ‘Deploy’
- Select the ‘Release’ and tick ‘Cloud-int user-data’
- Upload or paste the generated cloud-init file
- Click ‘Start deployment for machine’
- Turn on the machine and wait for MaaS to finish the deployment
- Refresh and wait for machine to be under the category Deployed
- Verify installation
- Go to the dashboard
- Go to Infrastructure | Hosts
- Verify that the new machine is present. NOTE! It might take some time for it to appear in CloudStack as the machine will reboot a couple of times more before it is completely ready
- Go to the status page
- Ensure the host status is visible under Server statistics