Charmed MAAS Site Manager K8s Tutorial | 1. Set up environment

Set up environment

In this section, we’ll set up a development environment for deploying Charmed MAAS Site Manager K8s. We use a multipass VM with the charm-dev cloud-init config to install and configure necessary components, like Microk8s and Juju.

Launch the charm-dev Multipass VM

If you haven’t already installed multipass, do so via snap:

sudo snap install multipass

Then, launch a new VM with the charm-dev cloud-init config:

multipass launch --cpus 4 --memory 8G --disk 50G --name charm-dev-vm charm-dev

Note: You can find documentation about the multipass launch command used above here.

Once the VM has finished launching, you can access it with:

multipass shell charm-dev-vm

Set up Juju

First, set up Juju to use a local Microk8s controller. In a shell inside the charm-dev-vm, run the following:

juju bootstrap microk8s microk8s

We will need two separate models for our deployment–one for COS Lite, and one for MAAS Site Manager. Create these models as shown below, then switch to the cos-lite model:

juju add-model msm
juju add-model cos-lite
juju switch cos-lite

Next Step: Deploy MAAS Site Manager and PostgreSQL