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
390
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.1k
What's new in Python 3.7?
matrixise
7
1.6k
Python loves your contributions
matrixise
1
430
CPython loves your Pull Requests
matrixise
0
960
Va debugger ton Python!
matrixise
0
1.1k
Django, from nightmare to dream with Best Practices
matrixise
0
1.3k
Architecture of CPython - Part 1
matrixise
0
1.4k
Exploring our Python Interpreter
matrixise
3
1.1k
Python & PostgreSQL - A Wonderful Wedding (English)
matrixise
7
2.6k
Other Decks in Programming
See All in Programming
RAGの回答精度評価用のQAデータセットを生成AIに作らせた話
kurahara
0
260
Shinjuku.rb#95:心の技術書紹介
free_world21
1
110
Pythonで改めて考える「クラス(class)」の使いどころ
os1ma
4
880
Scala アプリケーションのビルドを改善してデプロイ時間を 1/4 にした話 | How I improved the build of my Scala application and reduced deployment time by 4x
nomadblacky
1
180
Google Sign-inの移行から始めるCredential Manager活用
clockvoid
0
350
はじめてみよう量子プログラミング
itokoichi01
0
220
LangChainでWebサイトの内容取得やGitHubソースコード取得
shukob
0
160
REXML改善のその後
naitoh
0
190
unique パッケージから学ぶ interning と weak reference @ Asakusa.go#3
karamaru
2
810
What you can do with Ruby on WebAssembly
kateinoigakukun
0
170
Prompt Cachingは本当に効果的なのか検証してみた.pdf
ttnyt8701
0
530
意外とフォントが大事だった話 / Font Issues on Internationalization
fumi23
0
110
Featured
See All Featured
Robots, Beer and Maslow
schacon
PRO
157
8.2k
Atom: Resistance is Futile
akmur
261
25k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
How GitHub Uses GitHub to Build GitHub
holman
472
290k
In The Pink: A Labor of Love
frogandcode
139
22k
Building Flexible Design Systems
yeseniaperezcruz
325
38k
Facilitating Awesome Meetings
lara
49
6k
The Art of Programming - Codeland 2020
erikaheidi
48
13k
Docker and Python
trallard
39
3k
Bash Introduction
62gerente
608
210k
Six Lessons from altMBA
skipperchong
26
3.4k
Optimising Largest Contentful Paint
csswizardry
31
2.8k
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