Posted on Leave a comment

Multi Node OpenStack Installation Steps on CentOS 7

In this article we are going to install OpenStack ‘Newton’ on three nodes running on CentOS 7 using packstack script. Below is the details of my setup,

  • Node1 = controller.example.com (192.168.1.70)
  • Node2= compute.example.com (192.168.1.80)
  • Node3 = network.example.com (192.168.1.90)

Note: I am assuming Minimal CentOS 7 is installed and hostname is also set as per above specification in all the nodes.

Step:1 Update the Servers using yum command

Update the controller, compute and network node using below yum command and reboot them. Run the below command on all the nodes.

~]# yum update -y ; reboot

Edit the Hosts file on each server and set the below entries in case you don’t your local DNS server.

192.168.1.70 controller.example.com controller
192.168.1.80 compute.example.com compute
192.168.1.90 network.example.com network

Step:2 Stop and disable firewalld & NetworkManager Service

Execute the beneath commands one after the another to stop and disable firewalld and NetworkManager Service on all nodes.

~]# systemctl stop firewalld 
~]# systemctl disable firewalld
~]# systemctl stop NetworkManager
~]# systemctl disable NetworkManager
~]#ifup enp0s3

Disable SELinux using below command

~]# setenforce 0 ; sed -i 's/=enforcing/=disabled/g' /etc/sysconfig/selinux

Step:3 Configure passwordless ssh from controller to compute and network node.

Execute the below commands from controller node to configure passwordless ssh from controller to network and compute node.

[root@controller ~]# ssh-keygen 
[root@controller ~] # ssh-copy-id root@compute.example.com
[root@controller ~] # ssh-copy-id root@network.example.com

Verify whether  passwordless ssh is working from Controller node or not.

[root@controller ~]# ssh root@compute.example.com Last login: Sat Oct 8 08:26:46 2016 from controller.example.com 


# [[root@controller ~]# ssh root@network.example.com Last login: Sat Oct 8 08:27:27 2016 from controller.example.com

Step:4 Set OpenStack Newton Repository and install packstack utility.

Run the below command on controller node to set CentOS 7 Openstack Newton repository.

[root@controller ~]# yum install centos-release-openstack-newton -y 
[root@controller ~] # yum update -y

Install Packstack utility on controller node using following yum command

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

Step:5 Generate and update Openstack answer file

Execute below packstack command on controller node to generate answer file

[root@controller ~]# packstack --gen-answer-file=/root/newton-answer.txt

Update the answer file as per your architecture. In my case i have updated the following entries in my newton-answer.txt file.

[root@controller ~]# vi /root/newton-answer.txt 
.........................
CONFIG_NTP_SERVERS=0.pool.ntp.org,1.pool.ntp.org,2.pool.ntp.org CONFIG_COMPUTE_HOSTS= 10.0.2.8,10.0.2.9,10.0.2.10
CONFIG_KEYSTONE_ADMIN_PW=password CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS=openvswitch CONFIG_NEUTRON_ML2_TYPE_DRIVERS=vlan CONFIG_NEUTRON_ML2_TENANT_NETWORK_TYPES=vlan CONFIG_NEUTRON_ML2_VLAN_RANGES=physnet1:1000:2000 CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS=physnet1:br-eth1
CONFIG_CONTROLLER_HOSTS=10.0.2.8,10.0.2.9,10.0.2.10
CONFIG_COMPUTE_HOSTS=10.0.2.8,10.0.2.9,10.0.2.10
CONFIG_NETWORK_HOSTS=10.0.2.8,10.0.2.9,10.0.2.10
CONFIG_PROVISION_DEMO=n
CONFIG_CEILOMETER_INSTALL=Y
CONFIG_NTP_SERVERS=125.62.193.121
CONFIG_KEYSTONE_ADMIN_PW=<Specify_Password_for_Keystone_Admin> .........................................................................

Step:6 Start the newton openstack installation using packstack

Run the beneath command from the controller node to start the openstack installation

[root@controller ~]# packstack --answer-file=/root/newton-answer.txt

Once the Installation is Completed Successfully , we will get below message.

newton-successfully-installed-screen

Step:7 Login to Newton Horizon Dashboard

When the installation is completed successfully then Dashboard URL is provided on the Screen as shown in above screenshot. So in my case Dashboard url is “http://192.168.1.70/dashboard” , Use the user name as admin and the password which we specify in the answer file under the “CONFIG_KEYSTONE_ADMIN_PW” parameter.

login-openstack-newton-dashboard
overview-openstack-newton-dashboard

Step:8 Do the network Configuration on Network Node

When the openstack installation is completed bridge (br-ex) interface will be created on network node. Add interface (enp0s3 or ethx) in bride br-ex as a port and assign the ip address of enp0s3 or ethx to br-ex . To accomplish this do the below mentioned steps on the network node.

[root@network ~]# cd /etc/sysconfig/network-scripts/ 
[root@network ~] # cp ifcfg-enp0s3 ifcfg-br-ex
[root@network ~] # vi ifcfg-enp0s3
DEVICE=enp0s3
HWADDR=08:00:27:4b:53:57
TYPE=OVSPort
DEVICETYPE=ovs
OVS_BRIDGE=br-ex
ONBOOT=yes

Save & exit the file

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

Save &exit the file

Restart the network Service to take the above changes into the effect.

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

Now Verify whether the IP address of enp0s3 is assigned to br-ex using ifconfig command

ifconfig-openstack-newton

Also verify whether a port has been added in OVS bridge interface br-ex using ovs-vsctl command.

[root@network network-scripts]# ovs-vsctl show
ovs-vsctl-command-output

That’s all Basic installation of Openstack Newton is completed Now. Next step is create projects, users, network and flavors and upload cloud images and then start launching the VM instances using cloud images.

Leave a Reply

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