How to Install Single Node OpenStack on CentOS 7

OpenStack is a Cloud Software that manage large pool of compute (hypervisors), storage ( block & swift ) and network resources of a data center. It provides a Dashboard where admins can create and manage Projects (Tenants ) and give appropriate access to the project members , further on Project members can create VMs (Virtual Machine).

In this article we will install latest version of OpenStack ‘Liberty’ on CentOS 7 using rdo repositories. As per my setup i am using followings on my CentOS 7 Machine

  • Hostname = openstack.example.com
  • IP address = 192.168.1.3
  • netmask = 255.255.255.0
  • Gateway = 192.168.1.1
  • DNS = 192.168.1.254

Step:1 Set the hostname using hostnamectl command .

[root@localhost ~]# hostnamectl set-hostname "openstack.example.com"
[root@localhost ~]#

Step:2 Set the Selinux in Permissive Mode

[root@localhost ~]# setenforce 0

Edit the selinux config file ( /etc/sysconfig/selinux ) and set “SELINUX=permissive

[root@localhost ~]# grep permissive /etc/sysconfig/selinux
SELINUX=permissive
[root@localhost ~]#

Step:3 Disable firewalld & NetworkManager Service

[root@openstack ~]# systemctl stop firewalld
[root@openstack ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
[root@openstack ~]#
[root@openstack ~]# systemctl stop NetworkManager
[root@openstack ~]# systemctl disable NetworkManager
Removed symlink /etc/systemd/system/multi-user.target.wants/NetworkManager.service.
Removed symlink /etc/systemd/system/dbus-org.freedesktop.NetworkManager.service.
Removed symlink /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service.
[root@openstack ~]#

Step:4 Enable rdo repository for liberty packages.

Use below commands to update the system and enable rdo repository

[root@openstack ~]# yum update -y
[root@openstack ~]# yum install -y https://www.rdoproject.org/repos/rdo-release.rpm

Step:5 Install OpenStack PackStack Package

[root@openstack ~]# yum install -y openstack-packstack

Generate the answer file using below command.

[root@openstack ~]# packstack --gen-answer-file=/root/answer.txt
Packstack changed given value to required value /root/.ssh/id_rsa.pub

Edit the answer file “/root/answer.txt” , set the following parameters and leave rest of parameters as it is.

# NTP Server
CONFIG_NTP_SERVERS=<NTP_Server_IP>

# Disable Demo Version
CONFIG_PROVISION_DEMO=n

# Set KeyStone Admin Password or Admin user Password
CONFIG_KEYSTONE_ADMIN_PW=<password>

# Config Horizon over SSL
CONFIG_HORIZON_SSL=y

# Disable Nagios
CONFIG_NAGIOS_INSTALL=n

Note : In case if you don’t have NTP server in your setup then you can leave NTP parameter as it is.

Step:6 Start OpenStack installation using answer file.

[root@openstack ~]# packstack --answer-file /root/answer.txt

Once the installation is completed , we will get below message.

openstack-installation-packstack

After the installation a new interface “br-ex” will be created and assign the IP addess of eth0 or enp0s3 to br-ex .

[root@openstack ~]# cd /etc/sysconfig/network-scripts/
[root@openstack network-scripts]# cp ifcfg-enp0s3 ifcfg-br-ex
[root@openstack network-scripts]# vi ifcfg-enp0s3
DEVICE=enp0s3
HWADDR="08:00:27:8E:EA:56"
TYPE=OVSPort
DEVICETYPE=ovs
OVS_BRIDGE=br-ex
ONBOOT=yes

[root@openstack network-scripts]# vi ifcfg-br-ex
DEVICE=br-ex
DEVICETYPE=ovs
TYPE=OVSBridge
BOOTPROTO=static
IPADDR=192.168.1.3
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DNS1=192.168.1.254
ONBOOT=yes

In above files please change the IP details, Hardware address and Device name as per your setup.

When we restart the network service , it will add “enp0s3” as a port in br-ex OVS bridge.

[root@openstack network-scripts]# systemctl restart network
[root@openstack network-scripts]#

Please take a reboot and check whether settings are persistent or not.

Step:7 Now Access OpenStack Dashboard.

When the installation is completed a dashboard link was provided on the screen , in My Case it is “https://192.168.1.3/dashboard”

Liberty-OpenStack-Dashboard jpg

Use the user name as “admin” and password that we set for keystone admin user in answer file.

Instance-Overview- OpenStack-Dashboard

As we are able to login in Dashboard , so OpenStack installation part is completed. Now our next task is to “Launch an Instance from OpenStack Dashboard

Share Now!

47 thoughts on “How to Install Single Node OpenStack on CentOS 7”

  1. ERROR : Error appeared during Puppet run: 192.168.45.179_chrony.pp
    Error: /usr/sbin/ntpdate pool.ntp.org returned 1 instead of one of [0]

    Reply
  2. Hi Pradeep,

    Thanks for the valuable article.
    Could you let me know how I can add additional IP address to the openstack?
    For test I am using private IP address.

    Reply
  3. Hi Pradeep,

    After the open stack installation as you said.

    >>> After the installation a new interface “br-ex” will be created and assign the IP addess of eth0 or enp0s3 to br-ex .
    cp ifcfg-enp0s3 ifcfg-br-ex
    But I am not seeing a file name with ifcfg-enp0s3 under the folder network-scripts

    Reply
    • Hi Rinshad ,

      What OS version you are using ? and paste the content of directory (/etc/sysconfig/network-scripts). In case of CentOS 7.X & RHEL 7.X we have a interface file either with name “ifcfg-enp0s3” or ifcfg-eth0/1/2′ under the directory ‘/etc/sysconfig/network-scripts/’.

      Reply
      • Hi Pradeep,

        I am using Centos.7.1. Here is network-scripts folder contents.

        network-scripts]# ls
        ifdown ifdown-ippp ifdown-post ifdown-Team ifup-aliases ifup-ippp ifup-plip ifup-routes ifup-tunnel network-functions-ipv6
        ifcfg-eno1 ifdown-bnep ifdown-ipv6 ifdown-ppp ifdown-TeamPort ifup-bnep ifup-ipv6 ifup-plusb ifup-sit ifup-wireless
        ifcfg-lo ifdown-eth ifdown-isdn ifdown-routes ifdown-tunnel ifup-eth ifup-isdn ifup-post ifup-Team init.ipv6-global
        ifcfg-Profile_1 ifdown-ib ifdown-ovs ifdown-sit ifup ifup-ib ifup-ovs ifup-ppp ifup-TeamPort network-functions

        Reply
        • Rinshad ,

          In your case interface file name is ‘ifcfg-eno1’ , in the above document try to use ‘ifcfg-eno1’ instead of ‘ifcfg-enp0s3’

          Reply
  4. when i am using this command yum install -y ‘https://www.rdoproject.org/repos/rdo-release.rpm’
    i am getting this error:
    Loaded plugins: fastestmirror, langpacks
    Cannot open: ‘https://www.rdoproject.org/repos/rdo-release.rpm’ Skipping.
    Error: Nothing to do

    can u please tell me why it is like this.

    Reply
  5. Nice article all steps are working properly.

    some rpms need to be download from epel and centos plus repository 🙂

    Reply
  6. I cannot access to external network from instances that I launched in openstack environment. I have mapped it corectly but still cannot ping is threre a way you can show us how to map it our virtual netwotk to external network. It will be so helpfull.

    Reply
  7. Hi Kumar,

    i have error like this when install openstack:
    ERROR : Error appeared during Puppet run: 10.10.66.60_provision_glance
    Error: Execution of ‘/usr/bin/openstack image create –format shell cirros –public –container-format=bare –disk-format=qcow2 –copy-from=http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img’ returned 1: 400 Bad Request: The HTTP URL is invalid: HTTPConnectionPool(host=’download.cirros-cloud.net’, port=80): Max retries exceeded with url: /0.3.4/cirros-0.3.4-x86_64-disk.img (Caused by NewConnectionError(‘<requests.packages.urllib3.connection.HTTPConnection object at 0x6e9cf50>: Failed to establish a new connection: [Errno 113] EHOSTUNREACH’,)) (HTTP 400)
    what is impact for my environment?and any resolution? ^_^
    Regards

    Reply
  8. failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try.
    ‘http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml’: [Errno -1] Erro r importing repomd.xml for base: Damaged repomd.xml file
    ++ t

    Getting this error when trying to Start OpenStack installation using answer file, if anyone can help me here.

    Reply
  9. after finishing the installation, i must have an internet connection to access the dashboard. what should i do to make it as an offline server? please help me. thanks before.

    Reply
  10. The only available attributes in the file eno1 are these. I changed the ‘TYPE’ and the ‘ONBOOT’ thing. Do I need to add the other stuff myself?

    TYPE=OVS
    BOOTPROTO=dhcp
    DEFROUTE=yes
    PEERDNS=yes
    PEERROUTES=yes
    IPV4_FAILURE_FATAL=no
    IPV6INIT=yes
    IPV6_AUTOCONF=yes
    IPV6_DEFROUTE=yes
    IPV6_PEERDNS=yes
    IPV6_PEERROUTES=yes
    IPV6_FAILURE_FATAL=no
    NAME=eno1
    UUID=0b0f4400-2b25-4637-9ead-0aa3df178b0e
    DEVICE=eno1
    ONBOOT=yes

    Reply
    • You have to keep following stuff in the file “ifcfg-eno1”

      DEVICE=eno1
      HWADDR=’MAC-Address-Here’
      TYPE=OVSPort
      DEVICETYPE=ovs
      OVS_BRIDGE=br-ex
      ONBOOT=yes

      then create a new file with the name “ifcfg-br-ex”

      DEVICE=br-ex
      DEVICETYPE=ovs
      TYPE=OVSBridge
      BOOTPROTO=static
      IPADDR= ‘IP-Address-Here’
      NETMASK=’Subnet-Mask-Here’
      GATEWAY=’gateway-IP-Here’
      DNS1=’dns-Server-IP-Address-Here’
      ONBOOT=yes

      Restart the network service

      Reply
  11. Hello,

    Thanks for the great article. Could you please share the interface details of the VM. How many interfaces should I create? I created 2 interfaces. 1 with NAT with IP 10.0.2.15 and other with HOST-ONLY Adapter with IP 192.168.1.30. But in my answer file I configured the 10.0.2.15 as the IPs for controller. The packstack was successful but I am not able to access Horizon on the 10.0.2.15. Could you please help?

    Regards
    Ankur

    Reply
    • Hello Ankur ,

      Basically You can keep two interfaces for each node( Host-only and bridge). Specify the IP address of host only interface in the answers file for your respective nodes. All the openstack management API communication will be done via host only network. You can access the each node and dashboard from the outside using bridge interface ip address.
      So in your setup change NAT mode to bridge mode for the interface and assign the ip address as per your setup and try accessing the Dashboard

      Reply
      • Thank you Pradeep. For the single node setup, I added a port forwarding rule and it worked. Now I can access the horizon. But the multinode, because of the lack of resources my setup is a little chaotic.
        I have a virtual box with 2 vms in a physical host and in another physical host, I have another vm inside the virtual host. The problem now is that the vms in different virtual boxes can communicate only via the bridge. In that case the bridge has to be used for the openstack Management API communication?

        Reply
        • Yes Ankur ,When the VMs are hosted in different virtualbox then Bridge will be used for Openstack Management API communication.

          Reply
  12. Hello,

    I’m getting some problems. I can’t use keystone command, it says it not exists. I can’t create a network because it says it needs a plugin to get an auth token or it gives me error 401.If someone can help i’m really in need.

    Thank you.

    Reply
  13. Hello,

    Please help me,
    After exec command: packstack –answer-file /root/answer.txt
    I get stuck in this line:
    Applying 192.168.1.2_controller.pp
    Testing if puppet apply is finished: 192.168.1.2_controller.pp []

    May you guide me how to slove it?

    Thanks all,

    Reply
  14. i also has same issue
    I get stuck in this line:
    Applying 192.168.1.2_controller.pp
    Testing if puppet apply is finished: 192.168.1.2_controller.pp []

    Reply
  15. Thanks for the great article. I am facing some problem , the installation gets stuck up at Testing if puppet apply is finished: 192.168.0.250_controller.pp. Could you please help me .

    Reply
    • Hi Neeta,

      Which Openstack version you are trying to install and if possible share the error logs of your installation.

      Reply
      • I have the same problem and i dont know how much time do the server needs to past that point:

        Testing if puppet apply is finished: 192.168.1.130_controller.pp

        Always happens even with the option all in one , and i have the same repos as the example , i have followed all the steps that the tutorial says…. could you help us?

        Reply
        • Can you share the what exactly error are getting in log file. Whenever we start OpenStack installation, it gives the log file where you can track error logs.

          Reply
          • I have changed the openstack version , and it works ! And furthermore with 2gb of ram is not posible to start the dashboard correctly . However the explanation that you give us is very useful. thanks

  16. Hi Pradeep,
    I got the following error while running “packstack –answer-file /root/answer.txt”
    Applying 192.168.2.20_controller.pp
    192.168.2.20_controller.pp: [ ERROR ]
    Applying Puppet manifests [ ERROR ]
    ERROR : Error appeared during Puppet run: 192.168.2.20_controller.pp
    Error: Systemd start for httpd failed!

    Reply
      • Hi Pradeep,
        Still getting the error, This time it is a different error. Formatted the system three time. Can I get your mailID so that I can send the answer and log files. Please inbox me your contact in [email protected]

        192.168.122.18_controller.pp: [ ERROR ]
        Applying Puppet manifests [ ERROR ]

        ERROR : Error appeared during Puppet run: 192.168.122.18_controller.pp
        Error: Systemd start for openstack-nova-scheduler failed!
        You will find full trace in log /var/tmp/packstack/20170804-081704-YgDakK/manifests/192.168.122.18_controller.pp.log
        Please check log file /var/tmp/packstack/20170804-081704-YgDakK/openstack-setup.log for more information

        Thanks

        Reply
      • Hi Pradeep,

        I getting this error again after formating

        192.168.122.18_controller.pp: [ ERROR ]
        Applying Puppet manifests [ ERROR ]
        ERROR : Error appeared during Puppet run: 192.168.122.18_controller.pp
        Error: Systemd start for openstack-nova-scheduler failed!
        You will find full trace in log /var/tmp/packstack/20170816-032557-UHamKh/manifests/192.168.122.18_controller.pp.log

        Can you suggest how much RAM is required for the running “packstack”. Thanks

        Reply
  17. Hi Pradeep, thank you so much for offering this wonderful article, i’ve successfully installed my openstack on my computer. but i’ve got two questions about it, please take a look when you’re free, thanks again:
    No.1: at step 5, ediiting the answer file, about the option ‘CONFIG_HORIZON_SSL’, if i set ‘y’, i got a error during the installion, which prompts ” ERROR : [Errno 2] No such file or directory: ‘/etc/pki/tls/certs/selfcert.crt’ “; so i have to set ‘n’, then the installion succeeds. so what the meaning of this option? is there any problem that i set ‘n’?

    No.2: i’ve not done the step 6, i can still access my dashboard link, is there any problem that ignoring this step?

    Reply
    • Hi ,

      Answer of your queries:

      1) “CONFIG_HORIZON_SSL =n” means your openstack dashboard will open on http protocol. Communication between your web browser and Dashboard will be non-secure.
      2) In case you skip step-6 then you can not access the VMs from outside with floating IPs.

      Reply
      • Hi, i’ve done the step-6, got another question: my initial ip is 192.168.99.141, dhcp, after adding this new interface br-ex, restarting the network and rebooting, my initial ip becomes 192.168.99.143, i can stilll access my dashboard link, is this normal?

        Reply
  18. Ho,thank you for important information, i have error when i try to install Openstack the error,

    192.168.241.131_controller.pp: [ ERROR ]
    Applying Puppet manifests [ ERROR ]

    ERROR : Error appeared during Puppet run: 192.168.241.131_controller.pp
    Error: Systemd start for rabbitmq-server failed!
    You will find full trace in log /var/tmp/packstack/20171209-092211-WXcI0W/manifests/192.168.241.131_controller.pp.log
    Please check log file /var/tmp/packstack/20171209-092211-WXcI0W/openstack-setup.log for more information

    Can you help with this error
    Thank you

    Reply
  19. Administrators will learn to use the docker command to start, stop, query, and list installed services. Containerizing services allows OpenStack to scale easily and quickly, to be more resilient, and to more easily handle configuration management and upgrades.

    Reply
  20. ERROR : Error appeared during Puppet run: 192.168.122.159_controller.pp
    Error: Systemd start for openstack-nova-scheduler failed!
    You will find full trace in log /var/tmp/packstack/20181123-111257-PlzWbP/manifests/192.168.122.159_controller.pp.log

    I get this error. Could you please help?

    Reply
  21. I am facing this below error: how can I solve it????

    [root@osboxes ~]# yum install -y openstack-packstack
    RDO CentOS-7 – QEMU EV 18 kB/s | 18 kB 00:01
    OpenStack Train Repository 288 kB/s | 4.4 MB 00:15
    Error:
    Problem: cannot install the best candidate for the job
    – nothing provides PyYAML needed by openstack-packstack-1:15.0.1-1.el7.noarch
    – nothing provides python-netifaces needed by openstack-packstack-1:15.0.1-1.el7.noarch
    – nothing provides python-docutils needed by openstack-packstack-1:15.0.1-1.el7.noarch
    (try to add ‘–skip-broken’ to skip uninstallable packages or ‘–nobest’ to use not only best candidate packages)
    [root@osboxes ~]#

    Reply

Leave a Comment