sudo docker service create --replicas 3 --name redis --update-delay 10s redis:3.0.6
52gohqoq51ljvy39osgsfx6kw
overall progress: 3 out of 3 tasks
1/3: running [==================================================>]
2/3: running [==================================================>]
3/3: running [==================================================>]
verify: Service converged
sudo docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
52gohqoq51lj redis replicated 3/3 redis:3.0.6
sudo docker service scale redis=5
redis scaled to 5
overall progress: 5 out of 5 tasks
1/5: running [==================================================>]
2/5: running [==================================================>]
3/5: running [==================================================>]
4/5: running [==================================================>]
5/5: running [==================================================>]
verify: Service converged
sudo docker service create --name registry --publish published=5000,target=5000 registry:2
xt0y79rsazkbe60u3ckulwi9f
overall progress: 1 out of 1 tasks
1/1: running [==================================================>]
verify: Service converged
sudo docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
52gohqoq51lj redis replicated 5/5 redis:3.0.6
xt0y79rsazkb registry replicated 1/1 registry:2 *:5000->5000/tcp
sudo docker service update --replicas=4 registry
registry
overall progress: 4 out of 4 tasks
1/4: running [==================================================>]
2/4: running [==================================================>]
3/4: running [==================================================>]
4/4: running [==================================================>]
verify: Service converged
sudo docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
52gohqoq51lj redis replicated 5/5 redis:3.0.6
xt0y79rsazkb registry replicated 4/4 registry:2 *:5000->5000/tcp
sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1f87a48646c2 registry:2 "/entrypoint.sh /etc…" About a minute ago Up About a minute 5000/tcp registry.4.ujmzn7779stynf2f6qv989w1o
6cd7dbbc9923 registry:2 "/entrypoint.sh /etc…" About a minute ago Up About a minute 5000/tcp registry.2.30kjvc6cvhopx5tm026j23glf
6ab9d858ec3d registry:2 "/entrypoint.sh /etc…" About a minute ago Up About a minute 5000/tcp registry.3.50z586f7xdgjfrkseg2tlb851
7e6de1f57993 registry:2 "/entrypoint.sh /etc…" 2 minutes ago Up 2 minutes 5000/tcp registry.1.ybynizpgw4sbbh965xop22zu3
4f41191831c3 redis:3.0.6 "/entrypoint.sh redi…" 5 minutes ago Up 5 minutes 6379/tcp redis.5.dc5mfkm1aftdt113vsdjylhv1
35f2ba5b2163 redis:3.0.6 "/entrypoint.sh redi…" 5 minutes ago Up 5 minutes 6379/tcp redis.4.ftwytae6uyxuxvtbnxt6gr0gd
70dba21aed54 redis:3.0.6 "/entrypoint.sh redi…" 6 minutes ago Up 6 minutes 6379/tcp redis.1.yzdc9kz40m3bnhlg7mvn3gil4
0b89b42d03a3 redis:3.0.6 "/entrypoint.sh redi…" 6 minutes ago Up 6 minutes 6379/tcp redis.2.l96cdy64xpc4wbodbfvq10kn8
529cce908872 redis:3.0.6 "/entrypoint.sh redi…" 6 minutes ago Up 6 minutes 6379/tcp redis.3.g0m3febhn07ww1ro0wvcdjbtq
sudo docker service scale redis=4 registry=3
redis scaled to 4
registry scaled to 3
overall progress: 4 out of 4 tasks
1/4: running [==================================================>]
2/4: running [==================================================>]
3/4: running [==================================================>]
4/4: running [==================================================>]
verify: Service converged
overall progress: 3 out of 3 tasks
1/3: running [==================================================>]
2/3: running [==================================================>]
3/3: running [==================================================>]
verify: Service converged
sudo docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
52gohqoq51lj redis replicated 4/4 redis:3.0.6
xt0y79rsazkb registry replicated 3/3 registry:2 *:5000->5000/tcp
sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6cd7dbbc9923 registry:2 "/entrypoint.sh /etc…" 2 minutes ago Up 2 minutes 5000/tcp registry.2.30kjvc6cvhopx5tm026j23glf
6ab9d858ec3d registry:2 "/entrypoint.sh /etc…" 2 minutes ago Up 2 minutes 5000/tcp registry.3.50z586f7xdgjfrkseg2tlb851
7e6de1f57993 registry:2 "/entrypoint.sh /etc…" 4 minutes ago Up 3 minutes 5000/tcp registry.1.ybynizpgw4sbbh965xop22zu3
35f2ba5b2163 redis:3.0.6 "/entrypoint.sh redi…" 7 minutes ago Up 7 minutes 6379/tcp redis.4.ftwytae6uyxuxvtbnxt6gr0gd
70dba21aed54 redis:3.0.6 "/entrypoint.sh redi…" 8 minutes ago Up 8 minutes 6379/tcp redis.1.yzdc9kz40m3bnhlg7mvn3gil4
0b89b42d03a3 redis:3.0.6 "/entrypoint.sh redi…" 8 minutes ago Up 8 minutes 6379/tcp redis.2.l96cdy64xpc4wbodbfvq10kn8
529cce908872 redis:3.0.6 "/entrypoint.sh redi…" 8 minutes ago Up 8 minutes 6379/tcp redis.3.g0m3febhn07ww1ro0wvcdjbtq
sudo docker service create --mode global --name nginx nginx:latest
oj1hpjsrgegxghc4w0hjjc9tc
overall progress: 1 out of 1 tasks
91wmrtvrcypc: running [==================================================>]
verify: Service converged
sudo docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
oj1hpjsrgegx nginx global 1/1 nginx:latest
52gohqoq51lj redis replicated 4/4 redis:3.0.6
xt0y79rsazkb registry replicated 3/3 registry:2 *:5000->5000/tcp
sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f7b552a2d859 nginx:latest "/docker-entrypoint.…" 51 seconds ago Up 50 seconds 80/tcp nginx.91wmrtvrcypcsxj3921584uun.sdhr5h5j71bo2n1014u0nuwqh
6cd7dbbc9923 registry:2 "/entrypoint.sh /etc…" 5 minutes ago Up 5 minutes 5000/tcp registry.2.30kjvc6cvhopx5tm026j23glf
6ab9d858ec3d registry:2 "/entrypoint.sh /etc…" 5 minutes ago Up 5 minutes 5000/tcp registry.3.50z586f7xdgjfrkseg2tlb851
7e6de1f57993 registry:2 "/entrypoint.sh /etc…" 6 minutes ago Up 6 minutes 5000/tcp registry.1.ybynizpgw4sbbh965xop22zu3
35f2ba5b2163 redis:3.0.6 "/entrypoint.sh redi…" 9 minutes ago Up 9 minutes 6379/tcp redis.4.ftwytae6uyxuxvtbnxt6gr0gd
70dba21aed54 redis:3.0.6 "/entrypoint.sh redi…" 10 minutes ago Up 10 minutes 6379/tcp redis.1.yzdc9kz40m3bnhlg7mvn3gil4
0b89b42d03a3 redis:3.0.6 "/entrypoint.sh redi…" 10 minutes ago Up 10 minutes 6379/tcp redis.2.l96cdy64xpc4wbodbfvq10kn8
529cce908872 redis:3.0.6 "/entrypoint.sh redi…" 10 minutes ago Up 10 minutes 6379/tcp redis.3.g0m3febhn07ww1ro0wvcdjbtq
sudo docker service scale nginx=10
nginx: scale can only be used with replicated or replicated-job mode
sudo docker service rm oj1hpjsrgegx tj5exjev9xrw 52gohqoq51lj xt0y79rsazkb
oj1hpjsrgegx
tj5exjev9xrw
52gohqoq51lj
xt0y79rsazkb
No comments:
Post a Comment