All Flashcards

1
Q

What is the main problem that containers promise to solve?

A

Using virtual machines results in a non-efficient use of resources, need of multiple guest OS.
And run applications in their own isolated environments.

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

What does each line of a docker image mean?

A

Each line creates a new filesystem layer on top of the previous ones

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

What are Dockerfiles used for?

A

Used to build docker images

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

What is the difference between a docker container and a docker image?

A

They are the same but Docker containers have an additional Read/Write layer

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

What is the benefit of having multiple containers with a very similar base structure?

A

Some containers will be able to reuse layers that other containers are using (efficient)

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

What is a container registry?

A

Registry or hub of container images - Docker hub

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

Can a single image generate multiple containers?

A

Yes, it can generate multiple containers on many different Docker hosts.

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

What do you use docker files for?

A

To build Docker container

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

Are containers portable?

A

Yes

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

Mention 3 characteristics/benefits of using containers

A

Portable.
Lightweight - layers can be reused by multiple containers.
They always run as intended

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

What do you need to do to allow outside access to the container?

A

Expose ports

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

Mention a benefit related to scalability and isolation:

A

Containers can be used to isolate different tiers of an application or to scale determined services (parts of the application)

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

What does ECS generally do?

A

It accepts containers and instructions.

It orchestrates where and how to run those containers.

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

Where do containers run (in ECS)?

A

In clusters

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

In which modes can you use ECS?

A

EC2 mode and fargate mode

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

Describe the ECS EC2 mode

A

where EC2 is the container host running the ECS software

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

Describe the Fargate mode

A

AWS manages the container host part and allows you to architect and define your environment using containers

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

Which registries can be used by ECS?

A

ECR (elastic container registry - integrated with AWS) and DockerHub.

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

What is a container definition in ECS?

A

A container definition gives ECS just enough info about the single container:

  • Where the container is
  • Pointer to which image to use and ports to be exposed
20
Q

What does a Task definition do?

A

Stores the resources used by the task - represents a self contained application

21
Q

What is defined in a Task definition?

A
  • One container or many
  • Resources used by the task - CPU/memory
  • Task role - which allows the task to access other AWS resources
22
Q

Are tasks HA by itself?

A

No. That is covered by ECS services

23
Q

What do you need to configure an ECS service?

A

A service definition

24
Q

What can you set up in a service definition?

A
  • It can add capacity and resilience

- Can provides a level of scality and high availability

25
What does a service definition represent?
how many copies of a task you want to run for scaling and HA
26
What do container definitions provide?
Information about Image and ports
27
What do task definitions provide?
security (task role), containers, resources
28
What function does the task role have in a ECS task?
It defines what AWS resources the ECS task can access
29
What do service definitions provide?
Information about how many copies, HA, restarts - defines availability, scaling
30
In which environments is recommendable to use ECS services? Test environments, production environments? why?
In production environments for critical services due to the possibility to design a HA and resilient architecture. Normally not needed in test environments where you only want to perform small tests.
31
What do ECS clusters manage?
Scheduling, orchestration and placement engine (where to run containers)
32
EC2 mode - where is it deployed/created?
Within a VPC and its AZs
33
How do you control scalability in ECS EC2 mode?
Specifying an initial size which will drive an **auto scaling group** (ASG - controls horizontal scaling with EC2 instances when requirements dictate).
34
What will ECS handle in EC2 mode?
Number of tasks that will be deployed. | Whether you use services and service definitions.
35
What is the main factor take into account in the EC2 mode about capacity in the cluster?
At the cluster level you need to worry about the capacity of your cluster (ECS is not a serverless solution) because the container instances is something that is not delivered as a managed service, they are just EC2 instances.
36
What does ECS EC2 mode offer generally?
ECS using EC2 mode offers a great middle ground, if you want to use containers in your infrastructure but you need to manage the container host, capacity and availability.
37
What can you do to achieve more cost-effective solutions with ECS EC2 mode?
You can use spot pricing or prepaid EC2 servers.
38
What is one of the main differences between EC2 mode and fargate mode?
Fargate mode removes management overhead, no need to manage EC2 instances for use as container hosts.
39
What is Fargate mode?
Fargate is a cluster model, which means you have no servers to manage -> you do not pay for EC2 instances (servers) regardles of whether you are using them or not.
40
What does ECS manage in Fargate mode?
- Scheduling and Orchestration - Cluster manager - Placement engine - handles where to run containers
41
Does ECS use registries in the Fargate mode? How?
You still use registries for the container images, tasks and service definitions to define tasks and services (define image, ports and how much resources you need)
42
Describe the Shared Fargate infrastructure platform
**Shared Fargate infrastructure platform** allows all customers to access from the same pool of resources - it is like EC2, isolates different customer so for them, they are isolated. The resources defined in the task definition are allocated in the fargate shared infrastructure - tasks run in that infrastructure.
43
Where is a fargate cluster deployed (network-wise)?
In a VPC and its AZs.
44
How do tasks use the VPC?
Tasks are injected into the VPC. Each tasks is given an elastic network interface which has an IP address within the VPC. They then run like a VPC resource (they can be accessed from the VPC or from the public internet if the VCP is configured that way).
45
What is the EC2 mode good for?
**EC2 mode** is good for a **large** and consistent workload if you are **price** conscious. This allows for spot pricing and prepayment.
46
Is EC2 suitable for PROD systems?
Use EC2 just to play around with containers, but almost never for production systems.
47
What is Fargate great for?
- Have a **large** workload but are overhead conscious. - Have **small**/**bursty** style workloads - you pay only for the capacity that you use - Use batch or periodic workloads - you pay what you consume