# Install with DevStack

<https://www.digitalocean.com/community/tutorials/install-openstack-ubuntu-devstack>

![](https://296194292-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLoAqAoOfr7XVUQw7Gff8%2Fuploads%2Fgit-blob-2e54b666b41f51a5842a0beba69186558755e637%2Fintro-to-cloud.d49bc5f7.jpeg?alt=media)

[Openstack](https://www.openstack.org/software/) 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.

## [Minimum Requirements](https://www.digitalocean.com/community/tutorials/install-openstack-ubuntu-devstack#minimum-requirements)

Before we begin, ensure you have the following minimum prerequisites

1. A fresh Ubuntu 18.04 installation
2. User with sudo privileges
3. 4 GB RAM
4. 2 vCPUs
5. Hard disk capacity of 10 GB
6. Internet connection

With the minimum requirements satisfied, we can now proceed.

## [Step 1: Update and Upgrade the System](https://www.digitalocean.com/community/tutorials/install-openstack-ubuntu-devstack#step-1-update-and-upgrade-the-system)

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**

![](https://296194292-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLoAqAoOfr7XVUQw7Gff8%2Fuploads%2Fgit-blob-5a66aa989e4b111f6b84b6d48639c4c58e6d029b%2Fupdate-and-upgrade-ubuntu-18.04-bionic-beaver.png?alt=media)

Next reboot the system using the command.

```
sudo reboot

```

OR

```
init 6

```

## [Step 2: Create Stack user and assign sudo priviledge](https://www.digitalocean.com/community/tutorials/install-openstack-ubuntu-devstack#step-2-create-stack-user-and-assign-sudo-priviledge)

Best practice demands that devstack should be run as a regular user with [sudo](https://www.digitalocean.com/community/tutorials/sudo-command-in-linux) 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**

![](https://296194292-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLoAqAoOfr7XVUQw7Gff8%2Fuploads%2Fgit-blob-4f1d45ac1225215a0208ce3aa18d55952f2f276f%2Fadd-stack-user-and-assign-sudo-privileges.png?alt=media)

## [Step 3: Install git and download DevStack](https://www.digitalocean.com/community/tutorials/install-openstack-ubuntu-devstack#step-3-install-git-and-download-devstack)

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**

![](https://296194292-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLoAqAoOfr7XVUQw7Gff8%2Fuploads%2Fgit-blob-e041decedc9f73b1f72e78971a12c53243161adf%2Fswitch-to-stack-user-and-install-git.png?alt=media)

Using git, clone devstack’s git repository as shown.

```
git clone https://git.openstack.org/openstack-dev/devstack

```

**Sample output**

![](https://296194292-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLoAqAoOfr7XVUQw7Gff8%2Fuploads%2Fgit-blob-5c049bd4dacafc2a268aba4057dfa663fe2c661d%2Fdownlaod-devstack.png?alt=media)

## [Step 4: Create devstack configuration file](https://www.digitalocean.com/community/tutorials/install-openstack-ubuntu-devstack#step-4-create-devstack-configuration-file)

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:**

1. The `ADMIN_PASSWORD` is the password that you will use to log in to the OpenStack login page. The default username is **admin**.
2. The `HOST_IP` is your system’s IP address that is obtained by running `ifconfig` or `ip addr` commands.

## [Step 5: Install OpenStack with Devstack](https://www.digitalocean.com/community/tutorials/install-openstack-ubuntu-devstack#step-5-install-openstack-with-devstack)

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:

* Horizon – OpenStack Dashboard
* Nova – Compute Service
* Glance – Image Service
* Neutron – Network Service
* Keystone – Identity Service
* Cinder – Block Storage Service
* Placement – Placement API

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.

![](https://296194292-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLoAqAoOfr7XVUQw7Gff8%2Fuploads%2Fgit-blob-59670950bf710ce836628488e49066be34ded0dc%2Fdevstack-installed.jpg?alt=media)

This confirms that all went well and that we can proceed to access OpenStack via a web browser.

## [Step 6: Accessing OpenStack on a web browser](https://www.digitalocean.com/community/tutorials/install-openstack-ubuntu-devstack#step-6-accessing-openstack-on-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.

![](https://296194292-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLoAqAoOfr7XVUQw7Gff8%2Fuploads%2Fgit-blob-894f249182e03f9dce1255fa5a0e16159fb95400%2Fopenstack.png?alt=media)

Enter the credentials and hit “**Sign In**” You should be able to see the Management console dashboard as shown below.

![](https://296194292-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLoAqAoOfr7XVUQw7Gff8%2Fuploads%2Fgit-blob-308108ff541426bc36df398fa5aea92733af32a1%2Fopenstack-admin-dashboard.png?alt=media)

For more on Devstack’s customization, check out their [system configuration guide](https://docs.openstack.org/devstack/latest/configuration.html). Additionally, check out the [Openstack documentation](https://docs.openstack.org/stein/) for administration guide.
