Skip to content

A simple local docker cluster example managed by the swarm

Notifications You must be signed in to change notification settings

eturan/docker-cluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Simple local Docker Cluster Orchestrated by Swarm

Create the Swarm

$ docker-machine create --driver virtualbox manager
$ docker-machine create --driver virtualbox worker

Init the swarm and assigne the worker to the manager

$ docker-machine ssh manager "docker swarm init"
$ docker-machine ssh worker "docker swarm join --token <TOKEN> --ip <MANAGER_ID>"

Copy compose file into the manager

$ docker-machine scp docker-compose.yml manager:~

Start the stack

$ docker-machine ssh manager "docker stack deploy -c docker-compose.yml letsdistribute"

Check the stack's status

$ docker-machine ssh manager "docker stack ps letsdistribute"

Go to visualizer website http://managegerIP:8080

You should see running containers

Finally check the website. http://managerip

Every time you refresh you should see different host ip address.

About

A simple local docker cluster example managed by the swarm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published