I was initially tasked with manually setting up a Chef HA topology environment. As I followed the instructions, documented my own steps, and created a few helper scripts I figured the best way to validate my steps where to automate what I could easily. The scripts in this project are targeted for a single path - Ubuntu 12.04 systems using Rackspace clould instances. The caveats for Rackspace have been documented. The scripts do not include setting up the instances, but those steps are documented below.
If you are not using Rackspace or Ubuntu 12.04, the scripts can still be used as a general guide for other systems.
- Rackspace account
- EC 11.0.2 for Ubuntu 12.04 (used for development)
- 2 Backends using "Perf1 8 GB Performance"
- 2 Frontends using "Perf1 1 GB Performance"
- FE Load Balancer directing traffic to all FEs
- BE Load Balancer (Simulate floating IP) direct all traffic to bootstrap server. Creating a floating IP could be accomplished using the API, but is out of scope for the project.
Highly recommened to configure the cloud instances to include your public key.
When creating the servers, use the following naming conventions since some files have been preconfigured:
- be1 (bootstrap)
- be2
- fe1
- fe2
- Copy the hosts and private-chef.rb files in templates directory to the project base directory.
- Edit the files and enter the IPs that were generated by Rackspace for the associated servers.
- Add the same host entries to your local hosts file
- Add entries to local .ssh/config files
Host be1 be2 fe1 fe2
User root
StrictHostKeyChecking no
- ./bootstrap.sh
- Generate s3 url. I have been using dendrite, example below.
- ./install_chef.sh 'url'
- ./configure.sh
bundle exec bin/dendrite package list private-chef --build-type=release --platform=ubuntu --platform-version=12.04 --download-urls
- Mail Relay
- Automate S3 URL generation (dendrite)
The lessons learned and concepts in this project are to be carried to a Chef mainstream project. It could be a cookbook executed by a knife plugin - still in the works. Setting up environments will be included as part of the automation (Vagrant, EC2, etc using chef-metal)
- Configuring and starting DRBD was not as straight forward as the doc instructions
- Aborting the initial reconfigure can be enhanced to stop on it's own (duh)