Con$nuous Deployment with Docker Andrew Aslinger. Oct

Similar documents
Jinkun Jang Samsung Electronics

DevOps Course Content

Docker at Lyft Speeding up development Matthew #dockercon

Accelerate at DevOps Speed With Openshift v3. Alessandro Vozza & Samuel Terburg Red Hat

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

CONTINUOUS DELIVERY WITH DC/OS AND JENKINS

Deployment Patterns using Docker and Chef

UP! TO DOCKER PAAS. Ming

CONTINUOUS DELIVERY WITH MESOS, DC/OS AND JENKINS

DevOps and Microservices. Cristian Klein

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

Advanced Continuous Delivery Strategies for Containerized Applications Using DC/OS

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

Netflix OSS Spinnaker on the AWS Cloud

TM DevOps Use Case TechMinfy All Rights Reserved

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

Swift Web Applications on the AWS Cloud

Think Small to Scale Big

Logging, Monitoring, and Alerting

[Docker] Containerization

Getting Started With Containers

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

TM DevOps Use Case. 2017TechMinfy All Rights Reserved

DEPLOYMENT MADE EASY!

Amir Zipory Senior Solutions Architect, Redhat Israel, Greece & Cyprus

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

Docker and Security. September 28, 2017 VASCAN Michael Irwin

Azure DevOps. Randy Pagels Intelligent Cloud Technical Specialist Great Lakes Region

Docker & Chef. Containers. Containers and Docker 8/4/14. Linux containers (LXC) Single operating system Multiple isolated, working configurations

CONTINUOUS INTEGRATION; TIPS & TRICKS

TM DevOps Use Case. 2017TechMinfy All Rights Reserved

From Continuous Integration To Continuous Delivery With Jenkins

I keep hearing about DevOps What is it?

Kubernetes The Path to Cloud Native

Introduction to AWS GoldBase. A Solution to Automate Security, Compliance, and Governance in AWS

SBB. Java User Group 27.9 & Tobias Denzler, Philipp Oser

DevOps Tooling from AWS

DEVOPS TRAINING COURSE CONTENT

Docker II - Judgement Day

Containers, Serverless and Functions in a nutshell. Eugene Fedorenko

Aspirin as a Service: Using the Cloud to Cure Security Headaches

USING DOCKER FOR MXCUBE DEVELOPMENT AT MAX IV

At Course Completion Prepares you as per certification requirements for AWS Developer Associate.

CONTINUOUS DELIVERY IN THE ORACLE CLOUD

" Qué me estás container?" Docker for dummies

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

containerization: more than the new virtualization

Installing and Using Docker Toolbox for Mac OSX and Windows

There Should be One Obvious Way to Bring Python into Production. Sebastian Neubauer

CONTAINERIZING JOBS ON THE ACCRE CLUSTER WITH SINGULARITY

Java Architectures A New Hope. Eberhard Wolff

Running MarkLogic in Containers (Both Docker and Kubernetes)

Welcome to Docker Birthday # Docker Birthday events (list available at Docker.Party) RSVPs 600 mentors Big thanks to our global partners:

The age of orchestration

DEVOPS COURSE CONTENT

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

Getting Started With Amazon EC2 Container Service

Harbor Registry. VMware VMware Inc. All rights reserved.

Quick Prototyping+CI with LXC and Puppet

The 12-Factor app and IBM Bluemix IBM Corporation

DevOps Anti-Patterns. Have the Ops team deal with it. Time to fire the Ops team! Let s hire a DevOps unit! COPYRIGHT 2019 MANICODE SECURITY

AWS Course Syllabus. Linux Fundamentals. Installation and Initialization:

Vagrant and Ansible. Two so2ware tools to create and manage your custom VMs

DevOps Technologies. for Deployment

Orchestrating the Continuous Delivery Process

ContainerOps - DevOps Orchestration. Quanyi Ma

Using DC/OS for Continuous Delivery

FROM VSTS TO AZURE DEVOPS

Pursuit of stability. Growing AWS ECS in production. Alexander Köhler Frankfurt, September 2018

Making Immutable Infrastructure simpler with LinuxKit. Justin Cormack

Continuous Delivery for Cloud Native Applications

The Long Road from Capistrano to Kubernetes

Containers & Microservices For Realists. Karthik

Simple custom Linux distributions with LinuxKit. Justin Cormack

DevNet Workshop-Hands-on with CloudCenter and Jenkins

Follow me!

