Docker Community Forums

Share and learn in the Docker community.

SwarmKit or Swarm mode?


(Katopz) #1

Hi guys,

I’m just trying swarm and I’m now confusing SwarmKit and Swarm mode
After follow this guide https://github.com/docker/swarmkit
I got everything working as expected.

$ swarmctl service inspect redis
ID                : cowesn5129wr392g6icg5aphe
Name              : redis
Replicas          : 6/6
Template          
 Container        
  Image           : redis:3.0.6

Task ID                      Service    Slot    Image          Desired State    Last State               Node
-------                      -------    ----    -----          -------------    ----------               ----
dxf38x3t0vtie5au61zl24di3    redis      1       redis:3.0.6    RUNNING          RUNNING 3 minutes ago    node-3
95bec7zjufvgo2tf7baqf0z0k    redis      2       redis:3.0.6    RUNNING          RUNNING 3 minutes ago    node-1
9qylr7p9b82u0ll9xari00jx6    redis      3       redis:3.0.6    RUNNING          RUNNING 3 minutes ago    node-2
bpntfo8yu8vnwrl56hm2974jo    redis      4       redis:3.0.6    RUNNING          RUNNING 3 minutes ago    node-1
buol8shod3vtmg2dlmv59tf1i    redis      5       redis:3.0.6    RUNNING          RUNNING 3 minutes ago    node-2
2jbtkjre49hp5jy2k9a1xbwvf    redis      6       redis:3.0.6    RUNNING          RUNNING 3 minutes ago    node-3

but

$ docker service inspect redis --pretty
Error: no such service: redis

and

$ docker swarm join 127.0.0.1:4242
Error response from daemon: Timeout was reached before node was joined. Attempt to join the cluster will continue in the background. Use "docker info" command to see the current Swarm status of your node.

Seem like SwarmKit has it own pool?
Can it join together or it shouldn’t?
Or maybe SwarmKit is not Swarm mode?
Which one should I use then?

Thanks


(Nathan Le Claire) #2

Swarm mode (in docker) uses Swarmkit behind the scenes. Users should interact with Swarmkit through the docker CLI.


(Katopz) #3

Thanks! @nathanleclaire

That really mean Swarm mode can do what SwarmKit do.
In that case, What’s equivalent command in Swarm mode for this?

$ swarmd -d /tmp/node-1 --listen-control-api /tmp/manager1/swarm.sock --hostname node-1

Cheers.


(Nathan Le Claire) #4

@katopz I think you just want to docker swarm join that node to a manager.


(Katopz) #5

No worry, @nathanleclaire I think saw what I need

$ docker-machine create -d virtualbox node-1
$ docker-machine ssh node-1
docker@node-1:~$ docker swarm init --listen-addr=192.168.99.100:2733

Now it’s up and running as expected. :slight_smile:

Thanks.