Using Containers in Production
The course is part of this learning path
This course is for anyone with a basic understanding of what containers are, and even why you'd want to use them, but who doesn't understand the nitty-gritty of how they work yet. You should have a basic technical literacy, as well as an understanding of cloud app architecture. In this course, you'll learn about the major concepts around containers. You'll learn about different container systems, learn all about orchestration, get a better understanding of how and why to build and run 12-factor apps on containers, container security issues, and you'll even get a quick look at how to get a microservices app up-and-running on your computer in about two minutes with Docker compose.
- Understand the options for running containers
- Understand the common security concerns
- Know why orchestration is important
- Understand what types of applications should be containerized
- Understand how logging and monitoring works with containers
- Project Manager
- Business Manager
A good prerequisite for this course is to take the Introduction to Containers course.
This Course Includes
- 47 minutes of high-definition video
- Console demonstrations
What You'll Learn
- Course Intro: What to expect from this course
- Microservices: Designing Microservices and 12-factor apps.
- Running a Microserve App on Compose: Demo of using Compose.
- Container Orchestration: What is orchestration and how does it work?
- Container Security: Best practices to make containers more secure.
- Container Logging and Monitoring: An overview of tools commonly used for monitoring.
- Container Systems and OSs: Different Linux Containers: LXC, Docker, rkt, OCI, and an overview of Windows Containers.
- Wrap-Up: Course summary
Once your containerized app is up and running, you'll want to be able to monitor its health. This means both monitoring the uptime of the system and containers, and also tracking logs from inside your individual services. There are a number of tools on the market designed for container system monitoring. If you're using orchestration software, some of that monitoring is built into the system already.
After all, Kubernetes or Swarm can't spin up more containers to handle high traffic periods if they don't know what traffic is going where. Kubernetes in particular has a project called Heapster that aggregates a lot of different monitoring data into one spot. It largely wraps together different open source monitoring tools such as cAdvisor and InfluxDB. cAdvisor can be used with any Docker system, and is a way to visually see stats about your individual Docker containers.
It will give you information on run time, CPU and memory usage, and more, all in a pretty and easy to read graphs. InfluxDB works on any database, containerized or not, and is a way to watch data loads and read rights in a graphical interface. There are also third party cloud apps for monitoring.
A popular one is Data Dog. With Data Dog, you instruct Docker to send all the information from a cluster to their service through the API, and they then display the information and let you custom build dashboards that you can drill down into your data in real time. You can also set up alerts on Data Dog, so that if, for instance, there are too many containers running on a certain host, or not enough of a specific type of container, you can be alerted through whatever channels you'd like.
These tools, along with others like Prometheus and Sysdig all query the health of your containers, but not what going on inside of them. As we mentioned in the 12 Factor lesson, you'll want to make sure that each of your services is exporting logs. The good news is that most tools that work without containers will work with containers here. You can built the logging into your app, then you can send those logs to a system like New Relic which will collect those logs and let you build custom dashboards out of them. Monitoring your containers isn't particularly hard if you're using tools designed just for that.
About the Author
Adrian M Ryan is an educator and product manager. He was an early employee at General Assembly, has co-founded an education startup and a consultancy, and he loves teaching. He grew up in rural Alaska, and while he now lives in New York City he makes sure to find time to get out in the woods hiking whenever possible.