Giter Club home page Giter Club logo

eb-deploy's Introduction

eb-deploy

A script to deploy to AWS Elastic Beanstalk.

Usage

eb-deploy needs the following information:

  • WAR file location
  • Build number
  • Elastic Beanstalk IAM profile
  • Elastic Beanstalk Application
  • Elastic Beanstalk Environment
  • AWS key
  • AWS secret

Each one of them can be passed either as options to the command line or be present as environment variables.

eb-deploy options
  
Deploy a war file to AWS Elastic Beanstalk. You can pass params as options or 
have them be present as environment variables mentioned under the name specified for that option.
  
   -w      $APP_WAR                    | war file location of the form /var/app/target/scala-2.10/app_2.10-0.1
   -v      $CI_BUILD_NUMBER            | used to create full war file : $APP_WAR.$CI_BUILD_NUMBER.war
   -k      $APP_AWS_ACCESS_KEY         | AWS Key
   -s      $APP_AWS_SECRET_KEY         | AWS Secret
   -p      $APP_EB_InstanceProfileName | Elastic Beanstalk IAM Profile
   -a      $APP_EB_ApplicationName     | Elastic Beanstalk Application name
   -e      $APP_EB_EnvironmentName     | Elastic Beanstalk Environment name
   

Please note that that the WAR file location and Build Number are passed as such: if the war file is at /var/app/target/scala-2.10/app_2.10-0.1.213.war then "WAR file location" should be /var/app/target/scala-2.10/app_2.10-0.1 and "build number" should be 213. eb-deploy will then combine the two and suffix it with .war to create the far file name. This is a bit clunky and should be improved :(

Got something other than a war file?

Although eb-deploy deploys war files, it can be adapted to deploy any other kind of archive. If there is interest, file an issue and I'll get to it. Or better still, the code should be pretty readable, improve it and send in a pull request.

eb-deploy's People

Contributors

ayush avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

eb-deploy's Issues

Reset the version label of war deployed to beanstalk

Hi,

First of all thanks for the great script,

The script is working properly but one thing i need to modify is the version label of the uploaded war, currently it is renaming the build to something git-${a random number} , i need to provide a custom version label for build.

Deploy not happening

hi,
tried this script but must be doing something wrong. here is the output:

using war file at bma-server.1007340.war...
rm: cannot remove `AWS-ElasticBeanstalk-CLI-2.6.0.zip': No such file or directory
fetching https://s3.amazonaws.com/elasticbeanstalk/cli/AWS-ElasticBeanstalk-CLI-2.6.0.zip
--2014-03-30 19:01:55-- https://s3.amazonaws.com/elasticbeanstalk/cli/AWS-ElasticBeanstalk-CLI-2.6.0.zip
Resolving s3.amazonaws.com (s3.amazonaws.com)... 205.251.242.196
Connecting to s3.amazonaws.com (s3.amazonaws.com)|205.251.242.196|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6987224 (6.7M) [application/x-zip-compressed]
Saving to: AWS-ElasticBeanstalk-CLI-2.6.0.zip

0% [ ] 0 --.-K/s
57% [=====================> ] 4,003,743 11.2MB/s
100%[======================================>] 6,987,224 14.0MB/s in 0.5s

2014-03-30 19:01:56 (14.0 MB/s) - AWS-ElasticBeanstalk-CLI-2.6.0.zip saved [6987224/6987224]

expanding AWS-ElasticBeanstalk-CLI-2.6.0.zip
prepping deployment dir...
Initialized empty Git repository in /home/rof/src/github.com/beepmeapp/bma-base/target-deployment/.git/
Attemping to connect to eb...
Warning. File "config" has incorrect access permission and can be accessed by other users.
Retrieving status of environment "bmaWeb-env".
Environment "bmaWeb-env" is not running.
Preparing Deployment Package...
unzip: cannot find or open bma-server.1007340.war, bma-server.1007340.war.zip or bma-server.1007340.war.ZIP.
Deploying. This may take a bit; please standby...
Counting objects: 5, done.
Delta compression using up to 32 threads.
Compressing objects: 25% (1/4)
Compressing objects: 50% (2/4)
Compressing objects: 75% (3/4)
Compressing objects: 100% (4/4)
Compressing objects: 100% (4/4), done.
Writing objects: 20% (1/5)
Writing objects: 40% (2/5)
Writing objects: 60% (3/5)
Writing objects: 80% (4/5)
Writing objects: 100% (5/5)
Writing objects: 100% (5/5), 691 bytes | 0 bytes/s, done.
Total 5 (delta 0), reused 0 (delta 0)
remote:
remote: error: Unable to deploy application version: No Environment found for EnvironmentName = 'bmaWeb-env'.�

remote:
To https://AKIAI3ODC2KOXJPQZC4Q:20140330T190156Z3a17d4d8338029fe8f840d5833bb8dac51a3325bc6f17bc7f5cbd36c9d889bfe@git.elasticbeanstalk.us-east-1.amazonaws.com/v1/repos/626d612d776562/commitid/65626162623832376130306234643138316333323362326166646462306439366564373366623163/environment/626d615765622d656e76

  • bb3767d...ebabb82 HEAD -> master (forced update)

... thats all folks!

git aws.push not wirking

Hello, first of all I would like to thank you for the script :)
I've been using it for few months and everything worked fine until yesterday.

I think that the problem is in the git aws.push line. I'm getting this output:

Writing objects: 100% (131/131), 68.89 MiB | 10.01 MiB/s, done.
Total 131 (delta 2), reused 0 (delta 0)
remote: processing ...............................................

This processing thing lasts forever...

Do you have an idea what could be the problem?

Tnx.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.