XI)CONTAINER ORCHESTRATION
why orchestrate?
when you deploy multiple instances of your app by running the docker run command
multiple times ,that's something you have to do yourself.You have to keep a close
watch on the load and performance of your app and deploy additional instances
yourself.you have also to keep a close watch on the health of these apps.if a
container was to fail you should be able to detect that and run the docker run
command again to deploy another instance of that app.when the host crashes the
containers on it crash too.
So you need a dedicated engineer who can sit and monitor the state,performance and
health of the containers and take necessary actions to remediate the situation.but
when you have large apps deployed with tens of thousands of containers that's not a
practical approach.
container orchestration is a solution for this.it consists of a set of tools and
sscripts that can help host containers in a production environment.typically a
container orchestration solution consists of multiple docker hosts taht can hosts
containers.
there are multiple orchestration tools:docker swarm, k8s(google),mesos ..
1)DOCKER SWARM
you must have hosts or multiple hosts with docker installed on them then you must
designate one host to be the manager or the master or the swarm manager as it's
called and others are slaves or workers.once you're done with that ,run the docker
swarm init command on the swarm manager and that will initialize the swarm
manager .
the key component of swarm orchestration is the docker service which is one or more
instances of a single app or service that runs accross the nodes in the swarm
cluster
2)K8S