Install & Configure Nova - OpenStack Installation Part 4

Install Openstack nova Service, configure nova service, openstack nova client installation, nova openstack add image, openstack nova step by step tutorial

Install and Configure NOVA Compute on CentOS7

This article shows you how to Install and Configure OpenStack Nova Services. In the previous post, we have covered the topic, how to install and configure the Glance component for the Image service which was also a part of the Openstack Deployment.

Stages involved in the Openstack deployments are,
1. Enable Repositories on node1 and node2
2. Install Openstack Liberty Packages on node1 and node2.
3. Install and Configure MariaDB(MySQL) Database on node1 and node2.
4. Install and Configure RabbitMQ Message service on node1.
5. Install and Configure keystone for Identity service on node1.
6. Install Glance for Image service on node1.
7. Install Nova Computing on node1 and node2.
8. Install Neutron Networking on node1 and node2.
    8a. Install Openstack Neutron Component on Controller Node
    8b. Install Openstack Neutron Component on Compute Node
9. Install Openstack Horizon for dashboard on node1

Continue with the previous post, we will explain you how to install and configure Nova components on node1 and node2.

Basically OpenStack Nova Compute allow us to host and manage cloud computing systems. OpenStack Compute is a major part of an Infrastructure-as-a-Service (IaaS) system. OpenStack Nova Compute interacts with OpenStack Identity for authentication, OpenStack Image service for disk and server images, and OpenStack dashboard for the user and administrative interface.

Lab Setup for this Openstack Deployment:
Server Names : node1 and node2.
OS :  CentOS 7.2 - 64 Bit
Enabled Internet connection.

Prerequisites:
1. Make sure each hosts are reachable. I make an entries in hosts file.
2. Verify the internet connection, because we use puclic repos to install these glance component.
3. Take a backup or snapshot at different stages to restore if needed.
4. Stop the firewall to avoid issues during the installations (systemctl stop firewalld ; systemctl disable firewalld).
5. Make sure your nodes supports virtualization.
[root@node1 ~]# egrep -c '(vmx|svm)' /proc/cpuinfo
If you get value of equal or more than '1', then our node supports hardware acceleration. If not we should use Libvirt to use QEMU instead of KVM.


ALSO WATCH THIS DEMO TUTORIAL VIDEO FREE ON OUR YOUTUBE CHANNEL
Install and Configure Nova Controller on Node1

Login into 'node1' to create the Nova Database to store its data.
[root@node1 ~]# mysql -u root -p
Enter password:
Create nova database.
MariaDB [(none)]> CREATE DATABASE nova;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'node1' \
  IDENTIFIED BY 'redhat';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' \
  IDENTIFIED BY 'redhat';
MariaDB [(none)]> exit
Replace 'node1' with your controller node name and replace 'redhat' with your Nova password you wish to set.

Install the Nova Component packages
[root@node1 ~]# yum -y install openstack-nova-api openstack-nova-cert \
  openstack-nova-conductor openstack-nova-console \
  openstack-nova-novncproxy openstack-nova-scheduler \
  python-novaclient openstack-nova-compute sysfsutils
Configure Nova Compute Service
Do the following changes on /etc/nova/nova.conf file.
Change the connection parameter under [database] section.
[database]
connection = mysql://nova:redhat@node1/nova
Replace 'redhat' with your nova password which we have set during the nova database creation and replace 'node1' with your server name.

Change the following parameters under [DEFAULT] and [oslo_messaging_rabbit] sections
[DEFAULT]
rpc_backend = rabbit
enabled_apis=osapi_compute,metadata
auth_strategy = keystone
my_ip = 100.73.168.190
network_api_class = nova.network.neutronv2.api.API
security_group_api = neutron
linuxnet_interface_driver = nova.network.linux_net.NeutronLinuxBridgeInterfaceDriver
firewall_driver = nova.virt.firewall.NoopFirewallDriver
Replace '100.73.168.190' with your server management IP.
[oslo_messaging_rabbit]
rabbit_host = node1
rabbit_userid = openstack
rabbit_password = redhat
Replace 'node1' with the servername where you have configured rabbitmq service. Replace Userid and Password of rabbitmq service with your credentials.
[ads-post]
Change the following parameters under [keystone_authtoken]
[keystone_authtoken]
auth_uri = http://node1:5000
auth_url = http://node1:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = nova
password = redhat
Replace 'node1' with your keystone server name and replace 'redhat' with your nova password.
Change the following parameters under [vnc] section.
[vnc]
vncserver_listen = $my_ip
vncserver_proxyclient_address = $my_ip
Change the following parameter under [glance] section.
[glance]
host = node1
Replace 'node1' with your glance server name.

