Skip to content

Instantly share code, notes, and snippets.

@mipearson
Created August 7, 2011 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mipearson/1130406 to your computer and use it in GitHub Desktop.
Save mipearson/1130406 to your computer and use it in GitHub Desktop.
Migration off of linode to AWS for thebonscotts.com

So, linode bailed (http://yfrog.com/kkrk4p) while I was in the middle of working on the band website (http://www.thebonscotts.com)

That annoyed me somewhat.

Here's what I did to move it off linode in under one hour (except for DNS TTLs, obvs):

  • logged in to my (already extant) AWS account
  • created an elastic IP
  • put in a request for a t1.micro spot instance in ap-southeast-1 (have found it to have the least latency for .au clients) Note: spot instances use a 'bidding' mechanism and might go away. Working around this atm by specifying the max bid price as 2x the maximum price in the history. Will re-visit with a 'reserved' yearly instance soon.
  • logged in to linode
  • pointed the thebonscotts.com / www.thebonscotts.com A records to the new elastic IP
  • waited ~5min for the spot instance to come up
  • associated the elastic IP with the spot instance

I then logged in to the instance, ran ssh-keygen to create a ssh key, and added that key to my github project's deploy keyset.

I then ran these commands:

sudo apt-get update
sudo apt-get install git-core
wget http://rubyenterpriseedition.googlecode.com/files/ruby-enterprise_1.8.7-2011.03_amd64_ubuntu10.04.deb
sudo dpkg --install ruby-enterprise_1.8.7-2011.03_amd64_ubuntu10.04.deb 
sudo gem update --system
sudo gem install bundler --no-rdoc --no-ri
sudo gem install passenger --no-rdoc --no-ri
sudo apt-get install apache2-prefork-dev
sudo apt-get install build-essential libcurl4-openssl-dev zlib1g-dev apache2-mpm-prefork
sudo /usr/local/bin/passenger-install-apache2-module
sudo vim /etc/apache2/sites-available/default
# above I copied in the sections from the passenger install
git clone git@github.com:<REDACTED>
sudo apt-get install memcached
sudo update-rc.d memcached defaults
sudo update-rc.d apache2 defaults
cd bonscotts/
bundle install
sudo /etc/init.d/apache2 restart
@mipearson
Copy link
Author

Additional: this was using the standard canonical 10.04 ubuntu image.

@tigris
Copy link

tigris commented Aug 8, 2011

You should just have a script in [project]/bin that can bring a machine up from scratch, pretty simple, i try and do it for all projects now... along with all your configs in [project]/config of course, including apache/whatever else you need.

@mipearson
Copy link
Author

mipearson commented Aug 8, 2011 via email

@CTOMBC
Copy link

CTOMBC commented Dec 19, 2022

did you have a database or did you have to do that separately?

@mipearson
Copy link
Author

No DB. Also this is over 11 years old, probably no longer accurate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment