70
Using Rancher for highly available deployment services with GoCD and TeamCity Matthew Skelton, Skelton Thatcher Consulting @matthewpskelton / skeltonthatcher.com Amsterdam Continuous Delivery meetup group 08 February 2017, Amsterdam, NL

Using Rancher for highly available deployment services with GoCD and TeamCity

Embed Size (px)

Citation preview

Page 1: Using Rancher for highly available deployment services with GoCD and TeamCity

Using Rancher for highly available deployment services

with GoCD and TeamCityMatthew Skelton, Skelton Thatcher Consulting

@matthewpskelton / skeltonthatcher.com

Amsterdam Continuous Delivery meetup group08 February 2017, Amsterdam, NL

Page 2: Using Rancher for highly available deployment services with GoCD and TeamCity

Rancher + GoCD + TeamCity == 😍

Page 3: Using Rancher for highly available deployment services with GoCD and TeamCity

Today'Deployment Services'

Deployment orchestration with GoCDIntroduction to Rancher

Rancher: platform for deployment servicesLive Demo!

Page 4: Using Rancher for highly available deployment services with GoCD and TeamCity

Team-first digital transformation30+ organisations

UK, EU, India, Chinaskeltonthatcher.com

Page 5: Using Rancher for highly available deployment services with GoCD and TeamCity
Page 6: Using Rancher for highly available deployment services with GoCD and TeamCity

Build & Release EngineeringInfrastructure AutomationOrganisational 'Medicine'Training and Mentoring

Page 7: Using Rancher for highly available deployment services with GoCD and TeamCity

We're partners with…

Page 8: Using Rancher for highly available deployment services with GoCD and TeamCity

DevOpsTopologies.com

Page 9: Using Rancher for highly available deployment services with GoCD and TeamCity

About meMatthew Skelton

@matthewpskelton

Co-founder at Skelton Thatcher Consulting

skeltonthatcher.com

Page 10: Using Rancher for highly available deployment services with GoCD and TeamCity
Page 11: Using Rancher for highly available deployment services with GoCD and TeamCity

Using Rancher for highly available deployment

services with GoCD and TeamCity

Page 12: Using Rancher for highly available deployment services with GoCD and TeamCity

Safer, more rapid changes to software systems

(Business Agility)

Page 13: Using Rancher for highly available deployment services with GoCD and TeamCity

Deployment services as first-class, core capabilities for modern software teams

Page 14: Using Rancher for highly available deployment services with GoCD and TeamCity

use logging as a channel/vector to

make distributed systems more testable

Invest in Build & Release Engineering

Page 15: Using Rancher for highly available deployment services with GoCD and TeamCity

'Deployment Services'

Page 16: Using Rancher for highly available deployment services with GoCD and TeamCity

Minimum capabilities•Version Control•Build & Unit Test •Packaging / artefact management•Deployment & test orchestration•Logging / metrics / dashboard

Page 17: Using Rancher for highly available deployment services with GoCD and TeamCity

Minimum capabilities•Version Control•Build & Unit Test •Packaging / artefact mgt•Deployment & test orchestration•Logging / metrics / dashboard

Page 18: Using Rancher for highly available deployment services with GoCD and TeamCity
Page 19: Using Rancher for highly available deployment services with GoCD and TeamCity
Page 20: Using Rancher for highly available deployment services with GoCD and TeamCity
Page 21: Using Rancher for highly available deployment services with GoCD and TeamCity

2017: build & deployment tooling is core/critical

infrastructure – it's the only mechanism we use to make

changes to Production systems

Page 22: Using Rancher for highly available deployment services with GoCD and TeamCity

DZone 2017 Guide to DevOps & Continuous Deliveryhttps://dzone.com/guides/devops-continuous-delivery-and-automation

Page 23: Using Rancher for highly available deployment services with GoCD and TeamCity

Article: CD Anti-Patterns1. "One-stop shop" tools 2. Hidden logging / errors3. Environment-driven4. Blurred terminology

Authors: Manuel Pais & Matthew Skelton

Page 24: Using Rancher for highly available deployment services with GoCD and TeamCity

TSK, TSK.BAD TOOLS!!!

Page 25: Using Rancher for highly available deployment services with GoCD and TeamCity

One-stop-shop tools

Page 26: Using Rancher for highly available deployment services with GoCD and TeamCity

Compose tooling w/ APIs

Page 27: Using Rancher for highly available deployment services with GoCD and TeamCity

Logging exposed

Page 28: Using Rancher for highly available deployment services with GoCD and TeamCity

Logging exposed

Page 29: Using Rancher for highly available deployment services with GoCD and TeamCity

Environment-driven

Page 30: Using Rancher for highly available deployment services with GoCD and TeamCity

Activity-driven

Page 31: Using Rancher for highly available deployment services with GoCD and TeamCity

'Partially successful'

Page 32: Using Rancher for highly available deployment services with GoCD and TeamCity

Deployment Orchestration with GoCD

Page 33: Using Rancher for highly available deployment services with GoCD and TeamCity
Page 34: Using Rancher for highly available deployment services with GoCD and TeamCity

My experience•Using GoCD since 2011•(Used CruiseControl 2006-2011)•100s of pipelines•~200 build agents•😍

Page 35: Using Rancher for highly available deployment services with GoCD and TeamCity

