juju enable-ha with lxd servers

John Meinel john at arbash-meinel.com
Thu Jun 29 23:47:49 UTC 2017

Are these 3 LXD containers on one machine, or 3 different host machines
where you want to run LXD containers?

At present we don't support scheduling across LXD hosts, so the easier way
would probably be to treat 3 host machines as separate 'manually
provisioned' machines, and then deploy to containers on those machines.
Which would be more:

 $ juju bootstrap manual/HOST1
 $ juju switch controller
 $ juju add-machine ssh:HOST2 # shows up as machine 1
 $ juju add-machine ssh:HOST3 # shows up as machine 2
 $ juju enable-ha -n3 --to 1,2

At which point you should be able to do things like:
 $ juju deploy APP --to lxd:0
 $ juju add-unit APP --to lxd:1

Juju itself doesn't have a way to decide to schedule to machine 0 vs 1 vs
2, which is why you have to do manual scheduling (deploy this application
to a container on this specific machine).

LXD provider (vs manual provider deploying into containers) is a bit
different, but would only support a single host machine.

I believe there is ongoing work in LXD itself to support clustering host
machines and do simple scheduling across them. But I don't think that work
is quite at the point where you could just point Juju at an LXD cluster and
have it all 'JustWork'.


On Fri, Jun 30, 2017 at 4:43 AM, Daniel Bidwell <drbidwell at gmail.com> wrote:

> I have 3 lxd servers, lxd0,lxd1, and lxd2.  I did a "juju bootstrap lxd
> lxd-prod" on lxd0.  Now I would like to enable juju high availability
> with machines lxd1 and lxd2 as secondary juju controllers.  I see that
> I want something like "juju enable-ha -n 3 -server lxd1 lxd2".  What
> form do I need lxd1 and lxd2 in to do this?
> I tried doing "juju add-machine ssh:root at lxd1"
> --
> Daniel Bidwell <drbidwell at gmail.com>
> --
> Juju mailing list
> Juju at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/juju
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20170630/84fdaabf/attachment.html>

More information about the Juju mailing list