Openstack TripleO Undercloud Installation

Here are things needs to follow for undercloud installation:

1. Log in to your machine (baremetal or VM) where you want to install the undercloud as a non-root user. If you don’t have a non-root user created yet, log in as root and create one with following commands:

$ sudo useradd stack 
$ sudo passwd stack # specify a password
$ echo "stack ALL=(root) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/stack
$ sudo chmod 0440 /etc/sudoers.d/stack
$ su - stack

2. Install Dependencies: Install the necessary dependencies on the host machine where you’ll install the Undercloud, including Python, OpenStack client tools, and other dependencies specified by TripleO.
$ sudo dnf install -y https://trunk.rdoproject.org/centos9/component/tripleo/current/python3-tripleo-repos-<version>.el9.noarch.rpm
$ sudo -E tripleo-repos current-tripleo-dev ceph
$ sudo dnf install -y python*-tripleoclient

3. Prepare the configuration file. It is backwards compatible with non-containerized instack underclouds.
$ cp /usr/share/python-tripleoclient/undercloud.conf.sample ~/undercloud.conf

4. Generate configuration for preparing container images. 

As part of the undercloud install, an image registry is configured on port 8787. This is used to increase reliability of overcloud image pulls, and minimise overall network transfers. The undercloud registry will be populated with images required by the undercloud by generating the following containers-prepare-parameter.yaml file and including it in undercloud.conf: container_images_file=$HOME/containers-prepare-parameter.yaml:

$ openstack tripleo container image prepare default \
  --local-push-destination \
  --output-env-file ~/containers-prepare-parameter.yaml

5.  Override heat parameters and environment files used for undercloud deployment.

Similarly to overcloud deployments,  the undercloud.conf: custom_env_files and undercloud.conf: templates configuration parameters allow to use a custom heat templates location and override or specify additional information for Heat resources used for undercloud deployment.

6. Run the command to install the undercloud:
openstack undercloud install
 
7. Verify undercloud installation:

Once the install has completed, you should take note of the files stackrc and undercloud-passwords.conf. You can source stackrc to interact with the undercloud via the OpenStack command-line client. The undercloud-passwords.conf file contains the passwords used for each service in the undercloud. These passwords will be automatically reused if the undercloud is reinstalled on the same system, so it is not necessary to copy them to undercloud.conf.

Miscellaneous undercloud deployment artifacts, like processed heat templates and compressed files, can be found in undercloud.conf: output_dir locations like ~/tripleo-heat-installer-templates.

8. Cleaning the Undercloud

This procedure isn’t cleaning everything that TripleO generates, but enough so an Undercloud could be re-deployed.

$ ssh <non-root-user>@<undercloud-machine>
$ sudo podman rm -af
$ sudo podman rmi -af
$ sudo rm -rf \
/var/lib/tripleo-config \
/var/lib/config-data \
/var/lib/container-config-scripts \
/var/lib/container-puppet \
/var/lib/heat-config \
/var/lib/image-service \
/var/lib/mysql
$ sudo rm -rf /etc/systemd/system/tripleo*
$ sudo systemctl daemon-reload

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top