# aws-rolling-service-restart

> This script will help you do a rolling restart of a service, taking down a container at a time and waiting for a new one to come up, then proceeding with the next container and so on.

Latest version **0.1.14** (published 2018-07-25) · ISC license · 0 weekly downloads

## Install

```sh
npm install aws-rolling-service-restart
pnpm add aws-rolling-service-restart
yarn add aws-rolling-service-restart
bun add aws-rolling-service-restart
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.14 |
| Published | 2018-07-25 |
| First published | 2017-07-23 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 201 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | dpm |
| Maintainers | dontranlastmilelink |

## Links

- npm: https://www.npmjs.com/package/aws-rolling-service-restart
- Repository: https://github.com/dperezmavro/aws-rolling-service-restart
- Homepage: https://github.com/dperezmavro/aws-rolling-service-restart#readme
- Issues: https://github.com/dperezmavro/aws-rolling-service-restart/issues
- npm.io page: https://npm.io/package/aws-rolling-service-restart

## Recent versions

- 0.1.14 (latest) — 2018-07-25
- 0.1.13 — 2018-07-25
- 0.1.12 — 2018-07-25
- 0.1.11 — 2018-07-25
- 0.1.10 — 2018-07-25
- 0.1.9 — 2018-07-24
- 0.1.8 — 2018-07-24
- 0.1.7 — 2018-07-24
- 0.1.6 — 2018-07-24
- 0.1.5 — 2017-09-21
- 0.1.4 — 2017-08-07
- 0.1.3 — 2017-07-26
- 0.1.2 — 2017-07-24
- 0.1.1 — 2017-07-23
- 0.1.0 — 2017-07-23

## README

# About

This script will help you do a rolling restart of a service, taking down a container at a time and waiting for a new one to come up, then proceeding with the next container and so on.

# Module Usage

This exports to functions that will be of interest: `restartService` and `getServicesInclusters`.

## restartService

This is an `async` function with signature:

`const restartService = async (cluster, serviceName) => void`

## getServicesInclusters

This is a helper function that will give you a list of clusters with their service names. The function signature for this is:

`const getServicesInclusters = async () =>
  [
    {
      clusterArn: 'someArn',
      serviceArns: [
        'serviceArns',
        'serviceArns2'
      ]
    },
  ]`



# CLI usage

Run `npm install` and then `npm run make`. This will generate the executable you can run under `./dist/app.dist.js`

You only need to provide the service definition with `--service` and the cluster name with `--cluster`. Both of those can be found in the ECS console.

Example:

`node ./dist/app.dist.js --cluster docker-cluster --service serviceName`

---
_Source: https://npm.io/package/aws-rolling-service-restart · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
