Practical continuous deployment

Similar documents
Zero-Touch Drupal Deployment

Git Branching for Continuous Delivery

Continuous Integration and Delivery at NSIDC

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

StriderCD Book. Release 1.4. Niall O Higgins

Using GitHub for Rally Apps (Mac Version)

Continuous Keylane

Ansible in Depth WHITEPAPER. ansible.com

Continuous Integration

Automate Your Deployment with Bamboo, Drush and Features DrupalCamp Scotland, 9 th 10 th May 2014

Simple and powerful site deployment with capistrano

Lessons from DevOps: Taking DevOps practices into your AppSec Life. Matt Tesauro

Using DevOps Tools to Achieve Continuous Integration

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

Of Pets and Cattle and Hearts

Beginners guide to continuous integration. Gilles QUERRET Riverside Software

Best Overall Use of Technology. Jaspersoft

How To Benefit From An Automated Deployment

Database Build and Release will get started soon

Continuous Integration In challenging environments w/ Ansible. PyCon5 Italy, Cesare Placanica

Getting Started with DevOps Automation

MANAGE AND DEPLOY YOUR SITES WITH DRUSH

A central continuous integration platform

Jenkins Continuous Build System. Jesse Bowes CSCI-5828 Spring 2012

Beginner s guide to continuous integration. Gilles QUERRET Riverside Software

Achieving Rolling Updates & Continuous Deployment with Zero Downtime

DRUPAL WEBSITE PLATFORM BUYER S GUIDE

Developer support in a federated Platform-as-a-Service environment

Software Continuous Integration & Delivery

Pro Puppet. Jeffrey McCune. James TurnbuII. Apress* m in

Continuous Integration using Docker & Jenkins

How To Manage Change In Jeepers

Tuskar UI Documentation

Fundamentals of Continuous Integration

Practicing Continuous Delivery using Hudson. Winston Prakash Oracle Corporation

DevOps. Building a Continuous Delivery Pipeline

You ll need to have: It d be great if you have:

Jenkins Slave Cloud with Apache Mesos. Klaus Azesberger Reinhard Kiesswetter Infonova GmbH

Plan, track, work smarter and faster

Continuous Delivery Workshop

Version Control with Git

CoDe:U Git Flow - a Continuous Delivery Approach

Software configuration management

When flexibility met simplicity: The friendship of OpenStack and Ansible

Continuous Integration: A case study

Agile Delivery Framework Automation & Deployment With Puppet

The Virtualization Practice

Whitepaper. Continuous Integration Tools Applying Best Practices to the Toolchain

How To Manage A Multi Site In Drupal

Why Engine Yard is better than Do it yourself

Putting It All Together. Vagrant Drush Version Control

Continuous Integration

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

An Introduction to Continuous Delivery

Improving your Drupal Development workflow with Continuous Integration

Building, testing and deploying mobile apps with Jenkins & friends

Continuous Delivery. Alejandro Ruiz

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

OpenShift Enterprise PaaS by Red Hat. Andrey Markelov RHCA Red Hat, Presales Solution Architect

We are Atlassian. Our focus: Collaboration products for software innovation

DO NOT DISTRIBUTE. Automating Applications with Continuous Delivery on AWS. Student Guide. Version 1.0

Version control with GIT

MOOSE-Based Application Development on GitLab

How to set up SQL Source Control. The short guide for evaluators

Implementing Continuous Integration and Cloud Server Infrastructure for an International Enterprise Based In Finland

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

Continuous Integration and Automatic Testing for the FLUKA release using Jenkins (and Docker)

SMZ. SocialMedia. Z olutions

Best Practices for Python in the Cloud: Lessons

Automating Big Data Benchmarking for Different Architectures with ALOJA

Continuous Delivery on AWS. Version 1.0 DO NOT DISTRIBUTE

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

Continuous Integration and Bamboo. Ryan Cutter CSCI Spring Semester

TestOps: Continuous Integration when infrastructure is the product. Barry Jaspan Senior Architect, Acquia Inc.

depl Documentation Release depl contributors

JUSTIN J. LITTLE Build and Release Engineer

Gabriel Iuga. London, United Kingdom Tel: ; Website:

Improving database development. Recommendations for solving development problems using Red Gate tools

WHITEPAPER. Improving database development

Brakeman and Jenkins: The Duo Detects Defects in Ruby on Rails Code

AVOIDING THE GIT OF DESPAIR

Configuration Management Evolution at CERN. Gavin

<Insert Picture Here> Introducing Hudson. Winston Prakash. Click to edit Master subtitle style

Mastering Continuous Integration with Jenkins

CLOUD DEVELOPMENT BEST PRACTICES & SUPPORT APPLICATIONS

Enterprise PaaS Evaluation Guide

Building a Continuous Integration Pipeline with Docker

Bridging Development and Operations: The Secret of Streamlining Release Management

Continuous Integration and Delivery. manage development build deploy / release

Transcription:

Practical continuous deployment

