noun_Email_707352 noun_917542_cc noun_Globe_1168332 Map point Play Untitled Retweet

OpenStack deployment

Can we do OpenStack deployment at home? With this blog post we will deploy OpenStack on prepared earlier VirtualBox environment and run some simple application in OpenStack environment.

Marcin Nicpon / November 09, 2020

Today, we will deploy OpenStack software on prepared earlier VirtualBox environment. We will also run simple application in target OpenStack environment sharing also good practices worked out by TietoEVRY Szczecin during several years of our customer engagements.

If you want to learn more about the OpenStack environment preparation, please have a look at my previous blog post. 

 

OpenStack installer selection 

 
As the first step we need to select best installer of OpenStack for our needs. There is a lot of commercial and opensource solution in the market like: Mirantis FuelRedHat OSPKolla-AnsibleOpenStack-AnsiblePackstackDevstack, etc. Installation can be done also manually following steps listed on openstack.org. To ensure using minimum resources and extend installation if needed Kolla-Ansible was selected. It provides production ready tools, working out of the box, is highly customizable and automated. 

 
Additional libraries, tools and configurations needed for selected installer 

 
Additional network configurations 

We have assigned two network interfaces to the VM in NAT mode in previous steps. It may cause some connectivity issues as both interfaces have default gateway assigned. To fix potential problem we need to release IP address from one of them and make the change permanent. This can be accomplished by:  

  • editing /etc/netplan/00-installer-config.yaml file 
     

image9txy.png

  • setting new content: 

imagent18h.png

  •  and applying the changes: 

imageq2br8.png


Next step is also to make sure DNS client configuration is correct. Some corporate DHCP settings or default Linux configuration may cause the further connectivity problems. To avoid those, let’s follow couple of the steps: 

  • remove symlink leading to DNS stub: 

image15er.png
 

  • then create file with desired content: 

imagedd03a.png

  • here is how my DNS client configuration looks like: 

imagevl9yt.png

After these changes please make sure that internet access is still possible. 
 

Additional virtual storage volumes preparation [Optional] 

If our intent is to attach multiple volumes to the VMs or install VMs from ISO files on OpenStack there is a need for additional space for block storage provided by cinder service. Following screenshot show creation of 50 GB virtual storage drive, which is enough for our example deployment.

imageels0d.png
 Fig1. VirtualBox VM virtual disk volume creation window 
 
Operation can be performed only when VM is powered off. After adding the disk, we need to start VM and run following commands to prepare second disk for cinder by setting LVM on it. 

imager6hf.png

More information about cinder configuration for Kolla-Ansible deployment can be found here.
 


OpenStack deployment and running simple VM 


 
As our environment is ready for deployment, now we are ready to install OpenStack using Kolla-Ansible. Detailed guide is available here, the following steps were used in our case: 

imagefcss.png

  • To avoid issues with running installer, symlink, linking Ubuntu’s preinstalled python3 to path expected by installer needs to be created: 

imaget7wos.png
 

  • Optionally /etc/kola/passwords.yml file can be changed if user wants to change default OpenStack admin password which is defined in line “keystone_admin_password”: 

imagen29fh.png

  • Selected latest Kola-ansible requires Ansible v2.9, where default Ubuntu package installs version 2.5, so this needs to be upgraded: 

imagebdnvj.png

  • In next step we need to change some parameters /etc/kolla/globals.yml file: 

imagebn78q.png

The most important for our deployment is to change/enable the following: 

imagebu1lj.png

Where: 

  • enp0s3 is internal management interface used to connect OpenStack services together 
  • enp0s8 is external interface used to connect VMs located on OpenStack to external world 
  • 10.0.2.250 is virtual IP address used to bind most of OpenStack services e.g. Web UI, mostly used in multi host deployments to provide high availability 

More information about Kolla-Ansible can be found here.
 

  • Optionally, version of Openstack can be selected and Cinder services can be enabled as below: 

image5b5kq.png
 

  • When config files are ready, OpenStack installation can be started as below: 

imagea89oe.png

  • After successful deployment we need to run more few commands: 

image2m16v.png

  • Last command sets OS environment variables for OpenStack like AUTH_URL, USERNAME and PASSWORD, so we are ready work with OpenStack using CLI. 
     

Kolla-Ansible provides also a script setting basic objects like networks, images and flavors so starting first VM is like one click. Before running the script please make sure that following parameters are correct and match our environment in /usr/local/share/kolla-ansible/init-runonce file: 

imagelvqam.png

Where 10.0.3.0/24 is the network address on second interface of OpenStack VM. After OpenStack installation IP address 10.0.3.15 can be assigned to br-ex interface if needed. EXT_NET_RANGE defines IP address space used by floating IPs for VMs running in OpenStack environment It must not overlap to other IP addresses. 

  • Once the script is updated, we can run it:

imagedw6h.png

  • And just after that we can start first demo VM with following command: 

image2xkeo.png

  • As the final step we can log on to OpenStack Web UI available at: http://localhost:8080/ with user admin and password  

imagevebr9.png

Fig2.OpenStack Horizon dashboard 
 
In next article we will experiment with more demanding VMs with graphical interface, images, flavors and create some basic network resources. 

Do you feel inspired? If so, we encourage you to get to know us better. Don’t hesitate to approach us via TietoEVRY Careers or LinkedIn. You will have the opportunity to work with enthusiasts who share their knowledge. Due to the dynamic growth in demand for OpenStack skills, we are constantly seeking for talented engineers in this area. Currently, we are on the lookout for a candidate for the position of Cloud System Specialist.

Further reading: 

OpenStack horizon manual 

Main OpenStackOpen Sourceproject 

Glossary 

  


 

Marcin Nicpon
Senior Program Manager & Business Developer

Marcin has more than 18 years of experience in Telco and Cloud delivering software solutions for OEMs, TEMs and Silicon vendors designing and optimizing mobile communications networks and cloud solutions. He is very strong in NFV area, including implementations of several ETSI based use-cases.

Author

Marcin Nicpon

Senior Program Manager & Business Developer

Marcin Lis

Senior IT Systems Engineer / DevOps

Share on Facebook Tweet Share on LinkedIn