OpenStack with Sunbeam for medium-scale cloud infrastructure

The rapid growth in OpenStack installation and orchestration tools that we have seen in recent years has effectively established OpenStack as the world’s leading open source cloud platform. Projects like Sunbeam or Kolla Ansible, for example, are effectively transforming OpenStack into yet another user application. By using containers and the microservices architecture, OpenStack now runs on top of the cloud-native computing foundation, lowering the barrier to entry and simplifying its post-deployment operations. However, when it comes to managing the underlying hardware – the hardware that powers the cloud – different challenges arise.

In this blog, we demonstrate Canonical’s proven approach to setting up an OpenStack cloud with Sunbeam and MAAS. We show that using hardware automation is absolutely necessary when deploying cloud infrastructure at scale.

More in this series

This blog post is part of a larger series demonstrating various use cases for OpenStack and Sunbeam. Using practical examples, we illustrate how these two technologies can be used to address real-life challenges.

Other blogs in this series:

Before we start

Before we start, let’s briefly clarify some terms that we’ll be using in this blog.

What is Sunbeam?

Sunbeam is an upstream OpenStack project hosted under the governance of the OpenInfra Foundation (OIF) launched by Canonical. Sunbeam aims to lower the barrier to entry for OpenStack and simplify its deployment and operations processes. Backed by cloud-native architecture, Sunbeam uses full bottom-up automation and high-level abstraction to make OpenStack more accessible to newcomers and help users get to grips with the platform immediately.

What is Canonical OpenStack (based on Sunbeam)?

Canonical OpenStack (based on Sunbeam) is an enterprise-grade platform that distills the maturity and comprehensiveness of the upstream OpenStack project into an enterprise-grade product. Currently, Canonical OpenStack (based on Sunbeam) only includes core OpenStack services and capabilities,but it will evolve to  ensure full outcome parity with Charmed OpenStack soon.

OpenStack for medium-scale private cloud infrastructure

Thanks to Sunbeam, getting started with OpenStack is much easier. By following a simple tutorial, even inexperienced users can get it up and running with just a few terminal commands.

However, the real challenge starts when trying to scale OpenStack out across tens of physical machines. This is because dealing with data center internals, such as hardware and networks, creates another layer of complexity. 

Manual processes don’t scale

If you have ever provisioned bare metal machines manually, you know how painful this process tends to be. Installing the operating system (OS) takes time. Configuring it according to your needs takes even longer. Furthermore, storage devices have to be partitioned properly to segregate the OS from cloud tenants’ data. Finally, network interface cards (NICs) have to be set up accordingly – and let’s be frank: using NIC bonding, network bridges or VLANs is a very common practice these days. All of that takes time to configure and adds to the overall complexity of the project.

This might sound like an exaggeration when speaking about a relatively simple cloud scenario. However, consider an environment consisting of tens of physical machines, each needing to be manually set up. In this case, the effort required to provision bare metal scales fast and starts growing exponentially at a certain point. Not to mention the potential impact of hardware issues, or, even worse, misconfigurations… And that’s before you even attempt to install OpenStack services on top of the cloud hardware.

Embrace hardware automation

The need for automation is evident in this case. Manual processes never scale. But automating hardware is different from automating software and requires dedicated tools: tools that can cover bare metal provisioning end-to-end.

An example of such a tool is MAAS. MAAS is what Sunbeam uses as a reference for medium and large-scale OpenStack deployments.

Sample MAAS dashboard

MAAS automatically discovers all available machines in your data center and maintains a live inventory of hardware assets. It transforms those machines into cloud resources and lets you provision and terminate them on demand. After enlisting your machines in its database and passing them through some comprehensive hardware tests, it allows you to configure them, including the desired partition table and network setup. Lastly, cloud-init scripts can be used to further customize the OS during the installation phase, saving the time needed to execute them manually when using a traditional installer.

And you can do all of that without entering the data center in person. MAAS is 100% remote and provisions bare metal over the network cable.

Benefit from high-level abstraction

To sum things up, MAAS automates your data center’s hardware and makes provisioning of bare metal fast and repeatable. Installing OpenStack on top of this hardware might still create a serious challenge, though. However, when MAAS and Sunbeam meet together, even the most sophisticated deployments can be turned into a simple, multi-step procedure.

1) Install Sunbeam:

$ sudo snap install openstack

2) Prepare client machine:

$ sunbeam prepare-node-script --client

3) Add MAAS provider:

$ sunbeam deployment add maas NAME TOKEN URL

4) Map network spaces:

$ sunbeam deployment space map SPACE

5) Validate MAAS provider:

$ sunbeam deployment validate

6) Bootstrap controllers:

$ sunbeam cluster bootstrap

7) Bootstrap the cloud:

$ sunbeam cluster deploy

NOTE: For the most up-to-date instructions, visit the product documentation.

This is thanks to the high-level abstraction as provided by both MAAS and Sunbeam. Since Sunbeam uses the concept of roles, you can model your deployment by assigning certain cloud functions to machines. MAAS machine tags are used for this purpose; they also allow you to group machines forming an OpenStack deployment together. On the other hand, Sunbeam’s deployment manifest allows you to set additional cloud parameters.

This way you can model the entire deployment and maintain its configuration as a code. Such a pattern has been gaining momentum in recent years and is widely recognized as Infrastructure-as-Code (IaC) these days.

Conclusions

Deploying OpenStack at a medium scale comes with a completely different set of challenges than bootstrapping a simple environment consisting of just three physical machines. Due to the overall complexity of data centers, manual management of bare metal becomes a real pain at a certain scale. Fortunately, both MAAS and Sunbeam allow you to fully automate the initial deployment bottom-up. While MAAS drives physical machines, Sunbeam lets you drive MAAS and benefit from a high-level, declarative abstraction.

Learn more about Sunbeam

Now that you’ve got a basic understanding of Sunbeam and how it can be used for various OpenStack use cases, you might be wondering where to find more information about this new exciting project. If that’s the case, we have prepared some interesting follow-up materials for you:

Smart operations, optimal architecture, better pricing.

OpenStack and Ubuntu bring automated deployment and management that help you optimise infrastructure costs — no matter your industry or use case.

Find out how OpenStack will work for you ›

Newsletter signup

Get the latest Ubuntu news and updates in your inbox.

By submitting this form, I confirm that I have read and agree to Canonical's Privacy Policy.

Related posts

OpenStack with Sunbeam as an on-prem extension of the OpenStack public cloud

One of the biggest challenges that cloud service providers (CSPs) face these days is to deliver an extension of the public cloud they host to a small-scale...

OpenStack with Sunbeam for small-scale cloud infrastructure

Whenever it comes to a small-scale private cloud infrastructure project roll-out, organisations usually face a serious dilemma. The implementation process...

Data Centre AI evolution: combining MAAS and NVIDIA smart NICs

It has been several years since Canonical committed to implementing support for NVIDIA smart NICs in our products. Among them, Canonical’s metal-as-a-service...