{"id":14375,"date":"2022-10-09T10:06:11","date_gmt":"2022-10-09T07:06:11","guid":{"rendered":"https:\/\/kifarunix.com\/?p=14375"},"modified":"2024-03-09T22:57:52","modified_gmt":"2024-03-09T19:57:52","slug":"deploy-openstack-using-devstack-on-ubuntu","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/deploy-openstack-using-devstack-on-ubuntu\/","title":{"rendered":"Deploy OpenStack using DevStack on Ubuntu 22.04\/Ubuntu 20.04"},"content":{"rendered":"\n

In this tutorial, you will learn how to deploy OpenStack using DevStack on Ubuntu 22.04\/Ubuntu 20.04. There are different methods\/tools<\/a> that you can use to deploy OpenStack. Such include Ansible-kolla, openstack-ansible e.t.c. We will use DevStack to deploy a single node OpenStack on Ubuntu 22.04\/Ubuntu 20.04. DevStack<\/a> is a set of scripts and utilities to quickly deploy an OpenStack cloud from git source trees.<\/em><\/p>\n\n\n\n

Deploy OpenStack using DevStack on Ubuntu<\/h2>\n\n\n\n

In order to deploy OpenStack using DevStack, below are our system resources assigned to the vms. Of course if you have the capability to use more, please do!<\/p>\n\n\n\n

Item<\/strong><\/td>Specifics<\/strong><\/td><\/tr>
Linux System<\/td>Minimal Ubuntu 22.04\/20.04 VM running on VirtualBox<\/td><\/tr>
Processors<\/td>4 vCPUs<\/td><\/tr>
RAM<\/td>8 GB<\/td><\/tr>
Disk<\/td>50 GB<\/td><\/tr>
Internet Access<\/td>Yes<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

Install Minimal Linux System<\/h3>\n\n\n\n

You need deploy a minimal version of the Linux system you want to deploy OpenStack on since DevStack will install all the required packages. In this tutorial, we are using Ubuntu 22.04\/20.04 servers running on VirtualBox.<\/p>\n\n\n\n

Run System Update\/Upgrade<\/h3>\n\n\n\n

Once the system is up, you can update the system package repos;<\/p>\n\n\n\n

sudo apt update -y<\/code><\/pre>\n\n\n\n
sudo apt upgrade -y && sudo systemctl reboot -i<\/code><\/pre>\n\n\n\n

Create an Optional Deployment User<\/h3>\n\n\n\n

To deploy OpenStack using DevStack, you need to optionally have a standard user account, with passwordless sudo rights on your system.<\/p>\n\n\n\n

To create a user account, run the command below;<\/p>\n\n\n\n

sudo useradd -m -s \/bin\/bash cloud-admin<\/code><\/pre>\n\n\n\n

Give the user passwordless sudo rights;<\/p>\n\n\n\n

sudo visudo -f \/etc\/sudoers.d\/cloud-admin<\/code><\/pre>\n\n\n\n

Enter the line below<\/p>\n\n\n\n

cloud-admin ALL = NOPASSWD: ALL<\/code><\/pre>\n\n\n\n

Save and exit the file.<\/p>\n\n\n\n

Clone DevStack Github Repository<\/h3>\n\n\n\n

Switch to deployment user created above and clone the DevStack Github repository which contains a script that installs OpenStack and templates for configuration files<\/em>;<\/p>\n\n\n\n

sudo -u cloud-admin -i<\/code><\/pre>\n\n\n\n
git clone https:\/\/opendev.org\/openstack\/devstack<\/code><\/pre>\n\n\n\n
ls -1 devstack<\/code><\/pre>\n\n\n\n
clean.sh\nCONTRIBUTING.rst\ndata\ndoc\nextras.d\nfiles\nfunctions\nfunctions-common\nFUTURE.rst\ngate\nHACKING.rst\ninc\nlib\nLICENSE\nMakefile\nopenrc\nplaybooks\nREADME.rst\nroles\nrun_tests.sh\nsamples\nstackrc\nstack.sh\ntests\ntools\ntox.ini\nunstack.sh\n<\/code><\/pre>\n\n\n\n

Configure DevStack for OpenStack Deployment<\/h3>\n\n\n\n

To begin with, you need to create to define\/create passwords for some OpenStack services such Horizon, database, RabbitMQ and services password. These passwords need to be defined on the local.conf file under the root directory of the DevStack repository. If you do not define these passwords, you will be prompted by the installer to enter them during the installation of OpenStack.<\/p>\n\n\n\n

Thus, navigate to the devstack Github repository directory;<\/p>\n\n\n\n

cd devstack<\/code><\/pre>\n\n\n\n
vim local.conf<\/code><\/pre>\n\n\n\n

Enter the settings below, and update the value of each variable to your preferred password;<\/p>\n\n\n\n

[[local|localrc]]\nADMIN_PASSWORD=YourPasswordHere<\/strong>\nDATABASE_PASSWORD=$ADMIN_PASSWORD\nRABBIT_PASSWORD=$ADMIN_PASSWORD\nSERVICE_PASSWORD=$ADMIN_PASSWORD<\/code><\/pre>\n\n\n\n

Note that we used same password for all those services in this example setup.<\/p>\n\n\n\n

Similarly, define the OpenStack Host IP address;<\/p>\n\n\n\n

HOST_IP=192.168.56.124<\/code><\/pre>\n\n\n\n

Change that to your system IP that will allow you to access OpenStack.<\/p>\n\n\n\n

Save and exit the file.<\/p>\n\n\n\n

In its simplest setup, the above configurations are enough to get you started with the deployment of single node OpenStack for a proof of concept on Ubuntu 22.04 or Ubuntu 20.04.<\/p>\n\n\n\n

You can check the sample local.conf configuration file under the devstack\/samples\/<\/code><\/strong> directory.<\/p>\n\n\n\n

Deploy OpenStack using DevStack<\/h3>\n\n\n\n

All you need to do to deploy OpenStack using DevStack is to execute the DevStack script, stack.sh<\/code><\/strong> and let it perform its magics!<\/p>\n\n\n\n

.\/stack.sh<\/code><\/pre>\n\n\n\n

In the meantime, it is time for you to get up and make coffee!!<\/p>\n\n\n\n

When the script completes successfully, you will see such an installation summary output;<\/p>\n\n\n\n

=========================\nDevStack Component Timing\n (times are in seconds)  \n=========================\nwait_for_service       9\nasync_wait           142\nosc                  414\napt-get                9\ntest_with_retry        4\ndbsync                 5\npip_install          111\napt-get-update         2\nrun_process           37\n-------------------------\nUnaccounted time     -33\n=========================\nTotal runtime        700\n\n=================\nAsync summary\n=================\nTime spent in the background minus waits: 554 sec\nElapsed time: 700 sec\nTime if we did everything serially: 1254 sec\nSpeedup:  1.79143\n\n\nPost-stack database query stats:\n------------+-----------+-------+\n| db         | op        | count |\n+------------+-----------+-------+\n| keystone   | SELECT    | 89394 |\n| keystone   | INSERT    |    97 |\n| glance     | SELECT    |   999 |\n| glance     | CREATE    |    65 |\n| glance     | INSERT    |   257 |\n| glance     | SHOW      |     8 |\n| glance     | UPDATE    |    13 |\n| glance     | ALTER     |    10 |\n| glance     | DROP      |     3 |\n| neutron    | SELECT    |  4247 |\n| neutron    | CREATE    |   319 |\n| neutron    | SHOW      |    39 |\n| cinder     | SELECT    |   178 |\n| cinder     | SHOW      |     1 |\n| cinder     | CREATE    |    74 |\n| cinder     | SET       |     1 |\n| cinder     | ALTER     |    18 |\n| neutron    | INSERT    |  1128 |\n| neutron    | UPDATE    |   236 |\n| neutron    | ALTER     |   150 |\n| neutron    | DROP      |    52 |\n| neutron    | DELETE    |    31 |\n| nova_cell0 | SELECT    |   204 |  \n| nova_cell0 | SHOW      |    60 | \n| nova_cell0 | CREATE    |   210 |\n| nova_cell1 | SELECT    |   217 |\n| nova_cell1 | SHOW      |    60 |\n| nova_cell1 | CREATE    |   210 |\n| nova_cell0 | ALTER     |     2 |  \n| nova_cell1 | ALTER     |     2 |\n| placement  | SELECT    |    46 |   \n| placement  | INSERT    |    57 |\n| placement  | SET       |     2 |    \n| nova_api   | SELECT    |   116 |\n| nova_cell0 | INSERT    |     5 |\n| placement  | UPDATE    |     3 |\n| nova_cell0 | UPDATE    |    49 |\n| cinder     | INSERT    |     5 |\n| nova_cell1 | UPDATE    |    45 |\n| nova_cell1 | INSERT    |     4 |\n| cinder     | UPDATE    |    19 |\n| nova_api   | INSERT    |    20 |\n| nova_api   | SAVEPOINT |    10 |\n| nova_api   | RELEASE   |    10 |\n| cinder     | DELETE    |     1 |\n| keystone   | DELETE    |    10 |\n+------------+-----------+-------+\n\n\n\nThis is your host IP address: 192.168.56.124\nThis is your host IPv6 address: ::1\nHorizon is now available at http:\/\/192.168.56.124\/dashboard\nKeystone is serving at http:\/\/192.168.56.124\/identity\/\nThe default users are: admin and demo\nThe password: YourPasswordHere\n\nServices are running under systemd unit files.\nFor more information see: \nhttps:\/\/docs.openstack.org\/devstack\/latest\/systemd.html\n\nDevStack Version: 2023.1\nChange: f0ad3e5f3f99dc3cbec94bcced3c6e96fbfdab8b Merge \"Update user guide for Octavia\" 2022-10-05 18:45:57 +0000\nOS Version: Ubuntu 22.04 jammy\n\n2022-10-09 05:38:12.719 | stack.sh completed in 700 seconds.\n<\/code><\/pre>\n\n\n\n

And that is how you can simply deploy OpenStack using DevStack on Ubuntu 22.04\/Ubuntu 20.04.<\/p>\n\n\n\n

Accessing OpenStack Horizon<\/h3>\n\n\n\n

From the installation summary, you will see such information as;<\/p>\n\n\n\n

This is your host IP address: 192.168.56.124\nThis is your host IPv6 address: ::1\nHorizon is now available at http:\/\/192.168.56.124\/dashboard<\/strong>\nKeystone is serving at http:\/\/192.168.56.124\/identity\/\nThe default users are: admin and demo\nThe password: YourPasswordHere<\/code><\/pre>\n\n\n\n

The OpenStack dashboard should be available on http:\/\/server-IP\/dashboard<\/strong>.<\/p>\n\n\n\n

\"Deploy<\/figure><\/a><\/div>\n\n\n\n

You can login using the default user accounts created above.<\/p>\n\n\n\n

\"Deploy<\/figure><\/a><\/div>\n\n\n\n

You can now go through the OpenStack menu options to explore it further.<\/p>\n\n\n\n

We will bring to you more tutorial around OpenStack in our next tutorials. Until then, read more on how to administer OpenStack<\/a>.<\/p>\n\n\n\n

Other Tutorials<\/h3>\n\n\n\n

Deploy All-In-One OpenStack with Kolla-Ansible on Ubuntu 18.04<\/a><\/p>\n\n\n\n

Install and Configure Ceph Block Device on Ubuntu 18.04<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"

In this tutorial, you will learn how to deploy OpenStack using DevStack on Ubuntu 22.04\/Ubuntu 20.04. There are different methods\/tools that you can use to<\/p>\n","protected":false},"author":1,"featured_media":14386,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121,36],"tags":[5930,5929,5933,5932,5931],"class_list":["post-14375","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","category-virtualization","tag-all-in-one-openstack-using-devstack","tag-deploy-single-node-openstack-using-devstack","tag-devstack-single-node-openstack","tag-devstack-ubuntu-22-04","tag-openstack-ubuntu-22-04","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/14375"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=14375"}],"version-history":[{"count":10,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/14375\/revisions"}],"predecessor-version":[{"id":20639,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/14375\/revisions\/20639"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/14386"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=14375"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=14375"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=14375"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}