Openstack is a free and opensource IaaS cloud platform that handles cloud compute, storage and network resources. It comes with an intuitive dashboard that enables systems administrators to provide and monitor these resources. You can seamlessly install OpenStack locally on your Ubuntu 18.04 instance for learning and testing purposes using Devstack. Devstack is a set of extensible scripts that facilitate OpenStack deployment. In this guide, you will learn how to deploy OpenStack on Ubuntu 18.04 with devstack.
Before we begin, ensure you have the following minimum prerequisites
With the minimum requirements satisfied, we can now proceed.
To start off, log into your Ubuntu 18.04 system using SSH protocol and update & upgrade system repositories using the following command.
apt update -y && apt upgrade -y
Sample Output Next reboot the system using the command.
sudo reboot
OR
init 6
Best practice demands that devstack should be run as a regular user with sudo privileges. With that in mind, we are going to add a new user called “stack” and assign sudo privileges. To create stack user execute
sudo adduser -s /bin/bash -d /opt/stack -m stack
Next, run the command below to assign sudo privileges to the user
echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack
Sample Output
Once you have successfully created the user ‘stack’ and assigned sudo privileges, switch to the user using the command.
su - stack
In most Ubuntu 18.04 systems, git comes already installed. If by any chance git is missing, install it by running the following command.
sudo apt install git -y
Sample output Using git, clone devstack’s git repository as shown.
git clone https://git.openstack.org/openstack-dev/devstack
Sample output
In this step, navigate to the devstack directory.
cd devstack
Then create a local.conf
configuration file.
vim local.conf
Paste the following content
[[local|localrc]]
# Password for KeyStone, Database, RabbitMQ and Service
ADMIN_PASSWORD=StrongAdminSecret
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD
# Host IP - get your Server/VM IP address from ip addr command
HOST_IP=10.208.0.10
Save and exit the text editor. NOTE:
ADMIN_PASSWORD
is the password that you will use to log in to the OpenStack login page. The default username is admin.HOST_IP
is your system’s IP address that is obtained by running ifconfig
or ip addr
commands.To commence the installation of OpenStack on Ubuntu 18.04, run the script below contained in devstack directory.
./stack.sh
The following features will be installed:
The deployment takes about 10 to 15 minutes depending on the speed of your system and internet connection. In our case, it took roughly 12 minutes. At the very end, you should see output similar to what we have below. This confirms that all went well and that we can proceed to access OpenStack via a web browser.
To access OpenStack via a web browser browse your Ubuntu’s IP address as shown. https://server-ip/dashboard
This directs you to a login page as shown. Enter the credentials and hit “Sign In” You should be able to see the Management console dashboard as shown below. For more on Devstack’s customization, check out their system configuration guide. Additionally, check out the Openstack documentation for administration guide.
Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.
While we believe that this content benefits our community, we have not yet thoroughly reviewed it. If you have any suggestions for improvements, please let us know by clicking the “report an issue“ button at the bottom of the tutorial.
Is this GUI or CLI
- Sanjana
Hi , I am getting this error message when trying to install: ERROR keystone oslo_db.exception.DBConnectionError: (pymysql.err.OperationalError) (2003, “Can’t connect to MySQL server on ‘#$@127.0.0.1’ ([Errno -2] Name or service not known)”) Ubuntu 20.04
- Kostas
Dear all, While installing OpenStack on Ubuntu 18.04, It’s showing the below error. The following packages have unmet dependencies: python3-dev : Depends: python3 (= 3.6.5-3) but 3.6.5-3ubuntu1 is to be installed python3-venv : Depends: python3 (= 3.6.5-3) but 3.6.5-3ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages. +functions-common:apt_get:1 exit_trap +./stack.sh:exit_trap:503 local r=100 ++./stack.sh:exit_trap:504 jobs -p +./stack.sh:exit_trap:504 jobs= +./stack.sh:exit_trap:507 [[ -n ‘’ ]] +./stack.sh:exit_trap:513 ‘[’ -f ‘’ ‘]’ +./stack.sh:exit_trap:518 kill_spinner +./stack.sh:kill_spinner:413 ‘[’ ‘!’ -z ‘’ ‘]’ +./stack.sh:exit_trap:520 [[ 100 -ne 0 ]] +./stack.sh:exit_trap:521 echo ‘Error on exit’ Error on exit +./stack.sh:exit_trap:523 type -p generate-subunit +./stack.sh:exit_trap:526 [[ -z /opt/stack/logs ]] +./stack.sh:exit_trap:529 /usr/bin/python3.6 /opt/stack/devstack/tools/worlddump.py -d /opt/stack/logs +./stack.sh:exit_trap:538 exit 100
- Nithin
bonjour , je trouve le problème suivant : +./stack.sh:exit_trap:561 /opt/stack/devstack/tools/worlddump.py -d /opt/stack/logs World dumping… see /opt/stack/logs/worlddump-2020-06-08-112032.txt for details +./satck.sh:exit_trap :538 exit1
- walid
HI everyone, im facing this problem when installing openstack. Do anyone know how to solve it? +functions-common:apt_get:1109 sudo DEBIAN_FRONTEND=noninteractive http_proxy= https_proxy= no_proxy= apt-get --option Dpkg::Options::=–force-confold --assume-yes install targetcli-fb Reading package lists… Done Building dependency tree Reading state information… Done targetcli-fb is already the newest version (2.1.43-1). The following package was automatically installed and is no longer required: python3-wheel Use ‘sudo apt autoremove’ to remove it. 0 upgraded, 0 newly installed, 0 to remove and 16 not upgraded. 2 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Setting up python3-rtslib-fb (2.1.71-0ubuntu1~cloud0) … Failed to start rtslib-fb-targetctl.service: Unit rtslib-fb-targetctl.service is not loaded properly: Exec format error. See system logs and ‘systemctl status rtslib-fb-targetctl.service’ for details. invoke-rc.d: initscript rtslib-fb-targetctl, action “start” failed. ● rtslib-fb-targetctl.service - Restore LIO kernel target configuration Loaded: error (Reason: Exec format error) Active: inactive (dead) Apr 28 21:41:20 jun-VirtualBox systemd[1]: /lib/systemd/system/rtslib-fb-targetctl.service:9: Executable path is not absolute: mkdir -p /etc/rtslib-fb-target Apr 28 21:41:20 jun-VirtualBox systemd[1]: /lib/systemd/system/rtslib-fb-targetctl.service:9: Executable path is not absolute: mkdir -p /etc/rtslib-fb-target Apr 28 21:41:20 jun-VirtualBox systemd[1]: /lib/systemd/system/rtslib-fb-targetctl.service:9: Executable path is not absolute: mkdir -p /etc/rtslib-fb-target Apr 28 21:41:59 jun-VirtualBox systemd[1]: /lib/systemd/system/rtslib-fb-targetctl.service:9: Executable path is not absolute: mkdir -p /etc/rtslib-fb-target Apr 28 21:41:59 jun-VirtualBox systemd[1]: /lib/systemd/system/rtslib-fb-targetctl.service:9: Executable path is not absolute: mkdir -p /etc/rtslib-fb-target Apr 28 21:41:59 jun-VirtualBox systemd[1]: /lib/systemd/system/rtslib-fb-targetctl.service:9: Executable path is not absolute: mkdir -p /etc/rtslib-fb-target dpkg: error processing package python3-rtslib-fb (–configure): installed python3-rtslib-fb package post-installation script subprocess returned error exit status 1 dpkg: dependency problems prevent configuration of targetcli-fb: targetcli-fb depends on python3-rtslib-fb; however: Package python3-rtslib-fb is not configured yet. dpkg: error processing package targetcli-fb (–configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure. Errors were encountered while processing: python3-rtslib-fb targetcli-fb E: Sub-process /usr/bin/dpkg returned an error code (1) +functions-common:apt_get:1 exit_trap +./stack.sh:exit_trap:503 local r=100 ++./stack.sh:exit_trap:504 jobs -p +./stack.sh:exit_trap:504 jobs= +./stack.sh:exit_trap:507 [[ -n ‘’ ]] +./stack.sh:exit_trap:513 ‘[’ -f ‘’ ‘]’ +./stack.sh:exit_trap:518 kill_spinner +./stack.sh:kill_spinner:413 ‘[’ ‘!’ -z ‘’ ‘]’ +./stack.sh:exit_trap:520 [[ 100 -ne 0 ]] +./stack.sh:exit_trap:521 echo ‘Error on exit’ Error on exit +./stack.sh:exit_trap:523 type -p generate-subunit +./stack.sh:exit_trap:524 generate-subunit 1619615804 1523 fail +./stack.sh:exit_trap:526 [[ -z /opt/stack/logs ]] +./stack.sh:exit_trap:529 /usr/bin/python3.6 /opt/stack/devstack/tools/worlddump.py -d /opt/stack/logs World dumping… see /opt/stack/logs/worlddump-2021-04-28-134208.txt for details +./stack.sh:exit_trap:538 exit 100
- Jun
My installation fails on the below command and output --> When I run the command *./stack.sh* it goes on for around 5-10 minutes and then fails with below errors --> Exception: Traceback (most recent call last): File “/opt/stack/requirements/.venv/lib/python3.6/site-packages/pip/basecommand.py”, line 215, in main status = self.run(options, args) File “/opt/stack/requirements/.venv/lib/python3.6/site-packages/pip/commands/install.py”, line 342, in run requirement_set.prepare_files(finder) File “/opt/stack/requirements/.venv/lib/python3.6/site-packages/pip/req/req_set.py”, line 380, in prepare_files ignore_dependencies=self.ignore_dependencies)) File “/opt/stack/requirements/.venv/lib/python3.6/site-packages/pip/req/req_set.py”, line 554, in _prepare_file require_hashes File “/opt/stack/requirements/.venv/lib/python3.6/site-packages/pip/req/req_install.py”, line 281, in populate_link self.link = self._wheel_cache.cached_wheel(self.link, self.name) File “/opt/stack/requirements/.venv/lib/python3.6/site-packages/pip/wheel.py”, line 68, in cached_wheel self._cache_dir, link, self._format_control, package_name) File “/opt/stack/requirements/.venv/lib/python3.6/site-packages/pip/wheel.py”, line 129, in cached_wheel wheel_names = os.listdir(root) PermissionError: [Errno 13] Permission denied: ‘/opt/stack/.cache/pip/wheels/80/34/1c/3967380d9676d162cb59513bd9dc862d0584e045a162095606’ +inc/python:pip_install:1 exit_trap +./stack.sh:exit_trap:503 local r=2 ++./stack.sh:exit_trap:504 jobs -p +./stack.sh:exit_trap:504 jobs= +./stack.sh:exit_trap:507 [[ -n ‘’ ]] +./stack.sh:exit_trap:513 ‘[’ -f ‘’ ‘]’ +./stack.sh:exit_trap:518 kill_spinner +./stack.sh:kill_spinner:413 ‘[’ ‘!’ -z ‘’ ‘]’ +./stack.sh:exit_trap:520 [[ 2 -ne 0 ]] +./stack.sh:exit_trap:521 echo ‘Error on exit’ Error on exit +./stack.sh:exit_trap:523 type -p generate-subunit +./stack.sh:exit_trap:524 generate-subunit 1617964783 451 fail +./stack.sh:exit_trap:526 [[ -z /opt/stack/logs ]] +./stack.sh:exit_trap:529 /usr/bin/python3.6 /opt/stack/devstack/tools/worlddump.py -d /opt/stack/logs World dumping… see /opt/stack/logs/worlddump-2021-04-09-104715.txt for details +./stack.sh:exit_trap:538 exit 2 Could anyone please help me fix this issue ? Thank you
- OpenStack
Hi, When I am following the installation procedure, I am getting this error. +++functions-common:oscwrap:2328 set +o ++functions-common:oscwrap:2328 xtrace=‘set -o xtrace’ ++functions-common:oscwrap:2329 set +o xtrace Error while executing command: HttpException: 503, Unable to create the network. No tenant network is available for allocation. ++functions-common:oscwrap:2346 return 1 +lib/neutron_plugins/services/l3:create_neutron_initial_network:214 NET_ID= +lib/neutron_plugins/services/l3:create_neutron_initial_network:215 die_if_not_set 215 NET_ID ‘Failure creating NET_ID for private b23e8d57d8f04efdac5738c94fbd58c1’ +functions-common:die_if_not_set:216 local exitcode=0 +functions-common:die_if_not_set:217 local xtrace ++functions-common:die_if_not_set:218 grep xtrace ++functions-common:die_if_not_set:218 set +o +functions-common:die_if_not_set:218 xtrace=‘set -o xtrace’ +functions-common:die_if_not_set:219 set +o xtrace [Call Trace] ./stack.sh:1278:create_neutron_initial_network /opt/stack/devstack/lib/neutron_plugins/services/l3:215:die_if_not_set /opt/stack/devstack/functions-common:223:die [ERROR] /opt/stack/devstack/functions-common:215 Failure creating NET_ID for private b23e8d57d8f04efdac5738c94fbd58c1 Error on exit World dumping… see /opt/stack/logs/worlddump-2020-11-30-043504.txt for details nova-compute: no process found neutron-dhcp-agent: no process found neutron-l3-agent: no process found neutron-metadata-agent: no process found neutron-openvswitch-agent: no process found Please help me to resolve this issue.
- shalitha
Hi, Could you please help me out with this. I tried to install Openstack on Ubuntu 20.04 LTS, after the last step ./stack.sh it started running for about an hour. And finally got below message:- wget --progress=dot:giga -c
http://download.cirros-cloud.net/0.5.1/cirros-0.5.1-x86_64-disk.img
-O /opt/stack/devstac k/files/cirros-0.5.1-x86_64-disk.img --2020-08-14 13:01:45-- http://download.cirros-cloud.net/0.5.1/cirros-0.5.1-x86 _64-disk.img Resolving download.cirros-cloud.net (download.cirros-cloud.net)… 64.90.42.85, 2607:f298:6:a036::bd6:a72a Connecting to download.cirros-cloud.net (download.cirros-cloud.net)|64.90.42.85| :80… failed: Connection timed out. Connecting to download.cirros-cloud.net (download.cirros-cloud.net)|2607:f298:6: a036::bd6:a72a|:80… failed: Network is unreachable. +functions:upload_image:1 exit_trap +./stack.sh:exit_trap:489 local r=4 ++./stack.sh:exit_trap:490 jobs -p +./stack.sh:exit_trap:490 jobs= +./stack.sh:exit_trap:493 [[ -n ‘’ ]] +./stack.sh:exit_trap:499 ‘[’ -f /tmp/tmp.i4cMoIoHkQ ‘]’ +./stack.sh:exit_trap:500 rm /tmp/tmp.i4cMoIoHkQ +./stack.sh:exit_trap:504 kill_spinner +./stack.sh:kill_spinner:399 ‘[’ ‘!’ -z ‘’ ‘]’ +./stack.sh:exit_trap:506 [[ 4 -ne 0 ]] +./stack.sh:exit_trap:507 echo ‘Error on exit’ Error on exit +./stack.sh:exit_trap:509 type -p generate-subunit +./stack.sh:exit_trap:510 generate-subunit 1597386249 4186 fail +./stack.sh:exit_trap:512 [[ -z /opt/stack/logs ]] +./stack.sh:exit_trap:515 /usr/bin/python3.8 /opt/stack/devstac k/tools/worlddump.py -d /opt/stack/logs World dumping… see /opt/stack/logs/worlddump-2020-08-14-073355.txt for details ebtables v1.8.4 (nf_tables): table `broute’ is incompatible, use ‘nft’ tool. +./stack.sh:exit_trap:524 exit 4 Please help me out in this. I have given user sudo powers - Without password also, but still error in installation.- Preeth
hi ! I am working on ubuntu 18.04 lts an detecting below log: Package python3-venv is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package ‘python3-venv’ has no installation candidate +functions-common:apt_get:1 exit_trap +./stack.sh:exit_trap:489 local r=100 ++./stack.sh:exit_trap:490 jobs -p +./stack.sh:exit_trap:490 jobs= +./stack.sh:exit_trap:493 [[ -n ‘’ ]] +./stack.sh:exit_trap:499 ‘[’ -f ‘’ ‘]’ +./stack.sh:exit_trap:504 kill_spinner +./stack.sh:kill_spinner:399 ‘[’ ‘!’ -z ‘’ ‘]’ +./stack.sh:exit_trap:506 [[ 100 -ne 0 ]] +./stack.sh:exit_trap:507 echo ‘Error on exit’ Error on exit +./stack.sh:exit_trap:509 type -p generate-subunit +./stack.sh:exit_trap:512 [[ -z /opt/stack/logs ]] +./stack.sh:exit_trap:515 /usr/local/bin/python3.7 /devstack/tools/worldd ump.py -d /opt/stack/logs World dumping… see /opt/stack/logs/worlddump-2020-06-21-113238.txt for details +./stack.sh:exit_trap:524 exit 100
- Md. Newas
Dear Greetings! I tried to install with respective instruction installation goes for around 25 to 35 mins at the end it give exhibit below error and stop. Please guide accordingly ERROR: Cannot uninstall ‘simplejson’. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall. +inc/python:pip_install:1 exit_trap +./stack.sh:exit_trap:489 local r=1 ++./stack.sh:exit_trap:490 jobs -p +./stack.sh:exit_trap:490 jobs= +./stack.sh:exit_trap:493 [[ -n ‘’ ]] +./stack.sh:exit_trap:499 ‘[’ -f ‘’ ‘]’ +./stack.sh:exit_trap:504 kill_spinner +./stack.sh:kill_spinner:399 ‘[’ ‘!’ -z ‘’ ‘]’ +./stack.sh:exit_trap:506 [[ 1 -ne 0 ]] +./stack.sh:exit_trap:507 echo ‘Error on exit’ Error on exit +./stack.sh:exit_trap:509 type -p generate-subunit +./stack.sh:exit_trap:510 generate-subunit 1590671485 1360 fail +./stack.sh:exit_trap:512 [[ -z /opt/stack/logs ]] +./stack.sh:exit_trap:515 /usr/bin/python3.8 /home/stack01/devstack/tools/worlddump.py -d /opt/stack/logs World dumping… see /opt/stack/logs/worlddump-2020-05-28-133405.txt for details ebtables v1.8.4 (nf_tables): table `broute’ is incompatible, use ‘nft’ tool. +./stack.sh:exit_trap:524 exit 1 Thanks. Best Regards
- Mujtaba Bashir