AWS Load Balancer Use Case

Luis Arias kaaloo at
Thu Oct 20 14:57:24 UTC 2011


I have been learning about juju by writing a charm for our
"maintenance site" service.  When doing an upgrade to our site
requires downtime, we have a manual procedure which consists in doing
starting up a maintenance site instance, adding it to the load
balancer, then cleanly shutting down each production instance and
removing it from the load balancer.  A similar procedure allows us to
take the maintenance site instance down and add newly updated
production instances to the load balancer.  I was wondering what your
advice would be as to how such a procedure could fit in the juju
service orchestration model, in particular as regards adding and
removing instances from the load balancer.

1. I was thinking of using a hook to the expose / unexpose juju
commands and taking care of the load balancer at that time though an
ec2 cli command or a custom script.  Unfortunately I could not find a
hook that really corresponded to expose / unexpose, but I did find
something about open_port and was thinking of exploring that.  In this
way the maintenance site charm would add itself to the load balancer.

2. That led to an idea that there may be services such as an AWS Load
Balancer or an RDS instance for which it would be useful to declare
relationships, but which should be never be deployed by juju since
they pre-exist.  If it was possible to declare such a relationship
then I could use hooks related to the relationship to deal with my
load balancer.  It seems it would fit the juju model very cleanly
since they would be reusable.

3. Finally, I am wondering if the whole load balancer issue is not
something that lies on a higher level of orchestration and I should
instead be thinking about a script that deploys a maintenance site
charm that doesn't know anything about the load balancer and then
proceeds to add the new instance to the load balancer when its ready,
maybe by parsing the output of juju status in order to get information
about the instances involved in the service.

Unless you juju gurus really lean towards 3 then I was really thinking
of starting on 1 (although I need to figure out the hook to use), but
I think what I would really like to do is 2.

I would be very happy to get your advice on this!

Thanks for a really promising tool!


More information about the Juju mailing list