How to Install Tripleo(Openstack on Openstack) UnderCloud on CentOS 7

Undercloud is a single node OpenStack installation deployed either in a Virtual machine or in bare metal server. The objective of undercloud is to install, test, manage and update its overcloud servers (Controller, Compute & Storage nodes). In Red Hat terminology undercloud is known as “Director“. Undercloud basically contains all the images that is required to deployed Overcloud Controller, Computes, Swift and Storage.

Overcloud is the actual functional cloud for any organization where all the Virtual Machines are created on compute nodes and handle all the workloads. In other words we can say overcloud provides the openstack services like Nova, Keystone , Horizon, Neutron, cinder, Glance, Heat & Ceilometer Services.

In this article we will demonstrate how to install TripleO undercloud or Director on CentOS 7 VM.

Following are the minimum system requirements for undercloud:

  • 16 GB RAM
  • 1 Quad Core CPU
  • 80 GB disk Space
  • 2 Nics
  • CentOS 7.x / RHEL 7.x

Below are my lab setup details:

  • CentOS 7 VM (Minimal Installation) is hosted inside the KVM hypervisor.
  • Two Interfaces are attached to VM (Provisioning & NAT)
  • Provisioning Network: 192.168.126.0/24
  • NAT Network: 192.168.122.0/24
  • IP Address on eth0 is 192.168.122.90 and IP Address on eth1 is 192.168.126.1

To successfully install undercloud inside a virtual machine, you have to enabled Nested Virtualization in KVM hypervisor, if you not sure how to enable it, refer the below:

Let’s jump into the CentOS 7 VM and follow the below Steps:

Step:1) Set the Hostname and update /etc/hosts file

Run the hostnamectl command to set the hostname,

[root@localhost ~]# hostnamectl set-hostname "undercloud.example.com"
[root@localhost ~]# exec bash
[root@undercloud ~]#

Add the following entries using the beneath command:

[root@undercloud ~]# echo "192.168.126.1    undercloud.example.com" >> /etc/hosts

Update your system using below yum command and reboot once.

[root@undercloud ~]# yum update -y && reboot

Step:2) Create non-root user (stack)

Run the beneath commands one after the another to create stack user and assign sudo rights to it. We will install undercloud using stack user only.

[root@undercloud ~]# useradd stack
[root@undercloud ~]# echo "enter_password_here" | passwd --stdin stack
[root@undercloud ~]# echo "stack ALL=(root) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/stack
stack ALL=(root) NOPASSWD:ALL
[root@undercloud ~]# chmod 0440 /etc/sudoers.d/stack
[root@undercloud ~]# su - stack
[stack@undercloud ~]$

Step:3) Enable required repositories for undercloud

Execute the below commands to enable and configured required repositories for undercloud installation.

[stack@undercloud ~]$ wget https://trunk.rdoproject.org/centos7/current/python2-tripleo-repos-0.0.1-0.20190328140951.a7bc8dc.el7.noarch.rpm
[stack@undercloud ~]$ rpm -ivh python2-tripleo-repos-0.0.1-0.20190328140951.a7bc8dc.el7.noarch.rpm
[stack@undercloud ~]$ sudo -E tripleo-repos -b rocky current
[stack@undercloud ~]$ sudo yum -y install yum-plugin-priorities
[stack@undercloud ~]$ sudo yum install epel-release -y

Note : We can check the latest version of python2-tripleo-repos from RDO repository

Step:4) Install TripleO CLI package using yum command

[stack@undercloud ~]$ sudo yum install python-tripleoclient -y

Step:5) Copy & edit “undercloud.conf” sample file that suits to your env

[stack@undercloud ~]$ cp /usr/share/instack-undercloud/undercloud.conf.sample ~/undercloud.conf

Now edit ‘undercloud.conf‘ that suits to your environment, In my case I am adding the following content under “Default” Section

[stack@undercloud ~]$ vi undercloud.conf
[DEFAULT]
local_ip = 192.168.126.1/24
undercloud_public_vip = 192.168.126.2
undercloud_admin_vip = 192.168.126.3
local_interface = eth1
masquerade_network = 192.168.126.0/24
dhcp_start = 192.168.126.100
dhcp_end = 192.168.126.150
network_cidr = 192.168.126.0/24
network_gateway = 192.168.126.1
inspection_iprange = 192.168.126.160,192.168.126.199
generate_service_certificate = true
certificate_generation_ca = local
………………………………

Save and exit the file.

Step:6) Start undercloud installation using openstack command

Now start undercloud installation using below openstack command,

[stack@undercloud ~]$ openstack undercloud install

Once the installation is completed successfully, we will get the output something like below

Undercloud-installation-completed-message

Verify the OpenStack Service list

[stack@undercloud ~]$ source stackrc
(undercloud) [stack@undercloud ~]$ openstack service list
+----------------------------------+------------------+-------------------------+
| ID                               | Name             | Type                    |
+----------------------------------+------------------+-------------------------+
| 19f1261745004b31bc77dcb17a5ed4f5 | heat-cfn         | cloudformation          |
| 1bdd5dfbc36f444ebe62580d71f1a7ec | heat             | orchestration           |
| 2b39423f188b412d85bed43f112b35d7 | zaqar-websocket  | messaging-websocket     |
| 46f64d65be874718a1b2c123f588371b | keystone         | identity                |
| 605261da43d64395b72acc5309a22096 | mistral          | workflowv2              |
| 6f50fb704b224c1abc3c2a1a163eb73a | neutron          | network                 |
| 7110b7d7711a4aa1af6a3c13566be28f | zaqar            | messaging               |
| 7e41468745724ecfa8ed339137e8b700 | placement        | placement               |
| 853efa8a8acf403b827617725c3b7322 | ironic-inspector | baremetal-introspection |
| a5522e5df77343b99a0e47812323a17b | swift            | object-store            |
| b9bbb1a771704b57a0833d738bfb86e5 | glance           | image                   |
| d50fdfa25fb64c3e865c172754452ab1 | ironic           | baremetal               |
| e2ea283690c742d3a98bd1eae6f9b830 | nova             | compute                 |
+----------------------------------+------------------+-------------------------+
(undercloud) [stack@undercloud ~]$

This confirms that undercloud has been installed successfully. In the next article we will demonstrate how to import overcloud images in under cloud and how to create inventory file for overcloud servers and then we will see how we can deploy overcloud servers via undercloud.

Read More on: How to deploy TripleO Overcloud (Controller , Compute) on CentOS 7 VMs

In case this article helps you to understand how to install undercloud on CentOS 7 VM, please do share your feedback and comments.

