Not much to report other than the fact that I am pouring over HowTo’s for building and deploying MySQL clusters and chewing up my insides with anxiety over the added wrinkle of tossing them up in to Amazon’s EC2. After some heady and heavy reading on the subject I’m feeling a little bit like Gab’s up there. Hopefully, in the next couple of days I can get something working and maybe, just maybe, I’ll have a quick and dirty How-To of my own posted if all is a resounding success–you can be certain if it isn’t there’ll be a post about it!
Archive for June, 2007

Saturday morning I noticed that our hostas are finally in bloom.

After packing everyone up into two cars we drove over to the dog park in Granby.

Peri wasn’t the only one having fun, Gabi was enraptured with the dogs watching them for three hours occasionally cheering them on as they chased each other about.

We had such a good time on Saturday that we repeated it on Sunday and this little guy took it upon himself to keep Gabi amused with his antics.

After a busy weekend we got up this morning to this sight.

This is what I do Monday through Friday: ride in the back and take pictures.
With EC2 and S3 Amazon has made available some seriously powerful and flexible tools for server and file hosting. Ec2 allows you to roll whatever flavor OS you want and get it up and running–think of it as virtual dedicated hosting–which while being incredibly cool has one major downside: if your server instance fails you loose your data as it will revert to the most current instance when you get it back online. In other words, a hiccup on EC2 could turn into a blistering nightmare.
This is where S3 comes in handy for storing anything that might change after you create and instance and launch it such as databases, files uploaded or created, and even logs. One of the first projects I hopped into was dumping the MySQL databases, compressing them and tossing them up on S3, a tedious process that can be automated with cron and s3sync (a ruby based tool that approximates rsync, kinda sorta).
Daily cron job to create new bucket
cd /root/s3sync/
DAYNOW=$(date +%j)
ruby s3cmd.rb createbucket WTF_db_$DAYNOW
Daily cron job to delete old bucket
cd /root/s3sync/
DAYTHEN=$(date +%j --date='2 days ago')
ruby s3cmd.rb deletebucket WTF_db_$DAYTHEN
Hourly job to back up the database
# get into the directory
cd /root/s3sync/
# set the environment
export AWS_ACCESS_KEY_ID=XXXX
export AWS_SECRET_ACCESS_KEY=XXXX/XXXX
export SSL_CERT_DIR=/root/s3sync/certs
# set date variables
DAYNOW=$(date +%j)
TIMENOW=$(date +%H%M)
# dump database
mysqldump WTF > /tmp/WTF-$DAYNOW-$TIMENOW.sql
# tar SQL dump
tar -czvf /tmp/backups/WTF-$STAMPD-$STAMPT.tar.gz /tmp/WTF-$DAYNOW-$TIMENOW.sql
# copy tar to S3
ruby s3sync.rb -r --ssl /tmp/backups/ MahBukit:WTF_db_$DAYNOW
# clean up after yourself
rm /tmp/*.sql
rm /tmp/backups/*.gz
Now one of the frustrations I have with this set up is while I am dropping the buckets from 48 hours prior it isn’t actually deleting the files off S3, a bit of a pain in the ass that I need to find some sort of resolution for in the near future. If anyone has an answer to this problem I would love to hear it! For now, I’m cheating by using S3Fox to purge those pesky backups.
I’ve been busily slaving away weighing the pros and cons of System76 and Dell when I stumbled onto ZaReason and they are offering a laptop that seems to good to be true.
- Display–17″ WXGA LCD display @ 1440×900 pixels
- Graphics–Intel GMA 950
- Processor–Core 2 Duo T7200
- Memory–2 GB (DDR2-667)
- Hard Drive–100 GB (7200 RPM SATA)
- Optical Drive–CD-RW / DVD-RW (included)
- Expansion
- MMC.SD.MS/Pro slot
- E-SATA port
- 4 USB ports total (2 USB ports on each side)
- Networking–WiFi + Ethernet (both included)
- OS–Ubuntu 7.04 Feisty Fawn (Gnome)
- AC Adapters–2
- Warranty–1 year (included)
Subtotal–$1465.00
UPS Ground–$18.16
CA Sales Tax–$128.19 (no charge if ordering outside CA!)
Total–$1611.35 $1483.16
A quick note with a wicked fast and friendly response assured me that no sales tax would be applied so this laptop really smacks of value to me. For one, a 17″ screen which will make it much more comfortable to work longer hours and the 100GB 7200 RPM SATA will make life easier sorting and storing my growing library of Gabi pictures. Now, the graphics is a bit of a downer but seeing as I don’t play games they will likely be more than adequate especially with 2GB of RAM.
Yet again, I find another reason to continue dithering, though I’m really leaning towards this unit.










