These are my notes from Nigel Poulton’s course on PluralSight, “Docker and Containers: The Big Picture“. Do check out his videos, he’s an easy guy to listen to and explains the subject matter in a digestible manner. Yo can also follow him on Twitter – @nigelpoulton
What are containers?
Hypervisor
- Takes slice of physical server resource to run OS and apps.
- OS uses RAM, CPU & disk space just to run.
- Licence costs for OS for each virtual server.
- Resource and budget cost – CAPEX (Capital Expenditure) and OPEX (Operational Expenditure).
- Requirement to manage and patch each VM.
Containers
- One physical server, one OS then e.g. four containers hosting four apps.
Container Demo
- Download container image.
- Create app from image.
- Start container, stop container.
- Able to map port of host to port within the container.
Containers = Virtualisation 2.0
The Docker Project
- Open Source, not owned by Docker Inc.
- Build better, Ship better and Deploy better.
- Docker Hub
- Store and retrieve Docker images.
- >240k repositories.
- Public and Private repositories.
Preparing to Thrive
- Get hands on with it.
- Start making it official: CI/CD workflows.
- Distributed apps/services – run some in containers, some in VMs (infra services).
- Tools: orchestrate deployments, look at logs.
- Don’t neglect infrastructure to support containers: orchestration, clustering, management, monitoring and logging.
- Datadog stats (datadoghq.com): companies who adopted containers tripled the number in use within six months.
What Kind of Work Will Containers Do?
- Stateless: does not keep any changes or data, e.g. web server.
- Stateful: keeps changes and data, e.g. database server.
- Containers can do both.
- Can put legacy apps in containers but missing the point – opportunity to rethink: micro services (many services combine to create one app).
- Docker containers persist data just the same as a VM does.
Docker Hub (Container Registries)
- Place to store and retrieve container images.
- docker pull <image name> e.g. docker pull Mongo
- pulls Mongo container image.
- Registry can have one or many repositories.
- Images can be public or private.
- Public images can be pulled by anyone but only pushed by authorised users.
- Can create private repositories – within corporate firewall.
- Docker Trusted Registry (DTR).
Automated Workflow
- App Update -> Software Repo -> Testing -> Container Registry -> Deployment -> On Premise/Cloud
Ready for Production & Enterprise?
- Docker Engine available in different versions:
- Experimental
- Stable
- Commercially Supported (CR)
- Docker Swarm (clustering) is laid on top of several Docker engines.
- Docker Content Trust
Container Orchestration
Orchestration: taking something that was manual and automating it.
- Apps compromise multiple parts.
- Define services/components that make up the app.
- Define how they fit together: networking and API calls.
- Deploy to containers.
- Docker Machine: Provisions Docker hosts/engines.
- Docker Compose: Compose multi-container apps.
- Docker Swarm: Schedule containers over multiple Docker engines.
- Tutum: Sits across Machine, Compose & Swarm providing a UI.
Leave a Reply