Your submission was sent successfully! Close

You have successfully unsubscribed! Close

Thank you for signing up for our newsletter!
In these regular emails you will find the latest updates about Ubuntu and upcoming events where you can meet our team.Close

Launch your own MicroCloud with one command

Miona Aleksic

on 16 December 2022

If you are looking for a small-scale cloud deployment suitable for the edge, chances are you came across Canonical’s MicroCloud solution. These are small-footprint clusters of compute nodes with distributed storage and secure networking, optimised for repeatable and reliable remote deployments. We are happy to announce that with the help of snaps and some clever engineering, we have significantly simplified the deployment process and now you can deploy your own MicroCloud with a single command in just a few minutes. We invite users to test it out and give feedback. Read on for more details or skip to the video to see it in action.

Best of open-source ingredients

In essence, a MicroCloud is cloud-ish but small enough to be localised. It includes a cluster of compute nodes for running your workloads along with distributed storage and networking. It has the same experience and functionality as larger clouds, but a smaller footprint and easier maintenance. MicroCloud brings together several reliable open-source tools.

Efficient compute with LXD

LXD is a modern infrastructure tool that has everything you need to run your virtualised workloads. In addition to regular VMs, users can run their workloads using system containers that behave similarly but consume fewer resources while providing bare-metal performance. LXD is image-based, supporting a wide range of Linux distributions, as well as Windows VMs, and has a good mix of cloud-like features.

For production workloads, LXD runs in a clustering mode, joining from 3 to 50 servers that share a distributed database and are managed uniformly. This ensures high availability, keeping your workloads secure and allowing for recovery in the case of a disturbance.

Check the datasheet for an overview of LXD’s features.

Distributed storage with Ceph

Ceph has become a de facto standard for open-source storage solutions. It provides interfaces for several storage types (block, file and object) within a single cluster, eliminating the need for multiple storage solutions. It is scalable and reliable, making it the perfect solution for any cloud. Get familiar with Ceph in this blog.  

Secure networking with OVN

OVN logo

The third main ingredient in any cloud is networking, and OVN is a trusted solution in this area. It is a software-defined networking solution, providing virtual network abstractions,  such as virtual L2 and L3 overlays, security groups, DHCP and other networking services. It was designed to support highly scalable and production-grade implementations. OVN has numerous relevant networking features that you can read more about here

How do you deploy a MicroCloud?

LXD, Ceph and OVN are combined together to provide a production-grade, highly available MicroCloud. 

Deployment the “old way”

Until now, the deployment of MicroClouds entailed a certain amount of manual configuration by the users, and while not too difficult, the process is involved and required a slight learning curve.

The steps are roughly the following: 

  1. Deploy a Ceph cluster with at least 3 monitors
  2. Deploy an OVN cluster with at least 3 central daemons (northd) and databases
  3. Setup all servers with the Ceph client configuration and keyring
  4. Setup all servers with Open vSwitch connected to OVN
  5. Deploy a LXD cluster across all your servers
  6. Configure LXD to use Ceph for storage and OVN for networking
  7. Enjoy your new personal cloud!

MicroCeph and MicroCloud snaps to the rescue

While the process itself is not too complex, it doesn’t allow MicroClouds to deliver on the promise of simple and repeatable remote deployments, which is why we’re further optimising it.

To simplify the deployment process, while keeping it secure, we are using the power of snaps – app packages that are easy to install, secure, cross‐platform and dependency‐free. 

First, we set out to simplify the deployment of a Ceph cluster. We developed MicroCeph – a snap package that uses a small management daemon to allow for an easy bootstrap process for setting up a Ceph cluster of any size in just a few minutes. You can see how it works in detail in this video.

Next, we developed a MicroCloud snap which can automatically configure both LXD and Ceph across a set of servers. When initialised, MicroCloud will detect all the servers in the network and drive LXD and MicroCeph snaps to configure a cluster. It will then prompt you to add disks to Ceph, and you will have a working MicroCloud ready to use, skipping all the steps needed in the previous approach.

At the moment, OVN is not included in this automatic deployment, development is in progress and this feature will be included soon. However, the functionality doesn’t suffer from this, as MicroCloud utilises the default networking bridge, and OVN can be configured additionally if needed.

Try it yourself

To try it, you need at least 3 systems (and less than 50) and at least 3 additional disks for Ceph.

Then install MicroCloud, MicroCeph and LXD with:

snap install lxd microceph microcloud

Once this has been installed on all the servers you’d like to put in your cluster, run the following command on any of the servers:

microcloud init

And then go through the few initialization steps. This will detect the other servers, set up a cluster and finally prompt you to add disks to Ceph. You do not need to interact with any of the other servers to finish the process.

What is happening behind the scenes is MicroCloud talking to each of these systems one by one, issuing join tokens and bootstrapping itself, MicroCeph and LXD. The end result is that, after a few minutes, you have a functioning cloud ready to run workloads.

Watch the video below for an example.

What’s next?

We are on a mission to deliver a smooth, reliable and replicable experience for deploying small-scale clouds. This is just the beginning and more functionalities will be added continuously. In the meantime, we invite the community and anyone interested in MicroClouds to test this out and give us feedback via our community forum so that we can continue polishing the experience. 

ceph logo

What is Ceph?

Ceph is a software-defined storage (SDS) solution designed to address the object, block, and file storage needs of both small and large data centres.

It's an optimised and easy-to-integrate solution for companies adopting open source as the new norm for high-growth block storage, object stores and data lakes.

Learn more about Ceph ›

ceph logo

How to optimise your cloud storage costs

Cloud storage is amazing, it's on demand, click click ready to go, but is it the most cost effective approach for large, predictable data sets?

In our white paper learn how to understand the true costs of storing data in a public cloud, and how open source Ceph can provide a cost effective alternative!

Access the whitepaper ›


Interested in running Ubuntu in your organisation? Talk to us today

ceph logo

A guide to software-defined storage for enterprises

Ceph is a software-defined storage (SDS) solution designed to address the object, block, and file storage needs of both small and large data centres.

In our whitepaper explore how Ceph can replace proprietary storage systems in the enterprise.

Access the whitepaper ›


Interested in running Ubuntu in your organisation? Talk to us today

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

5 Edge Computing Examples You Should Know

In this blog, we’re exploring edge computing examples, its diverse applications and use cases, with a special focus on how Canonical’s MicroCloud fits...

The role of secure data storage in fueling AI innovation

There is no AI without data Artificial intelligence is the most exciting technology revolution of recent years. Nvidia, Intel, AMD and others continue to...

Implementing an Android™ based cloud game streaming service with Anbox Cloud

Since the outset, Anbox Cloud was developed with a variety of use cases for running Android at scale. Cloud gaming, more specifically for casual games as...