However…•GoCD is powerful•With great power comesresponsibility some trickiness•Forces you to really understand your build & deployments 👍

Page 36: Using Rancher for highly available deployment services with GoCD and TeamCity
Page 37: Using Rancher for highly available deployment services with GoCD and TeamCity
Page 38: Using Rancher for highly available deployment services with GoCD and TeamCity

Server + Agent model

Server

Build Agents Test Agents

Deployment Agents

Staging

Production

Page 39: Using Rancher for highly available deployment services with GoCD and TeamCity

Value stream map

http://jeremie-martinez.com/2016/04/19/gocd-android/

Page 40: Using Rancher for highly available deployment services with GoCD and TeamCity

Model the current activities

'Walking Skeleton' deployment pipeline

Helps to transform ways of working

Page 41: Using Rancher for highly available deployment services with GoCD and TeamCity

Model the current activities

Page 42: Using Rancher for highly available deployment services with GoCD and TeamCity

Model activities, not envs

Page 43: Using Rancher for highly available deployment services with GoCD and TeamCity

Secure deployments

Use sensible security boundaries

Page 44: Using Rancher for highly available deployment services with GoCD and TeamCity

GoCD encourages good practices and approaches for Continuous Delivery

Page 45: Using Rancher for highly available deployment services with GoCD and TeamCity

Introduction to Rancher

Page 46: Using Rancher for highly available deployment services with GoCD and TeamCity

"A Complete Platform for Running Containers"

Page 47: Using Rancher for highly available deployment services with GoCD and TeamCity

Managing container clusters is tricky

Rancher simplifies the container 'fabric' lifecycle

Page 48: Using Rancher for highly available deployment services with GoCD and TeamCity
Page 49: Using Rancher for highly available deployment services with GoCD and TeamCity
Page 50: Using Rancher for highly available deployment services with GoCD and TeamCity

Rancher Catalog

Page 51: Using Rancher for highly available deployment services with GoCD and TeamCity

Custom Catalog !!!

Page 52: Using Rancher for highly available deployment services with GoCD and TeamCity

Rancher as a platform forhighly-available

deployment services

Page 53: Using Rancher for highly available deployment services with GoCD and TeamCity

Goal: highly-available tools•Survive host failures•Auto-failover to healthy hosts•Auto-scale-out under load•Multi-zone availability

Page 54: Using Rancher for highly available deployment services with GoCD and TeamCity

Bad old deployment services

•Single VM•Manual installation•Occasional backups (not tested)•Sitting under a desk (aka randomAWS subscription)

Page 55: Using Rancher for highly available deployment services with GoCD and TeamCity

Modern deployment services

•Either SaaSor•Containerised•Built and managed as code•Recreateable in minutes

Page 56: Using Rancher for highly available deployment services with GoCD and TeamCity

Platform for HA deployment services

Rancher + Terraform + AWS

Page 57: Using Rancher for highly available deployment services with GoCD and TeamCity

Blog post series'Container Clustering with Rancher'https://skeltonthatcher.com/blog/

Page 58: Using Rancher for highly available deployment services with GoCD and TeamCity

HA at the Rancher level

Page 59: Using Rancher for highly available deployment services with GoCD and TeamCity

HA at the EFS level

Page 60: Using Rancher for highly available deployment services with GoCD and TeamCity

HA at the GoCD level (1x AZ)

Page 61: Using Rancher for highly available deployment services with GoCD and TeamCity

HA at the GoCD level (2x AZ)

Page 62: Using Rancher for highly available deployment services with GoCD and TeamCity

Rancher enables highly-available build &

deployment services using best-of-breed tools like

GoCD

Page 63: Using Rancher for highly available deployment services with GoCD and TeamCity

Live Demo!

Page 64: Using Rancher for highly available deployment services with GoCD and TeamCity

Demo•Create HA Rancher platform with Terraform

'cdams36'

Page 65: Using Rancher for highly available deployment services with GoCD and TeamCity

Demo•Spin up new GoCD agents via Rancher 'scale' setting

Page 66: Using Rancher for highly available deployment services with GoCD and TeamCity

Demo•Flexibility and power of GoCD 'value stream map' view

Page 67: Using Rancher for highly available deployment services with GoCD and TeamCity

Further material

Page 68: Using Rancher for highly available deployment services with GoCD and TeamCity

Links• GoCD: https://www.gocd.io/• Rancher: http://rancher.com/• Continuous Delivery with Windows & .NET by Matthew Skelton & Chris O'Dell

(O'Reilly, 2016): http://cdwithwindows.net/ (free download)• Blog post series on High-Availability Rancher:

https://skeltonthatcher.com/blog/container-clustering-rancher-server-part-3-aws-efs-mounts-using-rancher-nfs/

• DZone 2017 guide to Continuous Delivery: https://dzone.com/guides/devops-continuous-delivery-and-automation

Page 69: Using Rancher for highly available deployment services with GoCD and TeamCity

ContainerisedBuilt and managed as code

Recreateable in minutes

Using Rancher for highly available deployment services

with GoCD and TeamCity

Page 70: Using Rancher for highly available deployment services with GoCD and TeamCity

thank you

Matthew Skelton & Rich Bosomworth@matthewpskelton & @richbos

skeltonthatcher.com