{"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<p>In this tutorial, you will learn how to deploy OpenStack using DevStack on Ubuntu 22.04\/Ubuntu 20.04. There are <a href=\"https:\/\/www.openstack.org\/software\/project-navigator\/deployment-tools\" target=\"_blank\" rel=\"noreferrer noopener\">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. <em><a href=\"https:\/\/docs.openstack.org\/devstack\/latest\/overview.html\" target=\"_blank\" rel=\"noopener\">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<h2 class=\"wp-block-heading\">Deploy OpenStack using DevStack on Ubuntu<\/h2>\n\n\n\n<p>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<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Item<\/strong><\/td><td><strong>Specifics<\/strong><\/td><\/tr><tr><td>Linux System<\/td><td>Minimal Ubuntu 22.04\/20.04 VM running on VirtualBox<\/td><\/tr><tr><td>Processors<\/td><td>4 vCPUs<\/td><\/tr><tr><td>RAM<\/td><td>8 GB<\/td><\/tr><tr><td>Disk<\/td><td>50 GB<\/td><\/tr><tr><td>Internet Access<\/td><td>Yes<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Install Minimal Linux System<\/h3>\n\n\n\n<p>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<h3 class=\"wp-block-heading\">Run System Update\/Upgrade<\/h3>\n\n\n\n<p>Once the system is up, you can update the system package repos;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update -y<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt upgrade -y &amp;&amp; sudo systemctl reboot -i<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Create an Optional Deployment User<\/h3>\n\n\n\n<p>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<p>To create a user account, run the command below;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo useradd -m -s \/bin\/bash cloud-admin<\/code><\/pre>\n\n\n\n<p>Give the user passwordless sudo rights;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo visudo -f \/etc\/sudoers.d\/cloud-admin<\/code><\/pre>\n\n\n\n<p>Enter the line below<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cloud-admin ALL = NOPASSWD: ALL<\/code><\/pre>\n\n\n\n<p>Save and exit the file.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Clone DevStack Github Repository<\/h3>\n\n\n\n<p>Switch to deployment user created above and clone the DevStack Github repository which contains a <em>script that installs OpenStack and templates for configuration files<\/em>;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo -u cloud-admin -i<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>git clone https:\/\/opendev.org\/openstack\/devstack<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>ls -1 devstack<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>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<h3 class=\"wp-block-heading\">Configure DevStack for OpenStack Deployment<\/h3>\n\n\n\n<p>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<p>Thus, navigate to the devstack Github repository directory;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd devstack<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>vim local.conf<\/code><\/pre>\n\n\n\n<p>Enter the settings below, and update the value of each variable to your preferred password;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;&#91;local|localrc]]\nADMIN_PASSWORD=<strong>YourPasswordHere<\/strong>\nDATABASE_PASSWORD=$ADMIN_PASSWORD\nRABBIT_PASSWORD=$ADMIN_PASSWORD\nSERVICE_PASSWORD=$ADMIN_PASSWORD<\/code><\/pre>\n\n\n\n<p>Note that we used same password for all those services in this example setup.<\/p>\n\n\n\n<p>Similarly, define the OpenStack Host IP address;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>HOST_IP=192.168.56.124<\/code><\/pre>\n\n\n\n<p>Change that to your system IP that will allow you to access OpenStack.<\/p>\n\n\n\n<p>Save and exit the file.<\/p>\n\n\n\n<p>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<p>You can check the sample local.conf configuration file under the <strong><code>devstack\/samples\/<\/code><\/strong> directory.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Deploy OpenStack using DevStack<\/h3>\n\n\n\n<p>All you need to do to deploy OpenStack using DevStack is to execute the DevStack script, <strong><code>stack.sh<\/code><\/strong> and let it perform its magics!<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/stack.sh<\/code><\/pre>\n\n\n\n<p>In the meantime, it is time for you to get up and make coffee!!<\/p>\n\n\n\n<p>When the script completes successfully, you will see such an installation summary output;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>=========================\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<p>And that is how you can simply deploy OpenStack using DevStack on Ubuntu 22.04\/Ubuntu 20.04.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Accessing OpenStack Horizon<\/h3>\n\n\n\n<p>From the installation summary, you will see such information as;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>This is your host IP address: 192.168.56.124\nThis is your host IPv6 address: ::1\nHorizon is now available at <strong>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<p>The OpenStack dashboard should be available on <strong>http:\/\/server-IP\/dashboard<\/strong>.<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/10\/openstack-dashboard.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1498\" height=\"797\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/10\/openstack-dashboard.png\" alt=\"Deploy OpenStack using DevStack on Ubuntu 22.04\/Ubuntu 20.04\" class=\"wp-image-14388\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/10\/openstack-dashboard.png?v=1665296768 1498w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/10\/openstack-dashboard-768x409.png?v=1665296768 768w\" sizes=\"(max-width: 1498px) 100vw, 1498px\" \/><\/figure><\/a><\/div>\n\n\n\n<p>You can login using the default user accounts created above.<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/10\/overview-openstack-dashboard.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1910\" height=\"1439\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/10\/overview-openstack-dashboard.png\" alt=\"Deploy OpenStack using DevStack on Ubuntu 22.04\/Ubuntu 20.04\" class=\"wp-image-14389\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/10\/overview-openstack-dashboard.png?v=1665296803 1910w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/10\/overview-openstack-dashboard-768x579.png?v=1665296803 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2022\/10\/overview-openstack-dashboard-1536x1157.png?v=1665296803 1536w\" sizes=\"(max-width: 1910px) 100vw, 1910px\" \/><\/figure><\/a><\/div>\n\n\n\n<p>You can now go through the OpenStack menu options to explore it further.<\/p>\n\n\n\n<p>We will bring to you more tutorial around OpenStack in our next tutorials. Until then, read more on <a href=\"https:\/\/docs.openstack.org\/zed\/admin\/index.html\" target=\"_blank\" rel=\"noreferrer noopener\">how to administer OpenStack<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Other Tutorials<\/h3>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/deploy-all-in-one-openstack-with-kolla-ansible-on-ubuntu-18-04\/\" target=\"_blank\" rel=\"noreferrer noopener\">Deploy All-In-One OpenStack with Kolla-Ansible on Ubuntu 18.04<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-and-configure-ceph-block-device-on-ubuntu-18-04\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install and Configure Ceph Block Device on Ubuntu 18.04<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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}]}}