How Tos, OpenStack

Three-Node OpenStack Juno Deployed on Public Cloud – Part 2

In part 1 of this series I described how to prepare your environment. In this blog post I’ll get into details with the installation of your Controller, Network and Compute nodes.

The following commands should executed on all nodes.

We’ll log first with the root or any other user provided by our public cloud operator and change the password to one we can easily remember

passwd root/username

Screen Shot 2015-03-15 at 7.56.15 AM

We’ll install our favourite packages. In my case vim (nano is simply cramping my style)

apt-get install vim [your favourite package to use]

And before rebooting we’ll make sure our packages and kernel are up-to-date

apt-get update && apt-get dist-upgrade

Time to reboot

reboot

Now it’s time for some network setting. First we’ll modify /etc/hosts.conf to include our domain and host name. The installation guide uses only the host name. I’ll use a FQDN (fully qualified domain name) as it’s a better practice.

At this point we can ping using the FQDN each node and make sure our connectivity is fine. Example from our Controller node.

root@controller:~# ping -c 2 network.openstack.local
PING network (10.114.132.196) 56(84) bytes of data.
64 bytes from network (10.114.132.196): icmp_seq=1 ttl=64 time=0.855 ms
64 bytes from network (10.114.132.196): icmp_seq=2 ttl=64 time=0.210 ms

root@controller:~# ping -c 2 compute.openstack.local
PING network (10.114.132.197) 56(84) bytes of data.
64 bytes from network (10.114.132.197): icmp_seq=1 ttl=64 time=0.840 ms
64 bytes from network (10.114.132.197): icmp_seq=2 ttl=64 time=0.215 ms

The installation guide make changes to the Network node external interface but at this point I leave it as is.

Follow the changes required in the installation guide for /etc/ntp.conf and make sure it works correctly. NTP that doesn’t work well will lead to many issues later. You’ll have to trust me about this one.

Next, changes to /etc/sysctl.conf for both the Compute and Network nodes can be done now.

Just to be on the safe side I recommend executing again:

apt-get update

Next OpenStack Ubuntu repository configuration. Make sure this is done on all nodes otherwise you’ll have some inconstancies with your OpenStack components.

# apt-get install ubuntu-cloud-keyring
# echo "deb http://ubuntu-cloud.archive.canonical.com/ubuntu" \
  "trusty-updates/juno main" > /etc/apt/sources.list.d/cloudarchive-juno.list

From here till the end of this part of the post all of our modifications are on the Controller node.

Follow the steps required for database configuration in the installation guide and make sure you modify/etc/mysql/my.cnf (on the controller only).

Message Broker steps are next.

Change to /etc/rabbitmq/rabbitmq.config seems to be not required. As I got the following (earlier version than 3.3.0)

# rabbitmqctl status | grep rabbit

Status of node 'rabbit@controller' ...

{running_applications,[{rabbit,"RabbitMQ","3.2.4"},

Now that we have the database server, MariaDB, running we can actually create databases and users and save some time after by running the following script. Replace pswd with your own desired password and add any other service (e.g. Cinder) you’ll may use in your environment :
mysql -u root -p <<EOF
CREATE DATABASE nova;
CREATE DATABASE glance;
CREATE DATABASE keystone;
CREATE DATABASE neutron;
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' IDENTIFIED BY 'pswd';
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' IDENTIFIED BY 'pswd';
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY 'pswd';
GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' IDENTIFIED BY 'pswd';
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' IDENTIFIED BY 'pswd';
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' IDENTIFIED BY 'pswd';
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY 'pswd';
GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' IDENTIFIED BY 'pswd';
FLUSH PRIVILEGES;
EOF

Keystone (Identity Service)

Make sure you follow all the related Keystone installation steps and make the required modifications to /etc/keystone/keystone.conf.

Create users tenant and roles as described in the guide.

For creating services and API-endpoints we can again run everything in a script for all our services and API-points (unfortunately, I haven’t used any but you can look at the references section below for some ideas) and save some time making sure we are using FQDNs.

Follow the verify operation and create script environments to all nodes to allow queries from everywhere.

Glance (Image Storage Service)

Follow the steps required to configure glance (excluding the database related). Make sure you modify /etc/glance/glance-api.conf and /etc/glance/glance-registry.conf. Check the verify operation section and upload CirrOS image or any other.

We have made all the required preparations for our 3 nodes and installed the Keystone and Glance services. We have to follow the required steps for Nova (compute), Neutron (network) and Horizon (GUI/dashboard) before we have our OpenStack environment running. Move on to part 3 of this series to see how it’s done.

References:
http://tinyurl.com/nh4wwkm
http://intocloud.org/openstack-juno-with-three-node-setup-on-ubuntu-14-04-lts/
http://behindtheracks.com/2014/11/openstack-juno-scripted-install-with-neutron-on-centos-7/

Advertisements

2 thoughts on “Three-Node OpenStack Juno Deployed on Public Cloud – Part 2

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s