Follow me!

Similar documents
Follow me!

DEPLOYMENT MADE EASY!

Cloud providers, tools and best practices in running Magento on Kubernetes. Adrian Balcan MindMagnet Software

Deliver Docker Containers Continuously on AWS. Philipp

Best Practices for Developing & Deploying Java Applications with Docker

/ Cloud Computing. Recitation 5 February 14th, 2017

Docker on VDS. Aurelijus Banelis

Arup Nanda VP, Data Services Priceline.com

UP! TO DOCKER PAAS. Ming

A Hands on Introduction to Docker

Ellexus Container Checker user manual

GitLab-CI and Docker Registry

Con$nuous Deployment with Docker Andrew Aslinger. Oct

Tricks of the Captains. Adrian Mouat. Chief Scientist Container Solutions

CONTINUOUS INTEGRATION; TIPS & TRICKS

Wrapp. Powered by AWS EC2 Container Service. Jude D Souza Solutions Wrapp Phone:

USING DOCKER FOR MXCUBE DEVELOPMENT AT MAX IV

DevOps Course Content

Dockerfile Best Practices

Midterm Presentation Schedule

The Long Road from Capistrano to Kubernetes

/ Cloud Computing. Recitation 5 September 26 th, 2017

Splunk N Box. Splunk Multi-Site Clusters In 20 Minutes or Less! Mohamad Hassan Sales Engineer. 9/25/2017 Washington, DC

agenda PAE Docker Docker PAE

Container Orchestration on Amazon Web Services. Arun

Setting up Kubernetes with Day 2 in Mind. Angela Chin, Senior Software Engineer, Pivotal Urvashi Reddy, Senior Software Engineer, Pivotal

Introduction to Containers

Asterisk & the Docker revolution Some lessons from the trenches

Getting Started With Containers

SQL Server inside a docker container. Christophe LAPORTE SQL Server MVP/MCM SQL Saturday 735 Helsinki 2018

Creating pipelines that build, test and deploy containerized artifacts Slides: Tom Adams

Automating the Build Pipeline for Docker Container

DevOps in the Cloud A pipeline to heaven?! Robert Cowham BCS CMSG Vice Chair

Important DevOps Technologies (3+2+3days) for Deployment

INDIGO PAAS TUTORIAL. ! Marica Antonacci RIA INFN-Bari

/ Cloud Computing. Recitation 5 September 27 th, 2016

Parallelizing CI using Docker Swarm-Mode

Installing and Using Docker Toolbox for Mac OSX and Windows

Building a Global-Scale Multi- Tenant Cloud Platform on AWS and Docker: Lessons Learned

OpenShift 3 Technical Architecture. Clayton Coleman, Dan McPherson Lead Engineers

Think Small to Scale Big

By: Jeeva S. Chelladhurai

Red Hat Containers Cheat Sheet

@briandorsey #kubernetes #GOTOber

DevOps Technologies. for Deployment

Docker Cheat Sheet. Introduction

Container-based virtualization: Docker

Dockerfile Documentation

An introduction to Docker

Advanced Continuous Delivery Strategies for Containerized Applications Using DC/OS

Docker for Sysadmins: Linux Windows VMware

Dockerfile Documentation

Network softwarization Lab session 2: OS Virtualization Networking

Sunil Shah SECURE, FLEXIBLE CONTINUOUS DELIVERY PIPELINES WITH GITLAB AND DC/OS Mesosphere, Inc. All Rights Reserved.

The Galaxy Docker Project. our hands-on tutorial

Fixing the "It works on my machine!" Problem with Docker

Orchestration in Docker

SUSE s vision for agile software development and deployment in the Software Defined Datacenter

Using DC/OS for Continuous Delivery

Zero to Microservices in 5 minutes using Docker Containers. Mathew Lodge Weaveworks

Docker task in HPC Pack

DevOps Foundations : Infrastructure as Code

Dockerfile & docker CLI Cheat Sheet

Cloud & container monitoring , Lars Michelsen Check_MK Conference #4

HOW TO STAND OUT IN DEVOPS

the road to cloud native applications Fabien Hermenier

Docker at Lyft Speeding up development Matthew #dockercon

Set up, Configure, and Use Docker on Local Dev Machine

containerization: more than the new virtualization

Docker & why we should use it

NGINX: From North/South to East/West

Containers, Serverless and Functions in a nutshell. Eugene Fedorenko

Kuber-what?! Learn about Kubernetes

Travis Cardwell Technical Meeting

