Skip to content

Instantly share code, notes, and snippets.

@dreamr
Last active December 25, 2015 14:59
Show Gist options
  • Save dreamr/6995089 to your computer and use it in GitHub Desktop.
Save dreamr/6995089 to your computer and use it in GitHub Desktop.
firing up a new ec2 server

firing up a new ec2 server

NOTE!! Bug in knife ec2 - v

  • knife the server once
  • log in with generic ubuntu once
    • fix encrypted dbag value
    • ensure edbs is at /etc/chef/encrypted_data_bag_secret has the correct key (get from dreamr)
knife ec2 server create -r 'role[base], role[app--rails]' -I ami-daac32ea -f m1.medium -G hvst-base,hvst-web -x ubuntu -Z us-west-2b -N app02.hvst.com -i .chef/staginghvstcom.pem --secret-file .chef/encrypted_data_bag_secret

Set up route53

  • machine_id.hvst.com -> public ip
  • machine_id.internal.hvst.com -> private ip

deploy the app

  • add the public ip or dns route to your deploy/enviroment
  • cap deploy:setup
  • cap deploy:cold
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment