Skip to content

Instantly share code, notes, and snippets.

View agbodike's full-sized avatar

Afam Agbodike agbodike

  • Pomello
  • San Francisco
View GitHub Profile
@agbodike
agbodike / gist:78149a8c4ecd634b69d9
Last active August 29, 2015 14:02
Prepping an Opworks instance for an AMI.
Overview instructions:
http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-custom-ami.html
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-instance-store.html
https://dev.infopark.net/e7832b631baf0ce8/creating-an-instance-store-backed-ami-from-a-running-opsworks-instance
Make a very very big powerful box (or else you'll sit there forever waiting for the image to zip up)
SSH into a running blank opsworks box
Do whatever crazy stuff you need to do (install packages, root kits, etc)
Do the stuff at the bottom of here to kill off existing opsworks packages:
#!/bin/bash
mkdir workspace
(
cd "$HOME/workspace" || exit 1
git clone https://github.com/myhireQ/laptop.git "$HOME/workspace/laptop"
cd "$HOME/workspace/laptop" || exit 1
sh mac 2>&1 | tee ~/laptop.log
)