Who Am I? Steve Smith! An Atlassian for 8+ years! Original company sysadmin! Developer for last 5 years! Now working out of Amsterdam! Not a professional speaker

Who Am I? Steve Smith! An Atlassian for 8+ years! Original company sysadmin! Developer for last 5 years! Now working out of Amsterdam! Not a professional speaker

Who are you? Who s in the room? Devs, ops, mgmt?! Please ask questions (or share your experiences), I d like this to be a discussion, not a lecture.

What I ve been up to Spent 6 months converting our order systems to high-availability and continuous deployment.! Why so long? Because the concept is straightforward, but it s implications affect a lot of your organisation.

Deployment? Delivery? Continuous integration is continuous, automated build and test.! Continuous delivery is the next obvious step; be continuously release-ready.! Continuous deployment is the final step, the continuous delivery of software to production.

Deployment? Delivery? Constant QA is the common theme.! In practice there s a continuous spectrum of options, each organisation has different needs and constraints.! But if you trust your testing and process you can adopt the level appropriate for you.

Why Continuous deployment? We want to release features, not what ever happens to be done! Automation: Releasing is hard, automation makes it repeatable! Remove organisational bottlenecks to releases

Stakeholder benefits To customers: You ll get your requested feature faster!! To management: You ll get results faster and clearer progress.! To devs: No more death-marches, maddashes, clean-up after releases.! To admins: You know which change broke the system!

So how do you actually do it? Continuous deployment guides tend to focus on the high-level philosophy! But how do you actually get a feature from a customer request to your servers?

Development workflow Continuous deployment implies a clearer development process.! You need to know what is going out when you release, not a dump of the current state.! Hence release by feature

Step 1: Track your requests Each feature/update request should have a unique ID.! This allows tracking the state of a feature from request to deployment.! Bug-trackers are a good choice for this.

Step 2: Work on this feature in a branch Create a branch for just this feature! Name it after the feature request! Jira/Stash integration will do this! The branch will be merged when complete! You need a sane version control system! We use git, Mercurial is good too

Step 3: Automatically test the branch Run a continuous integration tool that will automatically run tests against the branch.! Features may not be merged until all tests are passing.! Stash has some features to support this.

Step 4: Code review No code may be merged to the release branch until reviewed by other members of the team.! Team members have a responsibility to ensure quality.

Step 4.1: Stash testing integration

Step 5: Merge and release Once all reviews and tests are passed them merge to release branch! At this point we have a separate Bamboo plan that performs a full release.

Step 6: Deploy to staging Allows testing of more advanced interactions and against production samples.! More testing can occur at this point, including testing by humans.

Step 7: Release to production Valid staging builds may be promoted up to production.

Segue: Continuous downtime? So if you re doing all these releases, what about uptime?! For public-facing service clustering/ha is important.! Ideally you should be able to automate cluster configuration as part of the deployment

Last mile

Practical issue How do you actually get releases onto your staging and production servers?! AKA the last-mile problem

Last mile - Puppet/Chef Puppet/Chef are not appropriate!.. if timing is critical!.. if cross-host coordination required

Last mile - DIY Roll your own! Bamboo SSH plugin + bash scripting! Number of existing automation solutions! func, capistrano, SaltStack, Ansible, mcollective, Fabric

Last mile - Direct Agent Bamboo (or other) agent per-node! SSH not required! Works for simple (single node) apps! Coordination is tricky

Last mile - Other Agents Agent-based frameworks! Powerful and flexible! Can parallelise deployments! Requires setup on all nodes! If you already have it setup then use it

Last mile SSH scripting! Requires management of SSH keys on agent! Bamboo SSH plugin! Scripting (Bash, Python, Ruby, etc.)! Automation frameworks (Ansible, SaltStack, Func, Fabric)

Last mile Our solution! Ansible for automation (explicit support for load-balancer integration)! Minimal requirements, SSH+Python! Bamboo pulls Ansible directly from their source repository! Ansible playbooks checked into git

Practical issue How do you manage what has been released, and to where?! How do you control who performs deployments?

Bamboo deployment environments The release build plan can be associated with certain environments! Normal ones are dev, staging (QA) and production

Bamboo deployment environments

Bamboo deployment environments Environment has tasks, like a build plan! Tasks perform the actual deployment! Environments have permissions, limiting who may perform deployments! Generates releases, which are deployed! Has some nice integrations

Bamboo deployment release

Bamboo deployment JIRA integration

Procedural issues Where s the oversight in all this?! What about SoX, PCI, SEC requirements?! Who is allowed to do releases?! Who signs off?

Procedural issues Our solution - separate the infrastructure! Dedicated Bamboo server for business software! Dedicated agents for building! Separate, dedicated agents for deployment

Procedural issues Access controls! Build team/admins control the server! Business analysts define features! Devs code, review, merge and release! Features pushed to staging for BA review! BAs can promote releases to production

Questions?

Steve Smith @tarkasteve ssmith@atlassian.com http://www.slideshare.net/tarkasteve/