Manual setup
LXD profile
Locally, in a VM
Multipass has the charm-dev
blueprint which will create a VM with a juju controller ready to go:
multipass launch charm-dev
Alternatively, you could use version-pinned cloud-init scripts, for example:
multipass launch
--cloud-init https://raw.githubusercontent.com/Abuelodelanada/charm-dev-utils/main/cloud-init/charm-dev-juju-3.0.yaml
With multipass it is very easy to create disposable instances of different sizes. For example, to mimic the default github runner,
multipass launch
--cloud-init https://raw.githubusercontent.com/Abuelodelanada/charm-dev-utils/main/cloud-init/charm-dev-juju-3.0.yaml \
--name charm-dev-2cpu-7g \
--mem 7G \
--cpus 2 \
--disk 50G \
--mount ~/code:/home/ubuntu/code
On GCP, using terraform
See https://github.com/sed-i/tf-gcp/tree/main/charm-dev
terraform apply -var-file="charm-dev.tfvars"