- Implementing Modern DevOps
- David Gonzalez
- 387字
- 2021-07-08 10:11:20
Amazon ECR and ECS
Containers are the new norm. Every single company that I've come across in the last few years is using or considering using containers for their software. This enables us to build software with the microservices principles in mind (small individual software components running independently) as it provides a decent level of abstraction from the configuration and deployment of different apps: basically, the entire configuration is stored in a container and we only need to worry about how to run it.
Amazon, as one of the pioneers of the microservices architectures, has created its own image registry and cluster (service).
As we will see in depth in Chapter 3, Docker, is built around two concepts: images and containers. An image is a definition of an application (configuration + software), whereas a container is an instance of the running image. The image is built through a Dockerfile (a description of the image with a very basic script language) and stored in a registry, in this case, Amazon EC2 Container Registry (ECR), our private registry in the AWS infrastructure. We don't need to worry about availability or managing resources; we just choose the region where our containers are going to run and push our images into that repository.
Then, from our host running Docker, the image is pulled and the container is instantiated. This is simple and effective, but there are a few considerations:
- What happens when our host does not have enough resources to run as many containers as we want?
- What happens if we want to ensure the high availability of our containers?
- How do we ensure that the containers are restarted when they fail (for some reason)?
- How can we add more hardware resources to our system without downtime?
All those questions were trickier a few years ago but are simple now: Amazon EC2 Container Service (Amazon ECS) will take care of it for us. ECS is basically a cluster of resources (EC2 machines) that work together to provide a runtime for our containers to be executed.
Within ECS, when creating a new service, we specify parameters such as how many replicas of our container should be running at the same time as well as what configuration (image) our container is supposed to use. Let's see how it works.
- INSTANT Mock Testing with PowerMock
- SoapUI Cookbook
- C語言程序設計教程(第2版)
- Python金融數據分析
- Silverlight魔幻銀燈
- Python High Performance Programming
- Terraform:多云、混合云環境下實現基礎設施即代碼(第2版)
- Clojure for Machine Learning
- Spring Boot+MVC實戰指南
- 平面設計經典案例教程:CorelDRAW X6
- Go語言從入門到精通
- .NET 4.0面向對象編程漫談:應用篇
- C# 7.0本質論
- AngularJS UI Development
- Python高性能編程(第2版)