D-DAY 2015 Electric sheep SERVEBOX
-
Upload
devops-d-day -
Category
Engineering
-
view
338 -
download
1
Transcript of D-DAY 2015 Electric sheep SERVEBOX
by ElectricSheep.IO
ServeBoxOU COMMENT NOUS AVONS TROUVÉ DESMOUTONS ÉLECTRIQUES SUR LA ROUTE
par Fabrice Nourisson / (un développeur hédoniste)@duckmole
DÉROULEMENT DE L'ATELIER15 min la route vers le devops et ElectricSheep.IO
30 min live démo d'ElectricSheep.IO
UNE ÉQUIPE EN ROUTEPOUR LE DEVOPS
ServeBox est une société de développement passée au devops pour les besoins de ses clients
UNE ÉQUIPE EN ROUTEPOUR LE DEVOPS
Production de code
UNE ÉQUIPE EN ROUTEPOUR LE DEVOPS
Déploiement
UNE ÉQUIPE EN ROUTEPOUR LE DEVOPS
Opérations
Monitoring et Alerte Reprise d'activité ?
LES DEVS ET LE BACKUPSolutions existantes trop lourdes
Mauvaise maîtrise du bashUne configuration par serveur et par projet
Alerte en cas d'échecTéléversement (upload) vers des systèmes tiers
LES DEVS ET LE BACKUP
Une DSL
LES DEVS ET LE BACKUP
La centralisation
One server to rule them all
LES DEVS ET LE BACKUP
Notifications claires
LES DEVS ET LE BACKUP
Confidentialité
QUI L'UTILISE ET POUR QUOI ?
SonarSource backup ses bases de données
et fichiers
Servebox backup les bases de données
des applications
e-labo backup ~70environnements clients
(CMS)
POURQUOI PAS VOUS ?
UTILISER
humans [at] electricsheep [dot] io
Getting Started
CONTRIBUER
Code sur github
Doc. sur readme.io
ET MAINTENANT LE LIVE CODING
INSTALLATIONcurl https://github.com/servebox/electric_sheep/releases/download/v0.5.0/electricsheepubuntu_0.5.01_amd64.debmd5 electricsheepubuntu_0.5.01_amd64.debdpkg i electricsheepubuntu_0.5.01_amd64.deb
Doc d'installation
CRÉATION ET INSTALLATION DES CLÉS SSHsshkeygen t rsa N '' f electric_sheep_rsasshcopyid i electric_sheep_rsa.pub [email protected]copyid i electric_sheep_rsa.pub servebox@havefunwithtdd.com
Doc. de création des clés ssh
SAUVEGARDE DU SITE WORDPRESS HAVE-FUN-WITH-TDD
SheepFile
Commande
host "havefunwithtdd", hostname: "192.168.50.4", private_key: "electric_sheep_rsa" working_directory "/backups"
job "havefunwithtddfiles" do schedule "daily", at: "00:00" resource "directory", path: "/var/www", host: "havefunwithtdd" remotely as: "servebox" do tar_gz delete_source: true end move to: "localhost", using: "scp", as: "servebox" end
job "havefunwithtdddb" do schedule "daily", at: "00:00" resource "database", name: "wordpress", host: "havefunwithtdd" remotely as: "servebox" do mysql_dump user: "wordpress", password: "wordpress" tar_gz delete_source: true end move to: "localhost", using: "scp", as: "servebox" end
electric_sheep
Cookbook pour wordpress
SAUVEGARDE DE LA BASE DE DONNÉESPOSTGRESQL DU SITE ORNITHORYNQUE
host "ornithorynque", hostname: "192.168.50.5", private_key: "electric_sheep_rsa" working_directory "/backups"
job "ornithorynquedb" do schedule "daily", at: "00:00" resource "database", name: "hello_phoenix_dev", host: "ornithorynque" remotely as: "servebox" do postgresql_dump user: "electric_sheep", password: "password" end remotely as: "servebox" do tar_gz delete_source: true end move to: "localhost", using: "scp", as: "servebox" end
Cookbook pour PostgreSQL
CRÉATION DES CLÉS GPGgpg genkeygpg batch armor output electric_sheep.public.gpg.asc export [email protected] batch armor output electric_sheep.private.gpg.asc exportsecretkey [email protected]
Doc. pour la création des clés gpg
CHIFFREMENT DES MOTS DE PASSEelectric_sheep encrypt k electric_sheep.public.gpg.asc "password"
Doc. pour chiffrer les mots de passe
SHEEPFILE AVEC MOTS DE PASSE CHIFFRÉShost "ornithorynque", hostname: "192.168.50.5", private_key: "electric_sheep_rsa" working_directory "/backups" decrypt with: "electric_sheep.private.gpg.asc"
job "ornithorynquedb" do schedule "daily", at: "00:00" resource "database", name: "hello_phoenix_dev", host: "ornithorynque" remotely as: "servebox" do postgresql_dump user: "electric_sheep", password: encrypted("xxxx") end remotely as: "servebox" do tar_gz end move to: "localhost", using: "scp", as: "servebox" locally do encrypt delete_source: true end end
Doc. pour chiffrer les mots de passe
RÉCUPÉRATION DE LA CLÉ PUBLIQUE GPG POURLE CHIFFREMENT DES SAUVEGARDES
gpg armor output fabrice.public.gpg.asc export fabrice@nourissonpytel.fr
Doc. pour générer la clé publique
CHIFFREMENT DES SAUVEGARDEShost "ornithorynque", hostname: "192.168.50.5", private_key: "electric_sheep_rsa" working_directory "/backups" decrypt with: "electric_sheep.private.gpg.asc" encrypt with: 'fabrice.public.gpg.asc'
job "ornithorynquedb" do schedule "daily", at: "00:00" resource "database", name: "hello_phoenix_dev", host: "ornithorynque" remotely as: "servebox" do postgresql_dump user: "electric_sheep", password: encrypted("xxxx") end remotely as: "servebox" do tar_gz delete_source: true end move to: "localhost", using: "scp", as: "servebox" locally do encrypt delete_source: true end end
Doc. pour chiffrer les sauvegardes
SheepFile
host "ornithorynque", hostname: "192.168.50.5", private_key: "electric_sheep_rsa" working_directory "/backups" decrypt with: "electric_sheep.private.gpg.asc" encrypt with: 'fabrice.public.gpg.asc'
job "ornithorynquedb" do schedule "daily", at: "00:00" resource "database", name: "hello_phoenix_dev", host: "ornithorynque" remotely as: "servebox" do postgresql_dump user: "electric_sheep", password: encrypted("xxxx") end remotely as: "servebox" do tar_gz delete_source: true end move to: "localhost", using: "scp", as: "servebox" locally do encrypt delete_source: true end end
host "havefunwithtdd", hostname: "192.168.50.4", private_key: "electric_sheep_rsa" working_directory "/backups"
job "havefunwithtddfiles" do schedule "daily", at: "00:00" resource "directory", path: "/var/www", host: "havefunwithtdd" remotely as: "servebox" do tar_gz delete_source: true end move to: "localhost", using: "scp", as: "servebox" end
job "havefunwithtdddb" do schedule "daily", at: "00:00" resource "database", name: "wordpress", host: "havefunwithtdd" remotely as: "servebox" do mysql_dump user: "wordpress", password: "wordpress" tar_gz delete_source: true end move to: "localhost", using: "scp", as: "servebox" end
#DEVOPSDDAY #ESIO
MERCI
by http://electricsheep.io
ServeBox
DEVELOPERS,GIVE YOUR BACKUPS SOME LOVE