Week 13

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Three ways to map host to container

"Bind mount: - a file/folder on host is mounted into a container. Reference inside the container. Volume: - persistent storage abstraction - managed by Docker - will last after the container is removed tmpfs: - best when do not want data to persist on the host or container (security, protect performance)

Docker Compose and its usage

"Docker Compose: The main tool by Docker for container orchestration, YAML" Usage: - Infrastructure as Code: - Declarative - Tell the system what you want to be achieved

Different types of Docker network drivers and their usages

"Docker networking enables a user to link a docker container to as many networks. Docker networks are used to provide complete isolation for containers. - Bridge Networking: private default network ONE Docker host. Containers connects to the same user-defined bridge network expose all ports to each other. The port must be published if wanting to connect to containers or non-Docker hosts on different network. > Default bridge network uses IP address > User-defined network uses container name Ex: --network my-net --publish 8080:80 (:80 is TCP port) => publish on localhost:8080 - Overlay Network: distributed network among multiple Docker daemon hosts/hosts in Docker Swarm expose all ports to each other. Sits on top of (overlays) the host networks. Has to be published outside of the service. 2 types: + ingress overlay network (default network that handles control and data traffic related to swarm services using Routing Mesh feature) + user-defined overlay networks. "

External load balancing in Docker Swarm

"Ingress overlay network: default overlay network with Routing Mesh or without Routing Mesh Routing Mesh: swarm service which publish ports do so using routing mesh. The routing mesh uses PORT-BASED service discovery and load balancing. The routing mesh enables each node in the swarm to accept connections on published ports for any service running in the swarm, even if there's no task running on the node. Without Routing Mesh: client connects directly to a list of IP's instead of accepting all IPs"

Swarm Services and states

"Swarm services use a declarative (WHAT) model, which means that you define the desired state of the service, and rely upon Docker to MAINTAIN this state. Swarm service: logical extension of a container State: image name and tag, how many containers (tasks) in the service, ports exposed to clients outside the swarm

What is Dockerfile and how to use it?

"Template of an image. Describe the build process for an image. It is used to create a docker container which is an executable package of application and its dependencies (bins/libs) together. "

Service discovery in Docker Swarm and Internal Load Balancing

"User-defined networks provide DNS service: user-defined bridge network, user-defined overlay network. Default connection is through VIRTUAL IP. Should connect to the SERVICE NAME (already load-balanced) and handled by all containers (tasks) backing the service. Internal Load balancing: from one service (desired state) to another. This features is automatically enabled once a service is created. When a service is created, it gets a virtual IP on the service's network. It results the DNS query is forwarded to the Docker Engine, which in turn returns the IP of the service, a VIRTUAL IP. Traffic sent to the VIRTUAL IP is load balanced (Round Robin) to all the healthy containers of the service on the network. All the load balancing is done by Docker since only one entry-point (IP) is given to the client."

What is Docker Swarm

A Docker Swarm (container orchestration) is a group of either physical or virtual machines that are running the Docker application and that have been configured to join containers together in a cluster.

Why do we need to map host to container?

Docker containers are based on Unionfs: - Multiple immutable R base layer - One R-W top layer When a container is removed, the top layer is also removed => to persist change, mount an external data storage location

What is a Docker task? What is a Docker service?

Docker lets you create services => task ~ container. Task does the work (Replicated tasks to create specific replicas of a service and Global Tasks to monitor the manager and the node) . Work is scheduled on swarm nodes in this sequence: 1. Create a service 2. The request goes to a docker manager node 3. The docker manager node schedules the service to run on particular node 4. Each service can start multiple task 5. Each task has a life cycle, with states NEW, PENDING, COMPLETE" A service is a description of a desired state.

ECS Amazon Elastic Container Service

ECS can run on EC2 or AWS Fargate. AWS Fargate: serverless backend for container. AWS manages resource provisioning for container instances deployment. Lex and Sagemaker run on ECS. AWS Cloud Map: service discover. No down time, end points of web app versions are dynamically updated.

Container orchestration

Multiple application consist of multiple components that need to be distributed on more than 1 machine.


Ensembles d'études connexes

Lippincott Hepatic, Biliary, Endocrine, DM

View Set

Biology 181 Quiz 6: DNA Replication and Gene Expression

View Set

GEC ART 1 -Origin and Meaning of Humanities

View Set

Ch.14 Weathering, Karst Landscapes , and Mass Movement

View Set