Install OpenStack using guided installation instructions

Key Value
Summary Guided installation.
Categories openstack
Difficulty 2
Author Tytus Kurek tytus.kurek@canonical.com

Overview

Duration: 3 minutes

Before you get started!

Welcome to OpenStack!

In this series of tutorials, we will walk you through all the necessary steps to install, configure and get started with OpenStack. Using just three dedicated machines, you will learn how to deploy OpenStack in highly available, multi-node, production-grade clusters.

This tutorial is the second in the “Phase II - Deploying OpenStack” series.

Explore other tutorials >

What is OpenStack?

OpenStack is a collection of open source projects designed to work together to form the basis of a cloud. OpenStack can be used for both private and public cloud implementation.

What is Sunbeam?

Sunbeam is an upstream project under the governance of the OpenInfra Foundation (OIF), which was created to lower the barrier to entry for OpenStack, simplify its adoption process, and set the foundation for an autonomous private cloud. Sunbeam uses cloud-native architecture and total bottom-up automation to make OpenStack more accessible to newcomers and to help users get to grips with the platform immediately.

What is MicroStack?

MicroStack (based on Sunbeam) is an OpenStack distribution designed for small-scale cloud environments. While it is available with full commercial support from Canonical, it can also be self-deployed with no friction, effectively eliminating the need for a paid consulting engagement. MicroStack currently includes core OpenStack services only, but is expected to evolve quickly to ensure full feature parity with Canonical’s Charmed OpenStack soon.

In this tutorial, you will learn how to:

  • Perform guided installation of OpenStack with Sunbeam without bare metal automation
  • Launch a test instance on OpenStack

You will only need:

  • Theoretical knowledge of OpenStack gained by completing all tutorials in the “Phase I - Learning OpenStack” series
  • Three fresh physical machines with:
  • The latest Ubuntu LTS installed
  • A minimum of 32 GB of free memory
  • 200 GB of SSD storage available on the root disk
  • At least one un-partitioned disk of at least 200 GB in size
  • Two network interfaces:
    - A primary network interface for access to the OpenStack control plane
    - A secondary network interface for remote access to cloud VMs

Reference configuration

Duration: 5 minutes

This section provides reference configuration used for the purpose of this tutorial.

! Reference configuration
Note that in your environment those values might be different and might need to be adjusted accordingly.

Machine

For the purpose of this tutorial, the following machines are used:

Machine FQDN Un-partitioned disk Roles
sunbeam01 sunbeam01.example.com /dev/sdb control, compute, storage
sunbeam02 sunbeam02.example.com /dev/sdb control, compute, storage
sunbeam03 sunbeam03.example.com /dev/sdb control, compute, storage

Control plane networking

The network associated with the primary network interface requires a range of approximately 10 IP addresses that will be used for API service endpoints.

For the purposes of this tutorial, the following configuration is in place:

Network component Value
CIDR 172.16.1.0/24
Gateway 172.16.1.1
Address range 172.16.1.201-172.16.1.220
Interface name on machine eno1

External networking

The network associated with the secondary network interface requires a range of IP addresses that will be sufficient for allocating floating IP addresses to VMs. This will, in turn, allow them to be contacted by remote hosts.

For the purposes of this tutorial, the following configuration is in place:

Network component Value
CIDR 172.16.2.0/24
Gateway 172.16.2.1
Address range 172.16.2.2-172.16.2.254
Interface name on machine eno2

Bootstrap the first node

Duration: 25 minutes

In this tutorial we’ll bootstrap the first node in the cluster.

Install OpenStack snap on the first node

In order to install OpenStack snap on the first node in the cluster, execute the following command on sunbeam01 machine:


$ sudo snap install openstack --channel 2023.2/edge

Prepare the first node

In order to prepare the first node for OpenStack usage, execute the following command on sunbeam01 machine:


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

Bootstrap the cloud

In order to bootstrap the cloud according to the “Reference configuration” section, execute the following command on sunbeam01 machine:


$ sunbeam cluster bootstrap --role control --role compute --role storage

! sunbeam cluster bootstrap
This command takes a while to finish. Please, be patient.

When prompted, enter the following values:

  • Configure proxy for access to external network resources? - type n and press Enter,
  • Management networks shared by hosts - type the value of the CIDR field from the “Control plane networking” sub-section of the “Reference configuration” section and press Enter,
  • MetalLB address allocation range - type the value of the Address range field from the “Control plane networking” sub-section of the “Reference configuration” section and press Enter,
  • Disks to attach to MicroCeph - type the value of the Un-partitioned disk field next to the sunbeam01 machine from the “Machines” sub-section of the “Reference configuration” section and press Enter.

Sample output:


Configure proxy for access to external network resources? [y/n] (n): n
Management networks shared by hosts (CIDRs, separated by comma) (172.16.1.0/24): 172.16.1.0/24 
MetalLB address allocation range (supports multiple ranges, comma separated) (10.20.21.10-10.20.21.20): 172.16.1.201-172.16.1.220
Disks to attach to MicroCeph (comma separated list) (): /dev/sda

Once finished, you should be able to see the following message:


Node has been bootstrapped with roles: control, compute, storage

In order to display all nodes in the cluster, execute the following command:


$ sunbeam cluster list

Configure the cloud

In order to configure the cloud according to the “Reference configuration” section, execute the following command on sunbeam01 machine:


$ sunbeam configure --openrc demo-openrc

When prompted, enter the following values:

  • Local or remote access to VMs - type remote and press Enter,
  • CIDR of network to use for external networking - type the value of the CIDR field from the “External networking” sub-section of the “Reference configuration” section and press Enter,
  • IP address of default gateway for external network - type the value of the Gateway field from the “External networking” sub-section of the “Reference configuration” section and press Enter,
  • Start of IP allocation range for external network - type the first IP address from the range defined in the Address range field from the “External networking” sub-section of the “Reference configuration” section and press Enter,
  • End of IP allocation range for external network - type the last IP address from the range defined in the Address range field from the “External networking” sub-section of the “Reference configuration” section and press Enter,
  • Network type for access to external network - type flat and press Enter,
  • Populate OpenStack cloud with demo user, default images, flavors etc - type n and press Enter,
  • Username to use for access to OpenStack - type demo and press Enter,
  • Password to use for access to OpenStack - type demo and press Enter,
  • Network range to use for project network - press Enter,
  • List of nameservers guests should use for DNS resolution - type an IP address of a DNS server (e.g. 8.8.8.8) accessible from the External network,
  • Enable ping and SSH access to instances? - type y and press Enter,
  • Free network interface that will be configured for external traffic - type the value of the Interface name on machine field from the “External networking” sub-section of the “Reference configuration” section and press Enter.

Sample output:


Local or remote access to VMs [local/remote] (local): remote
CIDR of network to use for external networking (10.20.20.0/24): 172.16.2.0/24
IP address of default gateway for external network (172.16.2.1): 172.16.2.1
Start of IP allocation range for external network (172.16.2.2): 172.16.2.2
End of IP allocation range for external network (172.16.2.254): 172.16.2.254
Network type for access to external network [flat/vlan] (flat): flat
Populate OpenStack cloud with demo user, default images, flavors etc [y/n] (y): y
Username to use for access to OpenStack (demo): demo
Password to use for access to OpenStack (PR********): 
Network range to use for project network (192.168.122.0/24): 
List of nameservers guests should use for DNS resolution (172.16.1.1): 8.8.8.8
Enable ping and SSH access to instances? [y/n] (y): y
Free network interface that will be configured for external traffic [eno2] (eno2): eno2

Once finished, you should be able to see the following message:


Writing openrc to demo-openrc ... done

Launch an instance

In order to launch your first instance, execute the following command:


$ sunbeam launch ubuntu --name test

Sample output:


Access instance with `ssh -i /home/ubuntu/snap/openstack/456/sunbeam ubuntu@172.16.2.146`

Note that since “remote” access to VMs has been configured, you won’t be able to SSH into them from any of the nodes in the cluster. Copy the private key given in the above output from the launching node to an external machine with an access to the 172.16.2.0/24 network. Note that the VM will not be ready instantaneously; waiting time is mostly determined by the cloud’s available resources.

Next steps

Duration: 2 minutes

Congratulations! You have reached the end of this tutorial.

You can now move to the next tutorial - “3. Scaling the cluster” - or explore other tutorials.

In this tutorial, you have learnt how to:

  • Perform guided installation of OpenStack with Sunbeam without bare metal automation
  • Launch a test instance on OpenStack

Where to go from here?