Skip to content

Have you dreamt of having your own home cloud but found it too complex? Micro-clouds enable everyone to build a cloud anywhere

License

Notifications You must be signed in to change notification settings

valentincanonical/diy-microcloud

Repository files navigation

Arm, Ubuntu, K8s: Build Your Own Cloud for Edge Computing

Have you dreamt of having your own home cloud but found it too complex?
Micro clouds enable anyone to build a lightweight cloud anywhere.

Abstract

Building micro clouds or edge clouds has vast potential. The edge is where the real world happens. Edge clusters bring your technologies to the consumer for more privacy and less latency. So, where to begin? With Arm, obviously. But what about after that?

This workshop gets you started. It's suitable for beginners, from install, set-up and config of an Ubuntu K8s cluster. But it also has value for experts, talking DevOps, AI use cases, and inferences at the edge, on something as simple and accessible as a Raspberry Pi or a Jetson Nano.

Micro cloud: a cloudish layer cake.

Table of Contents

Architecture Overview

Minimum Configuration

To enable more people to follow this tutorial at home, we won't require any specific hardware - only your workstation. Nonetheless, you will find secondary paths and alternative options all along, including instructions to use a cluster of Raspberry Pis. The following requirements apply if you're willing to follow the primary path, using virtualisation to emulate multiple small devices:

  • 16GB RAM recommended (8GB min required).
  • Min 4-core CPU.
  • Min 50GB of disk storage left.
  • Multipass installed for your platform (stick to the default configuration).
Before attending the session, please make sure you can use Multipass. The following commands should run without any specific configuration (click to expand).
    $ multipass launch --name iamatest --mem 16G --disk 10GB --cpus 4
    Launched: iamatest 

    $ multipass list
    Name                    State             IPv4             Image
    iamatest                Running           192.168.64.71    Ubuntu 20.04 LTS

    $ multipass exec iamatest -- sudo snap install microk8s --classic
    microk8s (1.21/stable) v1.21.3 from Canonical✓ installed

    $ multipass exec iamatest -- sudo microk8s status --wait-ready
    microk8s is running
    high-availability: no
    datastore master nodes: 127.0.0.1:19001
    datastore standby nodes: none
    ...

    $ multipass stop iamatest
    $ multipass delete iamatest
    $ multipass list
    Name                    State             IPv4             Image
    iamatest                Deleted           --               Not Available

    $ multipass purge

The sequence above should not take more than 10mn to run. Otherwise, please consider stopping any greedy processes, using a more powerful machine or trying a cloud-based virtual machine.


Issues with VPN software

It has been reported that VPNs (OpenVPN, AnyConnect...) might cause network issues. If you have the option to disable your VPN, please do. Otherwise, you can try this workaround.

After applying the workaround, if you still get error messages related to DNS, here's a few steps you can take (click to expand).
   $ multipass shell node1 # do that in all the machines
   ubuntu@node1:~$ sudo mkdir /etc/systemd/resolve.conf.d
   ubuntu@node1:~$ cat > /etc/systemd/resolve.conf.d/dns_servers.conf <<EOF
      [Resolve]
      DNS=1.1.1.1
      Domains=~.
   EOF

If you can't get it to work on your machine, please consider going for cloud virtual machines.
To set it up before the workshop, refer to the next step's instructions.

Building Your Home Lab Micro Cloud in 5 Steps

Expected overall tutorial duration: 70 minutes

Once the tutorial is complete, you'll get the following picture running on your edge/home lab.


Checkpoint 0

To make it easier to follow, we split this tutorial into five steps with clear goals. At the end of each step, a checkpoint will help you understand the intended outcome. If you can't get to the checkpoint, please reach out for help to the staff or online forums. You are also welcome to open issues directly on this repository.

Checkpoint #0: Minimum requirements matched.


Next step (1/5): Prepare the bare metal nodes >

About

Have you dreamt of having your own home cloud but found it too complex? Micro-clouds enable everyone to build a cloud anywhere

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published