Charmed PostgreSQL Tutorial > 1. Set up the environment
Set up the environment
In this page, we will set up a development environment with the required components for deploying Charmed PostgreSQL K8s.
Before we start, make sure your machine meets the minimum system requirements.
Set up Multipass
Multipass is a quick and easy way to launch virtual machines running Ubuntu. It uses the cloud-init standard to install and configure all the necessary parts automatically.
Install Multipass from Snap:
sudo snap install multipass
Launch a new VM using the charm-dev cloud-init config:
multipass launch --cpus 4 --memory 8G --disk 50G --name my-vm charm-dev
To show all running VMs, just run the command multipass list
. For more information about Multipass commands, see the Multipass CLI documentation.
As soon as a new VM has started, access it with:
multipass shell my-vm
Note: If at any point youâd like to leave a Multipass VM, enter Ctrl+D
or type exit
.
All necessary components have been pre-installed inside the VM already, like MicroK8s and Juju.
The files /var/log/cloud-init.log
and /var/log/cloud-init-output.log
contain all low-level installation details.
Set up Juju
Letâs bootstrap Juju to use the local MicroK8s controller. We will call it âoverlordâ, but you can give it any name youâd like.
juju bootstrap microk8s overlord
A controller can work with different models. Set up a specific model for Charmed PostgreSQL K8s named âtutorialâ:
juju add-model tutorial
You can now view the model you created above by running the command juju status
. You should see something similar to the following example output:
Model Controller Cloud/Region Version SLA Timestamp
tutorial overlord microk8s/localhost 3.1.7 unsupported 11:56:38+01:00
Model "admin/tutorial" is empty.
Next step: 2. Deploy PostgreSQL