codenow / docks-cli Goto Github PK
View Code? Open in Web Editor NEWAn easy-to-use internal CLI for managing customer docks.
An easy-to-use internal CLI for managing customer docks.
โ docks asg lc --env gamma 2335750 gamma-lc-7.0.2 [git:SAN-3474-rolling-thunder-schwifty] โ []
\ ๐ Fetching gamma Auto-Scaling Groups from AWS
Unhandled Rejection
Error: The ASG for the organization you've specified (2335750) does not exist. Did you remember to pass an environemnt (`--environment`)?
at /Users/cneill/git/docks-cli/lib/actions/asg-lc.js:36:15
at tryCatcher (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:497:31)
at Promise._settlePromise (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:555:18)
at Promise._settlePromise0 (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:600:10)
at Promise._settlePromises (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:683:18)
at Promise._fulfill (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:624:18)
at Promise._resolveCallback (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:424:57)
at Promise._settlePromiseFromHandler (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:510:17)
at Promise._settlePromise (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:555:18)
at Promise._settlePromise0 (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:600:10)
at Promise._settlePromises (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:683:18)
at Promise._fulfill (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:624:18)
at Promise._resolveCallback (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:424:57)
at Promise._settlePromiseFromHandler (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:510:17)
at Promise._settlePromise (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:555:18)
~/git/devops-scripts/docks
โ docks asg lc --environment gamma 2335750 gamma-lc-7.0.2 [git:SAN-3474-rolling-thunder-schwifty] โ []
\ ๐ Fetching gamma Auto-Scaling Groups from AWS
Unhandled Rejection
Error: The ASG for the organization you've specified (2335750) does not exist. Did you remember to pass an environemnt (`--environment`)?
at /Users/cneill/git/docks-cli/lib/actions/asg-lc.js:36:15
at tryCatcher (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:497:31)
at Promise._settlePromise (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:555:18)
at Promise._settlePromise0 (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:600:10)
at Promise._settlePromises (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:683:18)
at Promise._fulfill (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:624:18)
at Promise._resolveCallback (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:424:57)
at Promise._settlePromiseFromHandler (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:510:17)
at Promise._settlePromise (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:555:18)
at Promise._settlePromise0 (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:600:10)
at Promise._settlePromises (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:683:18)
at Promise._fulfill (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:624:18)
at Promise._resolveCallback (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:424:57)
at Promise._settlePromiseFromHandler (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:510:17)
at Promise._settlePromise (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:555:18)
-<[email protected]:~/git/docks-cli [master] [ruby-2.2.1]>- -<s001>- -<%>- docks asg -e delta lc 2828361 4 / ๐ Fetching delta Auto-Scaling Groups from AWS Unhandled Rejection Error: The ASG for the organization you've specified (2828361) does not exist. Did you remember to pass an environemnt (
--environment)? at /Users/cneill/git/docks-cli/lib/actions/asg-lc.js:42:15 at tryCatcher (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:503:31) at Promise._settlePromise (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:560:18) at Promise._settlePromise0 (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:605:10) at Promise._settlePromises (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:684:18) at Promise._fulfill (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:629:18) at Promise._resolveCallback (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:424:57) at Promise._settlePromiseFromHandler (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:515:17) at Promise._settlePromise (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:560:18) at Promise._settlePromise0 (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:605:10) at Promise._settlePromises (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:684:18) at Promise._fulfill (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:629:18) at Promise._resolveCallback (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:424:57) at Promise._settlePromiseFromHandler (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:515:17) at Promise._settlePromise (/Users/cneill/git/docks-cli/node_modules/bluebird/js/release/promise.js:560:18)
{16-02-03 16:24}[ruby-2.2.1]ChristophersMBP:~/git/devops-scripts/ansible@epsilon cneill% docks asg lc --lc epsilon-lc-6.0.10 --org 163708 -e epsilon
โ An Auto-Scaling Group for org 163708 does not exist.
In addition, "asg delete" seems to be silently failing:
{16-02-03 16:25}[ruby-2.2.1]ChristophersMBP:~/git/devops-scripts/ansible@epsilon cneill% docks asg delete --org 2335750 -e epsilon
\ ๐ Fetching epsilon Auto-Scaling Groups from AWS
| ๐ป Connecting to epsilon-rabbit
| ๐ Enquing epsilon job into asg.delete
โ Published: {"githubId":"2335750"}
{16-02-03 16:32}[ruby-2.2.1]ChristophersMBP:~/git/devops-scripts/ansible@epsilon cneill% docks asg create --org 2335750 -e epsilon
\ ๐ Fetching epsilon Auto-Scaling Groups from AWS
โ An Auto-Scaling Group for org 2335750 already exists.
$ docks unhealthy -i 10.20.253.127 [17:06:27]
| ๐ Fetching beta docks from mavis.runnable-beta.com
Are you sure you wish to mark 10.20.253.127 as unhealthy for org 146592? [y/N]: y
โ ansible git:(revert-350-docker-listener-SWARM_HOST) docks unhealthy 10.12.219.96 -e epsilon
/ ๐ Fetching epsilon docks from mavis.runnable-beta.com
โ๏ธ Are you sure you wish to mark 10.12.219.96 as unhealthy for org 2335750? [y/N]: [y/N]: y
/ ๐ป Connecting to epsilon-rabbit
\ ๐ Enquing epsilon job into `on-dock-unhealthy`
โ Published: {"host":"http://10.12.219.96:4242","githubId":"2335750"}
[some time later... ]
โ ansible git:(revert-350-docker-listener-SWARM_HOST) docks aws -e epsilon
- ๐ Fetching epsilon docks from AWS
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ID โ Org โ IP โ Type โ AMI โ State โ Launched โ
โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ i-af5e7275 โ 2335750 โ 10.12.219.96 โ m4.large โ ami-64df3304 โ โ running โ Fri Mar 11 2016 15:53:39 GMT-0800 (PST) โ
โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ i-3c93c8e6 โ 2828361 โ 10.12.195.206 โ m4.large โ ami-64df3304 โ โ running โ Sun Mar 06 2016 18:35:28 GMT-0800 (PST) โ
โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ i-9f86ab45 โ 2828361 โ 10.12.220.97 โ m4.large โ ami-64df3304 โ โ running โ Fri Mar 11 2016 12:32:08 GMT-0800 (PST) โ
โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ i-8edaf854 โ 8452555 โ 10.12.211.246 โ m4.large โ ami-64df3304 โ โ running โ Thu Mar 10 2016 21:49:14 GMT-0800 (PST) โ
โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ i-eed8f434 โ 17654916 โ 10.12.208.129 โ m4.large โ ami-64df3304 โ โ running โ Fri Mar 11 2016 22:31:22 GMT-0800 (PST) โ
โโโโโโโโโโโโโโโโผโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ i-42eec998 โ 17658695 โ 10.12.210.50 โ m4.large โ ami-64df3304 โ โ running โ Tue Mar 08 2016 14:35:46 GMT-0800 (PST) โ
โโโโโโโโโโโโโโโโดโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Query complete in 1.534s
โ ansible git:(revert-350-docker-listener-SWARM_HOST) docks kill 10.12.219.96
โ๏ธ โผ๏ธ โผ๏ธ UNHEALTHY will KILL the dock. โผ๏ธ โผ๏ธ Are you SURE you want to KILL the dock with ip 10.12.219.96 [y/N]: y
โ๏ธ Are you sure you wish to kill the dock with ip 10.12.219.96 [y/N]: y
/ ๐ป Connecting to gamma-rabbit
\ ๐ Enquing gamma job into `asg.instance.terminate`
โ Published: {"ipAddress":"10.12.219.96"}
cneill@Christophers-MacBook-Pro: ~/git/docks-cli master
$ docks -h [17:01:23]
/Users/cneill/git/docks-cli/lib/actions/list.js:114
for (let i = 3; i >= 0; i--) {
^^^
SyntaxError: Unexpected strict mode reserved word
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/Users/cneill/git/docks-cli/lib/actions/index.js:18:13)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/Users/cneill/git/docks-cli/lib/cli.js:6:15)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
FAIL: 8
cneill@Christophers-MacBook-Pro: ~/git/docks-cli master
$ node --version [17:01:28]
v0.10.38
If I pass the -e delta
flag to docks asg scale out
it works. If I attempt to do it on gamma it fails (as it should), but returns an unhelpful error:
Success Case:
hiphipjorge at Jorges-MBP in ~/runnable/docks-cli on master
$ docks asg scale-out --org 6585 -e delta
| ๐ Fetching delta Auto-Scaling Groups from AWS
/ ๐ป Connecting to delta-rabbit
- ๐ Enquing delta job into `asg.update`
โ Published: {"githubId":"6585","data":{"MinSize":3,"DesiredCapacity":3}}
Error Case:
hiphipjorge at Jorges-MBP in ~/runnable/docks-cli on master
$ docks asg scale-out --org 6585
| ๐ Fetching gamma Auto-Scaling Groups from AWS
[Unknown Error] Cannot read property 'min' of undefined
TypeError: Cannot read property 'min' of undefined
at /Users/hiphipjorge/runnable/docks-cli/lib/actions/asg.js:259:25
at tryCatcher (/Users/hiphipjorge/runnable/docks-cli/node_modules/bluebird/js/release/util.js:11:23)
at Promise._settlePromiseFromHandler (/Users/hiphipjorge/runnable/docks-cli/node_modules/bluebird/js/release/promise.js:489:31)
at Promise._settlePromise (/Users/hiphipjorge/runnable/docks-cli/node_modules/bluebird/js/release/promise.js:546:18)
at Promise._settlePromise0 (/Users/hiphipjorge/runnable/docks-cli/node_modules/bluebird/js/release/promise.js:591:10)
at Promise._settlePromises (/Users/hiphipjorge/runnable/docks-cli/node_modules/bluebird/js/release/promise.js:674:18)
at Async._drainQueue (/Users/hiphipjorge/runnable/docks-cli/node_modules/bluebird/js/release/async.js:129:16)
at Async._drainQueues (/Users/hiphipjorge/runnable/docks-cli/node_modules/bluebird/js/release/async.js:139:10)
at Immediate.Async.drainQueues [as _onImmediate] (/Users/hiphipjorge/runnable/docks-cli/node_modules/bluebird/js/release/async.js:16:14)
at processImmediate [as _immediateCallback] (timers.js:368:17)
I accidentally linked this into my node 0.10.x
environment, which gave me some sad results.
I see two options:
4
in the bin/docks
(with #!
?)engines
directive in the package.json
I'm more than happy to make a PR, but would like to know with which strategy to go!
devops-scripts/ansible git/master
โฏ docks unhealthy -e production -i 10.0.242.120
- :mag: Fetching production docks from mavis.runnable.io
Are you sure you wish to mark 10.0.242.120 as unhealthy for org 4643352? [y/N]: y
[Unknown Error] Hermes missing required arguments. Supplied opts hostname, port, username, password, queues. Opts must include: hostname, port, username, password, name
Error: Hermes missing required arguments. Supplied opts hostname, port, username, password, queues. Opts must include: hostname, port, username, password, name
at module.exports (/usr/local/lib/node_modules/docks-cli/node_modules/runnable-hermes/lib/assert-opts.js:18:11)
at new Hermes (/usr/local/lib/node_modules/docks-cli/node_modules/runnable-hermes/index.js:35:3)
at Function.Hermes.hermesSingletonFactory (/usr/local/lib/node_modules/docks-cli/node_modules/runnable-hermes/index.js:182:32)
at /usr/local/lib/node_modules/docks-cli/lib/util/rabbit.js:31:29
From previous event:
at Object.module.exports.publish (/usr/local/lib/node_modules/docks-cli/lib/util/rabbit.js:26:8)
at /usr/local/lib/node_modules/docks-cli/lib/actions/unhealthy.js:107:23
From previous event:
at Object.module.exports.execute (/usr/local/lib/node_modules/docks-cli/lib/actions/unhealthy.js:106:8)
at Object.<anonymous> (/usr/local/lib/node_modules/docks-cli/lib/actions/index.js:118:30)
From previous event:
at Object.module.exports.execute (/usr/local/lib/node_modules/docks-cli/lib/actions/index.js:110:11)
at /usr/local/lib/node_modules/docks-cli/lib/cli.js:50:22
at processImmediate [as _immediateCallback] (timers.js:383:17)
From previous event:
at main (/usr/local/lib/node_modules/docks-cli/lib/cli.js:46:6)
at Object.<anonymous> (/usr/local/lib/node_modules/docks-cli/bin/_docks.js:2:25)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Function.Module.runMain (module.js:467:10)
at startup (node.js:136:18)
at node.js:963:3
\ ๐ Fetching production docks from AWS (i-3f435bff)
โ๏ธ Are you sure you wish to kill i-3f435bff? [y/N]: y
[Unknown Error] Cannot read property 'yellow' of undefined
TypeError: Cannot read property 'yellow' of undefined
at /Users/myztiq/runnable/docks-cli/lib/util/mavis.js:91:22
at Object.module.exports.remove (/Users/myztiq/runnable/docks-cli/lib/util/mavis.js:81:12)
at /Users/myztiq/runnable/docks-cli/lib/actions/kill.js:92:22
at tryCatcher (/Users/myztiq/runnable/docks-cli/node_modules/bluebird/js/release/util.js:11:23)
at Promise._settlePromiseFromHandler (/Users/myztiq/runnable/docks-cli/node_modules/bluebird/js/release/promise.js:488:31)
at Promise._settlePromise (/Users/myztiq/runnable/docks-cli/node_modules/bluebird/js/release/promise.js:545:18)
at Promise._settlePromise0 (/Users/myztiq/runnable/docks-cli/node_modules/bluebird/js/release/promise.js:590:10)
at Promise._settlePromises (/Users/myztiq/runnable/docks-cli/node_modules/bluebird/js/release/promise.js:673:18)
at Async._drainQueue (/Users/myztiq/runnable/docks-cli/node_modules/bluebird/js/release/async.js:125:16)
at Async._drainQueues (/Users/myztiq/runnable/docks-cli/node_modules/bluebird/js/release/async.js:135:10)
at Immediate.Async.drainQueues [as _onImmediate] (/Users/myztiq/runnable/docks-cli/node_modules/bluebird/js/release/async.js:16:14)
at processImmediate [as _immediateCallback] (timers.js:383:17)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.