Orchestration Flashcards

1
Q

create docker swarm

A

docker swarm init –advertise-addr IPADDRESS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

add swarm worker

A

docker join-token worker

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

add swarm manager

A

docker join-token manager

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

create a service on a swarm

A

docker service create –replicas 1 –name helloworld ping docker.com

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

how do you specify replicas for a swarm

A

–replicas

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what is a quorum

A

the majority of managers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

what is the difference between running a container and a service

A

a docker service can be run on multiple containers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

how to view low level information of a container

A

docker inspect

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

how to template docker inspect to simplifiy inspection

A

docker inspect –format

i.e docker inspect nginx -f {{.NetworkSettings.Ports}}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what is docker-compose

A

docker compose allows us to create multiple containers

reminder: practice making docker-compose.yml file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is orchestration

A

moving and scaling containers accross clouds and data centers. automating maintenance, replacing of failed containers, managing rollout

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

how do you increase the number of replicas

A

docker service scale name-of-service=number

eg docker service scale myService=6

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

how do you publish ports for a service

A

-p or –publish tags when creating a service :

docker service update –publish-add published=8080,target=80

docker service update –publish-rm
published=8080,target=80

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

add a network to a service

A

–network tag on create
docker service update –network-add
docker service update –network-rm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

describe and demonstrate how to run replicated and global services.

A

replicated by default

global mode: –mode global

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

what is a docker node label

A

metadata we can add to nodes in a swarm

17
Q

add a label to a docker node

A

docker node update –label-add LABEL=VALUE node

18
Q

view existing node label commands

A

docker node inspect –pretty

19
Q

Describe and demonstrate how to use templates with “docker service create”.

A

supported flags:

- -hostname
- -mount
- -env

example placeholders:
.Service.ID
.Service.Name