Comment 3 for bug 2049600

Revision history for this message
Marcus Segerbjer (omgzilla) wrote (last edit ):

Hey Joseph,
We used "bootstrap manual/ubuntu@<ip>"

So this is basically what we did:
Create a new project infrastructure
$ lxc project create infrastructure --config features.images=false --config features.networks=false --config features.storage.volumes=false

Switch to infrastructure project
$ lxc project switch infrastructure

Add root disk and network to the default profile on project infrastructure
$ lxc profile device add default root disk path=/ pool=default
$ lxc profile device add default eth0 nic name=eth0 nictype=bridged parent=br0

Set limits for profile default
$ lxc profile set default limits.cpu=8
$ lxc profile set default limits.memory=32GB

Launch containers on each node
$ lxc launch ubuntu:jammy jctrl-<id>

Machines included in controller ha
dwellir9:jctrl-0
192.168.110.69/22

dwellir11:jctrl-1
192.168.110.68/22

dwellir15:jctrl-2
192.168.110.67/22

Add your SSH-keys to the containers
$ lxc exec <container-name> -- sh -c "echo '<ssh-key>' /home/ubuntu/.ssh/authorized_keys"

Since confined snaps aren't allowed to read from /tmp/ you need to create a tmp folder inside your home directory and point ssh-agent to use it
$ mkdir ~/tmp
$ eval `ssh-agent -a $HOME/tmp/ssh-agent`

Bootstrap controller
$ juju bootstrap manual/ubuntu@<container-ip> <controller-name> --config identity-url="https://api.jujucharms.com/identity"

Add machine from other lxd-hosts
$ juju add-machine ssh:ubuntu@192.168.110.68
$ juju add-machine ssh:ubuntu@192.168.110.67

Enable HA in juju
$ juju enable-ha -n 3 --to 1,2