Skip to content

How to install OpenStack

Mario Teixeira Lemes edited this page Jan 4, 2024 · 22 revisions

We used DevStack to quickly bring up a complete OpenStack environment.

Prerequisites

RECOMMENDED: 4 CPUs, 16 GB RAM, 80GB disk and a single interface with Internet access.

Note: We created a similar Virtual Machine in Google Cloud Plataform. Details can be found here.

Starting OpenStack VM

On google shell, type:

gcloud compute instances start openstack

Connect to OpenStack VM using SSH

On google shell, type:

gcloud compute ssh --zone "southamerica-east1-b" "openstack" --project "intent-layer"

Installing

Add stack user

sudo useradd -s /bin/bash -d /opt/stack -m stack

Ensure the correct permission

sudo chmod +x /opt/stack

Ensure the correct privileges

echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack
sudo -u stack -i

Download DevStack

git clone https://opendev.org/openstack/devstack
cd devstack

Create a local.conf

[[local|localrc]]
ADMIN_PASSWORD=admin
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD

Note: The sample local.conf file should be under the samples directory in the devstack repository. The password to access OpenStack GUI is admin.

Start the install

./stack.sh

Warning: The process takes around 30 minutes, largely depending on the speed of your internet connection. Many git trees and packages will be installed during this process.

Accessing the OpenStack GUI (a.k.a Horizon)

Configuring Openstack - RC file

Go to dashboard, and download the OpenStack RC File.

Create a new RC file and copy the content. Then, create a new file and paste the content. Finally, source the file to export environment variables.

Now, you can use openstack commands from terminal.

To permit traffic to OpenStack VMs instances

In dashboard, go to Project -> Network -> Security Groups. Click em Manage Rulesand add rule. In this case, we add two new rules to permit ICMP and SSHto VM instances.

Clone this wiki locally