Monday, 28 July 2008 17:49
We've been working on the base image, a stripped CentOS 5 with some tweaks here and there. We installed a Snort, ClamAV, Tripwire, Syslog-NG, OpenVPN.
For storage we are going to be using Elastic Drive. Elastic Drive allows mounting S3 as a local partition. It is very efficient and allows a number of options to be tweaked to adjust the performance depending on usage.
We have two roles, frontends and backends, in the frontends we have Apache serving Drupal using the backends with MySQL, everything running over an OpenVPN. Multiple instances can run for high availability and load balancing for the frontends and for high availability for the backends (to be expanded to load balancing later).
Within the base image we have created an init script that will mount S3 as well as a script that will create an AMI from the current instance.
# cat create_image
#!/bin/bash
set -e
if [ "$1" = "" ]; then
echo "Usage: $0 revision"
exit 3
fi
ec2-bundle-vol -d /mnt -k $AWS_PK_PEM -c $AWS_CERT_PEM -u $AWS_USER -r i386 -p centos-$1
ec2-upload-bundle -b baseimage -m /mnt/centos-$1.manifest.xml -a $AWS_AWSID -s $AWS_SECRET
ec2-register baseimage/centos-$1.manifest.xml
What's next:
- Branch the base image into Frontend and Backend;
- Create Frontend and Backend groups;
- Deploy software to each image.
