Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 41

Siddharth Salvi

60004180105
B-3
CC EXPERIMENT NO. 4

AIM: To install OpenStack on CentOS

THEORY:
OpenStack is a free cloud-computing solution that helps initiate, manage, and sustain a huge pool
of virtual machines with the required resources (CPU, memory, networking, and storage). This
infrastructure is managed through a user-friendly web interface that helps present the status of
the nodes to the system administrator, and gives them easy access to manage the infrastructure
resources. OpenStack provides open source and enterprise services as per the user’s demands,
which make it well used by multiple organizations. Most organizations providing cloud services,
to either the public or private, use OpenStack to deliver an IaaS service. Though OpenStack’s
core function is to provide IaaS platform, it is used as DBaaS (database-as-a-service), building
Hadoop clusters, Container orchestration and much more. In single node OpenStack installation,
all of its basic functionalities such as compute, network, storage, and dashboard are installed on
the same machine. This method of installation is the best for proof of concept (POC).
Major Functionalities of OpenStack

OpenStack Compute: OpenStack compute is the capacity to offer computing resources on


demand for the customer while managing the resources that have been requested. OpenStack
compute is accessible via both the web interface for administration and via the API for
developing and building applications. This architecture enables economic usage of the physical
hardware where it scales it horizontally. This technology also manages and automates a huge
pool of computing resources, while it offers a compatibility with a variety of virtualization
technologies.
OpenStack Networking: OpenStack networking is the capacity to manage networking for the
cloud resources managed by OpenStack. This technology ensures that the network resources
connecting the cloud infrastructure are always available. OpenStack networking offers a flexible
Siddharth Salvi
60004180105
B-3
networking model to answer needs such as flat networks, VLAN configurations, GRE, and
VXLAN. It provides the same services that the ordinary physical network hardware provides
such as routing, NAT and DHCP, and static IP association. OpenStack networking not only
supports automated network management but also offers its users the capacity to manage their
network manually by adjusting their proper connections, and connect servers and terminals to
each other as required.
OpenStack Storage: OpenStack storage is the data storage services offered by OpenStack inside
its architecture. Through its fully distributed API storage platform, cloud applications can access
storage space through multiple technologies and architectures (archiving, backup, data retention).
Storage with OpenStack is always scalable, to answer the user and application’s demands, by
allowing block devices to be added to each other and assuring a better performance.
Modules / Components in OpenStack

1. Horizon: This is the component responsible of setting up the OpenStack dashboard. It is


from where the OpenStack administrator manages the infrastructure. It is the only
graphical interface OpenStack has, so far. Horizon provides a look into what is happening
in the cloud infrastructure and gives to the system administrators some functionality to
manage it. On the other hand, the dashboard does not support developer’s access. There
is always an application-programming interface (API) where they can access resources
and other aspects of the cloud.
2. Nova: This is OpenStack’s primary computing engine. It is the main component
responsible for deploying and managing the virtual machines of the cloud infrastructure,
rather than just being a small infrastructure or a grid of super computers.
It also manages and organizes other instances such as handling cloud-computing tasks.
3. Neutron: This is OpenStack’s networking component. It is basically the one essential
part to ensure networking between different components of the cloud infrastructure. It
also supports multiple technologies to make sure that communication is reliable.
4. Keystone: This is the service responsible for identifying management for OpenStack. It
organizes the users using the cloud and also organizes their access permissions. It
organizes the resources which they are using. It is also a great help for the developer for
tracking user usage and access methods.
5. Swift: This is the component responsible of the storage system for OpenStack. It stores
the data in an advanced method where the developers only specify the file as a piece of
information, and OpenStack decides where to store that, which helps with scaling and
Siddharth Salvi
60004180105
B-3
resolves storage capacity issues. It makes most of the common tasks, such as backup and
security, the responsibility of the system more than the developer.
6. Cinder: This is a smaller storage component that organizes block storage. It helps with
the enhancement of data access in the disk drive and organizes in traditional ways the
speed of data access depending on the need.
7. Heat: This is the OpenStack orchestration component. It is a method to store information
about cloud applications where it has defined the resources needed for that application for
better organization of the cloud infrastructure.
8. Glance: This is the component that organizes the virtual copies of the hard disks, what
are known as images, to be used later as templates for deploying new virtual machines.
9. Ceilometer: This is the component that helps with the billing services for cloud usage by
individual users. It acts as a meter that reports the system usage during the period where
the user starts using the cloud.

