Chapter 3. Deploying the Undercloud
As a technician, you can deploy an undercloud, which provides users with the ability to deploy and manage overclouds with the Red Hat OpenStack Platform Director interface.
3.1. Prerequisites
- Have a valid Red Hat Hyperconverged Infrastructure for Cloud subscription.
- Have access to Red Hat’s software repositories through Red Hat’s Content Delivery Network (CDN).
3.2. Understanding Ironic’s Disk Cleaning Between Deployments
Enabling Ironic’s disk cleaning feature will permanently delete all data from all the disks on a node before that node becomes available again for deployment.
There are two facts that you should consider before enabling Ironic’s disk cleaning feature:
- When director deploys Ceph it uses the ceph-disk command to prepare each OSD. Before ceph-disk prepares an OSD, it checks if the disk which will host the new OSD has data from an older OSD and if it does, then it will fail the disk preparation in order to not overwrite that data. It does this as a safety feature so that data is not lost.
- If a deployment attempt with director fails and is then repeated after the overcloud is deleted, then by default the data from the previous deployment will still be on the server disks. This data may cause the repeated deployment to fail because of how the ceph-disk command behaves.
If an overcloud node is accidentally deleted and disk cleaning is enabled, then the data will be removed and can only be put back into the environment by rebuilding the node with Red Hat OpenStack Platform Director.
3.3. Configuring the Undercloud to Clean the Disks Before Deploying the Overcloud
Updating the undercloud configuration file to clean disks before deploying the overcloud.
Enabling this feature will destroy all data on all disks before they are provisioned in the overcloud deployment.
Prerequisites
Procedure
Edit the
undercloud.conffile, and add the following line:clean_nodes = True
3.4. Installing the Undercloud
Several steps must be completed to install the undercloud. This procedure is installing the Red Hat OpenStack Platform director (RHOSP-d) as the undercloud.
Prerequisites
- Have access to Red Hat’s software repositories through Red Hat’s Content Delivery Network (CDN).
Procedure
Summary of the steps:
- Create an installation user
- Create directories for templates and images
- Verify/Set the RHOSP-d node name
- Register the RHOSP-d node
- Install the RHOSP-d software
- Configure the RHOSP-d software
- Obtain and import disk images for the overcloud
- Set a DNS server on the undercloud’s subnet
Do the following steps on the command-line interface of the RHOSP-d node:
The RHOSP-d installation requires a non-root user with
sudoprivileges to do the installation.As
root, create a user namedstack:[root@director ~]# useradd stack
As
root, set a password forstack. When prompted, enter the new password:[root@director ~]# passwd stack
As
root, configuresudoaccess for thestackuser:[root@director ~]# echo "stack ALL=(root) NOPASSWD:ALL" | tee -a /etc/sudoers.d/stack [root@director ~]# chmod 0440 /etc/sudoers.d/stack
Switch to the
stackuser:[root@director ~]# su - stack
The RHOSP-d installation will be done as the
stackuser.
Create two new directories in the
stackuser’s home directory, one namedtemplatesand the other namedimages:[stack@director ~]$ mkdir ~/images [stack@director ~]$ mkdir ~/custom-templates
These directories will organize the system image files and Heat template files used to create the overcloud environment later.
The installing and configuring process requires a fully qualified domain name (FQDN), along with an entry in the
/etc/hostsfile.Verify the RHOSP-d node’s host name:
[stack@director ~]$ hostname -f
If needed, set the host name:
sudo hostnamectl set-hostname $FQDN_HOST_NAME sudo hostnamectl set-hostname --transient $FQDN_HOST_NAME
- Replace…
$FQDN_HOST_NAMEwith the FQDN of the RHOSP-d node.Example
[stack@director ~]$ sudo hostnamectl set-hostname director.example.com [stack@director ~]$ sudo hostnamectl set-hostname --transient director.example.com
Add an entry for the RHOSP-d node name to the
/etc/hostsfile. Add the following line to the/etc/hostsfile:sudo echo "127.0.0.1 $FQDN_HOST_NAME $SHORT_HOST_NAME localhost localhost.localdomain localhost4 localhost4.localdomain4" >> /etc/hosts
- Replace…
-
$FQDN_HOST_NAMEwith the full qualified domain name of the RHOSP-d node. $SHORT_HOST_NAMEwith the short domain name of the RHOSP-d node.Example
[stack@director ~]$ sudo echo "127.0.0.1 director.example.com director localhost localhost.localdomain localhost4 localhost4.localdomain4" >> /etc/hosts
-
Register the RHOSP-d node on the Red Hat Content Delivery Network (CDN), and enable the required Red Hat software repositories using the Red Hat Subscription Manager.
Register the RHOSP-d node:
[stack@director ~]$ sudo subscription-manager register
When prompted, enter an authorized Customer Portal user name and password.
Lookup the valid
Pool IDfor the RHOSP entitlement:[stack@director ~]$ sudo subscription-manager list --available --all --matches="*Hyperconverged*"
Example Output
Subscription Name: Red Hat Hyperconverged Infrastructure for Cloud Provides: Red Hat OpenStack Red Hat Ceph Storage SKU: RS00160 Contract: 1111111 Pool ID: a1b2c3d4e5f6g7h8i9 Provides Management: Yes Available: 1 Suggested: 1 Service Level: Self-Support Service Type: L1-L3 Subscription Type: Standard Ends: 05/27/2018 System Type: VirtualUsing the
Pool IDfrom the previous step, attach the RHOSP entitlement:[stack@director ~]$ sudo subscription-manager attach --pool=$POOL_ID
- Replace…
$POOL_IDwith the valid pool id from the previous step.Example
[stack@director ~]$ sudo subscription-manager attach --pool=a1b2c3d4e5f6g7h8i9
Disable the default software repositories, and enable the required software repositories:
[stack@director ~]$ sudo subscription-manager repos --disable=* [stack@director ~]$ sudo subscription-manager repos --enable=rhel-7-server-rpms --enable=rhel-7-server-extras-rpms --enable=rhel-7-server-rh-common-rpms --enable=rhel-ha-for-rhel-7-server-rpms --enable=rhel-7-server-openstack-13-rpms
If needed, update the base system software to the latest package versions, and reboot the RHOSP-d node:
[stack@director ~]$ sudo yum update [stack@director ~]$ sudo reboot
Wait for the node to be completely up and running before continuing to the next step.
Install all the RHOSP-d software packages:
[stack@director ~]$ sudo yum install python-tripleoclient ceph-ansible
Configure the RHOSP-d software.
Red Hat provides a basic undercloud configuration template to use. Copy the
undercloud.conf.samplefile to thestackuser’s home directory, namedundercloud.conf:[stack@director ~]$ cp /usr/share/instack-undercloud/undercloud.conf.sample ~/undercloud.conf
The undercloud configuration template contains two sections:
[DEFAULT]and[auth]. Open theundercloud.conffile for editing. Edit theundercloud_hostnamewith the RHOSP-d node name. Uncomment the following parameters under the[DEFAULT]section in theundercloud.conffile by deleting the#before the parameter. Edit the parameter values with the appropriate values as required for this solution’s network configuration:Parameter
Network
Edit Value?
Example Value
local_ipProvisioning
Yes
192.0.2.1/24network_gatewayProvisioning
Yes
192.0.2.1undercloud_public_vipProvisioning
Yes
192.0.2.2undercloud_admin_vipProvisioning
Yes
192.0.2.3local_interfaceProvisioning
Yes
eth1network_cidrProvisioning
Yes
192.0.2.0/24masquerade_networkProvisioning
Yes
192.0.2.0/24dhcp_startProvisioning
Yes
192.0.2.5dhcp_endProvisioning
Yes
192.0.2.24inspection_interfaceProvisioning
No
br-ctlplaneinspection_iprangeProvisioning
Yes
192.0.2.100,192.0.2.120inspection_extrasN/A
Yes
trueinspection_runbenchN/A
Yes
falseinspection_enable_uefiN/A
Yes
trueSave the changes after editing the
undercloud.conffile. See Appendix B, Red Hat Hyper-converaged Infrastructure for Cloud Undercloud Configuration Parameters for detailed descriptions of these configuration parameters.NoteConsider enabling Ironic’s disk cleaning feature, if overcloud nodes are going to be repurposed again. See Section 3.2, “Understanding Ironic’s Disk Cleaning Between Deployments” for more details.
Run the RHOSP-d configuration script:
[stack@director ~]$ openstack undercloud install
NoteThis script will take several minutes to complete. This script will install additional software packages and generates two files:
undercloud-passwords.conf- A list of all passwords for the director’s services.
stackrc- A set of initialization variables to help you access the director’s command line tools.
Verify that the configuration script started and enabled all of the RHOSP services:
[stack@director ~]$ sudo systemctl list-units openstack-*
The configuration script gives the
stackuser access to all the container management commands. Refresh thestackuser’s permissions:[stack@director ~]$ exec su -l stack
Initialize the
stackuser’s environment to use the RHOSP-d command-line tools:[stack@director ~]$ source ~/stackrc
The command-line prompt will change, which indicates that OpenStack commands will authenticate and execute against the undercloud:
Example
(undercloud) [stack@director ~]$
The RHOSP-d requires several disk images for provisioning the overcloud nodes.
Obtain these disk images by installing
rhosp-director-imagesandrhosp-director-images-ipasoftware packages:(undercloud) [stack@director ~]$ sudo yum install rhosp-director-images rhosp-director-images-ipa
Extract the archive files to the
imagesdirectory in thestackuser’s home directory:(undercloud) [stack@director ~]$ cd ~/images (undercloud) [stack@director ~]$ for x in /usr/share/rhosp-director-images/overcloud-full-latest-13.0.tar /usr/share/rhosp-director-images/ironic-python-agent-latest-13.0.tar ; do tar -xvf $x ; done
Import the disk images into the RHOSP-d:
(undercloud) [stack@director ~]$ openstack overcloud image upload --image-path /home/stack/images/
To view a list of imported disk images, execute the following command:
(undercloud) [stack@director ~]$ openstack image list
Image Name
Image Type
Image Description
bm-deploy-kernelDeployment
Kernel file used for provisioning and deploying systems.
bm-deploy-ramdiskDeployment
RAMdisk file used for provisioning and deploying systems.
overcloud-full-vmlinuzOvercloud
Kernel file used for the base system, which is written to the node’s disk.
overcloud-full-initrdOvercloud
RAMdisk file used for the base system, which is written to the node’s disk.
overcloud-fullOvercloud
The rest of the software needed for the base system, which is written to the node’s disk.
NoteThe
openstack image listcommand will not display the introspection PXE disk images. The introspection PXE disk images are copied to the/httpboot/directory.(undercloud) [stack@director images]$ ls -l /httpboot total 341460 -rwxr-xr-x. 1 root root 5153184 Mar 31 06:58 agent.kernel -rw-r--r--. 1 root root 344491465 Mar 31 06:59 agent.ramdisk -rw-r--r--. 1 ironic-inspector ironic-inspector 337 Mar 31 06:23 inspector.ipxe
Set the DNS server so that it resolves the overcloud node host names.
List the subnets:
(undercloud) [stack@director ~]$ openstack subnet list
Define the name server using the undercloud’s
neutronsubnet:openstack subnet set --dns-nameserver $DNS_NAMESERVER_IP $SUBNET_NAME_or_ID
- Replace…
-
$DNS_NAMESERVER_IPwith the IP address of the DNS server. $SUBNET_NAME_or_IDwith theneutronsubnet name or id.Example
(undercloud) [stack@director ~]$ openstack subnet set --dns-nameserver 192.0.2.4 local-subnet
NoteReuse the
--dns-nameserver $DNS_NAMESERVER_IPoption for each name server.
-
Verify the DNS server by viewing the subnet details:
(undercloud) [stack@director ~]$ openstack subnet show $SUBNET_NAME_or_ID
- Replace…
$SUBNET_NAME_or_IDwith theneutronsubnet name or id.Example
(undercloud) [stack@director ~]$ openstack subnet show local-subnet +-------------------+-----------------------------------------------+ | Field | Value | +-------------------+-----------------------------------------------+ | ... | | | dns_nameservers | 192.0.2.4 | | ... | | +-------------------+-----------------------------------------------+
Additional Resources
-
For more information on all the undercloud configuration parameters located in the
undercloud.conffile, see the Configuring the Director section in the RHOSP Director Installation and Usage Guide.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.