This only works on Amazon EC2. It uses Amazon specific metadata info,
and the Elastic Load Balancing tools from Amazon.
This charm cannot function without an AWS access key and secret key. See
config.yaml for the details. I recommend using IAM to assign a key that
can only do ELB operations so as to limit the exposure.
On relating a service to the elb-target relation, you will get the ELB
tools deployed to that service, and an ELB for that service created. The
DNS name will be printed in the charm log, and the ELB will be named
after the service.
juju deploy thinkup
juju deploy mysql
juju add-relation thinkup mysql
juju expose thinkup # this is necessary as ELB needs access to your nodes.
juju deploy elb --config my-elb-creds.yaml
juju add-relation elb:elb-target thinkup
You should now have an ELB named 'thinkup' that balances to the instances
in the thinkup service.
When units are removed, they will be removed from the ELB. However,
juju doesn't ever give us a chance to run the 'broken' relation for
subordinates, so you will need to manually remove the ELB. The simplest
way to do that is to ssh to the box and use the tools and envs there. A
script will be installed in /usr/local/bin called 'destroy-charmed-elb'
Which you can run with the name of the ELB.
Please be aware that multi-AZ load balancing can be expensive. You will
probably want to use the constraint 'ec2-zone' to keep your service
units all in one zone for simplicity. Things may not work properly
unless you list all of the availability zones in the config settings
(see config.yaml for more information.
|2012/09/02 Clint Byrum adding GPL-3 license (revno 7)
|2012/09/02 Clint Byrum Satisfying charm proof (revno 6)
|2012/04/27 Clint Byrum removing unused website requires relation (revno 5)
|2012/04/27 Clint Byrum adding copyright file (revno 4)
|2012/04/27 Clint Byrum Fixes for availability zones (revno 3)
|2012/04/27 Clint Byrum fixes from deploy testing (revno 2)