Skip to content

Progressively restarts ec2 instances under any Opsworks layer, x machines at a time

Notifications You must be signed in to change notification settings

mistermoe/aws-rolling-restarter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RollingRestarter

progressively restart ec2 instances under any OpsWorks layer


Description

Progressively restarts ec2 instances under any Opsworks layer, x machines at a time.


Installation

npm install aws-rolling-restarter

Usage

var restarter = require("aws-rolling-restarter");

restarter.init({
  accessKeyId: "Your accessKeyId",
  secretAccessKey: "Your secretAccessKey",
  region: "region where your machines are hosted",
  layerId: "the layer under which the ec2 instances are",
  groupSize: 2, // the amount of ec2 instances you want to restart at a time.
  retryOnSetupFailed: true, // whether or not to attempt stopping and starting again if machine ends up with setup_failed status. Default: false
});

restarter.start();

Events

  • you can add event listeners using the on function like so:
restarter.on("done", () => {
  console.log("done restarting");
});
  • Available events:
    • "done"

About

Progressively restarts ec2 instances under any Opsworks layer, x machines at a time

Resources

Stars

Watchers

Forks

Packages

No packages published