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
420
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.6k
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
‘무차별 LGTM~👍’만 외치던 우리가 ‘고봉밥 코드 리뷰’를?
hannah0731
0
540
SLI/SLOの設定を進めるその前に アラート品質の改善に取り組んだ話
tanden
2
740
CRE Meetup!ユーザー信頼性を支えるエンジニアリング実践例の発表資料です
tmnb
0
430
私の愛したLaravel 〜レールを超えたその先へ〜
kentaroutakeda
12
3.6k
Go1.24 go vetとtestsアナライザ
kuro_kurorrr
2
690
remix + cloudflare workers (DO) docker上でいい感じに開発する
yoshidatomoaki
0
120
PHPer's Guide to Daemon Crafting Taming and Summoning
uzulla
2
1.1k
AtCoder Heuristic First-step Vol.1 講義スライド(山登り法・焼きなまし法編)
takumi152
3
1k
アプリを起動せずにアプリを開発して品質と生産性を上げる
ishkawa
0
590
自分のために作ったアプリが、グローバルに使われるまで / Indie App Development Lunch LT
pixyzehn
1
130
安全に倒し切るリリースをするために:15年来レガシーシステムのフルリプレイス挑戦記
sakuraikotone
5
2.4k
なぜselectはselectではないのか
taiyow
2
310
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
40
2k
Done Done
chrislema
183
16k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
45
9.5k
It's Worth the Effort
3n
184
28k
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.3k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Mobile First: as difficult as doing things right
swwweet
223
9.5k
Gamification - CAS2011
davidbonilla
81
5.2k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
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