Skip to content

amanualt/TCCL_Docker-swarm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Docker swarm

install docker-machine

curl -L https://github.com/docker/machine/releases/download/v0.10.0/docker-machine-`uname -s`-`uname -m` >/tmp/docker-machine &&
    chmod +x /tmp/docker-machine &&
    sudo cp /tmp/docker-machine /usr/local/bin/docker-machine

Create docker-machine

docker-machine create --driver virtualbox --virtualbox-memory "512" --virtualbox-disk-size "5000" node1

alt tag

Setting memory and hardisk

  • setting memory
--virtualbox-memory "512"

allocates 512MB memory

  • setting hardisk
--virtualbox-disk-size "5000"

allocates 5000MB hardisk

Looking ip manager

ifconfig

alt tag

Remote manager

docker-machine ssh node1

alt tag

Looking token manager

docker swarm init --advertise-addr 192.168.99.1

alt tag

The minion joined a swarm as a worker

docker swarm join \
    --token SWMTKN-1-34sz44qnbosozfm7j93dli2m4odcsl8f9zhdqmwrcqen3bewco-erlp1v07bdj1zq4pbrmccj7v8 \
    192.168.99.1:2377

alt tag

Looking status swarm

docker node ls

alt tag

Deploy service to Docker-Swarm

docker service create --name slims -p 8080:80 --replicas 2 amanu/slims_web:1.0

alt tag

  • Looking service
docker service ls

alt tag

How to scale

docker service scale slims=8

alt tag

  • Looking service
docker service ls

alt tag

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published