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
SwiftUI Viewの責務分離
elmetal
PRO
2
270
お前もAI鬼にならないか?👹Bolt & Cursor & Supabase & Vercelで人間をやめるぞ、ジョジョー!👺
taishiyade
7
4.2k
CDK開発におけるコーディング規約の運用
yamanashi_ren01
2
260
sappoRo.R #12 初心者セッション
kosugitti
0
280
コードを読んで理解するko build
bells17
1
110
苦しいTiDBへの移行を乗り越えて快適な運用を目指す
leveragestech
0
1.1k
『テスト書いた方が開発が早いじゃん』を解き明かす #phpcon_nagoya
o0h
PRO
8
2.5k
Domain-Driven Design (Tutorial)
hschwentner
13
22k
未経験でSRE、はじめました! 組織を支える役割と軌跡
curekoshimizu
1
160
Introduction to kotlinx.rpc
arawn
0
770
XStateを用いた堅牢なReact Components設計~複雑なClient Stateをシンプルに~ @React Tokyo ミートアップ #2
kfurusho
1
990
LINE messaging APIを使ってGoogleカレンダーと連携した予約ツールを作ってみた
takumakoike
0
120
Featured
See All Featured
Building an army of robots
kneath
303
45k
Embracing the Ebb and Flow
colly
84
4.6k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.2k
Docker and Python
trallard
44
3.3k
The Invisible Side of Design
smashingmag
299
50k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
133
33k
How to Think Like a Performance Engineer
csswizardry
22
1.4k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.5k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
Speed Design
sergeychernyshev
27
810
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.7k
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: foo@bar.com! to: bar@foo.com! 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": "stephane@wirtel.be",! "to": "orga@pycon.fr",! "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": "stephane@wirtel.be",! "to": "orga@pycon.fr",! "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