Modern CI/CD and Asset Serving



Similar documents
Outline. 1. A bit about Bing 2. Velocity What does it mean? 4. Modern Engineering Principles 5. The inner and outer loop 6. Performance gating

JavaScript Applications for the Enterprise: From Empty Folders to Managed Deployments. George Bochenek Randy Jones

Building a Continuous Integration Pipeline with Docker

Drupal CMS for marketing sites

Git Branching for Continuous Delivery

Version Control! Scenarios, Working with Git!

Testing Rails. by Josh Steiner. thoughtbot

Jenkins World Tour 2015 Santa Clara, CA, September 2-3

SUCCESFUL TESTING THE CONTINUOUS DELIVERY PROCESS

Unity Version Control

Improving your Drupal Development workflow with Continuous Integration

Scalable Web Programming. CS193S - Jan Jannink - 1/12/10

Zero-Touch Drupal Deployment

MarkLogic Server. Reference Application Architecture Guide. MarkLogic 8 February, Copyright 2015 MarkLogic Corporation. All rights reserved.

SUCCESFUL TESTING THE CONTINUOUS DELIVERY PROCESS

Lean Software Development

Paul Barham Program Manager - Java. David Staheli (dastahel@microsoft.com) Software Development Manager - Java

CI Pipeline with Docker

Version Control Your Jenkins Jobs with Jenkins Job Builder

Delivery. Continuous. Jez Humble and David Farley. AAddison-Wesley. Upper Saddle River, NJ Boston Indianapolis San Francisco

A Sumo Logic White Paper. Harnessing Continuous Intelligence to Enable the Modern DevOps Team

Web UI & Functional Test Automation for Continuous Agile Deliveries

Agile Software Factory: Bringing the reliability of a manufacturing line to software development

OpenShift. OpenShift platform features. Benefits Document. openshift. Feature Benefit OpenShift. Enterprise

Surviving the Big Rewrite: Moving YELLOWPAGES.COM to Rails. John Straw YELLOWPAGES.COM

Continuous Integration

Fundamentals of Continuous Integration

Making HR Simpler. A Guide to HR Software in the Cloud

StriderCD Book. Release 1.4. Niall O Higgins

Test Automation: A Project Management Perspective

Continuous Delivery for Alfresco Solutions. Satisfied customers and happy developers with!! Continuous Delivery!

Content Delivery Network. Version 0.95

How To Manage Change In Jeepers

Introducing Xcode Source Control

Continuous Integration: A case study

CPSC 491. Today: Source code control. Source Code (Version) Control. Exercise: g., no git, subversion, cvs, etc.)

Installation, Configuration, and Usage

Ensure Merge Accuracy in Continuous Integration Development Environments

Continuous Integration

An Introduction to Continuous Delivery

IBM Digital Experience. Using Modern Web Development Tools and Technology with IBM Digital Experience

Using Microsoft Azure for Students

Continuous delivery Release software on-demand, not on Red Alert

Continuous Delivery: Automating the Deployment Pipeline. Solution Brief

Understanding Infrastructure as Code. By Michael Wittig and Andreas Wittig

Solution Spotlight KEY OPPORTUNITIES AND PITFALLS ON THE ROAD TO CONTINUOUS DELIVERY

The Role of Feedback in Continuous Integration, Continuous Delivery and Agile ALM

Translation Proxy A New Option for Managing Multilingual Websites

WHITE PAPER Redefining Monitoring for Today s Modern IT Infrastructures

CoDe:U Git Flow - a Continuous Delivery Approach

ALM2013VS_ACC: Application Lifecycle Management Using Visual Studio 2013

DevOps. Building a Continuous Delivery Pipeline

ACCELERATE DEVOPS USING OPENSHIFT PAAS

Deploying Governed Data Discovery to Centralized and Decentralized Teams. Why Tableau and QlikView fall short

Request Routing, Load-Balancing and Fault- Tolerance Solution - MediaDNS

Creating Value through Innovation MAGENTO 1.X TO MAGENTO 2.0 MIGRATION

