awsuper v0.3.0
AWSuper Command Line Tool
This command line tool allows convenient access to the endpoints exposed by the AWSuper Server
Installation
You can install the command line tool conveniently through NPM:
npm install -g awsuperConfigure the command line tool to connect to the server:
awsuper setupUse
Describe
The describe command can return a JSON description of a specified Stack, Layer, or Instance
Describe a Stack
awsuper describe --stack <stackName>
awsuper describe -s <stackName>Describe a Layer
awsuper describe --stack <stackName> --layer <layerName>
awsuper describe --s <stackName> -l <layerName>Describe an Instance
awsuper describe --stack <stackName> --layer <layerName> --instance <hostname>
awsuper describe --s <stackName> -l <layerName> -i <hostname>List
The list command will list all stacks, all layers in a specified stack, or all instances in a specified layer.
List all Stacks
awsuper listList Layers in a Stack
awsuper list --stack <stackName>
awsuper list -s <stackName>List Instances in a Layer
awsuper list --stack <stackName> --layer <layerName>
awsuper list --s <stackName> -l <layerName>Do
The do command will execute a new Task.
Syntax
awsuper do [options] <task-name> [key=value...]Example This will immediately begin a layer-rolling-restart job for the OpsWorks Stack and Layer "my stack"/"my layer", restarting 2 machines at a time.
awsuper do layer-rolling-restart stackName="my stack" layerName="my layer" window=2Example This will schedule a layer-rolling-restart job for 2 weeks in the future
awsuper do --delay 2w layer-rolling-restart stackName="my stack" layerName=superduperExample This will schedule a layer-rolling-restart job for October 1, 2018 at 10:35am
awsuper do --when "2018-10-1 10:35" layer-rolling-restart stackName="my stack" layerName=superduperCheck
The check command will check on a running or completed task.
Syntax
awsuper check <task-name> <id>Example
awsuper check layer-rolling-restart 5b6cb5f4e161b303089da220Query
The query command will query the database for tasks of a specified type. This interacts with the query parameters feature of the server.
Syntax
awsuper query <task-name> [key=value...] [sort[key]=asc/desc] [limit=10] [page=1]Example
This will query the most recently updated 1 layer-rolling-restart for the api layer of the mobile-app stack.
awsuper query layer-rolling-restart stack=mobile-app layer=api sort[date_updated]=desc limit=1Cancel
The check command will cancel a running task.
Syntax
awsuper cancel <task-name> <id>Example
awsuper cancel layer-rolling-restart 5b6cb5f4e161b303089da220Tasks
The tasks command will list all available tasks
Syntax
awsuper tasks