saltconf14 - ryan lane, wikimedia - immediate consistency with trebuchet deploy and saltstack

34
Immediate Consistency With Trebuchet Deploy

Upload: saltstack

Post on 11-May-2015

717 views

Category:

Technology


2 download

DESCRIPTION

Deployment is often omitted from configuration management and orchestration, which typically focuses on the infrastructure and not the core application that the infrastructure supports. This presentation will give an overview of a deployment system I wrote using SaltStack to provide immediately consistent deployment for software. The deployment system has the ability for manual deploys or for continuous deployments using a Heroku-like workflow. It has support for multiple deployment schemes, with a default of Git deployment. The deployment system uses a combination of Salt peer runner calls, runners, modules, returners, pillars and grains as well as a deployment host running Apache, Sartoris (a git-deploy frontend), and Redis (for reporting).

TRANSCRIPT

Page 1: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack

Immediate ConsistencyWith Trebuchet Deploy

Page 2: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack

Deployment is anignored problem

Page 3: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack
Page 4: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack

Sync

Common

All

Php

Page 5: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack

- Poor immediate consistency

Page 6: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack

- Poor reporting during deployment

Page 7: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack

- No reporting after deployment

Page 8: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack

- Difficult to modify and maintain

Page 9: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack

- Non-extensible

Page 10: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack

- No service orchestration

Page 11: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack

- Difficult to use

Page 12: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack

sync-commonsync-common-allsync-common-filesync-dblistsync-docrootsync-dirsync-filesync-wikiversionsscapapache-gracefulapache-graceful-allsync-apache

Page 13: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack

+ Has eventual consistency

Page 14: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack

+ Has fast transmission mechanism via tiered rsync

Page 15: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack

TrebuchetDeployment

System

Page 16: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack
Page 17: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack

+ Immediate consistency via deployment module

Page 18: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack

+ Eventual consistency via states

Page 19: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack

+ Reporting via returners

Page 20: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack

+ Easy modification and extension via modules and runners

Page 21: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack

+ Service orchestration via reactors, runners and modules

Page 22: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack

+ Targeting via grains or pillars

Page 23: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack

+ Configuration via pillars

Page 24: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack

deployment_config: parent_dir: /srv/deployment redis: db: 0 host: reporting.example.org port: 6379repo_config: test/testrepo: grain: testrepo upstream: https://gerrit.wikimedia.org/r/p/test fetch_module_calls: saltutil.refresh_pillars checkout_module_calls: testrepo.gen_css service_name: test-service

Page 25: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack

- Git is slow for large binaries

Page 26: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack

- No canary support yet

Page 27: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack

git deploy startgit deploy syncgit deploy abortgit deploy revertgit deploy service <action>git deploy reportgit deploy <extension>

TrebuchetTrigger

Page 28: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack
Page 29: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack
Page 30: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack
Page 31: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack

Mission

Enable the world to treat Wikimedia's infrastructure like any of

its projects: anyone can edit.

Page 32: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack
Page 33: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack

TrebuchetPaaS

Page 34: SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Deploy and SaltStack

Join us!

Ryan Lane

Lyft

[email protected]

trebuchet-deploy on GitHub

IRC (Freenode):

#trebuchet-deploy

Come to the puppet + salt

integration talk later today!