OpenInfra Vancouver 2023

This tutorial shows how to install MicroStack in the simplest way possible. It will deploy an OpenStack 2023.1 (Antelope) cloud and it will only allow access to its VMs from the local host.

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

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.

Tip: If you want to try it at the summit and you don’t have a laptop that meets these requirements, stop by the Canonical Booth (B11) to get a virtual machine you can try this out on.

Deploy the cloud

Install the openstack snap

Begin by installing the openstack snap:

sudo snap install openstack --channel 2023.1/stable/vancouver

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)

Note: if you are running this demo on one of the available virtual machines from the booth, set the following to use the local caching image registry:

sudo snap set openstack cache.ghcr-io=10.67.107.34:5000
sudo snap set openstack cache.docker-io=10.67.107.34:5001

Bootstrap the cloud

Deploy the OpenStack cloud using the cluster bootstrap command and accept software defaults:

sunbeam cluster bootstrap --accept-defaults

Configure the cloud and obtain credentials

Now configure the deployed cloud using the configure command:

sunbeam configure --accept-defaults --openrc demo-openrc

The above command configures cloud resources for use and creates a demo user, tenant, networking, etc and then writes user credentials to the file demo-openrc. User credentials using the clouds.yaml format can be obtained by the cloud-config command:

sunbeam cloud-config -u -c sunbeam-demo

This stores the cloud credentials for the demo user in the $HOME/.config/openstack/clouds.yaml file. Admin credentials can be obtained similarly:

sunbeam cloud-config --admin -u -c sunbeam-admin

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

Get your prize

When you’ve successfully launched your test instance, you will see output similar to the below:

Access instance with `ssh -i /home/ubuntu/snap/openstack/177/sunbeam ubuntu@10.20.20.7`
Thanks for trying MicroStack! Please use the code abc123 to collect your gift from the Ubuntu stand.

Take the code - abc123 in this example - and head to booth B11 with your generated token to claim your prize!

Incredibly small fix on the website (https://microstack.run/docs/openinfra-vancouver-2023) that is fixed in the forum post here already:

User credentials using the clouds.yam format can be obtained by the cloud-config command:

Should be clouds.yaml.

Thanks. The error has been fixed.

1 Like