Skip to main content

DevStack Installation

I believe this is the installation where we can start exploring OpenStack and understanding the components.

DevStack installation is for testing environments. In our project, we'll create only one machine that will be responsible for all necessary resources.

We'll use Vagrant with VirtualBox to create a machine where we'll install OpenStack.

You need to have VirtualBox which will be our provisioner and Vagrant which will configure the VM.

sudo apt-get install virtualbox
sudo apt-get install vagrant
vagrant --version
Vagrant 2.4.0

We'll launch a virtual machine using Vagrant, and for this, we need Vagrant installed and VirtualBox to be the Vagrant provisioner.

It's important to note that my network card where I'm receiving the IP address is wlo1; check yours with the ip addr show command.

The machine we're creating will be an Ubuntu 22.04 LTS with 10 processors, 10GB RAM, and 60GB HD.

After it's created, Vagrant will access this machine via SSH and run the requirements.sh script which will create an OpenStack user and their home in /opt and download the DevStack project in the specific stable version inside this folder.

After that, we'll run start.sh which will create the local.conf file with the configurations passed to DevStack of our preference inside the cloned project and execute the stack.

The project is at https://gitlab.com/davidpuziol/study-openstack/-/tree/main/environment-devstack

Vagrant.require_version ">= 2.4.0"

Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/jammy64"
config.vm.hostname = "devstack"
# Change your network interface
config.vagrant.plugins = "vagrant-disksize"
config.disksize.size = '60GB'
config.vm.network "public_network", bridge: "wlo1"
config.vm.provider "virtualbox" do |vb|
vb.name = "devstack"
vb.memory = 10240
vb.cpus = 10
end
config.vm.provision "shell", path: "requirements.sh"
config.vm.provision "shell", path: "start.sh"
end

Once the machine is up, let's start the installation by running the stack.sh script which will use the local.conf settings to install OpenStack. This manual step wasn't put in the start.sh script to avoid doing the installation every time we start the machine.

vagrant ssh
sudo -u stack -i
cd devstack
./stack.sh
...
...
...
This is your host IP address: 10.0.0.249
This is your host IPv6 address: ::1
Horizon is now available at http://10.0.0.249/dashboard
Keystone is serving at http://10.0.0.249/identity/
The default users are: admin and demo
The password: admin

Services are running under systemd unit files.
For more information see:
https://docs.openstack.org/devstack/latest/systemd.html

DevStack Version: 2023.2
Change: b082d3fed3fe05228dabaab31bff592dbbaccbd9 Make multiple attempts to download image 2023-12-12 08:07:39 +0000
OS Version: Ubuntu 22.04 jammy

To shut down the machine we could use the vagrant halt command and to start it again we could use the vagrant up --no-provision command to not run the scripts.