Skip to content

Instantly share code, notes, and snippets.

@wallace
Created June 19, 2009 13:58
Show Gist options
  • Save wallace/132629 to your computer and use it in GitHub Desktop.
Save wallace/132629 to your computer and use it in GitHub Desktop.
# setup db and ami staging instances all set up w/stale volumes
-- complete
# test staging instances
1) Log in as a few different clients
2) Launch courses in those clients
3) Make sure reports run as those clients
4) Manually trigger a few integrations (?)
5) Log into the admin account
6) Update some enrollments in the admin account
7) Run a few reports
8) Make sure email notification comes from report creation
# disable access to production
cap production deploy:web:disable REASON="a software update" UNTIL="in approximately 30 minutes"
# restart apache to shutdown existing passenger connections, then unmount uploads directory
ssh [email protected] '/etc/init.d/apache2 restart && umount /dev/sdj'
# stop postgres and unmount data directory
ssh [email protected] '/etc/init.d/postgresql-8.3 stop && umount /dev/sdi'
# detach db volume
ec2-detach-volume vol-e8bc5c81
# attach production db volume to db instance
RollbookAws::attach_volume(:volume_id => 'vol-e8bc5c81', :instance_id => db_instance_id, :device => '/dev/sdh')
# mount volume
ssh root@db_host_name 'mount -a'
# verify uid belongs to postgres on mounted volume
ssh root@db_host_name 'chown -R postgres:adm /var/lib/postgresql/8.3/main'
# start postgresql
/etc/init.d/postgresql-8.3 start
# switch elastic ip for the db instance
# once postgres is started, we can begin testing new app instance
# detach app volume
ec2-detach-volume vol-4f2fca26
# attach production app volume to app instance
RollbookAws::attach_volume(:volume_id => 'vol-4f2fca26', :instance_id => app_instance_id, :device => '/dev/sdi')
# mount volume
ssh root@app_host_name 'mount -a'
# verify uid belongs to rbadmin on mounted volume
ssh root@app_host_name 'chown -R rbadmin:rbadmin /var/www/rails/rollbook'
# restart app
cap HOSTS={app_host_name} deploy:migrations
# run tests
suggestions for tests or areas to focus on
# switch app elastic ip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment