About this task
This describes how to install the undercloud.
Before you begin
Procedure
-
Create the stack user.
sudo useradd stack echo "stack ALL=(root) NOPASSWD:ALL" | sudo tee -a \ /etc/sudoers.d/stack sudo chmod 0440 /etc/sudoers.d/stack su - stack
-
Configure the undercloud hostname.
The undercloud requires a FQDN (fully qualified domain name) for its installation and configuration process. Use hostnamectl to set the hostname as shown in the following example.
sudo hostnamectl set-hostname myhost.mydomain sudo hostnamectl set-hostname --transient myhost.mydomain
Edit the /etc/hosts file.sudo vim /etc/hosts
Add the following line to the /etc/hosts file.127.0.0.1 myhost.mydomain myhost
Note: If the /etc/hosts file already contains a line with 127.0.0.1, append myhost.mydomain myhost to the end of the existing line. -
Add repositories for undercloud and overcloud deployment.
sudo yum install -y yum-utils sudo curl -o /etc/yum.repos.d/delorean.repo \ https://trunk.rdoproject.org/centos8/current-tripleo/delorean.repo sudo curl -o /etc/yum.repos.d/delorean-current.repo \ https://trunk.rdoproject.org/centos8/current/delorean.repo sudo curl -o /etc/yum.repos.d/delorean-deps.repo \ https://trunk.rdoproject.org/centos8/delorean-deps.repo
-
Edit the /etc/yum.repos.d/delorean-current.repo file.
sudo vim /etc/yum.repos.d/delorean-current.repo
Add the following as one line to the end of the /etc/yum.repos.d/delorean-current.repo file.includepkgs=diskimage-builder,instack,instack-undercloud,os-apply-config,os-cloud-config,os-collect-config, os-net-config,os-refresh-config,python-tripleoclient,tripleo-common,openstack-tripleo-heat-templates, openstack-tripleo-image-elements,openstack-tripleo,openstack-tripleo-puppet-elements,openstack-puppet-modules
-
Install the python3-tripleo-repos RPM from the appropriate RDO
repository.
See the current RPO repository at https://trunk.rdoproject.org/centos8/component/tripleo/current/ to find the latest python3-tripleo-repos RPM.
sudo dnf install -y \ https://trunk.rdoproject.org/centos8/component/tripleo/current/python3-tripleo-repos-<latest>.rpm
For example:sudo dnf install -y \ https://trunk.rdoproject.org/centos8/component/tripleo/current/python3-tripleo-repos-0.1.1-0.20220201181859.87c9879.el8.noarch.rpm
-
Enable the current Victoria repositories.
sudo -E tripleo-repos -b victoria current
An output example:Removed old repo "/etc/yum.repos.d/delorean.repo" Removed old repo "/etc/yum.repos.d/delorean-deps.repo" Removed old repo "/etc/yum.repos.d/delorean-current.repo" Installed repo delorean to /etc/yum.repos.d/delorean.repo Installed repo delorean-victoria-testing to /etc/yum.repos.d/delorean-victoria-testing.repo Installed repo tripleo-centos-highavailability to /etc/yum.repos.d/tripleo-centos-highavailability.repo Installed repo tripleo-centos-powertools to /etc/yum.repos.d/tripleo-centos-powertools.repo Cache was expired 136 files removed
Update and reboot.sudo dnf update -y sudo reboot
Note: Do not enable any other repositories unless they are explicitly marked for the target release. -
Switch to the stack user after reboot, and install required packages.
su - stack sudo dnf -y install python3-proliantutils sudo dnf -y install python3-tripleoclient sudo dnf -y module reset container-tools sudo dnf -y module enable container-tools:3.0
-
Update the provided undercloud.conf file in the
tripleo package.
vim undercloud.conf
Set local_interface to the name of the network interface which is reserved for the provisioning network. It is eno2 in this example.local_interface = eno2
Place the file in the /home/stack/ directory.cp undercloud.conf /home/stack
Note: You don't have to configure the network interface for the provisioning network as it will be configured during undercloud deployment. -
Update the file system for the undercloud to pass.
sudo chmod -R a+rwX /root sudo mkdir /etc/cni/net.d/
-
Install the undercloud.
openstack undercloud install
An output example:... ######################################################## Deployment successful! ######################################################## Writing the stack virtual update mark file /var/lib/tripleo-heat-installer/update_mark_undercloud ########################################################## The Undercloud has been successfully installed. Useful files: Password file is at /home/stack/undercloud-passwords.conf The stackrc file is at ~/stackrc Use these files to interact with OpenStack services, and ensure they are secured. ##########################################################
Note: If it fails to deploy the undercloud because some packages are not installed, make sure that the repositories are configured properly, and all the required packages are installed as described in the previous steps. If some packages are not installed, the following steps should be executed:- Install the packages.
- Reboot.
- Install the undercloud
again.
openstack undercloud install
Note: To redeploy an undercloud, clean the undercloud using the following procedure.- Get list of the containers ID in the shell construction and delete all
containers.
id = $( sudo podman ps -a | awk '{ print $1}') for i in $p; do podman rm $i ; done
- Reboot the director node.
- Install the undercloud again.