Skip to content

Instances

Brett Weaver edited this page Dec 13, 2012 · 3 revisions

Instances

Simple Deploy is built to manage Instances with the following assumptions:

  • A stack is comprised of Instances performing one role (App Tier, Web Tier, Etc.) per Cloud Formation stack.
  • Multiple Cloud Formation stacks are loosly coupled to build more complex topoligies.
  • Instances within a Cloud Formation Stack are part of an Auto Scaling Group.

All operations Simple Deploy performs which affect an instnace (Deploy, Exec) are performed against all instances in a Stack.

Listing Instances

To list all instances within a stack:

# simple_deploy instances -n app-stack -e default
[
  "54.241.84.40",
  "50.18.22.164"
]

Execute

To execute 'uname -a' across all instances in a given stack:

# simple_deploy execute -n app-stack -e default -c 'uname -a' -l debug
2012-12-13 09:02:23 -0800 DEBUG : Not using an ssh gateway.
2012-12-13 09:02:23 -0800 DEBUG : Setting user to bweaver.
2012-12-13 09:02:23 -0800 DEBUG : Setting key to /Users/bweaver/.ssh/id_rsa.
2012-12-13 09:02:23 -0800 DEBUG : Executing command on instance 54.241.84.40.
2012-12-13 09:02:23 -0800 DEBUG : Executing command on instance 50.18.22.164.
2012-12-13 09:02:23 -0800 INFO : Setting command: 'uname -a'.
2012-12-13 09:02:23 -0800 DEBUG :   * executing `execute'
2012-12-13 09:02:23 -0800 DEBUG :   * executing "uname -a"
2012-12-13 09:02:23 -0800 DEBUG :     servers: ["54.241.84.40", "50.18.22.164"]
2012-12-13 09:02:28 -0800 DEBUG :     [50.18.22.164] executing command
2012-12-13 09:02:28 -0800 DEBUG :     [54.241.84.40] executing command
2012-12-13 09:02:29 -0800 DEBUG :  ** [out :: 50.18.22.164] Linux ip-10-177-57-41 2.6.32-220.el6.x86_64 #1 SMP Wed Nov 9 08:03:13 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
2012-12-13 09:02:30 -0800 DEBUG :  ** [out :: 54.241.84.40] Linux ip-10-196-15-34 2.6.32-220.el6.x86_64 #1 SMP Wed Nov 9 08:03:13 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
2012-12-13 09:02:30 -0800 DEBUG :     command finished in 1384ms

Deploy

Simple Deploy performs directed deployments using SSH to Instances within a Cloud Formation Stack. To execute a deploy against a stack and update the Chef Repo to Version 1.0.0:

# simple_deploy deploy -n app-stack -e default -a chef_repo=1.0.0
2012-12-13 09:05:02 -0800 INFO : Read chef_repo=1.0.0
2012-12-13 09:05:09 -0800 INFO : Updating app-stack.
2012-12-13 09:05:10 -0800 INFO : Adding artifact attribute: {"ChefRepoURL"=>"s3://intu-lc-us-west-1/my_app_chef_repo/1.0.0.tar.gz"}
2012-12-13 09:05:18 -0800 INFO : Updating Cloud Formation stack app-stack.
2012-12-13 09:05:25 -0800 INFO : Update complete for app-stack.
2012-12-13 09:05:28 -0800 INFO : Sending Campfire notifications.
2012-12-13 09:05:34 -0800 INFO : Campfire notifications complete.
2012-12-13 09:05:41 -0800 INFO : Starting deployment.
2012-12-13 09:06:01 -0800 INFO : Setting command: 'env CHEF_REPO_URL=s3://bucket-us-west-1/my_app_chef_repo/1.0.0.tar.gz COOKBOOKS_URL=s3://bucket-us-west-1/cookbooks/1.3.2.tar.gz APP_URL=s3://bucket-us-west-1/my_app/1.4.2.tar.gz PRIMARY_HOST=10.172.73.233 /opt/intu/admin/bin/configure.sh'.
2012-12-13 09:09:29 -0800 INFO : Deployment complete.
2012-12-13 09:09:51 -0800 INFO : Sending Campfire notifications.
2012-12-13 09:09:56 -0800 INFO : Campfire notifications complete.

For full details on deployment, please see Deployments.

Clone this wiki locally