Skip to content

Red Hat OpenStack Platform 7 Director (OSP director) cli simple install part 1

  • by

As you might know Red Hat released a new version of the OpenStack (Kilo) installer based on tripleO and Ironic. One of the reason why Red Hat went with tripleO and ironic is that you will be able to extend and upgrade an existing OSP 7 environment. Part 1 of the blog series is about setting up OSP director.

First we need to install the OSP director node. In my case I am going to have to following base setup:

RHEL OSP7 Network Diagram - RHEL OSP7 Network Distribution (Copy)

If you are lazy and want it up and running without much typing, here is an install script:
OSP director install script

1. First we need to create the stack user and allow stack to execute commands as root

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

2. Setup the Hostname in /etc/hosts   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6 ospdirector

3. Set the hostname on the command line

[root@ospdirector ~]# hostnamectl set-hostname
[root@ospdirector ~]# hostnamectl set-hostname --transient

4. Enable ip forwarding

[root@ospdirector ~]# echo "net.ipv4.ip_forward = 1" > /etc/sysctl.d/99-ipforward.conf
[root@ospdirector ~]# sysctl -p /etc/sysctl.d/99-ipforward.conf

5. Subscribe to the right channels

[root@ospdirector ~]# subscription-manager register -u $RHNUSER -p $RHNPASSWORD
[root@ospdirector ~]# subscription-manager attach --pool=$POOLID
[root@ospdirector ~]# subscription-manager repos --disable='*'
[root@ospdirector ~]# subscription-manager repos --enable=rhel-7-server-rpms --enable=rhel-7-server-optional-rpms --enable=rhel-7-server-extras-rpms --enable=rhel-7-server-openstack-7.0-rpms --enable=rhel-7-server-openstack-7.0-director-rpms

6. Update your system and reboot

[root@ospdirector ~]# yum update -y
[root@ospdirector ~]# reboot

7. Create the instack-certs dir

[root@ospdirector ~]# mkdir -p /etc/pki/instack-certs

8. Create the directories /home/stack/images and /home/stack/templates

[root@ospdirector ~]# mkdir -p /home/stack/{images,templates} 
[root@ospdirector ~]# chown -R stack.stack /home/stack

9. ALL next steps need to be done as user stack install the python-rdomanager-oscplugin.

[stack@ospdirector ~]$ sudo yum install -y python-rdomanager-oscplugin

10. Copy the undercloud.conf into the stacks home dir

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

11. Create the SSL keys for the undercloud

[stack@ospdirector ~]$ openssl genrsa -out privkey.pem 2048
[stack@ospdirector ~]$ openssl req -new -x509 -key privkey.pem -out cacert.pem -days 365
[stack@ospdirector ~]$ cat cacert.pem privkey.pem > undercloud.pem

12. As root perform the following steps

[root@ospdirector ~]# cp /home/stack/undercloud.pem /etc/pki/instack-certs/
[root@ospdirector ~]# semanage fcontext -a -t haproxy_exec_t /etc/pki/instack-certs(/.*)?
[root@ospdirector ~]# restorecon -R /etc/pki/instack-certs

13. Now that we have done all the pre work we can now proceed with editing the /home/stack/underlcoud.conf. Make sure to change the following lines within the undercloud.conf as user stack.

image_path = /home/stack/images
local_ip =
undercloud_public_vip =
undercloud_admin_vip =
local_interface = enp2s4
masquerade_network =
dhcp_start =
dhcp_end =
network_cidr =
network_gateway =
discovery_interface = br-ctlplane
discovery_iprange =,
discovery_runbench = true
undercloud_debug = true

14. Leave everything as it is in the auth section for now.

15. As user stack launch the install. Once your done you only will be able to access the actual undercloud via pxe network. If you want to make this accessable for anywhere you need to edit the /etc/openstack-dashboard/local_settings.

[stack@ospdirector ~]$ openstack undercloud install

And you might want to change the allowed_hosts param in local_settings to


16. You should know be able to login to your horizon dashboard. To get the admin password run

[root@ospdirector ~]# hiera admin_password


17. Next we will have to download the following images from—7/7.0/x86_64/product-downloads
Deployment Ramdisk for RHEL-OSP director 7.0
Discovery Ramdisk for RHEL-OSP director 7.0
Overcloud Image for RHEL-OSP director 7.0

[stack@ospdirector ~]$ cd ~/images
[stack@ospdirector ~]$ wget "" -O deploy-ramdisk-ironic-7.0.0-32.tar
[stack@ospdirector ~]$ tar -xvf deploy-ramdisk-ironic-7.0.0-32.tar
[stack@ospdirector ~]$ wget "" -O discovery-ramdisk-7.0.0-32.tar
[stack@ospdirector ~]$ tar -xvf discovery-ramdisk-7.0.0-32.tar
[stack@ospdirector ~]$ wget "" -O overcloud-full-7.0.0-32.tar
[stack@ospdirector ~]$ tar -xvf overcloud-full-7.0.0-32.tar

18. Upload the images to glance in the undercloud and check if the images are there

[stack@ospdirector ~]$ source ~/stackrc
[stack@ospdirector ~]$ openstack overcloud image upload
[stack@ospdirector ~]$ openstack image list
| ID                                   | Name                   |
| 11a4d0a3-7c00-42d2-ba86-8f75317aea10 | bm-deploy-ramdisk      |
| 15f8a2f3-0da9-482e-95c9-72e548871b3f | bm-deploy-kernel       |
| 5ad61c3e-9ea6-461e-bcba-dfa93c7113f4 | overcloud-full         |
| 39a6a2d6-0e2e-4105-8d30-340439e0fd63 | overcloud-full-initrd  |
| 5b9c986d-4465-48a6-a14f-7105c1c4e2d3 | overcloud-full-vmlinuz |

19. Set the nameserver for the overcloud

[stack@ospdirector ~]$ neutron subnet-list
| id                                   | name | cidr           | allocation_pools                                |
| 5f28722a-96b4-4f27-b616-248cbfe5a432 |      | | {"start": "", "end": ""} |

[stack@ospdirector ~]$ neutron subnet-update 5f28722a-96b4-4f27-b616-248cbfe5a432  --dns-nameserver

Your OSP Director setup is now complete. The next part will explain how you will be able to discover your hosts, setup flavors and deploy the test cloud.