OPENSTACK BEIJING CONFERENCE. by: Steven Hallett Head of Cloud Infrastructure Engineering and Operations

Immutable Servers. Building a deployment pipeline and deploying to EC2 Spot

Microservice Deployment. Software Engineering II Sharif University of Technology MohammadAmin Fazli

A Hands on Introduction to Docker

Best Practices for Developing & Deploying Java Applications with Docker

How can you implement this through a script that a scheduling daemon runs daily on the application servers?

A DEVOPS STATE OF MIND. Chris Van Tuin Chief Technologist, West

DevOps and Continuous Delivery USE CASE

I'm Andy Glover and this is the Java Technical Series of. the developerworks podcasts. My guest is Brian Jakovich. He is the

ACCELERATE APPLICATION DELIVERY WITH OPENSHIFT. Siamak Sadeghianfar Sr Technical Marketing Manager, April 2016

AALOK INSTITUTE. DevOps Training

Linux System Management with Puppet, Gitlab, and R10k. Scott Nolin, SSEC Technical Computing 22 June 2017

Distributed CI: Scaling Jenkins on Mesos and Marathon. Roger Ignazio Puppet Labs, Inc. MesosCon 2015 Seattle, WA

Introduction to cloud computing

How the Cloud is Enabling the Disruption of the Construction Industry. AWS Case Study Construction Industry. Abstract

OpenShift Roadmap Enterprise Kubernetes for Developers. Clayton Coleman, Architect, OpenShift

Quick Start ArcGIS Enterprise with Automation. Shannon Kalisky Mark Carlson Nikhil Shampur Cherry Lin

PHP Composer 9 Benefits of Using a Binary Repository Manager

Docker und IBM Digital Experience in Docker Container

Roles. Ecosystem Flow of Information between Roles Accountability

Lessons Learned: Deploying Microservices Software Product in Customer Environments Mark Galpin, Solution Architect, JFrog, Inc.

Firefox Crash Reporting.

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

The Post-Cloud. Where Google, DevOps, and Docker Converge

Transcription:

Con$nuous Deployment with Docker Andrew Aslinger Oct 9. 2014

Who is Andrew #1 So#ware / Systems Architect for OpenWhere Passion for UX, Big Data, and Cloud/DevOps Previously Designed and Implemented automated DevOps processes for several organiza@ons Mul$ple environments, many user / developer groups, big data clusters, hundreds of machines A Recovering Chef

Who is Andrew #2 (Andy) Host of AWS DC Meet Up Started as a developer who could talk to opera@ons and infrastructure teams Lived the transi@on from data center, Co- Lo, internal cloud, to AWS To much fun to ever go back

Agenda What is Docker? Con$nuous Delivery with AWS and Docker Docker Advanced Prac$ces and Lessons Learned Demo & Discussion 4

What is Docker? Docker is an open pla/orm for developers and sysadmins to build, ship, and run distributed applica:ons Yet another DevOps tool light weight container Latest hype?

Docker Benefits Virtual Machines Portability Across Machines Local Vagrant like deployment, Remote Deployment including Amazon EC2 Independent of host OS Lightweight vs VMs Supports DevOps Best Prac@ces & Re- use Infrastructure as Code Container Extensibility Docker Fits into a Con@nuous Deployment Pipeline Isola@on and Single Responsibility Reduce dependency conflicts, security

A Typical Docker Flow with six simple commands Docker Registry registryname: https://registry.hub.docker.com/ or Private registry Development Environment Host Environment docker tag imagename registryname/ imagename Docker Image docker build t imagename. Docker Image Docker Container docker run p 9000:9000 d --name containername imagename docker stop/restart/start containername Dockerfile conf 7

OpenWhere DevOps Philosophy 1. Immutable Infrastructure Focus on one process (build) vs. two (build & maintain) 2. Simplify the Tools Minimize On- boarding & Training Minimize Tools 3. Purpose Built Environments 4. DevOps code should co- exist with applica@on code How to build infrastructure for project inline with project Jenkins scripts Docker 5. Auto- scale from start

Why Docker with EC2? Build once, run many places Dev Machines, different clouds, different VPCs, share and build Not $ed to box size or guest OS AMI s are difficult to rebuild and more difficult to maintain Snapshots retain baggage There is no git version control for AMI AMI s are not cross region compa$ble Other AMI tools like Amiator aren t easy to use Easier to achieve immutable infrastructure and one click deploys Maintaining machines sucks Treat your infrastructure as code with a Con@nuous Deployment Pipeline