Microsoft Cloud Workshop. Containers and DevOps Hackathon Learner Guide

Red Hat OpenShift Roadmap Q4 CY16 and H1 CY17 Releases. Lutz Lange Solution

A REFERENCE ARCHITECTURE FOR DEPLOYING WSO2 MIDDLEWARE ON KUBERNETES

Developing and Testing Java Microservices on Docker. Todd Fasullo Dir. Engineering

Multi-Cloud and Application Centric Modeling, Deployment and Management with Cisco CloudCenter (CliQr)

Android meets Docker. Jing Li

DCCN Docker Swarm Cluster Documentation

Build your dev environment with Docker.

Precursor Steps & Storage Node

Running MarkLogic in Containers (Both Docker and Kubernetes)

AALOK INSTITUTE. DevOps Training

Lassoing the Clouds: Best Practices on AWS. Brian DeShong May 26, 2017

Developing Kubernetes Services

DevOps Workflow. From 0 to kube in 60 min. Christian Kniep, v Technical Account Manager, Docker Inc.

Lassoing the Clouds: Best Practices on AWS. Brian DeShong May 26, 2017

docker & HEP: containerization of applications for development, distribution and preservation

SCREENING TEST & TELEPHONIC

Well, That Escalated Quickly! How abusing the Docker API Led to Remote Code Execution, Same Origin Bypass and Persistence in the Hypervisor via

Clocker. Deploying Complex Applica3ons on Docker using Apache Brooklyn

Container Security and new container technologies. Dan

Buenos Aires 31 de Octubre de 2018

Who is Docker and how he can help us? Heino Talvik

DGX-1 DOCKER USER GUIDE Josh Park Senior Solutions Architect Contents created by Jack Han Solutions Architect

Code: Slides:

Dockerizing CS50. From Cluster to Cloud to Appliance to Container. David J. Malan Dan Armendariz

DevOps + Infrastructure TRACK SUPPORTED BY

Transcription:

Stuff I do

Follow me! https://pasztor.at @janoszen

About this talk 1. Maintaining your Build Stack 2. Orchestrating your Cluster 3. Pitfalls and Recommendations

About this talk 1. Maintaining your Build Stack 2. Orchestrating your Cluster 3. Pitfalls and Recommendations

About this talk 1. Maintaining your Build Stack 2. Orchestrating your Cluster 3. Pitfalls and Recommendations

Maintaining your Build Stack How Docker Images are Built

Maintaining your Build Stack How Docker Images are Built FROM ubuntu:16.04

Maintaining your Build Stack How Docker Images are Built FROM ubuntu:16.04 RUN apt-get install...

Maintaining your Build Stack How Docker Images are Built FROM ubuntu:16.04 RUN apt-get install... COPY files/etc /etc

Maintaining your Build Stack How Docker Images are Built FROM ubuntu:16.04 RUN apt-get install... COPY files/etc /etc COPY init.sh /init.sh

Maintaining your Build Stack How Docker Images are Built FROM ubuntu:16.04 RUN apt-get install... COPY files/etc /etc COPY init.sh /init.sh CMD /init.sh

Maintaining your Build Stack How Docker Images are Built FROM ubuntu:16.04 RUN apt-get install... COPY files/etc /etc COPY init.sh /init.sh CMD /init.sh e87eea024487 c90c59c78830 31c6577f6847 54511612f1c4 9e54da99b80c

Maintaining your Build Stack How Docker Images are Built latest FROM ubuntu:16.04 RUN apt-get install... COPY files/etc /etc COPY init.sh /init.sh CMD /init.sh e87eea024487 c90c59c78830 31c6577f6847 54511612f1c4 9e54da99b80c

Maintaining your Build Stack Server Your Laptop

Maintaining your Build Stack Docker Image Server Your Laptop

Maintaining your Build Stack Docker Image Docker Image Server Your Laptop

Maintaining your Build Stack Docker Image Docker Image Server Your Laptop

Maintaining your Build Stack Registry Docker Image Server Your Laptop

Maintaining your Build Stack Docker Image Registry docker push Docker Image Server Your Laptop

Maintaining your Build Stack Docker Image Registry Docker Image Docker Image Server Your Laptop

Maintaining your Build Stack Docker Image Registry Docker Image Docker Container Server Docker Image Your Laptop

Follow me! Problems:

Follow me! Problems: High Bandwidth Usage

Follow me! Problems: High Bandwidth Usage Different Hashes on Different Machines

Maintaining your Build Stack Registry CI Server Git Server Dockerfile Server Your Laptop

Maintaining your Build Stack Dockerfile Registry CI Server Git Server Dockerfile Server Your Laptop

Maintaining your Build Stack Dockerfile Dockerfile Registry CI Server Git Server Dockerfile Server Your Laptop

Maintaining your Build Stack Registry Dockerfile Docker Image CI Server Dockerfile Git Server Dockerfile Server Your Laptop

Maintaining your Build Stack Docker Image Registry Dockerfile Docker Image CI Server Dockerfile Git Server Dockerfile Server Your Laptop

Maintaining your Build Stack Docker Image Registry Dockerfile Docker Image CI Server Dockerfile Git Server Docker Image Dockerfile Server Your Laptop

Maintaining your Build Stack Docker Image Registry Dockerfile Docker Image CI Server Dockerfile Git Server Docker Image Docker Container Server Dockerfile Your Laptop

Maintaining your Build Stack CI server YES YES YES YES YES Docker Repository YES YES YES YES

Orchestrating your Cluster How do you run a Docker image?

Orchestrating your Cluster How do you run a Docker image? ssh youruser@example.com "docker run yourcontainer"

Orchestrating your Cluster How do you run a Docker image? ssh youruser@example.com "docker run yourcontainer"

Orchestrating your Cluster Orchestration tools

Orchestrating your Cluster Orchestration tools Where is my service?

Orchestrating your Cluster Orchestration tools Where is my service? Rolling updates

Orchestrating your Cluster Orchestration tools Where is my service? Rolling updates Scaling

Orchestrating your Cluster Orchestration tools Where is my service? Rolling updates Scaling Virtual networks

Orchestrating your Cluster Orchestration tools Where is my service? Rolling updates Scaling Virtual networks...

Orchestrating your Cluster Orchestration tools AWS EC2 Container Service Docker Swarm Kubernetes...

Orchestrating your Cluster EC2 Container Service

Orchestrating your Cluster EC2 Container Service + Integrated with AWS

Orchestrating your Cluster EC2 Container Service + Integrated with AWS + Autoscaling (limited)

Orchestrating your Cluster EC2 Container Service + Integrated with AWS + Autoscaling (limited) + Integrated registry

Orchestrating your Cluster EC2 Container Service + Integrated with AWS - Using the ELB is a must + Autoscaling (limited) + Integrated registry

Orchestrating your Cluster EC2 Container Service + Integrated with AWS + Autoscaling (limited) - Using the ELB is a must - No built-in DNS server + Integrated registry

Orchestrating your Cluster EC2 Container Service + Integrated with AWS + Autoscaling (limited) + Integrated registry - Using the ELB is a must - No built-in DNS server - Slow rollout

Orchestrating your Cluster EC2 Container Service + Integrated with AWS + Autoscaling (limited) + Integrated registry - Using the ELB is a must - No built-in DNS server - Slow rollout - No overlay network

Orchestrating your Cluster EC2 Container Service + Integrated with AWS + Autoscaling (limited) + Integrated registry - Using the ELB is a must - No built-in DNS server - Slow rollout - No overlay network - Outdated

Orchestrating your Cluster Docker Swarm

Orchestrating your Cluster Docker Swarm + (Very) Simple

Orchestrating your Cluster Docker Swarm + (Very) Simple + Overlay Networks

Orchestrating your Cluster Docker Swarm + (Very) Simple + Overlay Networks + Built-in DNS server and LB

Orchestrating your Cluster Docker Swarm + (Very) Simple + Overlay Networks + Built-in DNS server and LB + Fast rollout

Orchestrating your Cluster Docker Swarm + (Very) Simple - Very young (YMMV) + Overlay Networks + Built-in DNS server and LB + Fast rollout

Orchestrating your Cluster Docker Swarm + (Very) Simple + Overlay Networks - Very young (YMMV) - No Autoscaling + Built-in DNS server and LB + Fast rollout

Orchestrating your Cluster Docker Swarm + (Very) Simple + Overlay Networks + Built-in DNS server and LB - Very young (YMMV) - No Autoscaling - Monolithic (no plugins) + Fast rollout

Orchestrating your Cluster Kubernetes + Overlay networks

Orchestrating your Cluster Kubernetes + Overlay networks + Autoscaling

Orchestrating your Cluster Kubernetes + Overlay networks + Autoscaling + Rack awareness

Orchestrating your Cluster Kubernetes + Overlay networks + Autoscaling + Rack awareness + Plugins, everywhere

Orchestrating your Cluster Kubernetes + Overlay networks + Autoscaling + Rack awareness + Plugins, everywhere + Makes you coffee

Orchestrating your Cluster Kubernetes + Overlay networks - Complex to set up + Autoscaling + Rack awareness + Plugins, everywhere + Makes you coffee

Orchestrating your Cluster Kubernetes + Overlay networks + Autoscaling + Rack awareness - Complex to set up - Setup scripts and docs are beta / unstable / outdated + Plugins, everywhere + Makes you coffee

Pitfalls and Recommendations Oops...

Pitfalls and Recommendations Multiple services in one container?

Pitfalls and Recommendations Multiple services in one container? DON T!

Pitfalls and Recommendations supervisord nginx PHP-FPM

Pitfalls and Recommendations supervisord nginx PHP-FPM

Pitfalls and Recommendations supervisord nginx

Pitfalls and Recommendations Sidecar services

Pitfalls and Recommendations supervisord PHP-FPM nullmailer

Pitfalls and Recommendations supervisord PHP-FPM nullmailer manage-supervisord

Pitfalls and Recommendations supervisord PHP-FPM nullmailer manage-supervisord

Pitfalls and Recommendations supervisord PHP-FPM manage-supervisord

Pitfalls and Recommendations supervisord PHP-FPM manage-supervisord https://github.com/opsbears/docker-supervisord

Pitfalls and Recommendations Shell script in CMD?

Pitfalls and Recommendations Shell script in CMD? BE CAREFUL!

Pitfalls and Recommendations #!/bin/bash # Other stuff here /usr/sbin/nginx -g "daemon off;" exit $?

Pitfalls and Recommendations bash -c /init.sh nginx

Pitfalls and Recommendations SIGTERM bash -c /init.sh nginx

Pitfalls and Recommendations SIGTERM bash -c /init.sh YOLO! nginx

Pitfalls and Recommendations SIGKILL! bash -c /init.sh nginx

Pitfalls and Recommendations #!/bin/bash # Other stuff here exec /usr/sbin/nginx -g "daemon off;"

Pitfalls and Recommendations bash -c /init.sh

Pitfalls and Recommendations nginx

Pitfalls and Recommendations Don t update your containers!

Pitfalls and Recommendations Shared data?

Pitfalls and Recommendations Container Server

Pitfalls and Recommendations /srv/mysql Container bind mount Server

Pitfalls and Recommendations /srv/mysql Container Server Server

Pitfalls and Recommendations Healthchecks?

Pitfalls and Recommendations Dockerfile: HEALTHCHECK \ --interval=10s \ --timeout=3s \ CMD /usr/local/bin/healthcheck healthcheck: #!/bin/bash test $(SCRIPT_NAME=/status SCRIPT_FILENAME=/status REQUEST_METHOD=GET cgi-fcgi -bind -connect 127.0.0.1:9000 grep pool cut -d: -f2 sed 's/ //g') == www exit 1

Pitfalls and Recommendations healthcheck: #!/bin/bash test $(SCRIPT_NAME=/status SCRIPT_FILENAME=/status REQUEST_METHOD=GET cgi-fcgi -bind -connect 127.0.0.1:9000 grep pool cut -d: -f2 sed 's/ //g') == www exit 1

Pitfalls and Recommendations Docker Swarm: HEALTHCHECK \ --interval=10s \ --timeout=3s \ CMD /usr/local/bin/healthcheck

Pitfalls and Recommendations Kubernetes: spec: containers: - name: yourpod livenessprobe: exec: command: - /usr/local/bin/healthcheck initialdelayseconds: 5 periodseconds: 5 readinessprobe:...

Pitfalls and Recommendations TEST YO CONTAINERS!

Pitfalls and Recommendations docker-compose.test.yml version: '3.2' services: mysql: container_name: mysql build:.... sut: build:./test...

Pitfalls and Recommendations DO NOT HARD-CODE CREDENTIALS!

Pitfalls and Recommendations VERSION YOUR IMAGES!

Pitfalls and Recommendations CAREFUL WITH 3RD PARTY IMAGES!

Pitfalls and Recommendations opsbears/base opsbears/supervisord opsbears/nginx opsbears/mysql opsbears/nullmailer opsbears/php-fpm

Pitfalls and Recommendations REMOVE DEV STUFF!

That s all! Questions? Many thanks to Bence Sántha, Gábor Vereb, Dávid Papp for their inspiration and feedback.