43 thoughts on “How to Install Tripleo(Openstack on Openstack) UnderCloud on CentOS 7”

  1. Hi All,
    I am getting the below error “libfacter was not found”, Can anyone help,

    Thursday 02 July 2020 15:34:32 +0530 (0:00:00.064) 0:04:43.680 *********
    ===============================================================================
    Write kolla config json files ————————————————————————————————————————————————————————- 31.66s
    Run tripleo-container-image-prepare ——————————————————————————————————————————————————————- 28.28s
    Install ntpdate ————————————————————————————————————————————————————————————— 24.86s
    install tmpwatch on the host ————————————————————————————————————————————————————————– 22.16s
    container-registry : Docker | pause while Docker restarts ——————————————————————————————————————————————— 10.10s
    Ensure system is NTP time synced ———————————————————————————————————————————————————————– 9.29s
    Run async deployment NetworkDeployment —————————————————————————————————————————————————————– 7.66s
    Write docker config scripts —————————————————————————————————————————————————————————- 6.20s
    container-registry : Start Docker daemon ————————————————————————————————————————————————————— 3.87s
    Write per-step docker-container-startup-configs ——————————————————————————————————————————————————– 3.51s
    container-registry : Docker | reload docker ———————————————————————————————————————————————————— 3.19s
    Run deployment InstanceIdDeployment ——————————————————————————————————————————————————————– 2.81s
    Run deployment UndercloudAllNodesDeployment ———————————————————————————————————————————————————— 2.80s
    Run deployment UndercloudDeployment ——————————————————————————————————————————————————————– 2.78s
    Run deployment UndercloudAllNodesValidationDeployment ————————————————————————————————————————————————– 2.63s
    allow logrotate to read inside containers ————————————————————————————————————————————————————– 2.57s
    Run deployment UndercloudPreDeployment —————————————————————————————————————————————————————– 2.33s
    tripleo-bootstrap : Deploy required packages to bootstrap TripleO ————————————————————————————————————————————– 2.27s
    Run deployment UndercloudHostsDeployment ————————————————————————————————————————————————————— 2.21s
    Run deployment HostsEntryDeployment ——————————————————————————————————————————————————————– 2.17s
    Exception: Deployment failed
    Traceback (most recent call last):
    File “/usr/lib/python2.7/site-packages/tripleoclient/v1/tripleo_deploy.py”, line 1217, in _standalone_deploy
    raise exceptions.DeploymentError(‘Deployment failed’)
    DeploymentError: Deployment failed
    None
    ** Found ansible errors for undercloud deployment! **
    [
    [
    “Debug output for task: Run puppet host configuration for step 1”,
    {
    “changed”: false,
    “failed_when_result”: true,
    “_ansible_no_log”: false,
    “_ansible_verbose_always”: true,
    “outputs.stdout_lines | default([]) | union(outputs.stderr_lines | default([]))”: [
    “libfacter was not found. Please make sure it was installed to the expected location.”
    ]
    }
    ]
    ]

  2. Sanjib Das Pattanayak

    You need to downgrade leatherman packages by “yum downgrade leatherman”.
    I’m using i.e. rpm -qa | grep leatherman
    leatherman-1.3.0-9.el7.x86_64

    1. the downgrade leatherman is complete, but if run hit again $openstack undercloud install, the process install will be trigger to update package again, and so occur fail back

  3. Hi …
    I have created new network as external network and provisioning network (in virt kvm) and able to see it as virbr0 and virbr1… my issue is when I want to edit undercloud.conf,
    ===> local_interface = ? this is interface for provisioning right…so what interface should I add here? from my ifconfig interfaces I just have ens33 (to lan/internet), lo, virbr0 and virbr1 ..anyway I couldn’t find virbr0 and virbr1 interfaces in /etc/sysconfig/network-script . I’m bit confuse here…any help please. Thank you

  4. Hi..Can I just run single VM first to deploy undercloud? once complete create another VMs for computes and controller. Is it possible? Thank you

  5. Hi,
    I am installing the undercloud. In step 6 i am getting below error. Need your exepert help to resolve this issue
    $ sudo openstack undercloud install
    /usr/lib/python2.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.10.2) or chardet (3.0.4) doesn’t match a supported version!
    RequestsDependencyWarning)
    Traceback (most recent call last):
    File “/bin/openstack”, line 6, in
    from openstackclient.shell import main
    File “/usr/lib/python2.7/site-packages/openstackclient/shell.py”, line 22, in
    from osc_lib.api import auth
    File “/usr/lib/python2.7/site-packages/osc_lib/api/auth.py”, line 19, in
    from keystoneauth1.loading import base
    File “/usr/lib/python2.7/site-packages/keystoneauth1/loading/__init__.py”, line 13, in
    from keystoneauth1.loading import adapter
    File “/usr/lib/python2.7/site-packages/keystoneauth1/loading/adapter.py”, line 13, in
    from keystoneauth1 import adapter
    File “/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py”, line 16, in
    from keystoneauth1 import session
    File “/usr/lib/python2.7/site-packages/keystoneauth1/session.py”, line 25, in
    import requests
    File “/usr/lib/python2.7/site-packages/requests/__init__.py”, line 94, in
    from urllib3.exceptions import DependencyWarning
    ImportError: cannot import name DependencyWarning

    1. Hi,
      I hit the same error, and got the hint from this : ‘https://stackoverflow.com/questions/50202238/python-pip-requestsdependencywarning-urllib3-1-9-1-or-chardet-2-3-0-doe’

      Reinstall the urllib3 and chardet, and it works.

    2. Issue with openstck client :

      Solution: Install pip  (yum install python-devel python-pip) and
      upgrade request pacakge (sudo pip install –upgrade requests)

Leave a Comment

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