1

First off -- I'm not a sysadmin so I'm not even sure what I'm doing is right.

Basically I have two Amazon EC2 webservers that are essentially clones of each other. I've created an Elastic Load Balancer, and I've added both instances to it. I'm pushing production code simultaneously to both servers so the content stays consistent.

Now this is working alright, but I'm having a hard time wrapping my head around configurations. If I eventually expand and launch more instances and add them to the load balancer, how can I keep things like Apache configurations consistent across them all? I'd hate to have to manually SSH into each instance just to update my httpd.conf files.

Is there a strategy for this, and/or is my load balancer setup correct here?

Calvin
  • 403
  • 1
  • 4
  • 15

1 Answers1

3

Tongue in cheek answer, find a qualified sysadmin to help you. :-)

More helpfully, yes you're on the right path. By using Amazon's ELB, you essentially have a black box load balancer that 'just works' and can be easily managed via Amazon's tools. Your main responsibility as regards deployment is then to keep the webapp servers consistent and up to date. There are 3 classical strategies:

  1. "By the seat of your pants", mostly log in to each app server manually, and perform installations manually and/or with a little scripting to assist with parts of it.

  2. Using a declarative tool for configuration management, such as Chef, Puppet etc (there are many) to script everything.

  3. Use what's built into Amazon AWS. The workflow generally goes something like this: a) Deploy a production version. b) Build a staging server in a separate VM. c) Develop code, and install on the separate staging server. d) When ready to release, spawn x copies of the staging server AMI. e) Swing the ELB over to use the new (what used to be staging) VMs for production. f) Keep the old production VM around for a couple of days, to facilitate rollback if you need it.

The good choices of the above are generally 2) and 3).

You could read "Web Operations: Keeping the Data On Time" by John Allspaw and Jesse Robbins. It is quite high-level, i.e. the opposite of giving "paste this script in there" advice; it focuses more on higher-level concepts such as "why" and "culture". And it's a good book.