Scaling bare-metal full Anbox deployment

I suppose this is more of a juju questions but I wanted to make sure I understood how to scale out the pieces of a full Anbox deployment on bare-metal. Let me know if the following steps are correct:

  1. Setup VMs with Ubuntu

  2. On the juju controller, add the machines using juju add-machine

  3. Add the specified service to the specific machines:
    a) For scaling AMS, the initial deploy does not contain the ams load balancer so this must be deployed first and utilize the --to parameter to specify one of the previously added machines: juju deploy ams-load-balancer --channel 1.XX --to N
    i) Since this is a new LB, it must be related to the service via juju relate ams ams-load-balancer
    b) For the service that is to be scaled (ams, anbox-stream-gateway, anbox-stream-agent), use the juju add-unit command along with specifying a comma separated list of machine ids that were previously added.
    i) The docs say to run juju relate anbox-stream-gateway:api anbox-stream-gateway-lb:reverseproxy after adding more units. Does this need to be done even though the anbox-stream-gateway-lb already exists? If so does it need to be ran after every scale up ?

  4. Scaling LXD works similarly in that only add-unit is needed with specifying the --to parameter to target specific machines (juju add-unit -n N lxd --to N1,N2,NX)

Tangentially, is it possible to use a cloud provider and juju to scale all portions of Anbox except for LXD or is it all or nothing with utilizing juju’s cloud provider plugin?

Hey @devperson,

The relation has to be created only once as it is created for an application in the Juju context and then automatically being established for all units of that application.

Typically you create all instance of the control plane in HA and then face them with necessary load balancers. You can either use ams-load-balancer but typically the load balancer impementations of the clouds like AWS’s ELB or ALB are a better fit.

For scaling LXD you need something which calls juju add-unit lxd and juju remove-unit lxd/<n>, how that controller is being implemented and what its input is, is freely definitely and we don’t provide a solution for. If you can integrate an existing auto scaling solution with that and it fits your requirements, why not?

The only thing to keep in mind is that for scaling down you want to be careful which LXD units you remove to not disturb any remaining users. How to manage cluster nodes | Anbox documentation has some more details on the specifics.