Transcript

11

Romain Felden & Farhdine Boutzakhti @herrFelden & @farhdine

DevOps : Mission [im]possible ?

22

Notre mission : Démystifier l’approche et

la rendre accessible !

33

Pourquoi DevOps ?

44

Presque 50% temps total des activités des équipes d’exploitation est consacré au déploiement :

  Gestion du déploiement

  Gestion des incidents (liés en grande partie au déploiement)

ACTIVITÉS DES ÉQUIPES OPS

Source : Etude de Deepak Patil (Microsoft Global Foundation Services) de 2006, via une présentation de James Hamilton (Amazon Web Services)

http://mvdirona.com/jrh/TalksAndPapers/JamesHamilton_POA20090226.pdf

55

A LA MAIN ?

66

Jusqu’à quel point l’infrastructure est automatisée ?

AUTOMATISATION DE L’INFRASTRUCTURE

Chiffres issus d’un sondage de 690 « Ops » par RebelLabs / ZeroTurnAround (société éditrice de jRebel et LiveRebel) fait en 2013

19All rights reserved. 2013 © ZeroTurnaround OÜ

InfrasTrucTure as cODeany organization that is serious about adopting DevOps as a culture looks to control infrastructure programmatically by treating it as code. There are FOHDU�EHQHȴWV�WR�WKLV��\RXU�LQIUDVWUXFWXUH�LV�XSGDWHG�DQG�FKHFNHG�LQ�ZLWK�each new release, and this frees up time from carrying out fairly repetitive DQG�RFFDVLRQDOO\�HUURU�SURQH�� PDQXDO��FRQȴJXUDWLRQ�WDVNV��3OXV��LW�increases the agility of your team as a whole through automation.

Based on our survey, 61% of respondents have less than 10% of their infrastructure as code. Only 10% of them have more than 90% of their infrastructure as code, and those are the early adopters that manage their ZKROH�LQIUDVWUXFWXUH�ZLWK�SURYLVLRQLQJ�WRROV��:H�GLG�QRW�RHU�D����RSWLRQ�for this survey.

:H�DOVR�DVNHG�DERXW�LQIUDVWUXFWXUH�FRQȴJXUDWLRQ�WRROV��DQG�UDQNHG�WKHP�LQ�terms of popularity. puppet and chef are clearly the tools of choice when it comes to provisioning infrastructure as code, and there is a minority segment being battled over by Bash, cFengine, ansible and Fabric.

This isn’t anything to rush in to, and managing all your infrastructure as code is not something that is achievable overnight. It is a gradual process ZKHUH�\RX�ZRUN�WRZDUGV�IXOO\�DXWRPDWLQJ�WKH�SURFHVV�RI�FRQȴJXULQJ�\RXU�infrastructure.

HOw mucH Of yOur InfrasTrucTureDO yOu cOnfIgure wITH cODe?

Less THan 10% 61%

10%-25% 5%

51%-75% 8%

76%-90% 6%

mOre THan 90% 10%

26%-50% 10%

pOpuLar InfrasTrucTure cOnfIguraTIOn TOOLs

puppeT 40%

cHef 31%

cfengIne 4%

ansIbLe 3%

fabrIc 3%

basH 6%

77

ETENDRE L’AGILITÉ À LA PRODUCTION

DEVOPS Code

Bui

ld

Test

Deploy

Ope

rate

Monitor

Dev Ops

Développement Agile Déploiement / production Agile

88

3. Culture de la Collaboration

Dev Ops

2. Continuous Delivery

1. Infrastructure-as-code

AGENDA

99

Infrastructure-as-code

Continuous Delivery

Infrastructure-as-code

Culture de la Collaboration

1010

Infrastructure=

Code

1111

Source : http://code.google.com/p/devops-toolchain/wiki/ToolChainsAndUseCases

PROVISIONING ET DÉPLOIEMENTS AUTOMATISÉS

  Déploiement applicatif  Déploie, configure et connecte les ressources

  Configuration système  Configure les ressources de façon homogène

  Infrastructure agile  Virtualisation  Environnements complets en self-service

1212

L’art de builder et de versionner son SI !

Que contient un SI industrialisé ?

Des outils de gestion des vms Des images d'OS Des packages OS Des configurations système Des middlewares Des scripts d’installation/mise à jour de middlewares Des configurations middleware Des applications Des scripts de déploiement des applications

P’TIT REX

1313

La stack technique :

P’TIT REX

OS

Middleware

Machine Physique

Configuration applicative technique

Chef

Manuel

Par

tie a

pplic

ativ

e P

artie

tech

niqu

e

Configuration Middleware

Configuration Système

Machine Virtuelle

Application

PXE ou Clone de VM

Capistrano OpenStack

1414

P’TIT REX

Une version du SI :

1515

Jenkins

EXEMPLE D’AUTOMATISATION DU PROVISIONNING EXEMPLE AVEC CAPISTRANO ET CHEF

Git Nexus

Capistrano

Node

Chef

Hyperviseur

API hyperviseur Node

Chef

Node Chef

Dép. app.

2

1

1

3

•  Capistrano demande VM à l’hyperviseur •  Installation OS par PXE ou clone

2 •  Création & mise à disposition VMs •  SSH ouvert, IP temporaire

