1

I am trying to deploy Openstack in HA environment where there are 3 nodes(controllers) which have charms deployed inside lxcs but I am having difficulty in deploying the charms inside lxcs on specific nodes.

I would like to deploy 3 units of a charm inside lxcs. i.e. juju deploy -n 3 rabbitmq-server

Is there any way I can use the --to flag for this? i.e. juju deploy -n 3 rabbitmq-server --to lxc:0 lxc:1 lxc:2

Bilal Baqar
  • 543
  • 3
  • 14

3 Answers3

2

When using --to, you can't specify -n, sorry. You have to run the command once for each unit, like in a for loop.

Andreas Hasenack
  • 3,065
  • 1
  • 16
  • 17
1

First of all you need to make sure that your containers are running: lxc-ls --fancy. If not start them with lxc-start -n lxc:0 --daemon

Then you need to jump into each container with lxc-attach -n lxc:0, make sure you have OpenstackHA installed and running in each one of them (yes, that means installing it 3 times and wasting some bandwidht and disk space)

Once this is done you can do your Openstack stuff for which I admitedly can not help you much.

sмurf
  • 4,660
  • 1
  • 23
  • 29
1

If the units have to be places on specific nodes then do not use the num-units flag (-n).

Instead deploy the first unit using the command:

juju deploy rabbitmq-server --to lxc:0

Then add-units accordingly:

juju add-unit rabbitmq-server --to lxc:1

juju add-unit rabbitmq-server --to lxc:2

Bilal Baqar
  • 543
  • 3
  • 14