Change the following parameter under [oslo_concurrency] section.
[oslo_concurrency]
lock_path = /var/lib/nova/tmp
Once all changes done, populate the Image service database
[root@node1 ~]# nova-manage db sync
Start and Enable the nova service.
[root@node1 ~]# systemctl start openstack-nova-api \
  openstack-nova-cert openstack-nova-consoleauth \
  openstack-nova-scheduler openstack-nova-conductor \
  openstack-nova-novncproxy
[root@node1 ~]# systemctl enable openstack-nova-api \
  openstack-nova-cert openstack-nova-consoleauth \
  openstack-nova-scheduler openstack-nova-conductor \
  openstack-nova-novncproxy
Source the admin-openrc.sh to load the environment to gain access.
[root@node1 ~]# source admin-openrc.sh
Create the nova user and add roles.
[root@node1 ~]# openstack user create --domain default --password-prompt nova
User Password:
Repeat User Password:
+-----------+----------------------------------+
| Field     | Value                            |
+-----------+----------------------------------+
| domain_id | default                          |
| enabled   | True                             |
| id        | e6f9ba8fd2fd4d0dbcdb0014d001d387 |
| name      | nova                             |
+-----------+----------------------------------+
Add the admin role to the nova user and service project:
[root@node1 ~]# openstack role add --project service --user nova admin
Create the nova service entity:
[root@node1 ~]# openstack service create --name nova \
  --description "OpenStack Compute" compute
+-------------+----------------------------------+
| Field       | Value                            |
+-------------+----------------------------------+
| description | OpenStack Compute                |
| enabled     | True                             |
| id          | 9dd26aacb0da4fa89395918c652f9436 |
| name        | nova                             |
| type        | compute                          |
+-------------+----------------------------------+
Create the Nova compute service API endpoints:
Replace 'node1' with your node name.
[root@node1 ~]# openstack endpoint create --region RegionOne \
  compute public http://node1:8774/v2/%\(tenant_id\)s
+--------------+------------------------------------+
| Field        | Value                              |
+--------------+------------------------------------+
| enabled      | True                               |
| id           | 7b3d6dd2f19347faaaecb9f310127395   |
| interface    | public                             |
| region       | RegionOne                          |
| region_id    | RegionOne                          |
| service_id   | 9dd26aacb0da4fa89395918c652f9436   |
| service_name | nova                               |
| service_type | compute                            |
| url          | http://node1:8774/v2/%(tenant_id)s |
+--------------+------------------------------------+
[root@node1 ~]# openstack endpoint create --region RegionOne \
  compute internal http://node1:8774/v2/%\(tenant_id\)s
+--------------+------------------------------------+
| Field        | Value                              |
+--------------+------------------------------------+
| enabled      | True                               |
| id           | 083e5875f7374057b2e2ce75bd7649c5   |
| interface    | internal                           |
| region       | RegionOne                          |
| region_id    | RegionOne                          |
| service_id   | 9dd26aacb0da4fa89395918c652f9436   |
| service_name | nova                               |
| service_type | compute                            |
| url          | http://node1:8774/v2/%(tenant_id)s |
+--------------+------------------------------------+
[root@node1 ~]# openstack endpoint create --region RegionOne \
  compute admin http://node1:8774/v2/%\(tenant_id\)s
+--------------+------------------------------------+
| Field        | Value                              |
+--------------+------------------------------------+
| enabled      | True                               |
| id           | a0384987d20249eca36acbf24aa65753   |
| interface    | admin                              |
| region       | RegionOne                          |
| region_id    | RegionOne                          |
| service_id   | 9dd26aacb0da4fa89395918c652f9436   |
| service_name | nova                               |
| service_type | compute                            |
| url          | http://node1:8774/v2/%(tenant_id)s |
+--------------+------------------------------------+
We have completed the Installation and Configuration of Nova Controller component on node1. Lets do it on Node2.

