Top Banner
#GlobalAzure #ViseoSpirit DevOps pour une solution PHP robuste en PROD : Azure et Zend Server Cédric DERUE, ALTRAN Vincent THAVONEKHAM, VISEO
35

Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

Jul 24, 2015

Download

Technology

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

#GlobalAzure #ViseoSpirit

DevOps pour une solution PHP robuste en PROD : Azure et Zend ServerCédric DERUE, ALTRANVincent THAVONEKHAM, VISEO

Page 2: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

Microsoft Azure #GlobalAzure #ViseoSpirit

GAB 2015 LYON ORAGANIZER

LOCAL SPONSORS

THANK YOU ALL !!

WORLDWIDE SPONSORS

#GlobalAzure #ViseoSpirit

Page 3: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

Microsoft Azure #GlobalAzure #ViseoSpirit

BIO – Vincent THAVONEKHAM

3

SpeakerPracticeManager(VISEO)

Coach,Trainer

Consultant

www.thavo.com @vThavo

2013: Microsoft vTSP Azure2014: Microsoft p-Seller Azure2015: Microsoft p-Seller Azure2015: Microsoft p-Seller ALM TFS

ITIL v3PRINCE2ScrumMaster

Page 4: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

Microsoft Azure #GlobalAzure #ViseoSpirit

BIO - Cédric DERUE

4

SpeakerPhD

Senior Consultant

TrainerPublished

AuthorZend

Evangelist

Page 5: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

Microsoft Azure #GlobalAzure #ViseoSpirit

• Qui connait déjà le DevOps?• Qui le pratique (ou pense le faire) ?

QUESTION AUDIENCE

Page 7: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

Microsoft Azure #GlobalAzure #ViseoSpirit

• Enjeux du DevOps• Etude de cas – Startup

SOMMAIRE

Page 8: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

Microsoft Azure #GlobalAzure #ViseoSpirit

#GlobalAzure #ViseoSpirit

ENJEUX DU DEVOPS

Pourquoi réaliser sa transition vers le DevOps ?

Page 9: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

Microsoft Azure #GlobalAzure #ViseoSpirit

• « Entre le moment où on veut livrer et la livraison, il s’écoule 1 mois! »

• « Mes Dév font la livraison en Prod, car la Prod ne sait pas le faire… »

• « L’Exploitation trouve que mes Dév font n’importe quoi en Prod »

• Etc…

Problématique adressée par le DevOps

Directeur des Etudes… pas content !

Page 10: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

Microsoft Azure #GlobalAzure #ViseoSpirit 10

Page 11: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

Microsoft Azure #GlobalAzure #ViseoSpirit

Cycle de vie d’une applicationAB

C

C’

G

D

E

F

« Wall of confusion » 

A. Responsables fonctionnelsB. Chef de ProjetsC. Développeurs (C:Dév et C’:livraison)D. L’Equipe de RecetteE. L’ExploitationF. Le Support TechniqueG. La TMA (Tierce Maintenance

Applicative)

ENJEUX DU DEVOPS:- MINIMISER CE MUR- FACILITER LA COMMUNICATION ENTRE TOUS LES ACTEURS- Faire EMERGER l’objectif COMMUN final !

Page 12: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

Microsoft Azure #GlobalAzure #ViseoSpirit 12

• Transition vers le DevOps,• Travailler sur 3 axes

« People-Process-Tools »– P: Communication !– P: Rôles et responsabilités claires– T: Automatiser!

Facile le DevOps ? Comment faire ?

Page 13: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

Microsoft Azure #GlobalAzure #ViseoSpirit

Comment travailler sur les 3 axes

13

TOOL TOOL

Page 14: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

Microsoft Azure #GlobalAzure #ViseoSpirit

• « Mais c’est simple, on communique déjà tous les jours ! »

• « Facile à dire, mais comment faire ? »

• « Votre truc là, ça ne marche que sur des petits projets! »

• Etc…

ZOOM sur la partie communication

14

Directeur des Etudes

Page 15: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

Microsoft Azure #GlobalAzure #ViseoSpirit 15

• Des frameworks & patterns existent– Spécifications réellement partagées par tous les

acteurs– Approche YAGNI– Etc…

ZOOM sur la partie communication

Page 16: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

Microsoft Azure #GlobalAzure #ViseoSpirit 16

• Traverser plus rapidement les couches

ZOOM sur les Rôles et responsabilités

Page 17: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

Microsoft Azure #GlobalAzure #ViseoSpirit 17

• Etude de cas!

ZOOM sur l’outillage…

Page 18: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

#GlobalAzure #ViseoSpirit

ETUDE DE CASConsidérons la Start-up EventStrike

Page 19: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

Microsoft Azure #GlobalAzure #ViseoSpirit 19

• EventStrike est une startup (fictive) du web spécialisée dans l'événementiel

• EventStrike développe une plateforme de type "web social" pour la recherche et l'organisation d'évènements

Il était une fois...

Page 20: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

Microsoft Azure #GlobalAzure #ViseoSpirit

• Créer rapidement de la valeur

• Publication d'API scalables et robustes

EventStrike a choisi les micro-services en PHP combinés avec une approche DevOps

Stratégie

20

Page 21: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

Microsoft Azure #GlobalAzure #ViseoSpirit

