The Long Road from Capistrano to Kubernetes

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

Two years of on Kubernetes

Think Small to Scale Big

Containers, Serverless and Functions in a nutshell. Eugene Fedorenko

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

Using AWS to Build a Large Scale Dockerized Microservices Architecture. Dr. Oliver Wahlen moovel Group GmbH Frankfurt, 30.

Container Orchestration on Amazon Web Services. Arun

Continuous delivery while migrating to Kubernetes

Ruby in the Sky with Diamonds. August, 2014 Sao Paulo, Brazil

Developing Kubernetes Services

Lessons learned while automating MySQL in the AWS cloud. Stephane Combaudon DB Engineer - Slice

What s New in K8s 1.3

Building an on premise Kubernetes cluster DANNY TURNER

DevOps Course Content

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

Application Deployment

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

What s New in K8s 1.3

Taming your heterogeneous cloud with Red Hat OpenShift Container Platform.

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

DevOps + Infrastructure TRACK SUPPORTED BY

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

Advanced Continuous Delivery Strategies for Containerized Applications Using DC/OS

AALOK INSTITUTE. DevOps Training

Kubernetes made easy with Docker EE. Patrick van der Bleek Sr. Solutions Engineer NEMEA

Getting Started With Serverless: Key Use Cases & Design Patterns

Running MarkLogic in Containers (Both Docker and Kubernetes)

AWS 101. Patrick Pierson, IonChannel

Beyond 1001 Dedicated Data Service Instances

DevOps on AWS Deep Dive on Continuous Delivery and the AWS Developer Tools

Kuber-what?! Learn about Kubernetes

The 12-Factor app and IBM Bluemix IBM Corporation

Building Cloud Infrastructure

Building Kubernetes cloud: real world deployment examples, challenges and approaches. Alena Prokharchyk, Rancher Labs

Accenture Cloud Platform Serverless Journey

SCALING DRUPAL TO THE CLOUD WITH DOCKER AND AWS

What s New in Red Hat OpenShift Container Platform 3.4. Torben Jäger Red Hat Solution Architect

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

DEVOPS COURSE CONTENT

Microservices on AWS. Matthias Jung, Solutions Architect AWS

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

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

UP! TO DOCKER PAAS. Ming

KUBERNETES IN A GROWN ENVIRONMENT AND INTEGRATION INTO CONTINUOUS DELIVERY

Beginners guide to at #phpworld

Note: Currently (December 3, 2017), the new managed Kubernetes service on Azure (AKS) does not yet support Windows agents.

EASILY DEPLOY AND SCALE KUBERNETES WITH RANCHER

Containerizing GPU Applications with Docker for Scaling to the Cloud

Microservices. Chaos Kontrolle mit Kubernetes. Robert Kubis - Developer Advocate,

Using DC/OS for Continuous Delivery

Kubernetes. An open platform for container orchestration. Johannes M. Scheuermann. Karlsruhe,

Code: Slides:

Use Case: Scalable applications

Kubernetes Integration Guide

Docker at Lyft Speeding up development Matthew #dockercon

AWS London Loft: CloudFormation Workshop

CONTINUOUS DELIVERY WITH DC/OS AND JENKINS

CLOUD-NATIVE APPLICATION DEVELOPMENT/ARCHITECTURE

Leveraging the Serverless Architecture for Securing Linux Containers

Disclaimer This presentation may contain product features that are currently under development. This overview of new technology represents no commitme

WHITE PAPER. RedHat OpenShift Container Platform. Benefits: Abstract. 1.1 Introduction

Swift Web Applications on the AWS Cloud

FROM MONOLITH TO DOCKER DISTRIBUTED APPLICATIONS

개발자와운영자를위한 DevOps 플랫폼 OpenShift Container Platform. Hyunsoo Senior Solution Architect 07.Feb.2017

Logging, Monitoring, and Alerting

Cloud I - Introduction

Exam : Implementing Microsoft Azure Infrastructure Solutions

Deep Dive on Microservices and ECS

JELASTIC PLATFORM-AS-INFRASTRUCTURE

DevOps Technologies. for Deployment

Clocker. Deploying Complex Applica3ons on Docker using Apache Brooklyn

How to Re-Architect without Breaking Stuff (too much) Owen Garrett March 2018

Building/Running Distributed Systems with Apache Mesos

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

CONTAINERS AND MICROSERVICES WITH CONTRAIL

Getting Started With Amazon EC2 Container Service

Building a Kubernetes on Bare-Metal Cluster to Serve Wikipedia. Alexandros Kosiaris Giuseppe Lavagetto

ENHANCE APPLICATION SCALABILITY AND AVAILABILITY WITH NGINX PLUS AND THE DIAMANTI BARE-METAL KUBERNETES PLATFORM

Kubernetes The Path to Cloud Native

RED HAT QUAY. As part of OCP Architecture Workshop. Technical Deck

Kubernetes: Twelve KeyFeatures

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

Learn. Connect. Explore.

Docker All The Things

agenda PAE Docker Docker PAE

DevOps Online Training

CloudCenter for Developers

Design Patterns for the Cloud. MCSN - N. Tonellotto - Distributed Enabling Platforms 68

Containers Infrastructure for Advanced Management. Federico Simoncelli Associate Manager, Red Hat October 2016

the road to cloud native applications Fabien Hermenier

Implementing the Twelve-Factor App Methodology for Developing Cloud- Native Applications

Ingress Kubernetes Tutorial

BeBanjo Infrastructure and Security Overview


