Retour sur des conférences assistées durant DrupalCon 2016 à Dublin avec des sujets DevOps mais également Drupal 8 : docker, kubernetes, jenkins 2 pipeline, Lcache, configuration management, migrate, cache
11. How to Docker ?
Docker files
› Construction d’une image
› Description de l’environnement en YAML
› 1 fichier par processus
Docker compose
› Automatisation du déploiement des images
› Définition de l’architecture
› 1 commande pour tout installer
12. Docker & Drupal
Go shopping...
› Docker4Drupal
› Redis
› Memcached
› MySQL, MariaDB
› D7 & D8
› . . .
… or build your own
14. Problème
Gestion complexe des VMs
et des containers
Kubernetes
Solution
Kubernetes gère “magically”
différents containers au sein
de différentes VMs
15. Kubernetes : késako
› Open Source
› Started by Google
› Système d’orchestration de containers
Paradigme :
› Build scripts VS Desired state
› Children VS Employees
16. Kubernetes : paradigme
Employee
“We had a tough day, go
home and get some sleep”
Child
Go upstairs
Get undressed
Put on pajamas
Brush your teeth
17. Kubernetes : how it works
› Docker files
› Pods (1 or + containers), YAML style
› Pods controller :
› Réplication, déploiement, service
› Gestion des environnements (prod, test)
› Autoscaling
› Logging, monitoring, web interfacing, cluster
19. Everything at Google runs on Containers
› Gmail, Web Search, Maps,...
› MapReduce, batch,...
› GFS, Colossus,...
› Google Platform (VMs run on containers
underneath everything)
22. Jenkins : Pipeline
› Plugin
› Jenkins 1 Workflow → Jenkins 2 Pipeline
› Can survive restarts
› Pausable (for human input)
› BlueOcean Pugin → better GUI
› Jenkinsfile : container for the pipeline
› Multibranch pipelines : automatic
pipeline creation for branches
23. Jenkins : pratiques Drupal
› Ne pas commit “vendor”
› Pas de composer install ou update en PROD
Solutions :
› Build, tarball, sync (doesn’t work with Acquia)
› Target repo : commit > CI > Build > commit >
deploy
31. LCache
It combines:
› A well established architectural patterns
from modern CPU architecture
› Efficient data propagation from mysql’s
row-level replication
From platform.sh
https://goo.gl/1mdkVT
› Experience on Valhalla to provide an
efficient website object caching
32. Better
› Frequently read
› Rarely written
› Large
LCache
Worse
› Read once or not at all
› Things handleable
earlier in the stack
› Keys updated often
› Clearing 100+ keys with
a tag (because of
replication)
From platform.sh
https://goo.gl/1mdkVT
39. › Cache authentifié :
› How to decide to cache ?
From platform.sh
https://goo.gl/1mdkVT
40. › Cache authentifié :
› Exemple :
› Metadata :
From platform.sh
https://goo.gl/1mdkVT
41. D8 : practical caching
› Cacheability debugging :
› Module renderviz : permet de voir les
metadata dans l’inspecteur du navigateur
From platform.sh
https://goo.gl/1mdkVT
53. Configuration management
› Export/import configuration
› Configuration installer : installation profile, UI
› Override local configuration : settings.php
› Drush can ignore configurations about modules
› Drush_cmi_tools : use a YAML list of ignored
configurations
› Configuration split : blacklist, ignore set, entities
From pescetti, ademarco, bircher
https://goo.gl/MSjK3T
54. Configuration management
› Use Git as parallel development
› Careful about merge, workflow
› Safe : export, commit, merge, import, push
› Features for D8 :
› analyzes and automatically packages up site
configuration into a set of features
› Only for development purposes From pescetti, ademarco, bircher
https://goo.gl/MSjK3T
55. Configuration management
› Client messing with production configuration
› Lock configuration on production (settings.php)
› Export from prod and merge to dev
› Configuration split : choose what to keep
› Deploy content
› Use migrate on events
› Default_content module : any module
provides hal+json for entities
› Deploy module : stage and preview content
From pescetti, ademarco, bircher
https://goo.gl/MSjK3T
56. Configuration management : modules
› Config_installer : install site from config
› Config_readonly : lock conf via UI
› Config_update : diff between original & active
› Config_devel : helps developing config
› Config_split : import/export filtered config
› Config_tools : automatically commit config
changes to git
› Features : bundle config for re-use
› Config_sync : safely import config from
updated modules From pescetti, ademarco, bircher
https://goo.gl/MSjK3T
60. 1. Migrate is in core !
Tree new modules
› Migrate
Handle migration. Framework.
› Migrate Drupal
Contains migration from D6 & D7
› Migrate Drupal UI
The older migrate UI (new in 8.1.x)
61. 1. Migrate is in core !
How to execute migrations ?
› UI ?
› Drush command ?
Contrib to Migrate tools & Migrate Plus
74. 3. PROCESS
How we transform each field, each file or data.
You are able to:
› Map fields: Same value as origin.
› Modify: Change or process the value.
› Add: Create new fields from other fields or calculate
these fields.