Skip to content

Instantly share code, notes, and snippets.

@ajburton
Created June 13, 2011 17:23

Revisions

  1. ajburton revised this gist Jun 13, 2011. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions sandbox_quick
    Original file line number Diff line number Diff line change
    @@ -14,8 +14,8 @@ knife ec2 server create -x ubuntu -G sandbox -r 'role[development]'
    export NODE=i-whatever
    knife tag create $NODE MYSANDBOXNODE

    ## setup the SANDBOX_HOST environment variable
    export $SANDBOX_HOST=$(knife search node "tags:MYSANDBOXNODE" -a ec2.public_ipv4 | grep ec2 | awk '{print $2}')
    ## setup the SANDBOX_HOSTS environment variable
    export $SANDBOX_HOSTS=$(knife search node "tags:MYSANDBOXNODE" -a ec2.public_ipv4 | grep ec2 | awk '{print $2}')

    ## setup the directories on the server, grab the code, setup the database
    ## and start the app server
    @@ -27,4 +27,4 @@ cap sandbox deploy:seed
    cap sandbox deploy:start

    ## browse to the public IP in your browser and use the server!
    firefox $SANDBOX_HOST
    firefox $SANDBOX_HOSTS
  2. ajburton revised this gist Jun 13, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion sandbox_quick
    Original file line number Diff line number Diff line change
    @@ -27,4 +27,4 @@ cap sandbox deploy:seed
    cap sandbox deploy:start

    ## browse to the public IP in your browser and use the server!
    firefox $SANDBOX_HOSTS
    firefox $SANDBOX_HOST
  3. ajburton created this gist Jun 13, 2011.
    30 changes: 30 additions & 0 deletions sandbox_quick
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    ## all Chef commands need to be run from the chef-repo directory; go there
    cd chef-repo

    ## setup the AWS environment
    source .chef/.awsrc

    ## add the developer ssh key to your keychain
    ssh-add .chef/coshx-dev-keypair.pem

    ## create a node
    knife ec2 server create -x ubuntu -G sandbox -r 'role[development]'

    ## tag the node (have to put your thinking cap on here)
    export NODE=i-whatever
    knife tag create $NODE MYSANDBOXNODE

    ## setup the SANDBOX_HOST environment variable
    export $SANDBOX_HOST=$(knife search node "tags:MYSANDBOXNODE" -a ec2.public_ipv4 | grep ec2 | awk '{print $2}')

    ## setup the directories on the server, grab the code, setup the database
    ## and start the app server
    cap sandbox deploy:setup
    cap sandbox deploy:update
    cap sandbox deploy:setup_images_symlink
    cap sandbox deploy:migrate
    cap sandbox deploy:seed
    cap sandbox deploy:start

    ## browse to the public IP in your browser and use the server!
    firefox $SANDBOX_HOSTS