Use the deployment manifest to benefit from full automation and IaC

1. 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 third in the “Phase 2 - Deploy 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:

  • Create a deployment manifest
  • Use the deployment manifest to benefit from full automation and IaC

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:
    • Ubuntu 22.04 LTS installed
    • A minimum of 32 GB of free memory
    • 200 GB of SSD storage available on the root disk
    • A least one un-partitioned disk of at least 200 GB in size
    • Two network interfaces
      • Primary: for access to the OpenStack control plane
      • Secondary: for remote access to cloud VMs

2. 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

3. Create the deployment manifest

Duration: 5 minutes

As you could see in the tutorial “2. Deploy”, a guided installation comes with several interactive questions that have to be answered by the user. In order to automate this process a deployment manifest can be used.

In order to create a deployment manifest for the deployment from the tutorial “2. Deploy”, create a file called my_manifest.yaml with the following content:

deployment:
  region: RegionOne
  bootstrap:
    management_cidr: 172.16.1.0/24
  addons:
    metallb: 172.16.1.201-172.16.1.220
  external_network:
    nic: eno2
    network_type: flat
    cidr: 172.16.2.0/24
    gateway: 172.16.2.1
    start: 172.16.2.2
    end: 172.16.2.254
  microceph_config:
    osd_devices: /dev/sdb
  user:
    run_demo_setup: True
    username: demo
    password: demo
    cidr: 192.168.122.0/24
    nameservers: 8.8.8.8
    security_group_rules: True
    remote_access_location: remote
  proxy:
    proxy_required: False

Refer to the manifest file reference section of the official documentation for more options.

Note: since we’re going to use an openstack snap from the beta channel, our manifest file needs to be augmented with some additional software information

In order to augment the my_manifest.yaml file with those information, execute the following command:


$ cat /snap/openstack/current/etc/manifests/beta.yml >> my_manifest.yaml


4. Use the deployment manifest

Duration: 20 minutes

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

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 2024.1/beta

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 with the my_manifest.yaml deployment manifest, execute the following command on sunbeam01 machine:


$ sunbeam cluster bootstrap --role control --role compute --role storage --manifest ./my_manifest.yaml

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

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


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

Configure the cloud

In order to configure the cloud according to the “Reference configuration” section with the my_manifest.yaml deployment manifest, execute the following command on sunbeam01 machine:


$ sunbeam configure --openrc demo-openrc --manifest ./my_manifest.yaml

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


Writing openrc to demo-openrc ... done


5. Next steps