Your submission was sent successfully! Close

You have successfully unsubscribed! Close

Launch your own micro cloud 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 Micro cloud 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 micro cloud 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 micro cloud 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. Micro cloud 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 micro cloud?

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

Deployment the “old way”

Until now, the deployment of micro clouds 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 micro clouds 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 micro cloud 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 micro cloud 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 micro clouds 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 ›

Newsletter signup

Select topics you're
interested in

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

Related posts

Meet Canonical at MWC Barcelona 2023

Join Canonical and Ubuntu at Mobile World Congress Barcelona 2023 to discuss open source innovation in telecommunications.

Cloud storage pricing – how to optimise TCO

The flexibility of public cloud infrastructure allows for little to no upfront expense, and is great when starting a venture or testing an idea.  But once a...

Containerization vs. Virtualization : understand the differences

Containerization vs. Virtualization : understand the differences and benefits of each approach, as well as connections to cloud computing.