Single-node guided

This tutorial shows how to install MicroStack. It will deploy an OpenStack 2023.1 (Antelope) cloud.

Depending on how the deployment is configured, the cloud may either allow access to its VMs from the local host or from hosts on your network, but not both.

Requirements

You will need a single machine whose requirements are:

  • physical or virtual machine running Ubuntu 22.04 LTS
  • a multi-core amd64 processor (ideally with 4+ cores)
  • a minimum of 16 GiB of free memory

The machine will also need a second network interface if remote VM access is desired.

Caution: Any change in IP address of the local host will be detrimental to the deployment. A virtual host will generally have a more stable address.

Deploy the cloud

The cloud deployment process consists of several stages: installing a snap, preparing the cloud node machine, bootstrapping the cloud, and finally configuring the cloud.

Note: During the deployment process you will be asked to input information in order to configure your new cloud. These questions are explained in more detail on the Interactive configuration prompts page in the reference section.

Install the openstack snap

Begin by installing the openstack snap:

sudo snap install openstack --channel 2023.1

Prepare the machine

Sunbeam can generate a script to ensure that the machine has all of the required dependencies installed and is configured correctly for use in MicroStack - you can review this script using:

sunbeam prepare-node-script

or the script can be directly executed in this way:

sunbeam prepare-node-script | bash -x && newgrp snap_daemon

The script will ensure some software requirements are satisfied on the host. In particular, it will:

  • install openssh-server if it is not found
  • configure passwordless sudo for all commands for the current user (NOPASSWD:ALL)

Bootstrap the cloud

Deploy the OpenStack cloud using the cluster bootstrap command:

sunbeam cluster bootstrap

Two questions will now be asked - below are samples. A value in parentheses is the default value.

Management networks shared by hosts (CIDRs, separated by comma) (10.246.112.0/21):
MetalLB address allocation range (supports multiple ranges, comma separated) (10.20.21.10-10.20.21.20):

Availability: The management networks feature (question) is not yet released to the stable track.

Configure the cloud

Now configure the deployed cloud using the configure command:

sunbeam configure --openrc demo-openrc

A series of questions will now be asked. Below is sample output of an entire interactive session. The values in square brackets, when present, provide acceptable values. A value in parentheses is the default value.

Local or remote access to VMs [local/remote] (local): remote
CIDR of network to use for external networking (10.20.20.0/24): 10.246.112.0/21
IP address of default gateway for external network (10.246.112.1):
Populate OpenStack cloud with demo user, default images, flavors etc [y/n] (y):
Username to use for access to OpenStack (demo):
Password to use for access to OpenStack (mt********):
Network range to use for project network (192.168.122.0/24):
List of nameservers guests should use for DNS resolution (10.177.200.10):
Enable ping and SSH access to instances? [y/n] (y):
Start of IP allocation range for external network (10.246.112.2): 10.246.116.41
End of IP allocation range for external network (10.246.119.254): 10.246.116.51
Network type for access to external network [flat/vlan] (flat):
Writing openrc to demo-openrc ... done
Free network interface that will be configured for external traffic [eno3/eno2] (eno3): eno2

Any remote hosts intending to connect to VMs on this node must have connectivity with the interface selected for external traffic (last question above).

Obtain credentials

The previous configure command provided normal user credentials via file demo-openrc. Admin credentials can be obtained in this way (file admin-openrc):

sunbeam openrc > admin-openrc

Launch a VM

Verify the cloud by launching a VM called ‘test’ based on the ‘ubuntu’ image (Ubuntu 22.04 LTS). The launch command is used:

sunbeam launch ubuntu --name test

Sample output:

Launching an OpenStack instance ...
Access instance with `ssh -i /home/ubuntu/.config/openstack/sunbeam ubuntu@10.20.20.200`

Connect to the VM over SSH using the provided command. Note that the VM will not be ready instantaneously; waiting time is mostly determined by the cloud’s available resources.

Copy the private SSH key given in the above output to the connecting host if remote VM access has been enabled.

Related howtos

Now that OpenStack is set up, be sure to check out the following howto guides:

Last updated 2 months ago. Help improve this document in the forum.