{"id":5413,"date":"2020-08-08T23:01:10","date_gmt":"2020-08-08T20:01:10","guid":{"rendered":"https:\/\/kifarunix.com\/?p=5413"},"modified":"2024-03-14T22:39:58","modified_gmt":"2024-03-14T19:39:58","slug":"deploy-all-in-one-openstack-with-kolla-ansible-on-ubuntu-18-04","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/deploy-all-in-one-openstack-with-kolla-ansible-on-ubuntu-18-04\/","title":{"rendered":"Deploy All-In-One OpenStack with Kolla-Ansible on Ubuntu 18.04"},"content":{"rendered":"\n<p>In this guide, you will to learn how to deploy all-in-one OpenStack with <a href=\"https:\/\/opendev.org\/openstack\/kolla-ansible\" target=\"_blank\" rel=\"noreferrer noopener\">Kolla-Ansible<\/a> on Ubuntu 18.04. <\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-style-default td_pull_quote td_pull_center is-layout-flow wp-block-quote-is-layout-flow\">\n<p>Kolla provides Docker containers and Ansible playbooks to meet Kolla\u2019s mission. Kolla\u2019s mission is to provide production-ready containers and deployment tools for operating OpenStack clouds. It allows the operators with minimal experience to deploy OpenStack quickly and as experience grows modify the OpenStack configuration to suit the operator\u2019s exact requirements.<\/p>\n<\/blockquote>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#deploying-all-in-one-open-stack-with-kolla-ansible-on-ubuntu\">Deploying All-In-One OpenStack with Kolla-Ansible on Ubuntu<\/a><ul><li><a href=\"#system-requirements\">System Requirements<\/a><\/li><li><a href=\"#install-required-packages-on-ubuntu-18-04\">Install Required Packages on Ubuntu 18.04<\/a><\/li><li><a href=\"#install-ansible-on-ubuntu-18-04\">Install Ansible on Ubuntu 18.04<\/a><\/li><li><a href=\"#install-kolla-ansible-on-ubuntu-18-04\">Install Kolla-ansible on Ubuntu 18.04<\/a><\/li><li><a href=\"#configure-kolla-ansible-for-all-in-one-open-stack-deployment\">Configure Kolla-ansible for All-in-one OpenStack Deployment<\/a><ul><li><a href=\"#define-kolla-ansible-global-deployment-options\">Define Kolla-Ansible Global Deployment Options<\/a><\/li><\/ul><\/li><li><a href=\"#generate-kolla-passwords\">Generate Kolla Passwords<\/a><\/li><li><a href=\"#configure-all-in-one-open-stack-deployment-inventory\">Configure All-in-one OpenStack deployment Inventory<\/a><\/li><li><a href=\"#deploy-all-in-one-open-stack\">Deploy All-In-One OpenStack<\/a><ul><li><a href=\"#list-running-open-stack-docker-containers\">List Running OpenStack Docker Containers<\/a><\/li><\/ul><\/li><li><a href=\"#all-in-one-open-stack-post-deployment-tasks\">All-in-one OpenStack Post Deployment Tasks<\/a><\/li><li><a href=\"#reconfiguring-the-stack\">Reconfiguring the Stack<\/a><\/li><\/ul><\/li><li><a href=\"#accessing-open-stack-web-interface-horizon\">Accessing OpenStack Web Interface (Horizon)<\/a><ul><li><a href=\"#launching-an-instance-on-open-stack-aio\">Launching an Instance on OpenStack AIO<\/a><\/li><li><a href=\"#further-reading\">Further Reading<\/a><\/li><li><a href=\"#reference\">Reference<\/a><\/li><li><a href=\"#related-tutorials\">Related Tutorials<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"deploying-all-in-one-open-stack-with-kolla-ansible-on-ubuntu\"><a href=\"#aio-openstack-with-koll-ansible\">Deploying All-In-One OpenStack with Kolla-Ansible on Ubuntu<\/a><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"system-requirements\">System Requirements<\/h3>\n\n\n\n<p>Below are the recommended minimum requirements for deploying AIO OpenStack with Kolla-Ansible:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>2 (or more) network interfaces.<\/li>\n\n\n\n<li>At least 8gb main memory<\/li>\n\n\n\n<li>At least 40gb disk space<\/li>\n<\/ul>\n\n\n\n<p>Below are our deployment system specifics;<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Interfaces<\/strong><\/td><td>2 network interfaces:<br>enp1s0: 192.168.122.216\/24<br>enp6s0: no assigned IP address<\/td><\/tr><tr><td><strong>RAM<\/strong><\/td><td>8 GB<\/td><\/tr><tr><td><strong>vCPUs<\/strong><\/td><td>2<\/td><\/tr><tr><td><strong>Storage<\/strong><\/td><td>\/dev\/vda (root filesystem), \/: 50G<br>\/dev\/vda5 (Volume group, openstack_cinder): 50G<\/td><\/tr><tr><td><strong>Virtualization Platform<\/strong><\/td><td>KVM<\/td><\/tr><tr><td><strong>Operating System<\/strong><\/td><td>Ubuntu 18.04 LTS<\/td><\/tr><tr><td><strong>User<\/strong><\/td><td>non root user with sudo rights<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>You can provide as much resources since the more resources you have the better the performance of the stack.<\/p>\n\n\n\n<p><strong>NOTE: We are running the installation as non root user with sudo privileges.<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-required-packages-on-ubuntu-18-04\">Install Required Packages on Ubuntu 18.04<\/h3>\n\n\n\n<p>Before you can proceed, there are a number of required packages that needs to be installed.<\/p>\n\n\n\n<p>Update and upgrade your system packages<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo apt update<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo apt upgrade<\/code><\/pre>\n\n\n\n<p>Install the required packages;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo apt install python3-dev python3-venv libffi-dev gcc libssl-dev git<\/code><\/pre>\n\n\n\n<p>Create a virtual environment for deploying Kolla-ansible. To avoid conflict between system packages and Kolla-ansible packages, it is recommended that Kolla-ansible be installed in a virtual environment.<\/p>\n\n\n\n<p>You can create a virtual environment by executing the command below. Be sure to replace the path to your virtual environment.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>python3 -m venv $HOME\/kolla-openstack<\/code><\/pre>\n\n\n\n<p>Next, activate your virtual environment;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>source $HOME\/kolla-openstack\/bin\/activate<\/code><\/pre>\n\n\n\n<p>Once you activate the Kolla-ansible virtual environment, you shell prompt should change. See my shell prompt;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code><strong>(kolla-openstack)<\/strong> koromicha@kolla-ansible:~$<\/code><\/pre>\n\n\n\n<p>Upgrade pip;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>pip install -U pip<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-ansible-on-ubuntu-18-04\"><a href=\"#install-ansible-ubuntu-18.04\">Install Ansible on Ubuntu 18.04<\/a><\/h3>\n\n\n\n<p>Install Ansible from the virtual environment. If you ever log out of the virtual environment, you can always source the path to activate it;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>source $HOME\/kolla-openstack\/bin\/activate<\/code><\/pre>\n\n\n\n<p>Next, install Ansible. Kolla requires at least Ansible&nbsp;<code>2.8<\/code>&nbsp;up to&nbsp;<code>2.9<\/code>. <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>pip install 'ansible&lt;2.10'<\/code><\/pre>\n\n\n\n<p>Create an ansible configuration file on your home directory with the following tunables;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>vim $HOME\/ansible.cfg<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;defaults]\nhost_key_checking=False\npipelining=True\nforks=100<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-kolla-ansible-on-ubuntu-18-04\"><a href=\"#install-kolla-ansible-ubuntu-18.04\">Install Kolla-ansible on Ubuntu 18.04<\/a><\/h3>\n\n\n\n<p>Install Kolla-ansible on Ubuntu 18.04 using pip from the virtual environment above;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>source $HOME\/kolla-openstack\/bin\/activate<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>pip install kolla-ansible<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"configure-kolla-ansible-for-all-in-one-open-stack-deployment\">Configure Kolla-ansible for All-in-one OpenStack Deployment<\/h3>\n\n\n\n<p>Next, create Kolla configuration directory;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo mkdir \/etc\/kolla<\/code><\/pre>\n\n\n\n<p>Update the ownership of the Kolla config directory to the user with which you activated Koll-ansible deployment virtual environment as.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo chown $USER:$USER \/etc\/kolla<\/code><\/pre>\n\n\n\n<p>Copy the main Kolla configuration file, <code><strong>globals.yml<\/strong><\/code> and the OpenStack services passwords file, <code><strong>passwords.yml<\/strong><\/code> into the Kolla configuration directory above from the <strong>virtual environment<\/strong>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>cp $HOME\/kolla-openstack\/share\/kolla-ansible\/etc_examples\/kolla\/* \/etc\/kolla\/<\/code><\/pre>\n\n\n\n<p>Copy Kolla-ansible deployment inventory to the current working directory. In this tutorial, we are deploying all-in-one OpenStack with Kolla-ansible. Hence, copy the all-in-one ansible inventory file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>cp $HOME\/kolla-openstack\/share\/kolla-ansible\/ansible\/inventory\/all-in-one .<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"define-kolla-ansible-global-deployment-options\">Define Kolla-Ansible Global Deployment Options<\/h4>\n\n\n\n<p>Open the<code> globals.yml<\/code> configuration file and define the AIO Kolla global deployment options;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>vim \/etc\/kolla\/globals.yml<\/code><\/pre>\n\n\n\n<p>Below are the  basic options that we enabled for our AIO OpenStack deployment.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>grep -vE '^$|^#' \/etc\/kolla\/globals.yml<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>---\nconfig_strategy: \"COPY_ALWAYS\"\nkolla_base_distro: \"ubuntu\"\nkolla_install_type: \"binary\"\nopenstack_release: \"ussuri\"\nkolla_internal_vip_address: \"192.168.122.206\"\nkolla_internal_fqdn: \"kolla-openstack.kifarunix-demo.com\"\nkolla_external_vip_address: \"{{ kolla_internal_vip_address }}\"\nkolla_external_fqdn: \"{{ kolla_internal_fqdn }}\"\nnetwork_interface: \"enp1s0\"\nneutron_external_interface: \"enp6s0\"\nneutron_plugin_agent: \"openvswitch\"\nenable_haproxy: \"yes\"\n<strong>enable_cinder: \"yes\"<\/strong>\nenable_cinder_backend_lvm: \"yes\"\nkeystone_token_provider: 'fernet'\ncinder_volume_group: \"<strong>openstack_cinder<\/strong>\"\nnova_compute_virt_type: \"qemu\"\n<\/code><\/pre>\n\n\n\n<p><strong>Note that we enabled cinder block storage for openstack and defined the name of the existing volume group.<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>sudo vgs<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>  VG               #PV #LV #SN Attr   VSize   VFree  \n  <strong>openstack_cinder<\/strong>   1   0   0 wz--n- &lt;53.06g &lt;53.06g<\/code><\/pre>\n\n\n\n<p>Refer to <a href=\"https:\/\/docs.openstack.org\/\/kolla-ansible\/latest\/doc-kolla-ansible.pdf\" target=\"_blank\" rel=\"noreferrer noopener\">Kolla-ansible documentation guide<\/a> to learn more about the global options used above. The configuration is also highly commented. Go through the comments for each option to learn what it is about a specific option.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"generate-kolla-passwords\">Generate Kolla Passwords<\/h3>\n\n\n\n<p>Kolla <code><strong>passwords.yml<\/strong><\/code> configuration file stores various OpenStack services passwords. You can automatically generate the password using the Kolla-ansible <code>kolla-genpwd<\/code> in your virtual environment.<\/p>\n\n\n\n<p>Ensure that your virtual environment is activated<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>source $HOME\/kolla-openstack\/bin\/activate<\/code><\/pre>\n\n\n\n<p>Next, generate the passwords;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>kolla-genpwd<\/code><\/pre>\n\n\n\n<p>All generated passwords will be populated to <code><strong>\/etc\/kolla\/passwords.yml<\/strong><\/code> file.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"configure-all-in-one-open-stack-deployment-inventory\">Configure All-in-one OpenStack deployment Inventory<\/h3>\n\n\n\n<p>You now have our deployment inventory in place. Since we are running an all-in-one deployment, we will leave all the default options defined on the <code><strong>all-in-one<\/strong><\/code> inventory file as is.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"deploy-all-in-one-open-stack\">Deploy All-In-One OpenStack<\/h3>\n\n\n\n<p>Since everything is setup, you can now start to deploy OpenStack using Kolla-ansible playbooks.<\/p>\n\n\n\n<p><strong>Again, ensure that your virtual environment is activated.<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>source $HOME\/kolla-openstack\/bin\/activate<\/code><\/pre>\n\n\n\n<p>Bootstrap your localhost configuration before deploying containers using <code><strong>bootstrap-servers<\/strong><\/code> subcommand.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>kolla-ansible -i all-in-one bootstrap-servers<\/code><\/pre>\n\n\n\n<p>Below is just a snippet of the bootstrapping command;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>...\nTASK [baremetal : Restart docker] ******************************************************************************************************************************************\nchanged: [localhost]\n\nTASK [baremetal : Enable docker] *******************************************************************************************************************************************\nok: [localhost]\n\nTASK [baremetal : Stop time service] ***************************************************************************************************************************************\nskipping: [localhost]\n\nTASK [baremetal : Stop time service] ***************************************************************************************************************************************\nskipping: [localhost]\n\nTASK [baremetal : Synchronizing time one-time] *****************************************************************************************************************************\nskipping: [localhost]\n\nTASK [baremetal : Start time sync service] *********************************************************************************************************************************\nskipping: [localhost]\n\nTASK [baremetal : Start time sync service] *********************************************************************************************************************************\nskipping: [localhost]\n\nTASK [baremetal : Change state of selinux] *********************************************************************************************************************************\nskipping: [localhost]\n\nTASK [baremetal : include_tasks] *******************************************************************************************************************************************\nskipping: [localhost]\n\nPLAY RECAP *****************************************************************************************************************************************************************\nlocalhost                  : ok=39   changed=16   unreachable=0    failed=0    skipped=32   rescued=0    ignored=0  \n<\/code><\/pre>\n\n\n\n<p>This is what the bootstrap command do;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Customisation of&nbsp;<code>\/etc\/hosts<\/code><\/li>\n\n\n\n<li>Creation of user and group<\/li>\n\n\n\n<li>Kolla configuration directory<\/li>\n\n\n\n<li>Package installation and removal<\/li>\n\n\n\n<li>Docker engine installation and configuration<\/li>\n\n\n\n<li>Disabling firewalls<\/li>\n\n\n\n<li>Creation of Python virtual environment<\/li>\n\n\n\n<li>Configuration of Apparmor<\/li>\n\n\n\n<li>Configuration of SELinux<\/li>\n\n\n\n<li>Configuration of NTP daemon<\/li>\n<\/ul>\n\n\n\n<p>Run pre-deployment checks;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>kolla-ansible -i all-in-one prechecks<\/code><\/pre>\n\n\n\n<p>If everything is fine, proceed to deploy OpenStack with Kolla-ansible<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>kolla-ansible -i all-in-one deploy<\/code><\/pre>\n\n\n\n<p>The process might take a while as it involves building containers for different OpenStack services.<\/p>\n\n\n\n<p>If all ends well, you should get 0 failed tasks;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>...\nPLAY RECAP *****************************************************************************************************************************************************************\nlocalhost                  : ok=366  changed=72   unreachable=0    <strong>failed=0<\/strong>    skipped=245  rescued=0    ignored=0<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"list-running-open-stack-docker-containers\">List Running OpenStack Docker Containers<\/h4>\n\n\n\n<p>Once the deployment is done, you can list running OpenStack docker containers.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>docker ps<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>CONTAINER ID        IMAGE                                                  COMMAND                  CREATED             STATUS              PORTS               NAMES\nc6b248403560        kolla\/ubuntu-binary-horizon:ussuri                     \"dumb-init --single-\u2026\"   8 minutes ago       Up 8 minutes                            horizon\n2beb267813bf        kolla\/ubuntu-binary-heat-engine:ussuri                 \"dumb-init --single-\u2026\"   10 minutes ago      Up 10 minutes                           heat_engine\n5870b0231ebd        kolla\/ubuntu-binary-heat-api-cfn:ussuri                \"dumb-init --single-\u2026\"   10 minutes ago      Up 10 minutes                           heat_api_cfn\n66f4ed832ddd        kolla\/ubuntu-binary-heat-api:ussuri                    \"dumb-init --single-\u2026\"   11 minutes ago      Up 11 minutes                           heat_api\nf2bb8fada9a7        kolla\/ubuntu-binary-neutron-metadata-agent:ussuri      \"dumb-init --single-\u2026\"   14 minutes ago      Up 14 minutes                           neutron_metadata_agent\nf9d5336ac7c6        kolla\/ubuntu-binary-neutron-l3-agent:ussuri            \"dumb-init --single-\u2026\"   14 minutes ago      Up 14 minutes                           neutron_l3_agent\n9d03c6194140        kolla\/ubuntu-binary-neutron-dhcp-agent:ussuri          \"dumb-init --single-\u2026\"   14 minutes ago      Up 14 minutes                           neutron_dhcp_agent\na19896229e01        kolla\/ubuntu-binary-neutron-openvswitch-agent:ussuri   \"dumb-init --single-\u2026\"   15 minutes ago      Up 15 minutes                           neutron_openvswitch_agent\n4fb2a327014a        kolla\/ubuntu-binary-neutron-server:ussuri              \"dumb-init --single-\u2026\"   15 minutes ago      Up 15 minutes                           neutron_server\nc5afee94823a        kolla\/ubuntu-binary-openvswitch-vswitchd:ussuri        \"dumb-init --single-\u2026\"   25 minutes ago      Up 25 minutes                           openvswitch_vswitchd\n84c10bfce945        kolla\/ubuntu-binary-openvswitch-db-server:ussuri       \"dumb-init --single-\u2026\"   25 minutes ago      Up 25 minutes                           openvswitch_db\n1b4b0189c044        kolla\/ubuntu-binary-nova-compute:ussuri                \"dumb-init --single-\u2026\"   49 minutes ago      Up 33 minutes                           nova_compute\n410bc4a9ac94        kolla\/ubuntu-binary-nova-libvirt:ussuri                \"dumb-init --single-\u2026\"   51 minutes ago      Up 33 minutes                           nova_libvirt\n286aabab9557        kolla\/ubuntu-binary-nova-ssh:ussuri                    \"dumb-init --single-\u2026\"   53 minutes ago      Up 33 minutes                           nova_ssh\nf7ade004aba0        kolla\/ubuntu-binary-nova-novncproxy:ussuri             \"dumb-init --single-\u2026\"   54 minutes ago      Up 34 minutes                           nova_novncproxy\nce053ee3936c        kolla\/ubuntu-binary-nova-conductor:ussuri              \"dumb-init --single-\u2026\"   54 minutes ago      Up 33 minutes                           nova_conductor\n9ace1abb6b13        kolla\/ubuntu-binary-nova-api:ussuri                    \"dumb-init --single-\u2026\"   54 minutes ago      Up 33 minutes                           nova_api\n93ec899f31e3        kolla\/ubuntu-binary-nova-scheduler:ussuri              \"dumb-init --single-\u2026\"   54 minutes ago      Up 32 minutes                           nova_scheduler\n71675d26922b        kolla\/ubuntu-binary-placement-api:ussuri               \"dumb-init --single-\u2026\"   About an hour ago   Up 33 minutes                           placement_api\n022bc9dd585c        kolla\/ubuntu-binary-cinder-backup:ussuri               \"dumb-init --single-\u2026\"   About an hour ago   Up 32 minutes                           cinder_backup\n10f728092b34        kolla\/ubuntu-binary-cinder-volume:ussuri               \"dumb-init --single-\u2026\"   About an hour ago   Up 33 minutes                           cinder_volume\ne34abeac698c        kolla\/ubuntu-binary-cinder-scheduler:ussuri            \"dumb-init --single-\u2026\"   About an hour ago   Up 33 minutes                           cinder_scheduler\nd82dbb5a8b94        kolla\/ubuntu-binary-cinder-api:ussuri                  \"dumb-init --single-\u2026\"   About an hour ago   Up 32 minutes                           cinder_api\nc214451bc731        kolla\/ubuntu-binary-glance-api:ussuri                  \"dumb-init --single-\u2026\"   About an hour ago   Up 34 minutes                           glance_api\nd895ebbc56b9        kolla\/ubuntu-binary-keystone-fernet:ussuri             \"dumb-init --single-\u2026\"   About an hour ago   Up 33 minutes                           keystone_fernet\n8e59bb92ad72        kolla\/ubuntu-binary-keystone-ssh:ussuri                \"dumb-init --single-\u2026\"   About an hour ago   Up 34 minutes                           keystone_ssh\n4e3f928dc21d        kolla\/ubuntu-binary-keystone:ussuri                    \"dumb-init --single-\u2026\"   About an hour ago   Up 34 minutes                           keystone\ne53e6f4982af        kolla\/ubuntu-binary-rabbitmq:ussuri                    \"dumb-init --single-\u2026\"   About an hour ago   Up 33 minutes                           rabbitmq\nbc7eeed07ef7        kolla\/ubuntu-binary-tgtd:ussuri                        \"dumb-init --single-\u2026\"   About an hour ago   Up 32 minutes                           tgtd\n50fb03637da8        kolla\/ubuntu-binary-iscsid:ussuri                      \"dumb-init --single-\u2026\"   About an hour ago   Up 32 minutes                           iscsid\n87d533ef99ee        kolla\/ubuntu-binary-memcached:ussuri                   \"dumb-init --single-\u2026\"   About an hour ago   Up 34 minutes                           memcached\n8504b79a0988        kolla\/ubuntu-binary-keepalived:ussuri                  \"dumb-init --single-\u2026\"   2 hours ago         Up 34 minutes                           keepalived\n73cbbebc44c2        kolla\/ubuntu-binary-haproxy:ussuri                     \"dumb-init --single-\u2026\"   2 hours ago         Up 34 minutes                           haproxy\nc44ebacd4a1b        kolla\/ubuntu-binary-mariadb-clustercheck:ussuri        \"dumb-init --single-\u2026\"   2 hours ago         Up 33 minutes                           mariadb_clustercheck\nf307c05bc38a        kolla\/ubuntu-binary-mariadb:ussuri                     \"dumb-init -- kolla_\u2026\"   2 hours ago         Up 34 minutes                           mariadb\n5693020d43a2        kolla\/ubuntu-binary-chrony:ussuri                      \"dumb-init --single-\u2026\"   2 hours ago         Up 34 minutes                           chrony\n9cb7d0776984        kolla\/ubuntu-binary-cron:ussuri                        \"dumb-init --single-\u2026\"   2 hours ago         Up 34 minutes                           cron\nacf3ce5c1813        kolla\/ubuntu-binary-kolla-toolbox:ussuri               \"dumb-init --single-\u2026\"   2 hours ago         Up 33 minutes                           kolla_toolbox\n54b6b06d7e03        kolla\/ubuntu-binary-fluentd:ussuri                     \"dumb-init --single-\u2026\"   2 hours ago         Up 34 minutes                           fluentd\n<\/code><\/pre>\n\n\n\n<p>All-in-one OpenStack is now up and running.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"all-in-one-open-stack-post-deployment-tasks\">All-in-one OpenStack Post Deployment Tasks<\/h3>\n\n\n\n<p>Install OpenStack command line administration tools. You can do this from the virtual environment.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>source $HOME\/kolla-openstack\/bin\/activate<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>pip install python-openstackclient python-neutronclient python-glanceclient<\/code><\/pre>\n\n\n\n<p>You can now administer OpenStack from cli. For example, to list the currently available services;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>openstack service list<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>+----------------------------------+-------------+----------------+\n| ID                               | Name        | Type           |\n+----------------------------------+-------------+----------------+\n| 06864fe8aae14ca9ad3a021af20b6159 | nova_legacy | compute_legacy |\n| 3f3b8fdfc1b04d789cbafc820ba6971d | cinderv3    | volumev3       |\n| 5cb91155a74d4fe0bed0081f60376b0f | heat        | orchestration  |\n| 789c635f1dc947018aaa962537547985 | glance      | image          |\n| abe33e17f53d4656b71251cbf57cf24c | nova        | compute        |\n| df623a12fe25412b9bd29483560eb4e5 | neutron     | network        |\n| e2318f5d7a424dac9416910e6b1094f6 | placement   | placement      |\n| e6c08f0c6a84421e85c8bff4c73a1b83 | heat-cfn    | cloudformation |\n| ec383b1d33aa4d64ab55829a44b3c687 | keystone    | identity       |\n| f0d09637e4b84db1a02ce26b005407ca | cinderv2    | volumev2       |\n+----------------------------------+-------------+----------------+\n<\/code><\/pre>\n\n\n\n<p>Generate OpenStack admin user credentials file (<code>openrc<\/code>).<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>kolla-ansible post-deploy<\/code><\/pre>\n\n\n\n<p>This command generates the admin credentials file, <code>\/etc\/kolla\/admin-openrc.sh<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>source \/etc\/kolla\/admin-openrc.sh<\/code><\/pre>\n\n\n\n<p>Create OpenStack networks, images, nova keys using <code>init-runonce<\/code> script. The script downloads a cirros image and registers it. Then it configures networking and nova quotas to allow 40 m1.small instances to be created.<\/p>\n\n\n\n<p>In regards to networking, edit the <code>init-runonce<\/code> script and configure your public network,that you want to connect to the internet via.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>vim kolla-openstack\/share\/kolla-ansible\/init-runonce<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>...\nENABLE_EXT_NET=${ENABLE_EXT_NET:-1}\nEXT_NET_CIDR=${EXT_NET_CIDR:-'<strong>192.168.122.0\/24<\/strong>'}\nEXT_NET_RANGE=${EXT_NET_RANGE:-'start=<strong>192.168.122.15,end=192.168.122.45<\/strong>'}\nEXT_NET_GATEWAY=${EXT_NET_GATEWAY:-'<strong>192.168.122.1<\/strong>'}\n<\/code><\/pre>\n\n\n\n<p>Next, run the script from the virtual environment.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>kolla-openstack\/share\/kolla-ansible\/init-runonce<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>...\n+----------------------------+-----------+\n| Field                      | Value     |\n+----------------------------+-----------+\n| OS-FLV-DISABLED:disabled   | False     |\n| OS-FLV-EXT-DATA:ephemeral  | 0         |\n| disk                       | 160       |\n| id                         | 5         |\n| name                       | m1.xlarge |\n| os-flavor-access:is_public | True      |\n| properties                 |           |\n| ram                        | 16384     |\n| rxtx_factor                | 1.0       |\n| swap                       |           |\n| vcpus                      | 8         |\n+----------------------------+-----------+\n\nDone.\n\nTo deploy a demo instance, run:\n\nopenstack server create \\\n    --image cirros \\\n    --flavor m1.tiny \\\n    --key-name mykey \\\n    --network demo-net \\\n    demo1\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"reconfiguring-the-stack\">Reconfiguring the Stack<\/h3>\n\n\n\n<p>If you want to reconfigure the stack by adding or removing services, edit the globals.yml configuration file and redoply the changes from the virtual environment.<\/p>\n\n\n\n<p>For example, after making changes on the globals config file, reconfigure the stack;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>source \/path\/to\/virtual-environment\/bin\/activate<\/code><\/pre>\n\n\n\n<p>The redeploy the changes;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>kolla-ansible -i all-in-one&nbsp; reconfigure<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"accessing-open-stack-web-interface-horizon\">Accessing OpenStack Web Interface (Horizon)<\/h2>\n\n\n\n<p>So far so good! OpenStack is up and running. It is time we login to the web interface.<\/p>\n\n\n\n<p>First, check the OpenStack IP address (the Kolla VIP address).<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>ip add show enp1s0<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>2: enp1s0: &lt;BROADCAST,MULTICAST,UP,LOWER_UP&gt; mtu 1500 qdisc fq_codel state UP group default qlen 1000\n    link\/ether 52:54:00:3e:8c:af brd ff:ff:ff:ff:ff:ff\n    inet 192.168.122.216\/24 brd 192.168.122.255 scope global dynamic enp1s0\n       valid_lft 2697sec preferred_lft 2697sec\n  <strong>  <\/strong>inet <strong>192.168.122.206\/32<\/strong> scope global enp1s0\n       valid_lft forever preferred_lft forever\n    inet6 fe80::5054:ff:fe3e:8caf\/64 scope link \n       valid_lft forever preferred_lft forever\n<\/code><\/pre>\n\n\n\n<p>So, <strong>192.168.122.206<\/strong>, is the IP address with which we access OpenStack from the external browser.<\/p>\n\n\n\n<p>Therefore, to access the OpenStack Horizon from the browser, use the address, <code><strong>http:\/\/192.168.122.206<\/strong><\/code>.<\/p>\n\n\n\n<p>.This should take you to OpenStack web interface login page;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1252\" height=\"709\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/08\/openstack-aio.png\" alt=\"Deploy All-In-One OpenStack with Kolla-Ansible on Ubuntu 18.04\" class=\"wp-image-6647\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/08\/openstack-aio.png?v=1596916131 1252w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/08\/openstack-aio-768x435.png?v=1596916131 768w\" sizes=\"(max-width: 1252px) 100vw, 1252px\" \/><\/figure>\n\n\n\n<p>Login using <code><strong>admin<\/strong><\/code> as the username.<\/p>\n\n\n\n<p>You can obtain the admin credentials from the Kolla passwords file, <code>\/etc\/kolla\/passwords.yml<\/code>. For the Horizon authentication, you need to the Keystone admin password.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>grep keystone_admin_password \/etc\/kolla\/passwords.yml<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><code><strong>keystone_admin_password: vyntMgfyaZnHUcVGqQJ5OqVxbe4ppUJ2exAiB7po<\/strong><\/code><\/pre>\n\n\n\n<p>When you successfully log in, you land on OpenStack horizon dashboard.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1904\" height=\"956\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/08\/openstack-horizon.png\" alt=\"Deploy All-In-One OpenStack with Kolla-Ansible on Ubuntu 18.04\" class=\"wp-image-6648\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/08\/openstack-horizon.png?v=1596916195 1904w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/08\/openstack-horizon-768x386.png?v=1596916195 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/08\/openstack-horizon-1536x771.png?v=1596916195 1536w\" sizes=\"(max-width: 1904px) 100vw, 1904px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"launching-an-instance-on-open-stack-aio\">Launching an Instance on OpenStack AIO<\/h3>\n\n\n\n<p>We already have cirros image registered (<strong><code>Admin &gt; Compute &gt; Images<\/code><\/strong>).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1914\" height=\"582\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/08\/openstack-images.png\" alt=\"Deploy All-In-One OpenStack with Kolla-Ansible on Ubuntu 18.04\" class=\"wp-image-6649\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/08\/openstack-images.png?v=1596916222 1914w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/08\/openstack-images-768x234.png?v=1596916222 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/08\/openstack-images-1536x467.png?v=1596916222 1536w\" sizes=\"(max-width: 1914px) 100vw, 1914px\" \/><\/figure>\n\n\n\n<p>Example networks (<strong><code>Admin &gt; Network &gt; Networks<\/code><\/strong>) created.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1910\" height=\"534\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/08\/openstack-networks.png\" alt=\"Deploy All-In-One OpenStack with Kolla-Ansible on Ubuntu 18.04\" class=\"wp-image-6650\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/08\/openstack-networks.png?v=1596916241 1910w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/08\/openstack-networks-768x215.png?v=1596916241 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/08\/openstack-networks-1536x429.png?v=1596916241 1536w\" sizes=\"(max-width: 1910px) 100vw, 1910px\" \/><\/figure>\n\n\n\n<p>We also have different flavours of the cirros image created;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1912\" height=\"631\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/08\/openstack-cirros-flavours.png\" alt=\"OpenStack cirros flavours\" class=\"wp-image-6651\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/08\/openstack-cirros-flavours.png?v=1596916287 1912w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/08\/openstack-cirros-flavours-768x253.png?v=1596916287 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/08\/openstack-cirros-flavours-1536x507.png?v=1596916287 1536w\" sizes=\"(max-width: 1912px) 100vw, 1912px\" \/><\/figure>\n\n\n\n<p>To create and launch an instance, navigate to <strong>Project &gt; Compute &gt; Instances<\/strong>. Click <strong>Launch Instance<\/strong>.<\/p>\n\n\n\n<p>Set the details of the instance, set the source image, the flavour, the networks and other settings.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"824\" height=\"917\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/08\/instance-settings.png\" alt=\"Deploy All-In-One OpenStack with Kolla-Ansible on Ubuntu 18.04\" class=\"wp-image-6652\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/08\/instance-settings.png?v=1596916319 824w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/08\/instance-settings-768x855.png?v=1596916319 768w\" sizes=\"(max-width: 824px) 100vw, 824px\" \/><\/figure><\/div>\n\n\n<p>Click <strong>Launch Instance<\/strong> when done.<\/p>\n\n\n\n<p>The instance takes a few mins to create. When done, it should look like as shown below;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1918\" height=\"533\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/08\/instance-created.png\" alt=\"Deploy All-In-One OpenStack with Kolla-Ansible on Ubuntu 18.04\" class=\"wp-image-6653\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/08\/instance-created.png?v=1596916360 1918w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/08\/instance-created-768x213.png?v=1596916360 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2020\/08\/instance-created-1536x427.png?v=1596916360 1536w\" sizes=\"(max-width: 1918px) 100vw, 1918px\" \/><\/figure>\n\n\n\n<p>Click on the instance name to see more details including logs, access to console&#8230;<\/p>\n\n\n\n<p>You can as well deploy an instance using OpenStack CLI client;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>openstack server create \\\n    --image cirros \\\n    --flavor m1.tiny \\\n    --key-name mykey \\\n    --network demo-net \\\n    inst002<\/code><\/pre>\n\n\n\n<p>Check the status of the OpenStack instances;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>openstack server list<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>\n+--------------------------------------+---------+--------+------------------------+--------+---------+\n| ID                                   | Name    | Status | Networks               | Image  | Flavor  |\n+--------------------------------------+---------+--------+------------------------+--------+---------+\n| c429be25-b8d0-482c-a68a-e11836ab9dc9 | inst002 | ACTIVE | demo-net=10.0.0.240    | cirros | m1.tiny |\n| b5467ca7-0224-42e0-b3ed-ffe7cf6a6885 | inst001 | ACTIVE | public1=192.168.122.28 |        | m1.tiny |\n+--------------------------------------+---------+--------+------------------------+--------+---------+\n<\/code><\/pre>\n\n\n\n<p>For more OpenStack client examples, refer to;<\/p>\n\n\n\n<p><a href=\"https:\/\/docs.openstack.org\/ocata\/user-guide\/cli-cheat-sheet.html\" target=\"_blank\" rel=\"noreferrer noopener\">OpenStack command-line interface cheat sheet<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"further-reading\">Further Reading<\/h3>\n\n\n\n<p><a href=\"https:\/\/docs.ansible.com\/ansible\/latest\/user_guide\/intro_getting_started.html\" target=\"_blank\" rel=\"noreferrer noopener\">Getting Started with Ansible<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/docs.openstack.org\/ussuri\/admin\/\" target=\"_blank\" rel=\"noreferrer noopener\">OpenStack Administration guides<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/www.docker.com\/get-started\" target=\"_blank\" rel=\"noreferrer noopener\">Getting Started with Docker<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"reference\">Reference<\/h3>\n\n\n\n<p><a href=\"https:\/\/docs.openstack.org\/project-deploy-guide\/kolla-ansible\/ussuri\/quickstart.html\" target=\"_blank\" rel=\"noreferrer noopener\">OpenStack Kolla-Ansible Quick Start Guide<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"related-tutorials\">Related Tutorials<\/h3>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-and-run-mariadb-as-a-docker-container\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install and Run MariaDB as a Docker Container<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-and-deploy-kubernetes-cluster-on-ubuntu-20-04\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install and Deploy Kubernetes Cluster on Ubuntu 20.04<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-and-use-docker-ce-on-centos-8\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install and Use Docker CE on CentOS 8<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-docker-ce-on-ubuntu-20-04\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install Docker CE on Ubuntu 20.04<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this guide, you will to learn how to deploy all-in-one OpenStack with Kolla-Ansible on Ubuntu 18.04. Kolla provides Docker containers and Ansible playbooks to<\/p>\n","protected":false},"author":1,"featured_media":14393,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121,1884,1722,1885,1076,1077,1886],"tags":[1888,1673,1887,1890,1892,1891,1889,67],"class_list":["post-5413","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","category-ansible","category-automation-2","category-cloud-compute","category-containers","category-docker","category-openstack","tag-deploy-all-in-one-openstack-on-ubuntu-20-04","tag-docker-containers","tag-install-kolla-ansible-on-ubuntu-20-04","tag-kolla-ansible","tag-openstack","tag-openstack-docker-containers","tag-single-node-openstack-with-koll-ansbile","tag-ubuntu-18-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\/5413"}],"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=5413"}],"version-history":[{"count":22,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/5413\/revisions"}],"predecessor-version":[{"id":21491,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/5413\/revisions\/21491"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/14393"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=5413"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=5413"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=5413"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}