Swarms Flashcards

1
Q

What is a swarm?

A

Docker Swarm is Docker’s native feature to support clustering of Docker machines. A swarm is made up of multiple nodes, which can be either physical or virtual machines.

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

What is a manager node?

A

The manager node performs cluster management and orchestration.

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

What is a worker node?

A

The worker nodes perform tasks allocated by the manager.

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

What strategies can swarm manager use?

A

Swarm managers can use several strategies to run containers, such as “emptiest node” – which fills the least utilized machines with containers. Or “global”, which ensures that each machine gets exactly one instance of the specified container. You instruct the swarm manager to use these strategies in the Compose file, just like the one you have already been using.

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

What happens when swarm mode is enabled?

A

Enabling swarm mode instantly makes the current machine a swarm manager. From then on, Docker will run the commands you execute on the swarm you’re managing, rather than just on the current machine.

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

How do you deploy your app to a cluster?

A

first copy yml file to home directory of swarm manager
& docker-machine scp docker-compose.yml myvm1:~

run the same deploy command on manager node
$ docker-machine ssh myvm1 “docker stack deploy -c docker-compose.yml getstartedlab”

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

How to make a machine swarm manager?

A

$ docker-machine ssh myvm1 “docker swarm init”

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

How to join to a docker swarm?

A

$ docker-machine ssh myvm2 “docker swarm join \
–token \
:”

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

How to open a terminal on VM?

A

docker-machine ssh myvm2

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