Install and Configure Nova Compute on Node2

Install the Nova Component packages.
[root@node2 ~]# yum -y install openstack-nova-compute sysfsutils
Configure Nova Compute Service.

Do the following changes on /etc/nova/nova.conf file.

Change the following parameters under [DEFAULT] and [oslo_messaging_rabbit] sections
[DEFAULT]
rpc_backend = rabbit
auth_strategy = keystone
my_ip = 100.73.168.191
network_api_class = nova.network.neutronv2.api.API
security_group_api = neutron
linuxnet_interface_driver = nova.network.linux_net.NeutronLinuxBridgeInterfaceDriver
firewall_driver = nova.virt.firewall.NoopFirewallDriver

Replace '100.73.168.191' with your server management IP.
[oslo_messaging_rabbit]
rabbit_host = node1
rabbit_userid = openstack
rabbit_password = redhat
Replace 'node1' with the servername where you have configured rabbitmq service. Replace Userid and Password of rabbitmq service with your credentials.

Change the following parameters under [keystone_authtoken]
[keystone_authtoken]
auth_uri = http://node1:5000
auth_url = http://node1:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = nova
password = redhat
Replace 'node1' with your keystone server name and replace 'redhat' with your nova password.

Change the following parameters under [vnc] section.
[vnc]
enabled = True
vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = $my_ip
novncproxy_base_url = http://node1:6080/vnc_auto.html
Change the following parameter under [glance] section.
[glance]
host = node1
Replace 'node1' with your glance server name.

Change the following parameter under [oslo_concurrency] section.
[oslo_concurrency]
lock_path = /var/lib/nova/tmp
Check our server Node2 supports virtualization or not?.
[root@node2 ~]# egrep -c '(vmx|svm)' /proc/cpuinfo
If you get value of equal or more than '1', then our node supports hardware acceleration. If not we should use Libvirt to use QEMU instead of KVM.

Edit /etc/nova/nova.conf and change libvirt section as below.
[libvirt]
virt_type = qemu
Start and Enable the nova service.
[root@node2 ~]# systemctl start libvirtd openstack-nova-compute
[root@node2 ~]# systemctl enable libvirtd openstack-nova-compute
Check the Configurations:
Login into each node and source admin-openrc.sh script. We have not created any admin-openrc.sh script on node2, Soo just copy from node 1 server.

Execute the below command to ensure each nodes are available in the list.
nova service-list
You should see the list of services configured with number of nodes connected for this NOVA service.

We have installed and configured NOVA Compute service on Node1 and node2. Refer the below links to know the stages involved in this OpenStack Deployment.

Stages involved in the Openstack deployments are,
1. Enable Repositories on node1 and node2
2. Install Openstack Liberty Packages on node1 and node2.
3. Install and Configure MariaDB(MySQL) Database on node1 and node2.
4. Install and Configure RabbitMQ Message service on node1.
5. Install and Configure keystone for Identity service on node1.
6. Install Glance for Image service on node1.
7. Install Nova Computing on node1 and node2.
8. Install Neutron Networking on node1 and node2.
    8a. Install Openstack Neutron Component on Controller Node
    8b. Install Openstack Neutron Component on Compute Node
9. Install Openstack Horizon for dashboard on node1

Also download 100% free eBooks related to OpenStack Cloud.
1. A Brief Look at OpenStack
2. OpenStack Cloud Computing Cookbook
3. Concepts of Cloud Computing in simple terms

More topics will be added soon. stay connected with us on social networking sites and Subscribe our YouTube channel for more updates.
Youtube Channel : https://www.youtube.com/learnitguide
Facebook : http://www.facebook.com/learnitguide
Twitter : http://www.twitter.com/learnitguide
Pinterest : http://www.pinterest.com/learnitguide
RSS : http://feeds.feedburner.com/learnitguide
March 03, 2016

Post a Comment

[disqus][facebook][blogger]

Contact Form

Name

Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget