OpenStack is an open source cloud computing platform, provides solution for infrastructure as a service. OpenStack consists of multiple component put together for providing IaaS, components are listed below with its use.
|Compute||(Nova)||Manages virtual machines|
|Object Storage||(Swift)||Manages storage across cloud|
|Block Storage||(Cinder)||Manages storage to compute instance|
|Networking||(Neutron)||Manages networking and ip addresses|
|Dashboard||(Horizon)||Provide graphical web interface to manage resources|
|Identity Service||(Keystone)||Manages authentication system across cloud|
|Image Service||(Glance)||Provides disk and server images (Template)|
|Orchestration||(Heat)||Provides orchestration function|
As for as infrastructure is concern, we are going to use OpenStack networking (neutron), total of three Ubuntu instance will be used here, will act as Controller, Network and Compute Node.
OpenStack recommends below minimum configurations for each node, with 64 bit host operating system.
• Controller Node: 1 processor, 2 GB memory, and 5 GB storage
• Compute Node: 1 processor, 2 GB memory, and 10 GB storage
The following is the network configuration of each node.
|Role||NW Card 1||NW Card 2|
HostName = controller.itzgeek.local (controller)
|192.168.12.21 / 24, GW=192.168.12.2
|192.168.0.21 / 24 GW=192.168.0.1
(Public Network – DHCP Enabled)
HostName = compute.itzgeek.local (compute)
|192.168.12.22 / 24 GW=192.168.12.2
|192.168.0.22 / 24 GW=192.168.0.1
(Public Network – DHCP Enabled)
* Management on 192.168.12.0/24 with gateway 192.168.12.1
This network requires a gateway to provide Internet access to all nodes for administrative purposes such as package installation, security updates, DNS, and NTP.
* Public on 192.168.0.0/24 with gateway 192.168.0.1
This network requires a gateway to provide Internet access to instances in your OpenStack environment.
Add a host entry, so that nodes can use hostname to communicate instead of ip address. Place it on all nodes.
# nano /etc/hosts # controller 192.168.12.21 controller.itzgeek.local controller # compute 192.168.12.22 compute.itzgeek.local compute
Once you have done with configuring ip address, ping between nodes to verify the connectivity.
Install and configure chrony (NTP) on Controller Node so that all other nodes can do sync time with controller node.
# apt-get install ntp # service ntp restart
Client NTP Configuration
Install NTP package on Compute nodes and any nodes you add in future.
# apt-get install ntp
Edit the below configuration file.
# nano /etc/ntp.conf
Remove other ntp servers from this file or just comment out the lines that starts with word “server”. Add below entry to get our nodes sync with controller node.
Restart the NTP service.
# service ntp restart
Install the Ubuntu Cloud archive keyring and repository.
# apt-get install software-properties-common # add-apt-repository cloud-archive:liberty
Upgrade your system.
# apt-get update && apt-get dist-upgrade
Install the OpenStack python client.
# apt-get install python-openstackclient
Perform the above two steps on all nodes.
Install MySQL database:
OpenStack components uses MySQL database to store information, so install MySQL on the Controller Node.
# apt-get install mariadb-server python-pymysql
Installer invokes a command line tui to set MySQL root password.
Create and edit the /etc/mysql/conf.d/mysqld_openstack.cnf file
# nano /etc/mysql/conf.d/mysqld_openstack.cnf
Add the following values and ensure bind-address value is set to management ip address of controller node to allow other node can access MySQL instance.
[mysqld] ## Set to Management IP bind-address = 192.168.12.21 default-storage-engine = innodb innodb_file_per_table collation-server = utf8_general_ci init-connect = 'SET NAMES utf8' character-set-server = utf8
Restart the MySQL.
# service mysql restart
Install NoSQL database (For Telemetry Service):
The Telemetry service uses a NoSQL database to store information. The database typically runs on the controller node. Here we will use MongoDB.
The installation of the NoSQL database server is only necessary when installing the Telemetry service. Otherwise you can skip this.
Install MongoDB and package.
# apt-get install mongodb-server mongodb-clients python-pymongo
Edit the /etc/mongodb.conf file.
# vi /etc/mongodb.conf
Add the following values and ensure bind_ip value is set to management ip address of controller node to allow other node can access MySQL instance. Also, set smallfiles = true.
# Management interface IP address of the controller node bind_ip = 192.168.12.21 smallfiles = true
Stop and start the MongoDB service.
# service mongodb stop # rm -rf /var/lib/mongodb/journal/prealloc.* # service mongodb start
RabbitMQ is used by OpenStack to coordinate operations and status information among services. Install it on controller node.
# apt-get install rabbitmq-server
Add openstack user.
# rabbitmqctl add_user openstack password
* Replace password with your own password.
Allow openstack user to read, write and configuration access.
# rabbitmqctl set_permissions openstack ".*" ".*" ".*"
Next is to
configure KeyStone (OpenStack identity) service.