SERVERLESS APL. For now this is just research in Cloud technologies in SimCorp A/S.

An Introduction to Kubernetes

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

Fidor Solutions Software Defined Everything and Breaking up the Monolith. marc grimme

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

Automating ArcGIS Deployments Using Chef

Transcription:

The Long Road from Capistrano to Kubernetes Tobias Schwab, Co-Founder of PhraseApp Slides: http://bit.ly/cap-to-kube

How to deploy Ruby on Rails?

Deploying Ruby on Rails required on all servers: OS + system packages ruby runtime in specific version gems in specific versions + system packages nginx reverse proxy deployment: copy source code to all servers parallel restarts on all servers (zero downtime)

2007: Capistrano

Capistrano Framework and utility for executing commands in parallel on multiple remote machines, via SSH. The primary goal is to simplify and automate the deployment of web applications. one directory per release current symlink hooks rollbacks

2007: Capistrano 3 bare metal servers, SMB hoster deployment with capistrano manual config and library management pros: simple, easy to understand cons: hardly any automation

2010: Bundler

2010: Bundler ~ 10 bare metal servers at telefonica/o2 library (gem) management with bundler bundle install via capistrano hook on every deployment config management with versioned shell scripts pros: semi-automated config management cons: system state hard to manage with shell scripts

The problem with convenience creating, adding and updating gems is easy more gems => less code to write more gems => more gems to maintain more gems => more system packages necessary more system packages => more demand for good config management

The problem with popularity

2012: Hetzner

2012-01: Hetzner first PhraseApp deployment single hetzner host manually installed ruby version and system packages pros: good enough, let s fix things if we need to cons: not important

2012: Scaling Rails

2012-07: Scaling Rails hybrid cloud on Rackspace: bare metal + VMs config management with chef custom HAProxy pros: automated config management, suitable for fire fighting cons: learning curve for chef, long bootstrapping times, capistrano difficult with changing hosts

2013: Immutable Infrastructure

2013-01: Immutable Infrastructure replacing chef-server based deployment golden master AMIs on AWS linear shell script to create AMIs, no config management deploying by replacing full instances pros: stateless, immutable, scalable cons: slow deployments, custom deploy code

Docker OS + packages + libraries + code in one image API immutable infrastructure reduce deployment times moves dev closer to prod

2013: Docker

2013-09: Docker data protection requirements static VMs on not so good but german hoster deployment docker image per deployment create new containers via API update HAProxy after terminate old containers pros: immutable infrastructure on static VMs, fast cons: 100% custom deployment code

2014: AMIs, Cloudformation, ASGs

2014-01: AMIs, Cloudformation, ASGs deployment create Golden Master AMI update AutoScaling Group scale up and scale down to replace instances pros: rock solid, not much custom code, transparent cons: slow deployments, chaotic rollbacks

2015: Wunderproxy

2015-03: Wunderproxy reverse proxy with API for container management config on S3 picked up in ASG Userdata deployment create docker image create new containers via API update reverse proxy config update and terminate old containers pros: faster deployments, simpler rollbacks cons: custom code, stuck with legacy docker version

2016: ECS vs. Kubernetes

PhraseApp goes Kubernetes 2016-03: begin of evaluation of ECS, then Kubernetes 2016-05: initial commit to kc 2016-06: internal growth app deployed with kc on kubernetes 2017-02: PhraseApp deployed with kubernetes

PhraseApp: Architecture monolithic Ruby on Rails application MySQL, ElasticSearch, Redis asynchronous Jobs cronjobs

Architecture PhraseApp Cloudfront dpl/worker-uploads dpl/worker-uploads dpl/worker-uploads ELB svc/nginx dpl/nginx dpl/nginx SQS dpl/worker-index dpl/worker-index dpl/worker-index svc/web dpl/web dpl/web dpl/web dpl/worker-default dpl/worker-default

kc (our) generic way for building and deploying applications on kubernetes

kc build Dockerfile or build script in repository build image in separate build pods automatic builds triggered by master changes build caching via dedicated build nodes support for all container registries (Google, ECR, etc.)

kc deploy allow updating multiple deployments at once wait for deployments to finish hooks multistage: kc prod deploy kc staging deploy

Hooks configure in.kc file executed with new image with current ENV in separate container pre-check with prompt abort on failure allow e.g. database migrations

Cronjobs triggered by jenkins (running in k8s cluster) kc run each job creates new container with current image and ENV jenkins task waits for jobs to finish (only one job at a time)

Staging running in the same cluster separate kc config separate ELBs (public and vpn), TCP only 2 x nginx ingress (public and vpn) TLS via kube-lego basic-auth proxy (because SEO)

Logging all important information in single nginx line rails App passes information via HTTP header fluented as DaemonSet on all nodes kinesis-firehose S3 SQS k8s ES kibana

deployment/nginx versioned ConfigMap custom nginx image ngx_headers_more

Benefits no more config management (chef, puppet, etc.) fully transparent infrastructure better resource utilization, bigger instances new services deployed in minutes easy to scale cluster up and down hardly any lock-in to specific hosting infrastructure spend more time on development, less time on ops

What s next? kops: advanced kubernetes cluster management on AWS extract first components from monolith via GRPC

Resources https://github.com/jetstack/kube-lego https://github.com/kubernetes/ingress/tree/master/contro llers/nginx https://github.com/kubernetes/kops https://prometheus.io/ http://www.fluentd.org/ http://www.grpc.io/

We are always looking for talent! @tobstarr tobias@phraseapp.com phraseapp.com