Can you contain the future - Docker, Container Technologies, The Future, and You

82
CAN YOU CONTAIN THE FUTURE: Docker, Container Technologies, The Future, And You BY: CURT GRATZ

Transcript of Can you contain the future - Docker, Container Technologies, The Future, and You

Page 1: Can you contain the future - Docker, Container Technologies, The Future, and You

CAN YOU CONTAIN THE FUTURE: Docker, Container Technologies, The Future, And YouBY: CURT GRATZ

Page 2: Can you contain the future - Docker, Container Technologies, The Future, and You
Page 3: Can you contain the future - Docker, Container Technologies, The Future, and You
Page 4: Can you contain the future - Docker, Container Technologies, The Future, and You
Page 5: Can you contain the future - Docker, Container Technologies, The Future, and You
Page 6: Can you contain the future - Docker, Container Technologies, The Future, and You
Page 7: Can you contain the future - Docker, Container Technologies, The Future, and You
Page 8: Can you contain the future - Docker, Container Technologies, The Future, and You
Page 9: Can you contain the future - Docker, Container Technologies, The Future, and You

‣ Getting started with Docker

‣ Why you should contain everything in containers that contain things

‣ Everything about Docker

‣ The Batman Equation

What we won’t be covering

Page 10: Can you contain the future - Docker, Container Technologies, The Future, and You

‣ Learn about containers and how they differ from Vms

‣ Learn the pros and cons of using containers

‣ A little about Docker and how to integrate it into your workflow

‣ Learn how you can use Docker for easy deployments

‣ Bust some Myths about container technologies and Docker.

What we will be covering

Page 11: Can you contain the future - Docker, Container Technologies, The Future, and You

‣ Husband

‣ Dad

‣ Coach

‣ Youth Leader

‣ Co-Owner of Computer Know How

‣ Member of Team ColdBox

‣ Lover of Open Source

The Obligatory Who Am I?

Page 12: Can you contain the future - Docker, Container Technologies, The Future, and You

Lets talk about you

Page 13: Can you contain the future - Docker, Container Technologies, The Future, and You
Page 14: Can you contain the future - Docker, Container Technologies, The Future, and You

YOU? A DEVELOPER?

Page 15: Can you contain the future - Docker, Container Technologies, The Future, and You

YOU? A SYS ADMIN?

Page 16: Can you contain the future - Docker, Container Technologies, The Future, and You

YOU? DEV OPS?

Page 17: Can you contain the future - Docker, Container Technologies, The Future, and You

YOU? AN ACCOUNTANT?

Page 18: Can you contain the future - Docker, Container Technologies, The Future, and You

YOU? MARKETING?

Page 19: Can you contain the future - Docker, Container Technologies, The Future, and You

YOU? MANAGER?

Page 20: Can you contain the future - Docker, Container Technologies, The Future, and You

YOU? DBA?

Page 21: Can you contain the future - Docker, Container Technologies, The Future, and You

YOU? QA/TESTER?

Page 22: Can you contain the future - Docker, Container Technologies, The Future, and You

YOU? FULL STACK?

Page 23: Can you contain the future - Docker, Container Technologies, The Future, and You
Page 24: Can you contain the future - Docker, Container Technologies, The Future, and You

Lets talk about containers

Page 25: Can you contain the future - Docker, Container Technologies, The Future, and You

Matrix of Hell

Page 26: Can you contain the future - Docker, Container Technologies, The Future, and You

It works on my machine

Page 27: Can you contain the future - Docker, Container Technologies, The Future, and You

How shipping solved the problem

Page 28: Can you contain the future - Docker, Container Technologies, The Future, and You

How containers solve the problem

Page 29: Can you contain the future - Docker, Container Technologies, The Future, and You

Traditional VM VS Containers

Page 30: Can you contain the future - Docker, Container Technologies, The Future, and You

Pros and Cons of Containers

Page 31: Can you contain the future - Docker, Container Technologies, The Future, and You

Isolation

Page 32: Can you contain the future - Docker, Container Technologies, The Future, and You
Page 33: Can you contain the future - Docker, Container Technologies, The Future, and You

Startup times

Page 34: Can you contain the future - Docker, Container Technologies, The Future, and You

Size

Page 35: Can you contain the future - Docker, Container Technologies, The Future, and You

CPU and Memory usage

Page 36: Can you contain the future - Docker, Container Technologies, The Future, and You

Its a container

Page 37: Can you contain the future - Docker, Container Technologies, The Future, and You

Deciding between containers and VMs

Page 38: Can you contain the future - Docker, Container Technologies, The Future, and You

More then just Docker

Page 39: Can you contain the future - Docker, Container Technologies, The Future, and You
Page 40: Can you contain the future - Docker, Container Technologies, The Future, and You
Page 41: Can you contain the future - Docker, Container Technologies, The Future, and You

Commands for images

‣ $ docker images # shows all images.

‣ $ docker import # creates an image from a tarball.

‣ $ docker build # creates image from Dockerfile.

‣ $ docker commit # creates image from a container.

‣ $ docker rmi # removes an image.

‣ $ docker history # list changes of an image.

Page 42: Can you contain the future - Docker, Container Technologies, The Future, and You

Commands for Dockerfile‣ FROM - The image the new image will be based on.

‣ COPY - Copy a file or dir into the image

‣ ADD - Like copy, but can be a URL or unpack a tar

‣ RUN - Ran a command inside the container

‣ ONBUILD - Run commands when building

‣ CMD - Default command to run

‣ ENV - Set a environment variable

‣ EXPOSE - expose a port

‣ VOLUME - Specify that a directory should be stored outside the union file system

Page 43: Can you contain the future - Docker, Container Technologies, The Future, and You

Commands for containers‣ $ docker create # creates a container but does not start it.

‣ $ docker run # creates and starts a container.

‣ $ docker stop # stops it.

‣ $ docker start # will start it again.

‣ $ docker restart # restarts a container.

‣ $ docker rm # deletes a container.

‣ $ docker kill # sends a SIGKILL to a container.

‣ $ docker exec # executes a command in a running container.

Page 44: Can you contain the future - Docker, Container Technologies, The Future, and You

Commands for inspecting‣ $ docker ps # shows running containers.

‣ $ docker inspect # info on a container (incl. IP address).

‣ $ docker logs # gets logs from container.

‣ $ docker events # gets events from container.

‣ $ docker port # shows public facing port of container.

‣ $ docker top # shows running processes in container.

‣ $ docker diff # shows changed files in container's FS.

‣ $ docker stats # shows metrics, memory, cpu, filsystem

Page 45: Can you contain the future - Docker, Container Technologies, The Future, and You

Deployments

Page 46: Can you contain the future - Docker, Container Technologies, The Future, and You

Build Once, Run Anywhere

Page 47: Can you contain the future - Docker, Container Technologies, The Future, and You

Cattle, not Pets

Page 48: Can you contain the future - Docker, Container Technologies, The Future, and You

Contract between Dev and Ops

Page 49: Can you contain the future - Docker, Container Technologies, The Future, and You

Why it is important to get it right

Page 50: Can you contain the future - Docker, Container Technologies, The Future, and You

Deployments

Page 51: Can you contain the future - Docker, Container Technologies, The Future, and You

Deployments

Page 52: Can you contain the future - Docker, Container Technologies, The Future, and You

node-app-service.yamlapiVersion: v1kind: Servicemetadata: name: node-app-servicespec: ports: - port: 3000 protocol: TCP nodePort: 30061 selector: name: node-app type: LoadBalancer

Page 53: Can you contain the future - Docker, Container Technologies, The Future, and You

node-app-rc.yamlapiVersion: v1kind: ReplicationControllermetadata: name: node-app-rcspec: replicas: 4 selector: name: node-app template: metadata: labels: name: node-app spec: containers: - name: node-app image: privateRepo.private.com/image-name ports: imagePullSecrets: - name: node-app

Page 54: Can you contain the future - Docker, Container Technologies, The Future, and You

Start it up‣ kubectl create -f node-app-service.yaml

‣ kubectl create -f node-app-rc.yaml

Page 55: Can you contain the future - Docker, Container Technologies, The Future, and You

Scale it you say‣ kubectl scale rc node-app --replicas=20

Page 56: Can you contain the future - Docker, Container Technologies, The Future, and You
Page 57: Can you contain the future - Docker, Container Technologies, The Future, and You

Containers Are Best Understood as Small VMs

Page 58: Can you contain the future - Docker, Container Technologies, The Future, and You
Page 59: Can you contain the future - Docker, Container Technologies, The Future, and You

Containers Aren’t Suitable for Critical Workloads

Page 60: Can you contain the future - Docker, Container Technologies, The Future, and You
Page 61: Can you contain the future - Docker, Container Technologies, The Future, and You

Containers Aren’t as Secure as Traditional Infrastructure

Page 62: Can you contain the future - Docker, Container Technologies, The Future, and You
Page 63: Can you contain the future - Docker, Container Technologies, The Future, and You

Containers Cannot Be Deployed and Orchestrated At Scale

Page 64: Can you contain the future - Docker, Container Technologies, The Future, and You
Page 65: Can you contain the future - Docker, Container Technologies, The Future, and You

Microservices are mandatory

Page 66: Can you contain the future - Docker, Container Technologies, The Future, and You
Page 67: Can you contain the future - Docker, Container Technologies, The Future, and You

Containers use less CPU and Memory

Page 68: Can you contain the future - Docker, Container Technologies, The Future, and You
Page 69: Can you contain the future - Docker, Container Technologies, The Future, and You

Developers don’t want to deploy apps and define infrastructure

Page 70: Can you contain the future - Docker, Container Technologies, The Future, and You
Page 71: Can you contain the future - Docker, Container Technologies, The Future, and You

Lets talk about the future

Page 72: Can you contain the future - Docker, Container Technologies, The Future, and You

Containers are an old idea.

Page 73: Can you contain the future - Docker, Container Technologies, The Future, and You

Containers are here to stay

Page 74: Can you contain the future - Docker, Container Technologies, The Future, and You

Microservices grow in popularity

Page 75: Can you contain the future - Docker, Container Technologies, The Future, and You

Standards and Maturity

Page 76: Can you contain the future - Docker, Container Technologies, The Future, and You

Community on the rise

Page 77: Can you contain the future - Docker, Container Technologies, The Future, and You

‣ Logging ‣ None

‣ json-file

‣ syslog

‣ jourald

‣ fluent

Other topics not covered

Page 78: Can you contain the future - Docker, Container Technologies, The Future, and You

‣ Secrets ‣ Kubernetes

‣ Vault (open source by HashCorp)

‣ Keywhiz (open source by Square)

‣ Conjur (commercial)

Other topics not covered

Page 79: Can you contain the future - Docker, Container Technologies, The Future, and You

‣ Service Discovery ‣ Kubernetes

‣ Consul

‣ Etcd

‣ Zookeeper

Other topics not covered

Page 80: Can you contain the future - Docker, Container Technologies, The Future, and You

‣ Metrics

‣ Monitoring

‣ Networking

‣ Stateful services

Other topics not covered

Page 81: Can you contain the future - Docker, Container Technologies, The Future, and You

“Thank you.”

–hold up applause sign here

Page 82: Can you contain the future - Docker, Container Technologies, The Future, and You

‣ Email - [email protected]

‣ Blog - http://www.compknowhow.com/blog/

‣ Twitter - gratzc

‣ Skype - gratzc

‣ Snapchat - gratzc

‣ League of Legends - gratzc

Contact Info