DevOoops Increase awareness around DevOps infra security. Gianluca

Continuous Delivery and Test Automation in Agile SW projects with Robot Framework Antti Pohjonen

Introduction to Git. Markus Kötter Notes. Leinelab Workshop July 28, 2015

Source Code Management for Continuous Integration and Deployment. Version 1.0 DO NOT DISTRIBUTE

Outlook Profile Setup Guide Exchange 2010 Quick Start and Detailed Instructions

How To Set Up Wiremock In Anhtml.Com On A Testnet On A Linux Server On A Microsoft Powerbook 2.5 (Powerbook) On A Powerbook 1.5 On A Macbook 2 (Powerbooks)

Application Lifecycle Management Using Visual Studio 2013 (SCRUM)

Continuous Integration Comes to China.

Pipeline Orchestration for Test Automation using Extended Buildbot Architecture

Configuring CQ Security

Putting a Red Nose on the Cloud

Automation and Virtualization, the pillars of Continuous Testing

Enabling Continuous Delivery for Java Projects with Oracle Cloud Services (Oracle PaaS) Siva Rama Krishna Oracle India

Web application Architecture

Continuous Delivery. Martin Fowler, Jez Humble YOW! Brisbane, 5 December Wednesday, December 7, 11

10 kanban boards and their context

Continuous Integration and Delivery. manage development build deploy / release

Continuous Integration & Automated Testing in a multisite.net/cloud Project

DevOps. Josh Preston Solutions Architect Stardate

IBM WebSphere Application Server Communications Enabled Applications Setup guide

A BASELINE FOR WEB PERFORMANCE WITH PHANTOMJS

MOOSE-Based Application Development on GitLab

From Traditional Functional Testing to Enabling Continuous Quality in Mobile App Development

GitLab as an Alternative Development Platform for Github.com

SOFTWARE DEVELOPMENT. Notes for Startup Founders. March 25 th, 2015

Velocity and Volume (or Speed Wins)

SAMSUNG SMARTTV: HOW-TO TO CREATING INSECURE DEVICE IN TODAY S WORLD. Sergey Belov

Firenze. Iottly, open source Internet of Things distribution

Dashboard Skin Tutorial. For ETS2 HTML5 Mobile Dashboard v3.0.2

Transcription:

Modern CI/CD and Asset Serving Mike North 10/20/2015

About.me Job.new = CTO Job.old = UI Architect for Yahoo Ads & Data Organizer, Modern Web UI Ember.js, Ember-cli, Ember-data contributor OSS Enthusiast

Agenda Manual Integration Manual Releases Modern Asset Serving Continuous Integration Continuous Deployment

Integration (working together)

Integration MASTER FEATURE BRANCHES

Integration Hell Merge Conflicts Duplicate Work Difficult to automate Detect problems late Lack of visibility

Continuous Integration (CI) Technology + People Stay close to master Tests are automatically run on each small change Alert team when tests fail! Team keeps the pipeline healthy

Continuous Integration (CI) Staying close to master Hide (and merge) incomplete features It s ok to stub things out in the beginning Modular design practices Bottom up Top down and stub

Continuous Integration (CI) Test each change - Push vs PR build PULL REQUEST PUSH BUILD PR BUILD FEATURE BRANCH HEAD MASTER

Continuous Integration (CI) Test each change - Green Light?? Never Tested later

Continuous Integration (CI) Good team practices Pipeline breaks? Treat like a critical bug Don t pile on top of a break Assume things will fail Write tests that give you release confidence

Continuous Integration (CI) Keep the pipeline fast Trunk Staging Production 60m 10m 60m to fix

Continuous Integration (CI) Keep the pipeline fast Trunk Staging Production 10m 60m 10m to fix

Continuous Integration (CI) Keep the pipeline fast Selenium is slow JS tests (QUnit, Mocha) are fast Useless tests === tech debt Hitting a real API in your UI s CI pipeline should be kept at a minimum

Mocking an API Pretender.js Hijacks the XMLHttpRequest object Responds to requests with pre-defined fixtures Allows for passthrough on defined URLs Throws errors whenever unexpected requests are sent

