aws ec2 elb #1


Overview

Link one AWS ELB to many AWS EC2 instances you have running. An alternative to HAProxy that can support SSL if configured correctly. Only works for HTTP/HTTPS services.

Installation

To deploy this charm you will need at a minimum:

  • a AWS cloud environment
  • working Juju installation
  • a successful bootstrap

You will want to deploy this charm on an existing host, possibly your 0 host. Mostly because this service configures an ELB host and does not require resources itself to operate.
juju deploy aws-ec2-elb --to 0

It may be useful to setup a config yaml before deploy, so you start with the right settings:

aws-ec2-elb:
  elb_name: my-elb
  aws_access_key: ACCESS
  aws_secret_key: SECRET
  elb_region: us-east-1
  elb_availability_zones: us-east-1a

Then deploy with this command: juju deploy aws-ec2-elb --config myconfig.yaml --to 0

Config

The ELB has no name by default, which causes it to not configure. This is intentional because it does not undeploy ELB's
when you change the name (currently no built-in mechanism to know the changed values on config-changed).

  1. Set the elb-name, aws_access_key, aws_secret_key, elb_region and elb_availability_zones in one go.
  2. HTTP is enabled on port 80 by default, at this point you can add some websites and it will update.
  3. Enable HTTPS and set the certificate ID if you want HTTPS

References

Configuration

aws_secret_key
(string) AWS secret key
aws_access_key
(string) AWS access key
elb_name
(string) AWS name for the ELB
elb_region
(string) AWS Region for this ELB
us-east-1
elb_availability_zones
(string) comma seperated list of AZ's for this ELB
us-east-1a
hc_interval
(int) How often the check is made in seconds.
20
http_port
(int) ELB port for regular HTTP
80
ssl_port
(int) ELB port for HTTPS
443
hc_timeout
(int) Number of seconds the load balancer will wait for a check to return a result.
5
ssl_cert_id
(string) AWS SSL Certificate ID
ssl_enabled
(boolean)
http_enabled
(boolean)
True