3•  Scripts de démarrage (maison, cloud-init…) •  Personnalisation VM, IP, Reseau etc •  Installation Chef

4

4

4•  Capistrano lance Chef sur Node •  Chef récupère les cookbooks via Git •  Installation packages et configurations

5

5

5•  Capistrano lance déploiement •  Exécute sur machine téléchargement livrable •  Déploie livrable

•  Administrateur lance job 0

1616

ContinuousDelivery

Continuous Delivery

Infrastructure-as-code

Culture de la Collaboration

1717

APPRENDRE VITE DU TERRAIN

1818

Change

Temps

Beaucoup de code =

Risques importants

1919

“IF IT HURTS, DO IT MORE OFTEN !”

Change

Temps

Petit changement =

Risques maîtrisés

2020

CONSTRUCTION ET LIVRAISON CONTINUE

John  Allspaw,  Etsy  h0p://www.slideshare.net/jallspaw/ops-­‐metametrics-­‐the-­‐currency-­‐you-­‐pay-­‐for-­‐change  

2121

Réduire le TTR

2222

Réduire le TTM

2323

CONTINUOUS…

Déployé sur un environnement

d’intégration

Livré à l’équipe suivante (QA,

MEP …) Déployé en production

CONTINUOUS INTEGRATION CONTINUOUS DELIVERY CONTINUOUS DEPLOYMENT

2424

INTÉGRATION CONTINUE

2525

SÉPAREZ LE BLANC DES JAUNES !

2626

Facebook : > 2 déploiements par jour

Flickr : > 10 déploiements par jour

Etsy : > 25 déploiements par jour

Amazon : 1 déploiement toutes les 10 secondes sur 10000 machines

CHEZ LES GÉANTS DU WEB

2727

ZERO DOWNTIME DEPLOYMENT

Le  Zero-­‐downAme  Deployment  (ZDD)  permet  de  déployer  une  nouvelle  version  d’un  système  

sans  interrompre  le  bon  foncAonnement  du  service.  

2828

Blue/Green Deployment   Pattern standard de ZDD   Une chaîne complète de l’infrastructure est dédiée à la version N+1

Pattern associé : Canary Release   Permet de confronter la version N+1 à une population restreinte d’utilisateurs   Les mécanismes sont identiques au Blue/Green Deployment

PATTERNS DE DÉPLOIEMENT

Version  N  du  système   Version  N+1  du  système  

Load  Balancer  

Serveurs  Web  

Serveurs  Applica>on  

Serveurs  Données  

Load

 Balan

cer  

N+1

N

2929

FEATURE FLIPPING

http://code.flickr.net/2009/12/02/flipping-out/

if ($cfg.enable_unicorn_polo) { // do something new and amazing here. } else { // do the current boring stuff. }

3030

Contexte Quotidien national Développement interne agile (Scrum)

Objectif   Minimiser l’impact des mises en production sur

l’exploitation Améliorer le TTM des nouvelles fonctionnalités

Stratégie Livrer souvent Mesurer

Solutions Chaîne de livraison continue

  Monitoring / feedback loop

Le nombre de mises en production passe à environ 10 par jour

P’TIT REX

3131

Culture de laCollaboration

Continuous Delivery

Infrastructure-as-code

Culture de la Collaboration

3232

Culture  du  Produit  (logiciel)   Culture  du  Service    (archivage,  supervision,  etc.)  

Cherche  à  délivrer   Cherche  à  fiabiliser  

LE MUR DE LA CONFUSION

Dev OpsGaranAr  le  Run  des  applicaAons  

(stabilité)  Livrer  de  nouvelles  

fonc>onnalités  (de  qualité)  

Objec>fs  locaux   Objec>fs  locaux  

3333

3434

ALLEZ PRENDRE UN CAFÉ !

3535

AIDE TON PROCHAIN !

3636

MODÈLE 1 : UNE ORGANISATION ORIENTÉE PROJET…

3737

MODÈLE 1 : LA PATATE CHAUDE

3838

MODÈLE 2 : UNE ORGANISATION HYBRIDE…

Agile

Agile

Agile

Exploitation +

Infrastructure

DEV +

TMA

3939

YOU BUILD IT, YOU RUN IT! WERNER VOGELS

CTO @AMAZON

4040

MODÈLE 3 : UNE ORGANISATION ORIENTÉE PRODUIT !

4141

PRÊTE TES JOUETS !

4242

#1. Culture de la collaboration

INTÉRESSER LES « DEV » AUX

PROBLÈMES DES « OPS »…

CA VEUT DIRE ÇA!

4343

CULTURE DE LA MESURE

4444

SUPERVISION

Transactions Métier

€ Mbps

Charge machine

Clients déclarés

Clients connectés

4545

Faire participer les Ops aux rituels

Partager avec les Ops dans un objectif d’amélioration continue

Des Devs qui participent aux mises en production

Post Mortem

Des Devs qui s’approprient les mesures / métriques

P’TIT REX

4646

4747

Take Away

Continuous Delivery

Infrastructure-as-code

Infrastructure-as-code

4848

POURQUOI DEVOPS ?

Fiabiliser les déploiements&

Réduire le TTM/TTR

4949

UNE DÉMARCHE PROGRESSIVE

5050

Romain Felden Farhdine Boutzakhti

@farhdine @herrFelden

meetup.com/devopsch

5151

Merci


Top Related