Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Evy - Serveur d'Intégration Continue Distribué
Search
Stéphane Wirtel
October 27, 2013
Programming
0
410
Evy - Serveur d'Intégration Continue Distribué
Basé sur Redis et étant modulaire, Evy est peut-être une solution entre Jenkins et Buildbot.
Stéphane Wirtel
October 27, 2013
Tweet
Share
More Decks by Stéphane Wirtel
See All by Stéphane Wirtel
What's new in Python 3.8?
matrixise
1
2.2k
What's new in Python 3.7?
matrixise
7
1.7k
Python loves your contributions
matrixise
1
460
CPython loves your Pull Requests
matrixise
0
1k
Va debugger ton Python!
matrixise
0
1.2k
Django, from nightmare to dream with Best Practices
matrixise
0
1.4k
Architecture of CPython - Part 1
matrixise
0
1.5k
Exploring our Python Interpreter
matrixise
3
1.2k
Python & PostgreSQL - A Wonderful Wedding (English)
matrixise
7
2.7k
Other Decks in Programming
See All in Programming
.NET Frameworkでも汎用ホストが使いたい!
tomokusaba
0
200
PEPCは何を変えようとしていたのか
ken7253
2
160
密集、ドキュメントのコロケーション with AWS Lambda
satoshi256kbyte
1
210
もう少しテストを書きたいんじゃ〜 #phpstudy
o0h
PRO
16
3.8k
Datadog DBMでなにができる? JDDUG Meetup#7
nealle
0
140
Visual StudioのGitHub Copilotでいろいろやってみる
tomokusaba
1
210
CSS Linter による Baseline サポートの仕組み
ryo_manba
1
150
Rails アプリ地図考 Flush Cut
makicamel
1
130
Multi Step Form, Decentralized Autonomous Organization
pumpkiinbell
1
860
Boos Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
230
GoとPHPのインターフェイスの違い
shimabox
2
210
メンテが命: PHPフレームワークのコンテナ化とアップグレード戦略
shunta27
0
300
Featured
See All Featured
Gamification - CAS2011
davidbonilla
80
5.2k
Why Our Code Smells
bkeepers
PRO
336
57k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.6k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.5k
Speed Design
sergeychernyshev
27
810
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
30
2.2k
Side Projects
sachag
452
42k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.4k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
A designer walks into a library…
pauljervisheath
205
24k
Transcript
Evy Serveur d’Intégration Continue Distribué
Qui suis-je ? Stéphane WIRTEL !2
Février 2014 à Bruxelles Au fait !
Pourquoi suis-je là ? !4
• pour parler du Runbot (CI) d’OpenERP • échanger des
idées d’un éventuel remplaçant • et pour le fun ! !5
C’est quoi ce Runbot ! !6
Le Runbot - La Bête • Serveur d’intégration continue •
Propre à OpenERP • en Python, Of course ;-) • parce que nous avions des problèmes avec Buildbot (je sais plus !) !7
!8 Interface du Runbot
• Build le dernier commit de plusieurs branches • Si
build ok -> Instanciation de l’OpenERP • Interface simple • HTTP Proxy avec nginx !9 Le “Pour”
• Monolitique (non-extensible) • Non-distribué • Exécuté toutes les X
minutes • Installation très fastidieuse • bzr branch lp:~openerp-dev/openerp-tools/trunk !10 Le “Contre”
Ok, que proposes-tu ? !11
Evy Serveur d’Intégration Continue Distribué
None
Objectifs • Modularité • Scalabilité • Distribué • Extensible !
! • Monitoring • API HTTP Versionnée • Configurable (YAML) • Installation rapide !14
Glossaire • Proxy • Manager • Worker • Queue •
Plugin (Capacité) ! • Job • Build • Context d’exécution !15
Architecture !16
Modularité • Proxy • Manager • Workers • Plugins !17
Scalabilité • Ajout de Workers • Ajout de Manager •
Ajout de Proxy (reverse-proxy, nginx) !18
Distribué • Redis • Queue • Workers !19
Extensible • Création de plugins • Utilisation de stevedore (entrypoints)
!20
Monitoring !21
API HTTP • Versionnée • RESTful • SSL • etc…
!22
API - Exemple > http GET http://localhost:19000/api/v1/builds/48f5f6f041bd4190af6504663150d67a! HTTP/1.1 200 OK!
Connection: close! Content-Length: 57! Content-Type: application/json! Date: Sun, 27 Oct 2013 05:02:54 GMT! Server: gunicorn/18.0! ! {! "identifier": "48f5f6f041bd4190af6504663150d67a",! "status": "in progress"! }! !23
Installation !24 apt-get install redis-server! ! pip install evy-worker evy-master
evy-plugin-email!
Redis • In Memory / Persistence on Disk • Queue
• Utilisé pour la configuration globale du système !25
Proxy • HTTP API • RESTful • Versionné • Interface
Web • Interface pour voir les queues !26
Workers • Capacité • Ecoute sur sa propre queue •
Fait sa TACHE ! • Configuration (YAML). !27
Manager • Extension d’un Worker • Utilisation du Plugin “Manager”
• Dispatch un build en fct(plugin) à éxécuter !28
Plugins • Stevedore • Configuration • Capacité ! ! !
• Exemples • Email • Nginx • Bzr !29
Plugin Email !30 #!/usr/bin/env python! from setuptools import setup! !
import release! ! setup(! author=release.author,! author_email=release.author_email,! name=release.name,! version=release.version,! install_requires=[! 'EvyWorker',! ],! entry_points={! 'evy.plugins': [! 'email = plugin:Email',! ]! }! )!
from evyworker.logging import logger! ! class Email(object):! def __init__(self):! pass!
! def run(self, job, build, plugin, config, context=None):! logger.info("We do something in this method")! return {}! !31 Plugin Email
Job !32 • Modèle d’un travail à réaliser • Statique
Exemple 1 !33 name: Hello! plugins:! - email! config:! email:!
from:
[email protected]
! to:
[email protected]
! subject: Hello! body: How are you ?!
Exemple 2 name: OpenERP Build 7.0! plugins:! - bzr_fetch_source! -
openerp_build! - openerp_execute! - openerp_nginx_http_proxy! - update_web_site! - email! config:! bzr_fetch_source:! branches:! addons: 'lp:openobject-addons/7.0'! server: 'lp:openobject-server/7.0'! web: 'lp:openerp-web/7.0'! openerp_nginx_http_proxy:! server_name: 'demo.openerp.com'! port: 6543! ssl: true! context:! working_directory: /mount/srv/build/! !34
Messages • Message entrant • Message interne !35
Message entrant • De Internet vers le Proxy • JSON
!36 {! "job": "Hello",! "plugins": {! "email": {! "from": "
[email protected]
",! "to": "
[email protected]
",! "subject": "Bonjour de Evy",! "body": "Le monde merveilleux de Python",! }! }! }!
La réponse ;-) HTTP/1.1 202 ACCEPTED! Connection: close! Content-Length: 57!
Content-Type: application/json! Date: Sun, 27 Oct 2013 04:58:46 GMT! Location: http://localhost:19000/api/v1/builds/48f5f6f041bd4190af6504663150d67a! Server: gunicorn/18.0! X-Evy-Build: 48f5f6f041bd4190af6504663150d67a! ! {! "identifier": "48f5f6f041bd4190af6504663150d67a"! }! !37
Message interne • Entre Redis et Workers • Pickle !38
Message interne - Exemples {! "job": "Hello",! "build": "48f5f6f041bd4190af6504663150d67a",! "plugin":
"email",! "config": {! "from": "
[email protected]
",! "to": "
[email protected]
",! "subject": "Bonjour de Evy",! "body": "Le monde merveilleux de Python"! },! "context" : {! }! }! • Envoyé vers le Worker !39
Message interne {! "job": "Hello",! "build": "48f5f6f041bd4190af6504663150d67a",! "status": "done",! "plugin":
"email",! "context": {! }! }! {! "job": "Hello",! "build": "48f5f6f041bd4190af6504663150d67a",! "status": "failed",! "plugin": "email",! }! • Retour du Worker !40
Command Line • Utilise l’API HTTP • Permet de créer
des jobs • Gérer un build • Extensible en local/remote !41
Et l’avenir ? • Unit Test • Documentation • Utilisation
d’un File System distribué • Déplacer les logs vers LogStash ou Riemann • Plugin pour déploiement continu • Git Hook • Python-Eve • JSON (Message Interne) • ZMQ • Cron • Recettes !42
Au fait ;-) • A la dernière minute -> Place
vacante !43
Contribuer !44 git://github.com/matrixise/evy-*
Merci ! @matrixise Stéphane WIRTEL https://github.com/matrixise