Une trajectoire avec un objectif double :• Une symbiose entre Dev et Ops• Une usine logicielle pour le

déploiement continu d'applications PHP

Cap sur DevOps

21

Page 22: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

Microsoft Azure #GlobalAzure #ViseoSpirit 22

Page 23: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

Microsoft Azure #GlobalAzure #ViseoSpirit

démoMONTER UNE ARCHITECTURE HAUTEMENT DISPONIBLE

« Infrastructure as a Code»

Page 24: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

Microsoft Azure #GlobalAzure #ViseoSpirit

#cloud-configwrite_files:- content: |#!/bin/bash -ex## Script parameterszendadmin_ui_pass='p2ssw0rd1'zenddev_ui_pass='p1ssw0rd2'zend_order_number='BZ-01503-14'zend_admin_email='[email protected]'zend_license_key='S3TE7G10801O31D540435CC52C940D4D'zend_self_name=`hostname`zend_self_addr=`ip a s dev eth0 | grep -oP 'inet\s+\K[^/]+'`zend_php_ver='5.5'export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/binset -e## Making sure wget and tar are present on the systemcommand -v wget >/dev/null 2>&1 || { echo >&2 "wget is not installed. Abort"; }command -v tar >/dev/null 2>&1 || { echo >&2 "tar is not installed. Abort"; }## Install Zend Server using a tarball stored in Azure Blob Storagecd /tmpwget -q https://zendstorage.blob.core.windows.net/server/ZendServer-8.0.1-RepositoryInstaller-linux.tar.gztar xvzf ZendServer-8.0.1-RepositoryInstaller-linux.tar.gz

ZendServer-RepositoryInstaller-linux/install_zs.sh "$zend_php_ver" --automatic## Cleanuprm -rf *## Bootstrap and create or join cluster.sudo /usr/local/zend/bin/zs-manage bootstrap-single-server -p"$zendadmin_ui_pass" -o "$zend_order_number" -l "$zend_license_key" -r TRUE -a TRUE -e "$zend_admin_email" -d "$zenddev_ui_pass"## Restart Zend Serversudo /usr/local/zend/bin/zendctl.sh restart

web_api_key=`sqlite3 /usr/local/zend/var/db/gui.db "select HASH fromGUI_WEBAPI_KEYS where NAME='admin';"`sudo /usr/local/zend/bin/zs-manage restart -N admin -K "$web_api_key"$ command -v foo >/dev/null 2>&1 || { echo >&2 "I require foo but it's notinstalled. Aborting."; exit 1; }$ type foo >/dev/null 2>&1 || { echo >&2 "I require foo but it's not installed.Aborting."; exit 1; }$ hash foo 2>/dev/null || { echo >&2 "I require foo but it's not installed.Aborting."; exit 1; }permissions: '0755'path: /zend/bootstrapsingleruncmd:- /zend/bootstrapsingl

Amorcer Zend Server sur Azure avec Cloud-Init

24

Page 25: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

Microsoft Azure #GlobalAzure #ViseoSpirit

démoCOMMENT MONITORER?

Page 26: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

Microsoft Azure #GlobalAzure #ViseoSpirit

Monitorer avec Zend Server

26

Page 27: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

Microsoft Azure #GlobalAzure #ViseoSpirit

URL Insights

27

Page 28: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

Microsoft Azure #GlobalAzure #ViseoSpirit

Vue d'ensemble sur Z-Ray

28

Page 29: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

Microsoft Azure #GlobalAzure #ViseoSpirit

ConclusionMOTS DE LA FIN

29

Page 30: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

Microsoft Azure #GlobalAzure #ViseoSpirit 30

Cas réel d’une société multinationale• Temps de transformation 6 mois (temps

partiel)• AVANT : 1 mois avant une livraison Recette• APRES : 10 livraisons par jours en Dev

et 5 min pour passer en RecetteLe client peut ENFIN donner des Feedbacks rapidement !

Retours d’expérience sur le DevOps?

Page 31: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

Microsoft Azure #GlobalAzure #ViseoSpirit 31

• Gestion du changement sur 3 axes « People-Process-Tools »

– P: Communication !– P: Rôles et responsabilités claires– T: Automatiser!

• De nombreux frameworks éprouvés existent depuis 2003…

• Pourquoi pas vous ?

POUR REUSSIR DANS LE DEVOPS

Page 32: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

Microsoft Azure #GlobalAzure #ViseoSpirit

BONNES PRATIQUES D’UNE MIGRATION VERS LE DEVOPS

Maturity

Source : http://blog.cobia.net/cobiacomm/2012/10/24/devops-meets-alm-in-the-cloud-cloud-devops-factory

Tenir compte de la courbe de maturité tout en parallélisant les actions

Page 33: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

Microsoft Azure #GlobalAzure #ViseoSpirit

GAB 2015 LYON ORAGANIZER

LOCAL SPONSORS

THANK YOU ALL !!

WORLDWIDE SPONSORS

#GlobalAzure #ViseoSpirit

Page 34: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

Microsoft Azure #GlobalAzure #ViseoSpirit 34

ANNEXES

Page 35: Gab2015 Cedric Derue Vincent Thavonekham Approche Devops pour builder une solution robuste en PHP (Zend server et MS Azure)

Microsoft Azure #GlobalAzure #ViseoSpirit

Configuration Management avec Chef

35