In this article we will install the latest version of OpenStack ‘Liberty’ on CentOS 7 using rdo
repositories. As per my setup i am using followings on my CentOS 7 Machine
● Hostname = openstack.example.com
● IP address = 192.168.1.3
● netmask = 255.255.255.0
● Gateway = 192.168.1.1
● DNS = 192.168.1.254

STEPS AND OUTPUT:


Siddharth Salvi
60004180105
B-3
Siddharth Salvi
60004180105
B-3
Siddharth Salvi
60004180105
B-3
Siddharth Salvi
60004180105
B-3
Step1: Set the hostname using the hostnamectl command.
Siddharth Salvi
60004180105
B-3
Step2: Set the Selinux in Permissive Mode

Edit the selinux config file ( /etc/sysconfig/selinux ) and set “SELINUX=permissive”


Step3: Disable firewalld & NetworkManager Service
Siddharth Salvi
60004180105
B-3
Step4: Enable rdo repository for liberty packages.
Use below commands to update the system and enable rdo repository
Siddharth Salvi
60004180105
B-3
Step5: Install OpenStack PackStack Package
Siddharth Salvi
60004180105
B-3
Generate the answer file using the below command.
Siddharth Salvi
60004180105
B-3
Step6: Start OpenStack installation using answer file.
Siddharth Salvi
60004180105
B-3
Once the installation is completed, we will get the message below.
Siddharth Salvi
60004180105
B-3
Siddharth Salvi
60004180105
B-3

After the installation a new interface “br-ex” will be created and assign the IP addess of eth0 or
enp0s3 to br-ex .
In above files please change the IP details, Hardware address and Device name as per your setup.
When we restart the network service , it will add “enp0s3” as a port in br-ex OVS bridge.
Please take a reboot and check whether settings are persistent or not.
Step7: Now Access OpenStack Dashboard.
When the installation is completed a dashboard link was provided on the screen, in My Case it is
https://10.0.2.15/dashboard
Use the user name as “admin” and password that we set for keystone admin user in the answer
file.
As we are able to login in Dashboard , the OpenStack installation part is completed.
Siddharth Salvi
60004180105
B-3
Now our next task is to “Launch an Instance from OpenStack Dashboard”.
To Launch an instance from OpenStack Horizon dashboard, first we need to finish following
steps :
o Create a Project and add a member to the Project.
o Create a Image and Flavor
o Create a Network and Router for a Project.
In my case I will use Project Name as “Innovation” and linuxtechi as Project Member of
Innovation.
o Internal Network = 10.10.10.0/24
o External Network or Floating IP Network = 192.168.1.0/24
o Gateway of External Network = 192.168.1.1
Create a Project and add a member to the Project.
Login to the dashboard using Admin credentials and Go to Identity Tab –> Projects and Click
on Create Project.
Siddharth Salvi
60004180105
B-3
Click on “Create Project”, We can also set the Quota for the project from Quota Tab.
To create Users, go to Identify Tab–> Users–> Click on ‘Create User’
In my case I have specified the followings:
o User Name = linuxtechi
o email = linuxtechi@example.com
o password = xxxxxx
o Primary Project = innovation
o Role = member
Siddharth Salvi
60004180105
B-3

Create a flavor and image:


To create a flavor login in dashboard using admin credentials, go to Admin Tab –> Flavors –>
Click on create Flavor.
Siddharth Salvi
60004180105
B-3

