Dec 11, 2016

Installing OpenStack ‘Newton’ on Multi-node in CentOS 7 or Read Hat Linux


This guide will walk you through the steps to install OpenStack 'Newton' on three different nodes on CentOS 7 or Red Hat enterprise Linux. OpenStack Newton has been released on October 6th 2016 and it is the 14th release from openstack developers.






What's New in 'Newton' Release

  • Enhanced Scalability : It offers scale-up/scale-down capabilities in Nova, Horizon, and Swift.
  • Introduction of Magnum : It provides the container orchestration tools via docker Swarm, Kubernetes and Mesos
  • Improvement in bare metal provisioning and it adds multi-tenant networking and integration with magnum.


Testing Environment

Node Hostname IP Address
Controller controller.example.com 192.168.1.70
Compute compute.example.com 192.168.1.80
Network network.example.com 192.168.1.90


You should have completed minimal installation of CentOS 7 or Red Hat on all three nodes and have configured hostname and ip address according to your environment using the above examples.


STEP1 - Updating All Three Nodes

Update the controller, compute and network node by executing the following command and reboot them.
[root@controller ~]# yum update -y ; reboot
[root@compute ~ ]# yum update -y ; reboot
[root@network ~ ]# yum update -y ; reboot
Edit the /etc/hosts file on each node and set the following entries if you don't have local DNS server in your environement
[root@controller ~]# vi /etc/hosts
192.168.1.70 controller.example.com controller
192.168.1.80 compute.example.com compute
192.168.1.90 network.example.com network
[root@compute ~]# vi /etc/hosts
192.168.1.70 controller.example.com controller
192.168.1.80 compute.example.com compute
192.168.1.90 network.example.com network
[root@network ~]# vi /etc/hosts
192.168.1.70 controller.example.com controller
192.168.1.80 compute.example.com compute
192.168.1.90 network.example.com network
Save and Close



STEP2 - Stop, Disable Firewalld and Network Manager Service


To stop and disable firewalld and NetworkManager Service on all three nodes, execute the following commands one by one
systemctl stop firewalld
systemctl disable firewalld
systemctl stop NetworkManager
systemctl disable NetworkManager
Disable SELinux by executing the following command
setenforce 0 ; sed -i 's/=enforcing/=disabled/g' /etc/sysconfig/selinux


STEP3 - Configuring Password-less SSH from controller to compute and network node.

You need to execute the following commands from controller node to configure the password less ssh access 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
Now verify password less access from Controller node by accessing compute and network node through ssh
[root@controller ~]# ssh root@compute.example.com
Last login: Sat Oct 8 08:26:46 2016 from controller.example.com
[root@compute ~]#

[root@controller ~]# ssh root@network.example.com
Last login: Sat Oct 8 08:27:27 2016 from controller.example.com
[root@network ~]#
and password less configuration is working fine.

STEP4 - Add OpenStack Newton Repository

Here you need to execute the following command on controller node to add CentOS 7/RHEL Openstack Newton repository.
[root@controller ~]# yum install centos-release-openstack-newton -y
[root@controller ~]# yum update -y
Lets install Packstack utility on controller node by executing the following command
[root@controller ~]# yum install openstack-packstack -y



STEP5 - Generating/Updating Openstack answer file

Now you need to execute following packstack command on controller node to generate answer file.

[root@controller ~]# packstack --gen-answer-file=/root/newton-answer.txt
[root@controller ~]#
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_CONTROLLER_HOST=192.168.1.70
CONFIG_COMPUTE_HOSTS=192.168.1.80
CONFIG_NETWORK_HOSTS=192.168.1.90
CONFIG_PROVISION_DEMO=n
CONFIG_CEILOMETER_INSTALL=n
CONFIG_NTP_SERVERS=125.62.193.121
CONFIG_KEYSTONE_ADMIN_PW=
.............................................................................


STEP6 - Installing OpenStack 'Newton'

You need to execute the following command from the controller node to start the openstack installation.
[root@controller ~]# packstack --answer-file=/root/newton-answer.txt
Upon Successfully Installation , you will get following message.

STEP7 - Login to OpenStack Dashboard
Open up your favorite web browser and access dashboard by visiting your controller node ip address or hostanme. My controller node url is http://192.168.1.70/dashboard
Use the user name as admin and the password which you specify in the answer file under the “CONFIG_KEYSTONE_ADMIN_PW” parameter.

OpenStack Newton Dashboard




STEP8 - Applying Network Configuration on Network Node

During openstack installation, bridge (br-ex) interface will be created on network node. Add interface (enp0s3 or eth0) in bridge br-ex as a port and assign the ip address of enp0s3 or eth0 to br-ex as shown below.
[root@network ~]# cd /etc/sysconfig/network-scripts/
[root@network network-scripts]# cp ifcfg-enp0s3 ifcfg-br-ex
[root@network network-scripts]# vi ifcfg-enp0s3
DEVICE=enp0s3
HWADDR=08:00:27:4b:53:57
TYPE=OVSPort
DEVICETYPE=ovs
OVS_BRIDGE=br-ex
ONBOOT=yes
Save and close 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 and exit the file
Now restart the network service to update the changes
[root@network network-scripts]# systemctl restart network
[root@network network-scripts]#
Now verify ip configuration
[root@network network-scripts]# ovs-vsctl show







Conclusion

We have completed the basic installation of OpenStack Newton on CentOS 7. Next task is to create projects, users, network, flavors and upload cloud images and start launching the VM instances using cloud images. To accomplish these steps, you need perform step 9 to last mentioned in this guide.

Post a Comment

 
TECHNOCRACY © 2012-2017