Pretender github.com/ pretenderjs/ pretender Setup Server Define JSON Fixture XHR

Deployment (the shipping it part)

Releases Manual releases are painful, expensive demoralizing and risky Human testing scales terribly

Continuous Deployment (CD) Code goes from master to production, w/o human intervention required Heavy emphasis on automated testing Release early and often!

Continuous Deployment (CD) Good team practices Flow to production only when you want Report released changes back to the team Master === Production App versioning (SHA?)

Continuous Deployment (CD) Canary Environment 10% 90% Trunk Staging Production (Canary) Production (GA) Unit, Functional, Integration Tests Prod Verification Tests 24h Wait

Continuous Deployment (CD) Benefits Increased reliability, visibility, velocity, flexibility, focus, agility Reduced pressure to prematurely ship Deliver incremental value to users, early Consistency

Continuous Deployment (CD) for single-page apps index.html app.js vendor.js REDIS mystyle.css CDN

Asset Serving (the delivering it part)

Asset Serving Often overlooked, but important part of SPA development What do we want? Fast initial page load Maintenance page, API is down page, etc Notify users of new version available Canary environment

Asset Serving Fast initial page load S3 is not a CDN - Latency matters! CSS, JS, Images should be cached, index.html should not index.html app-1ab41cd781.js vendor-ab818d2175.js mystyle-b41cd1a832.css

Asset Serving for single-page apps *.{js, css, png, etc } index.html Server REDIS

Asset Serving Canary Environment - Multi tenancy Canary and GA environment are separate versions index.html index.html app-1ab41cd781.js vendor-ab818d2175.js app-cbab412.js vendor-abcd1d12.js mystyle-b41cd1a832.css mystyle-b41cd1a832.css

Asset Serving Canary Environment - Multi tenancy There s a version for each git SHA Via query param, you can ask for a version myapp:a1b231c myapp:d1241b myapp:abc11db http://myapp.com?key=bc147ba

Asset Serving Canary Environment - Multi tenancy There s a version for each git SHA Via query param, you can ask for a version There are also some named versions, that refer to other versions myapp:current myapp:a1b231c myapp:d1241b myapp:canary myapp:abc11db myapp:a1b231c myapp:d1241b

Asset Serving Canary Environment - Multi tenancy host & paths app myapp:current myapp:a1b231c localhost:3000/* myapp:current myapp:a1b231c lvh.me/* myapp:current myapp:d1241b canary.lvh.me/* myapp:canary myapp:canary myapp:d1241b myapp:abc11db Add a URL-to-App table to the mix

Asset Serving Maintenance Mode host & paths app myapp:current maintenance:current localhost:3000/* myapp:current myapp:a1b231c lvh.me myapp:current myapp:d1241b canary.lvh.me myapp:canary myapp:canary myapp:d1241b myapp:abc11db maintenance:1dbabc1 maintenance:current maintenance:1dbabc1

Asset Serving Making a PR Build available PULL REQUEST myapp:current maintenance:current PUSH BUILD PR BUILD myapp:a1b231c myapp:d1241b myapp:canary myapp:d1241b HEAD myapp:abc11db FEATURE BRANCH maintenance:1dbabc1 maintenance:current maintenance:1dbabc1 MASTER myapp:bc147ba http://myapp.com?key=bc147ba

A new version is here! Click below to start using it! http://myapp.com?key=bc147ba Asset Serving Notifying existing clients about deploys myapp:current maintenance:current myapp:a1b231c myapp:d1241b myapp:canary myapp:d1241b WebSocket myapp:abc11db maintenance:1dbabc1 maintenance:current maintenance:1dbabc1 myapp:bc147ba Pub/Sub Slack, Github, etc

It s coming https://github.com/mike-north/banker

TL;DR Manual testing and releasing can be awful at scale CI/CD is an investment worth making Don t treat your SPA like an API Your asset serving layer can boost productivity! Check out mike-north/banker soon for a turnkey implementation!