Docker

We will run through the Docker Tutorial, only adapted for our setup at UTM.

Containers (From the Docker Tutorial...)

Flexible: Even the most complex applications can be containerized. Lightweight: Containers leverage and share the host kernel. Interchangeable: You can deploy updates and upgrades on-the-fly. Portable: You can build locally, deploy to the cloud, and run anywhere. Scalable: You can increase and automatically distribute container replicas. Stackable: You can stack services vertically and on-the-fly. Containers run as processes on host, shares the OS. VM has own OS. Containers are much more light weight.

Definitions

Orientation and Setup

Setup at UTM

Get Started, Part 2: Containers

Building an image Running an image (a running image is a container) Sharing an image

Get Started, Part 3: Services

REPLICATION: A service is running copies of a container.
Configuring a service Running a Service Load Balanced Proxy Controlling the App (scale, stop, leave the swarm)

Get Started, Part 4: Swarms

Swarms Creating a Swarm
NOTE: We are not using Docker Machine here!!!! Deploying a Stack into a Swarm

Restarting

Removing Docker containers and images

Get Started, Part 5: Stacks

PARTITION: Stack is a collection of services that comprise the application. You can think of the different types of services as partitioning the application. docker swarm init # may complain that you are already part of a swarm, or ask about --advertise-addr docker swarm leave --force # on all of your hosts docker swarm init --advertise-addr 10.11.12.X # on the master only!! # Why the --advertise-addr? Ans: two interfaces in the lab # Keep the join line!!! Configuring a Stack Deploying the Stack locally Deploying the stack on other hosts (adding nodes) Adding state to stateless containers! Adding Persistence. Deploying the Stack