Running Containers in AWS

In Chapter 6, Scaling Your Infrastructure, our architecture changed quite a bit. We explored different ways to scale our applications in AWS, but one of the major technologies that we left out was containers. Containers are at the heart of the software development life cycle (SDLC) of many major technology companies.

So far, we have used our personal computers to develop our applications. This works well for simple projects, such as our Hello World application. However, when it comes to more complex projects with many dependencies, it's a different story. Have you ever heard of situations in which a certain feature works on a developer's laptop but does not work for the rest of the organization-or-even worse, does not work in production? A lot of these issues stem from the differences between environments. When we build our staging and production environments, we rely on CloudFormation, Terraform, and Ansible, to keep those environments consistent. Unfortunately, we can't easily replicate that to our local development environment.

Containers address this issue. With them, we can package an application and include the operating system, the application code, and everything in between. Containers can also help at a later stage, when it's time to break out the monolithic approach.

In this chapter, we will look at Docker, the most popular container technology. After a brief explanation of what Docker is and how to use its basic functionalities, we will Dockerize our application. This will help us to understand the value of using Docker as a developer. In this chapter, we will cover the following topics:

  • Dockerizing our Hello World application
  • Using the EC2 container service
  • Updating our CI/CD pipeline to utilize ECS
This book covers ECS, but also offers further options for using Docker in AWS. You can also take a look at CoreOS Tectonic (https://tectonic.com/), Mesosphere DC/OS (https://mesosphere.com), or Docker Datacenter (https://www.docker.com/products/docker-datacenter).
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.17.50