node-rancher-cli
v0.0.2
Published
Node Rancher cli is a console utility using node.js to interface with rancher
Downloads
3
Readme
node-rancher-cli
Introduction
Node Rancher cli is a console utility using node.js to interface with rancher
Compatibility
- Tested against Rancher 1.1.4
Installation
npm install -g node-rancher-cli
Usage
File Based
./config.json
{
"protocol": "https",
"env": "1a5",
"host": "test-server:8000",
"username": "{username}",
"password": "{password}"
}
Command
ranch --file ./config.json stack restart Database\Postgres
Environment
SET RCLI_PROTOCOL=https
SET RCLI_ENV=1a5
SET RCLI_HOST=test-server:8000
SET RCLI_USERNAME={username}
SET RCLI_PASSWORD={password}
Command
ranch stack restart Database\Postgres
Command Line
ranch --protocol https --env 1a5 --host test-server:8000 --username {username} --password {password} service restart Database\Postgres
Docker
docker run --rm -it rungeict/rancher-cli --protocol https --env 1a5 --host test-server:8000 --username {username} --password {password} service restart Database\Postgres
Commands
ranch ${....args} service restart Database\Postgres
service
- restart ${Service Path}
- restart-containers ${Service Path} - Will only restart containers under a service.
container
- restart ${HostName} ${ContainerName}
TODO
- Flesh out the rest of the api, it can only restart services and containers