-
-
Save kkemple/b1aa0ce612330b5028cf to your computer and use it in GitHub Desktop.
Revisions
-
dwwoelfel revised this gist
Aug 1, 2014 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,8 @@ In your repo's root directory, check in a requirements.txt with ``` boto==2.30.0 ``` Then, from the project's Project Settings > Environment Variables page, add the two env vars: AWS_ACCESS_KEY_ID and AWS_SECRET_KEY, with an IAM key that can deploy to eb. -
dwwoelfel created this gist
Aug 1, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,40 @@ In your repo's root directory, check in a requirements.txt with boto==2.30.0 Then, from the project's Project Settings > Environment Variables page, add the two env vars: AWS_ACCESS_KEY_ID and AWS_SECRET_KEY, with an IAM key that can deploy to eb. Then create a bash script to set up eb: setup-eb.sh: ``` #!/usr/bin/env bash set -x set -e wget https://s3.amazonaws.com/elasticbeanstalk/cli/AWS-ElasticBeanstalk-CLI-2.6.3.zip -O /home/ubuntu/AWS-ElasticBeanstalk-CLI-2.6.3.zip cd /home/ubuntu && unzip AWS-ElasticBeanstalk-CLI-2.6.3.zip echo 'export PATH=$PATH:/home/ubuntu/AWS-ElasticBeanstalk-CLI-2.6.3/eb/linux/python2.7/' >> ~/.circlerc cd /home/ubuntu/$CIRCLE_PROJECT_REPONAME && bash /home/ubuntu/AWS-ElasticBeanstalk-CLI-2.6.3/AWSDevTools/Linux/AWSDevTools-RepositorySetup.sh # set up credentials touch /home/ubuntu/.aws-credentials chmod 600 /home/ubuntu/.aws-credentials echo "AWSAccessKeyId=$AWS_ACCESS_KEY_ID" > /home/ubuntu/.aws-credentials echo "AWSSecretKey=$AWS_SECRET_KEY" >> /home/ubuntu/.aws-credentials echo 'export AWS_CREDENTIAL_FILE=/home/ubuntu/.aws-credentials' >> ~/.circlerc ``` And then, in the deployment section of your circle.yml add the following: ``` deployment: production: branch: master commands: - bash ./setup-eb.sh - git aws.push ```