Giter Site home page Giter Site logo

elastic-beanstalk.js's Introduction

elastic-beanstalk.js

Build Status Coverage Status

Utilities to deploy packages to AWS Elastic Beanstalk.

Installation

npm install elastic-beanstalk.js

Usage

// Create the client 
var elasticBeanstalk = new ElasticBeanstalk({
  aws: {
    /* your AWS credentials */
    accessKeyId: 'ACCESS_KEY_ID',
    secretAccessKey: 'SECRET_ACCESS_KEY',
    
    /* the AWS region of your Elastic Beanstalk application*/
    region: 'REGION',
    
    /* your Elastic Beanstalk application */
    applicationName: 'APPLICATION_NAME',
    
    /* the S3 bucket where the packages must be created */
    versionsBucket: 'VERSIONS_BUCKET'
    
    /* Newrelic application to notify during the deployment (optional) */
    newrelic: {
      applicationKey: 'NEW_RELIC_APPLICATION_KEY',
      applicationName: 'NEW_RELIC_APPLICATION_NAME'
    }
  }
});

// Create an application version and deploy it to an Elastic Beanstalk environment
elasticBeanstalk.createVersionAndDeploy({
  /* Elastic Beanstalk environment where the package must be deployed */
  environment: 'TARGET',
  
  /* Path to the local package (an Elastic Beanstalk package must be a .zip file */
  filename: 'LOCAL_ARCHIVE_FILENAME.zip',
  
  /* Name of the package in the S3 bucket */
  remoteFilename: 'S3_ARCHIVE_FILENAME.zip',
  
  /* Label of the version in Elastic Beanstalk */
  versionLabel: 'VERSION_LABEL',
  
  /* Description of the version in Elastic Beanstalk */
  description: 'DESCRIPTION'
}).then(function() {
  console.log('Successfully deployed the package in TARGET environment');
}).catch(function() {
  console.log('Cannot create version in Elastic Beanstalk');
});

// Promote a version from one environment to another
elasticBeanstalk.promoteVersion({
  /* the source Elastic Beanstalk environment */
  sourceEnvironment: 'SOURCE',
  
  /* the Elastic Beanstalk environment where the version must be promoted */
  targetEnvironment: 'TARGET'
}).then(function() {
  console.log('Environment has been successfully updated');
}).catch(function() {
  console.log('Cannot promote version');
});

elastic-beanstalk.js's People

Contributors

jsebfranck avatar jerep6 avatar rniveau avatar jaredly avatar

Watchers

Alexis K. avatar jsmadja avatar Nicolas Jozwiak avatar Pablo Lopez avatar Simone Civetta avatar James Cloos avatar Christophe H avatar Hugo Geissmann avatar  avatar  avatar

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.