Giter VIP home page Giter VIP logo

beanstalk-upload's Introduction

Beanstalk-upload script

I’m getting a lot of trouble trying to upload wars to Beanstalk using its console. Specially large wars (larger than 50MB).
So, I’ve build this simple script that upload your war to Beanstalk and generates one version for it.

Usage

You have to have a credentials.properties file in the same directory you’re running the script.
The default AWS ‘credentials.properties’ file as below

accessKey = AKIAAIEQF6SPAKSE5BN5
secretKey = J7fa9akja879FGA308JAHA749jha7va83akaf931

After that, just run the beanstalk.groovy with the usage shown below:

Usage: groovy beanstalkUpload.groovy <path_to_war> <application_name> <application_version_label>

Attention

The script uses Grape to resolve dependencies (thanks @berngp), so, the first time you run the script it will take a while to initialize (approx 5 minutes in my 15mb/s internet). So, be patient.
Further times, the script will run immediately.

Example

groovy beanstalkUpload.groovy ../sde-0.1.war sde 0.1-beta

Output

Output will be thrown in your console, as this example:

[2011/02/18 14:10:08] [sde] Loading 'credentials.propeties' file
[2011/02/18 14:10:08] [sde] Loaded AWS credentials
[2011/02/18 14:10:08] [sde] Creating s3 bucket 'sde-d27c0fd0-8b57-44ff-8692-82233496e0a8' to hold application file
[2011/02/18 14:16:59] [sde] Uploading to sde-d27c0fd0-8b57-44ff-8692-82233496e0a8/20110218141010-sde-0.1.war: [InProgress] - 48955392 of 48956935 (100%)  
[2011/02/18 14:17:00] [sde] Creating application version...
[2011/02/18 14:17:03] [sde] Done!
[2011/02/18 14:17:03] [sde] App: sde
[2011/02/18 14:17:03] [sde] Version: 0.5
[2011/02/18 14:17:03] [sde] S3 Bucket: sde-d27c0fd0-8b57-44ff-8692-82233496e0a8
[2011/02/18 14:17:03] [sde] War file:  20110218141010-sde-0.1.war
[2011/02/18 14:17:03] [sde] Version created at: 2011/02/18 14:17:02

(AWS SDK Logs are turned off, for esthetic purposes)

Improvements?

Feel free to fork the repo, do your changes and send me a pull request

Contact

Lucas Teixeira
@lucastex

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.