EC2
First steps toward Drupal automation on Amazon EC2
simon — Sun, 20/01/2008 - 7:28pm
I'm hoping to use Amazon Elastic Compute Cloud (EC2) for an upcoming project that involves multi-hosting a bunch of Drupal websites. I like the "pay for what you use" model, and the ability to ramp up capacity within minutes instead of weeks. Integrating one of Drupal's provisioning solutions with Amazon's "Datacentre On-Demand" is my ultimate goal.
But first, EC2 has a few limitations which makes multi-site hosting a little more challenging:
Convert EC2 data filesystems to LVM for Drupal & MySQL
simon — Mon, 24/12/2007 - 3:40am
We're going to remove /mnt and use the "disk" to create LVM filesystems for our data. This will let us take snapshots, allowing for much quicker backups.
This script is a slightly modified version of Paul Moen's from http://blog.dbadojo.com/2007/11/making-logical-volumes-on-ec2.html.
Paste the script below into a file:
#!/bin/sh
# Name: make_mnt_LV.sh
# Script to make EC2 /mnt into a LVM volume
modprobe dm-snapshot
umount /mnt
pvcreate /dev/sda2
vgcreate vg /dev/sda2
lvcreate -L30720M -n myvmdisk1 vg
mkfs -t ext3 /dev/vg/myvmdisk1
mkdir -p /data/mysql_master
Installing AMP on our Amazon EC2 AMI
simon — Sun, 23/12/2007 - 1:42pm
In http://croome.org/content/running-our-first-centos-5-virtual-machine-ama... we got out new EC2 vm running, now we need to update it with our application stack.
First, run an update against the base repository:
yum -y update
Enable the centosplus repository to get more recent package versions changing "enable=0" to "enable=1" in the centosplus section of /etc/yum.repos.d/CentOS-Base.repo.
Install MySQL:
yum --enablerepo=centosplus -y install mysql mysql-devel mysql-server mysql-admin
And Apache/PHP:
Running our first Centos 5 virtual machine with Amazon EC2 and a base AMI
simon — Sun, 23/12/2007 - 7:44am
These are my notes on creating an EC2 image for Drupal 5.5 running on Centos 5 and the latest versions of MySQL, Apache and PHP. The intention is to get the base stack running, customise for EC2's characteristics, then publish as a public AMI.
Rather than create yet another base OS image, I'll re-use the Centos 5 image from RightSight. Details at http://developer.amazonwebservices.com/connect/entry.jspa?externalID=821.... At least this image is a known quantity with it's build process automated and available at http://s3.amazonaws.com/rightscale_scripts/Cent5V1.10Install.sh
