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
450
CPython loves your Pull Requests
matrixise
0
1k
Va debugger ton Python!
matrixise
0
1.1k
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
個人アプリを2年ぶりにアプデしたから褒めて / I just updated my personal app, praise me!
lovee
0
350
ファインディLT_ポケモン対戦の定量的分析
fufufukakaka
0
740
Domain-Driven Transformation
hschwentner
2
1.9k
1年目の私に伝えたい!テストコードを怖がらなくなるためのヒント/Tips for not being afraid of test code
push_gawa
0
210
ソフトウェアエンジニアの成長
masuda220
PRO
12
1.7k
Djangoアプリケーション 運用のリアル 〜問題発生から可視化、最適化への道〜 #pyconshizu
kashewnuts
1
250
CI改善もDatadogとともに
taumu
0
120
Pythonでもちょっとリッチな見た目のアプリを設計してみる
ueponx
1
570
PHP ステートレス VS ステートフル 状態管理と並行性 / php-stateless-stateful
ytake
0
100
sappoRo.R #12 初心者セッション
kosugitti
0
260
DROBEの生成AI活用事例 with AWS
ippey
0
130
Rails アプリ地図考 Flush Cut
makicamel
1
120
Featured
See All Featured
Building Adaptive Systems
keathley
40
2.4k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
114
50k
A designer walks into a library…
pauljervisheath
205
24k
Automating Front-end Workflow
addyosmani
1368
200k
The World Runs on Bad Software
bkeepers
PRO
67
11k
Building a Scalable Design System with Sketch
lauravandoore
461
33k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.5k
GraphQLとの向き合い方2022年版
quramy
44
13k
Six Lessons from altMBA
skipperchong
27
3.6k
Rebuilding a faster, lazier Slack
samanthasiow
80
8.8k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.8k
Optimizing for Happiness
mojombo
376
70k
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