Specify the Flavor Name (fedora.small) , VCPU , Root Disk , Ephemeral Disk & Swap disk.
Siddharth Salvi
60004180105
B-3

To Create Image, go to Admin Tab –> Images—> Click on Create Image.


Specify the Image Name, Description, Image Source (in my case I am using Image File as i have
already downloaded the Fedora 23 Cloud Image), Format QCOW2.
Siddharth Salvi
60004180105
B-3
Siddharth Salvi
60004180105
B-3
Create Network and Router for Project Innovation.
To create Network and router for Innovation project sign out of admin user and login as
“linuxtechi” user in dashboard.
Go to the Network Tab —> Click on Networks —> then Click on Create Network
Specify the Network Name as Internal
Siddharth Salvi
60004180105
B-3
Siddharth Salvi
60004180105
B-3

click on Next. Specify the Subnet name (sub-internal) and Network Address (10.10.0.0/24)
VMs will be getting internal IP from DHCP Server because we enable DHCP option for internal
network.
Now Create External Network. Click on “Create Network” again, Specify Network Name as
“external”.
Siddharth Salvi
60004180105
B-3

Click on Next. Specify subnet Name as “sub-external” & Network Address as “192.168.1.0/24”
Click on Next. Untick “Enable DHCP” option and Specify the ip address pool for external
network.
Siddharth Salvi
60004180105
B-3

Click on Create. Now time to create a Router.


Siddharth Salvi
60004180105
B-3
Now Mark External network as “External”, this task can be completed only from admin user, so
logout from linuxtechi user and login as admin.
Go to Admin Tab —> Networks–> Click on Edit Network for “External”

Click on Save Changes


Now Logout from admin user and login as linuxtechi user.
Go to Network Tab —> Routers –> for Router1 click on “Set Gateway”
Siddharth Salvi
60004180105
B-3
Siddharth Salvi
60004180105
B-3
Siddharth Salvi
60004180105
B-3
Siddharth Salvi
60004180105
B-3
Siddharth Salvi
60004180105
B-3

Click on Add interface. Network Part is completed Now & we can view Network Topology from
“Network Topology” Tab
Siddharth Salvi
60004180105
B-3
Siddharth Salvi
60004180105
B-3
Siddharth Salvi
60004180105
B-3
Now Create a key pair that will be used for accessing the VM and define the Security firewall
rules.
For creating a key pair
Go to ‘Access & Security’ tab —> Click on Key Pairs –> then click on ‘Create Key Pair’
Siddharth Salvi
60004180105
B-3

It will create a Key pair with name “myssh-keys.pem”


Add a new Security Group with name ‘fedora-rules’ from Access & Security Tab. Allow 22 and
ICMP from Internet (0.0.0.0 ).
Siddharth Salvi
60004180105
B-3

Once the Security Group ‘fedora-rules’ created, click on Manage Rules and allow 22 & ICMP
ping.
Click on Add, similarly add a rule for ICMP.
Now Finally it’s time to Launch an instance.
Go to Compute Tab –> Click on Instances –> then click on ‘Launch Instance’
Siddharth Salvi
60004180105
B-3
Siddharth Salvi
60004180105
B-3
Specify the Instance Name, Flavor that we created in above steps and ‘Boot from image’ from
Instance Boot Source option and Select Image Name ‘fedora-image’.
Click on ‘Access & Security’ and Select the Security Group ‘fedora-rules’ & Key Pair ”myssh-
keys”

Now Select Networking and add ‘Internal’ Network and the Click on Launch.

Once the VM is launched, associate a floating IP so that we can access the VM. 

Click on ‘Associate Floating IP’.


Siddharth Salvi
60004180105
B-3

Click on Allocate IP.

Click on Associate.
Now try to access the VM with floating IP (192.168.1.20) using keys.
Siddharth Salvi
60004180105
B-3

As we can see above that we are able to access the VM using keys. Our task of launching a VM
from Dashboard is Completed Now.

CONCLUSION: Hence we have installed OpenStack on CentOS 7.

You might also like