Why Docker with EC2? Separate your data and state from your image Machine layers evolve at different velocity and have different reuse (Example Later) Core OS Organiza$on Level Requirements Applica$on Level Requirements Applica$on Code Test and version control your deploy ar$facts and configura$on together Same container for developers and EC2 Java Example Stop maintaining AMIs +

Docker Con@nuous Deployment Flow: Set up AWS infrastructure 1 Create AWS Ec2 Instances and install Docker yum install -y docker-io service docker start.

Docker Con@nuous Deployment Flow: Build and push docker image with latest code 6 Push new Image to public or private repo 4 Push Artifacts (optional) 5 Build new Docker Image from Docker File 3 SCM Poll Trigger build 2 Commit New Code w/ Docker file

Docker Con@nuous Deployment Flow: Trigger EC2 to pull latest Docker image 8 Docker Pull & start container 7 Trigger Docker Pull on target machines

Advanced #1: Docker Image Layers using FROM and OnBuild commands in the Docker File Docker Image Layers ONBUILD Project Code Specific Image Organiza$on Applica$on Image (Example NodeJs Web App Image) Organiza$on Base OS Jenkins Built Reusable Project SCM Application Dependencies & Config: NodeJS, express, supervisord etc. Common Dependencies & Config: Security, LDAP, Logging, etc. Core OS Base OS: CentOs, Ubuntu, etc. Machine layers can evolve at different velocity and have different levels of reuse

Advanced #2: Linked Containers Run multiple containers on a machine. Each with a responsibility linked by ports / address https://docs.docker.com/userguide/dockerlinks/ --link name:alias docker run -d -P --name web --link db:db training/webapp python app.py Container 1 DB Container 2 Web $DB_PORT = 6379, etc. /etc/hosts db 172.0.0.2 Host OS

Advanced #3: Data Containers A container which allows sharing of data across containers https://docs.docker.com/userguide/dockervolumes/ Benefits: Change image independent of data (maintainability) Enables Data sharing patterns (single responsibility) Limitations: Data is Tied to Host OS sudo docker run -d --volumes-from dbdata --name db2 training/postgres Data Container (non running) /volume -file1.txt -file2.txt /volume Container 2 Web Container 3 Web /volume Physical files docker managed Host OS

Advanced #4: Customize on Init You need to parameterize and modify items in a container based on the environment Examples: Set a IP address or DNS name, Set a DB password Pattern: 1. Load a script onto the box as part of an building the image 2. Run script at container launch 3. Script uses environment variables to customize settings files etc 4. Environment variables are passed to the docker run Command docker run -e DB=10.0.0.1 start.sh Data Container (non running) sed config.conf Service Discovery & Registra$on is an emerging area

OpenWhere Docker Wins 1. Full con@nuous deployment and write once, deploy many @mes realized 2. Developer Replacement for vagrant Less complexity Test with what you deploy! 3. Deployment build process co- exists with the so#ware! Reduced Maintenance, developer buy- in, testability 4. Awesome Re- use with minimal code 1 line Dockerfile(s) for new MEAN Stack apps 5. Simplicity (Streamlined DevOps)

OpenWhere Docker Burns Learning Curve / Maturity Learning a Docker way for each DevOps task (s$ll in progress) Example: Need tricks to do things like have more than one process running in a container Example: Learning layers are independent and don t retain state between RUN commands A Docker Container is not the same as a typical virtual machine Basic stuff like syslog off and tar, wget not installed Base Image: hmp://phusion.github.io/baseimage- docker/ Containers not restar@ng on EC2 Restart We hacked a cloud- init work around Upda@ng to new images is dirty Manually clean up images / containers or run out of disk! Debugging more complex: You can only a`ach to a Docker container if the program you are running is a shell Install SSH or we have a workaround trick

Recommenda$ons Docker works great for a Con$nuous Deployment flow on EC2 Especially for stateless applica$ons or a micro- service architecture Complex cluster deployments, stateful applica$ons or databases, service discovery etc. not quite there yet You may need to roll your own solu$on or integrate with another technology

Ques$ons

Contact Informa$on Andrew Aslinger Senior Systems Architect OpenWhere aaslinger@openwhere.com @aaa572 hmp://owaaa.github.io/ Andrew Heifetz Chief Cloud Officer OpenWhere aheifetz@openwhere.com @andyheifetz hmp://www.linkedin.com/pub/andrew- heifetz Cell: 240-481- 7442 22