Skip to content

Custom installations

Anaconda

Users who need to customise the partition table on their instances, can use anaconda deployment to deploy an OS using a kickstart file.

This is a freshly added feature in our Cloud deployment, in its early testing stages, we would be greatful for any kind of feedback.

Preparation

To be able to configure Anaconda deployment on the physical servers, the user needs to have access to their Ironic nodes. This can be checked by setting the project and listing the nodes in aiadm/ciadm:

[aiadm]$ eval $(ai-rc "Your project name")
[aiadm]$ openstack baremetal node list
If the list is empty, please, open a ticket to the Cloud Team.

Configuration steps

1. Driver

For the physical node to know that it has to use anaconda driver to deploy, set the driver-interface to anaconda:

openstack baremetal node set --deploy-interface anaconda $NODE

To unset anaconda and use the usual deployment (direct) run:

openstack baremetal node set --deploy-interface direct $NODE

2. Image

Ironic requires special images to be used for Anaconda deployment. The naming pattern is {release} ANACONDA - {arch}

They can be found by:

openstack image list --community | grep ANACONDA

3. Default kickstart file

Each OpenStack Anaconda image has a default kickstart file assigned to it by default.

You can find the basic kickstart file for Alma8, Alma9, RHEL8, RHEL9 with autopatitioning. They look more or less the same for all releases apart of some sematic changes.

Important bits are marked with # DO NOT REMOVE. Required by Ironic. This commands are required for the correct deployment through Ironic.

Last part is AIMS deregistartion, without it the node would always boot into AIMS in the loop.

All the rest is configurable on the user's needs.

4. Configuring your own kickstart file

If you want to configure your own kickstart file, use the above one as a base (remember to keep the Ironic lines):

  • upload your kickstart file to the glance:
    openstack image create --file your_template_file.cfg  --container-format bare --disk-format raw anaconda_kickstart
    
  • assign just created glance image (kickstart_uuid) to the node:
    openstack baremetal node set --instance-info ks_template=glance://kickstart_uuid $NODE
    

5. Server creation

To create a server follow an usual workflow for self managed or puppet-managed machines.

Remember to use the correct image_uuid from image section.

ai-installhost - alternative way

Another way for installing physical machines is to use ai-installhost command in order to provide a custom kickstart file. When creating an instance using Bare Metal Service you can provide only an OpenStack Image, which means all the custom configuration has to be done from inside of the image.

When using Ironic, ai-installhost is not available right away. You need to wait for Puppet to run at least once in order to use the tool. More information can be found in the config docs