decking create docker cluster simple

Decking json example:
vi decking.json
{
"containers": {
"centos7a": "milcom/centos7-systemd",
"centos7b": "milcom/centos7-systemd"
},
"clusters": {
"main": ["centos7a", "centos7b"]
}
}

And lets build:

sudo decking create main

centos7a ...
centos7b ...
centos7a creating...
centos7b ...
centos7a creating... ✔
centos7b ...
centos7a creating... ✔
centos7b creating...
centos7a creating... ✔
centos7b creating... ✔

sudo decking start main

centos7a ...
centos7b ...
centos7a starting...
centos7b ...
centos7a starting... ✔
centos7b ...
centos7a starting... ✔
centos7b starting...
centos7a starting... ✔
centos7b starting... ✔

sudo decking status main

centos7a ...
centos7b ...
centos7a ...
centos7b running 172.17.0.2
centos7a running 172.17.0.1
centos7b running 172.17.0.2

Lets check if its really running:

c4175064768b milcom/centos7-systemd:latest “/usr/sbin/init” 3 minutes ago Up About a minute centos7b
b4b1766eb4d8 milcom/centos7-systemd:latest “/usr/sbin/init” 3 minutes ago Up About a minute centos7a

I guess its better than FIG.
Next step use ansible to manage these VM, its quit fast.

3 thoughts on “decking create docker cluster simple

  1. VIKAS KUMAR

    I get this error when I run decking status or decking create

    root@docker-centos:~# decking status
    SyntaxError: Unexpected token :
    at Object.parse (native)
    at Decking.loadConfig (/usr/lib/node_modules/decking/lib/decking.js:116:19)
    at Decking.execute (/usr/lib/node_modules/decking/lib/decking.js:89:24)
    at Object._onImmediate (/usr/lib/node_modules/decking/bin/decking:25:20)
    at processImmediate [as _immediateCallback] (timers.js:354:15)
    root@docker-centos:~#

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *