SlideShare una empresa de Scribd logo
1 de 40
Descargar para leer sin conexión
WHO AM I ?
Alexandre Strzelewicz
• Étudiant Epitech
• “Full stack developer”
• Éternel créateur
• http://apps.hemca.com
SOMMAIRE

1. PM2
2. L’impact d’un projet OpenSource

3. Perspectives futures
SHANGHAI
TAKE OFF PHASE
• Entreprise WiredCraft – Devo.ps
• Message bus, Process management
• Deployer du Node en production
• Simple, magique ?
CONTEXTE
CLUSTERING
• Javascript est mono thread
• Utilise un CPU

• “Clusterizer” l’application Node
• Utilise tous les CPUs

• Load balance de requêtes (stateless)
• Amélioration de X fois la capacité de traitement
PROCESS MANAGEMENT
• Node-forever seul outil disponible
• En production pouvoir

•
•
•
•

Monitorer
Garder en vie
Intéragir
Logger

• Process important
OPEN SOURCE
• Redonner à la communauté
• Inciter au partage
• Recevoir des feedbacks
LE GRAND MIX
• Cluster
• Rendre le javascript plus performant
• Process management

• Gérer les processus de façon élègante
• Open Source
• Redonner à la communauté
HACKER NEWS

Blog Post

« Goodbye node-forever, hello PM2 »
• 70,000 visites en 3 heures
• Intérêt de la part des développeurs Node
SOMMAIRE

1. PM2
2. L’impact d’un project OpenSource

3. Perspectives futures
PM2

PM2 est une solution complète pour gérer, mettre
en ligne et monitorer vos applications NodeJS
PM2 FEATURES
DAEMONIZATION
$ pm2 start app.js
• Lance pm2
• Met en arrière plan le processus et le garde en vie
CLUSTERING
$ pm2 start app.js –i max
• Duplique le processus en fonction du nombre de CPU
• Utilise le module Cluster de NodeJS
MONITORING
$ pm2 monit
MONITORING
$ pm2 monit
PROCESS LISTING
$ pm2 list
PROCESS LISTING
$ pm2 list
STARTUP SCRIPTS
$ pm2 startup
0S DOWNTIME RELOAD
$ pm2 reload all
• Laisse les processus terminer leurs
traitements en cours
• Crée de nouveaux processus
• Dispatch les nouvelles requetes vers les
nouveaux processus
API
$ pm2 web
• Expose la consommation CPU, RAM de chaque processus
INTERFACE
$ npm install pm2-interface --save
pm2-interface
• Expose pm2 localement
• Permet :
• Capter les messages emis par les programmes
• Capter les changements d’états
• Capter les exceptions
https://github.com/Unitech/pm2-interface
ARCHITECTURE

God, Satan et les autres
TESTS &

• Travis utilisé pour l’intégration continue

• Offre gratuite pour les projets OpenSource
• Test sur Node 0,8 - 0,10 - 0,11
• ~100 tests bash + unitaires
DEPENDENCY STATUS
YOU DEPEND ON OTHER PROJECTS.
YOU WANT TO STAY UP TO DATE.
DAVID'S GOT YOUR BACK.

david-dm.org
DEMO
OPEN SOURCE & STATS

God, Satan et les autres
GITHUB

• + 1800 stars
• + 40 pull requests
• Googlers, Russes, Français…
BITDELI – 10/13
BITDELI – 11/13
NPM STATS

https://nodei.co/
TWITTER
WHAT’S NEXT
SAAS DASHBOARD
• Grâce à pm2-interface
• Créer un service SaaS
•
•
•
•

Remonter les exceptions
Monitorer les processus et le serveur
Afficher les logs
Contrôller les processus
EPITECH HUB CLOUD
Un PaaS à la Heroku
OPEN SOURCE ! MUAHHAH !
SPONSORS
THANK YOU (:
• PM2
• https://github.com/Unitech/pm2

• Alexandre Strzelewicz
•
•
•
•

@Unitech sur Github
@fr.linkedin.com/in/alexandrestrzelewicz
@http://apps.hemca.com/ – ancien portfolio
strzelewicz.alexandre@gmail.com

Más contenido relacionado

La actualidad más candente

Kubernetes Meetup Paris #5 - Metriques applicatives k8s
Kubernetes Meetup Paris #5 - Metriques applicatives k8sKubernetes Meetup Paris #5 - Metriques applicatives k8s
Kubernetes Meetup Paris #5 - Metriques applicatives k8sArnaud MAZIN
 
Consul, un vrai couteau suisse
Consul, un vrai couteau suisseConsul, un vrai couteau suisse
Consul, un vrai couteau suisseXavierPestel
 
Kubernetes University, Cap sur l’orchestration Docker
Kubernetes University, Cap sur l’orchestration DockerKubernetes University, Cap sur l’orchestration Docker
Kubernetes University, Cap sur l’orchestration DockerJean-Baptiste Claramonte
 
Workshop mesos docker devoxx fr 2016
Workshop mesos docker devoxx fr 2016Workshop mesos docker devoxx fr 2016
Workshop mesos docker devoxx fr 2016Julia Mateo
 
Retour d'expérience Docker: Puissance et simplicité de VSTS, déploiement sur ...
Retour d'expérience Docker: Puissance et simplicité de VSTS, déploiement sur ...Retour d'expérience Docker: Puissance et simplicité de VSTS, déploiement sur ...
Retour d'expérience Docker: Puissance et simplicité de VSTS, déploiement sur ...Cédric Leblond
 
Introduction à Docker et utilisation en production /Digital apéro Besançon [1...
Introduction à Docker et utilisation en production /Digital apéro Besançon [1...Introduction à Docker et utilisation en production /Digital apéro Besançon [1...
Introduction à Docker et utilisation en production /Digital apéro Besançon [1...Silicon Comté
 
Journée DevOps : Puppet, un outil pour les installer tous
Journée DevOps : Puppet, un outil pour les installer tousJournée DevOps : Puppet, un outil pour les installer tous
Journée DevOps : Puppet, un outil pour les installer tousPublicis Sapient Engineering
 
Présentation CoreOS
Présentation CoreOSPrésentation CoreOS
Présentation CoreOSgcatt
 
Docker du mythe à la réalité
Docker du mythe à la réalitéDocker du mythe à la réalité
Docker du mythe à la réalitéZenika
 
Rancher, le (petit) orchestrateur qui vous veut du bien
Rancher, le (petit) orchestrateur qui vous veut du bienRancher, le (petit) orchestrateur qui vous veut du bien
Rancher, le (petit) orchestrateur qui vous veut du bienChristophe Furmaniak
 
Docker avec Rancher, du dev à la prod - Makazi au devopsdday 2016
Docker avec Rancher, du dev à la prod - Makazi au devopsdday 2016Docker avec Rancher, du dev à la prod - Makazi au devopsdday 2016
Docker avec Rancher, du dev à la prod - Makazi au devopsdday 2016Alexis Ducastel
 
CI, CD, pipelines, conteneurs : la cohabitation est elle possible ?
CI, CD, pipelines, conteneurs : la cohabitation est elle possible ?CI, CD, pipelines, conteneurs : la cohabitation est elle possible ?
CI, CD, pipelines, conteneurs : la cohabitation est elle possible ?Membré Guillaume
 
Introduction à Docker et Gaudi
Introduction à Docker et GaudiIntroduction à Docker et Gaudi
Introduction à Docker et GaudiEmmanuel Quentin
 

La actualidad más candente (20)

Kubernetes Meetup Paris #5 - Metriques applicatives k8s
Kubernetes Meetup Paris #5 - Metriques applicatives k8sKubernetes Meetup Paris #5 - Metriques applicatives k8s
Kubernetes Meetup Paris #5 - Metriques applicatives k8s
 
Consul, un vrai couteau suisse
Consul, un vrai couteau suisseConsul, un vrai couteau suisse
Consul, un vrai couteau suisse
 
Kubernetes University, Cap sur l’orchestration Docker
Kubernetes University, Cap sur l’orchestration DockerKubernetes University, Cap sur l’orchestration Docker
Kubernetes University, Cap sur l’orchestration Docker
 
La révolution Docker
La révolution DockerLa révolution Docker
La révolution Docker
 
Meetup PM2 @delicious-insights
Meetup PM2 @delicious-insightsMeetup PM2 @delicious-insights
Meetup PM2 @delicious-insights
 
Workshop mesos docker devoxx fr 2016
Workshop mesos docker devoxx fr 2016Workshop mesos docker devoxx fr 2016
Workshop mesos docker devoxx fr 2016
 
Mise en place nagios
Mise en place nagiosMise en place nagios
Mise en place nagios
 
Vert.x 3
Vert.x 3Vert.x 3
Vert.x 3
 
Retour d'expérience Docker: Puissance et simplicité de VSTS, déploiement sur ...
Retour d'expérience Docker: Puissance et simplicité de VSTS, déploiement sur ...Retour d'expérience Docker: Puissance et simplicité de VSTS, déploiement sur ...
Retour d'expérience Docker: Puissance et simplicité de VSTS, déploiement sur ...
 
Introduction à Docker et utilisation en production /Digital apéro Besançon [1...
Introduction à Docker et utilisation en production /Digital apéro Besançon [1...Introduction à Docker et utilisation en production /Digital apéro Besançon [1...
Introduction à Docker et utilisation en production /Digital apéro Besançon [1...
 
Journée DevOps : Puppet, un outil pour les installer tous
Journée DevOps : Puppet, un outil pour les installer tousJournée DevOps : Puppet, un outil pour les installer tous
Journée DevOps : Puppet, un outil pour les installer tous
 
Présentation CoreOS
Présentation CoreOSPrésentation CoreOS
Présentation CoreOS
 
Devoxx France : GruntJs In Action
Devoxx France : GruntJs In ActionDevoxx France : GruntJs In Action
Devoxx France : GruntJs In Action
 
Docker du mythe à la réalité
Docker du mythe à la réalitéDocker du mythe à la réalité
Docker du mythe à la réalité
 
Rancher, le (petit) orchestrateur qui vous veut du bien
Rancher, le (petit) orchestrateur qui vous veut du bienRancher, le (petit) orchestrateur qui vous veut du bien
Rancher, le (petit) orchestrateur qui vous veut du bien
 
Docker avec Rancher, du dev à la prod - Makazi au devopsdday 2016
Docker avec Rancher, du dev à la prod - Makazi au devopsdday 2016Docker avec Rancher, du dev à la prod - Makazi au devopsdday 2016
Docker avec Rancher, du dev à la prod - Makazi au devopsdday 2016
 
Automatiser l'ère post-dev
Automatiser l'ère post-devAutomatiser l'ère post-dev
Automatiser l'ère post-dev
 
CI, CD, pipelines, conteneurs : la cohabitation est elle possible ?
CI, CD, pipelines, conteneurs : la cohabitation est elle possible ?CI, CD, pipelines, conteneurs : la cohabitation est elle possible ?
CI, CD, pipelines, conteneurs : la cohabitation est elle possible ?
 
Docker
DockerDocker
Docker
 
Introduction à Docker et Gaudi
Introduction à Docker et GaudiIntroduction à Docker et Gaudi
Introduction à Docker et Gaudi
 

Destacado

Инфраструктура распределенных приложений на Node.js
Инфраструктура распределенных приложений на Node.jsИнфраструктура распределенных приложений на Node.js
Инфраструктура распределенных приложений на Node.jsStanislav Gumeniuk
 
Keymetrics & PM2 - NodeJS NYC @ Microsoft
Keymetrics & PM2 - NodeJS NYC @ Microsoft Keymetrics & PM2 - NodeJS NYC @ Microsoft
Keymetrics & PM2 - NodeJS NYC @ Microsoft Alexandre Strzelewicz
 
Riak Intro at Munich Node.js
Riak Intro at Munich Node.jsRiak Intro at Munich Node.js
Riak Intro at Munich Node.jsPhilipp Fehre
 
{EPITECH} - Keymetrics / Final studies internship report
{EPITECH} - Keymetrics / Final studies internship report{EPITECH} - Keymetrics / Final studies internship report
{EPITECH} - Keymetrics / Final studies internship reportAlexandre Strzelewicz
 
Fast Data Intelligence in the IoT - real-time data analytics with Spark
Fast Data Intelligence in the IoT - real-time data analytics with SparkFast Data Intelligence in the IoT - real-time data analytics with Spark
Fast Data Intelligence in the IoT - real-time data analytics with SparkBas Geerdink
 
Кратчайшее введение в docker по-русски
Кратчайшее введение в docker по-русскиКратчайшее введение в docker по-русски
Кратчайшее введение в docker по-русскиOSLL
 
Scalable Realtime Analytics with declarative SQL like Complex Event Processin...
Scalable Realtime Analytics with declarative SQL like Complex Event Processin...Scalable Realtime Analytics with declarative SQL like Complex Event Processin...
Scalable Realtime Analytics with declarative SQL like Complex Event Processin...Srinath Perera
 
Mohamed Amine Abdessemed – Real-time Data Integration with Apache Flink & Kafka
Mohamed Amine Abdessemed – Real-time Data Integration with Apache Flink & KafkaMohamed Amine Abdessemed – Real-time Data Integration with Apache Flink & Kafka
Mohamed Amine Abdessemed – Real-time Data Integration with Apache Flink & KafkaFlink Forward
 
[devops REX 2016] Retour d’expérience de la transformation DevOps de Microsoft
[devops REX 2016] Retour d’expérience de la transformation DevOps de Microsoft[devops REX 2016] Retour d’expérience de la transformation DevOps de Microsoft
[devops REX 2016] Retour d’expérience de la transformation DevOps de Microsoftdevops REX
 

Destacado (15)

Web Lab - Thinking Rails
Web Lab - Thinking RailsWeb Lab - Thinking Rails
Web Lab - Thinking Rails
 
Инфраструктура распределенных приложений на Node.js
Инфраструктура распределенных приложений на Node.jsИнфраструктура распределенных приложений на Node.js
Инфраструктура распределенных приложений на Node.js
 
Jsconf asia pm2
Jsconf asia pm2Jsconf asia pm2
Jsconf asia pm2
 
NODE NYC
NODE NYCNODE NYC
NODE NYC
 
Keymetrics & PM2 - NodeJS NYC @ Microsoft
Keymetrics & PM2 - NodeJS NYC @ Microsoft Keymetrics & PM2 - NodeJS NYC @ Microsoft
Keymetrics & PM2 - NodeJS NYC @ Microsoft
 
Riak Intro at Munich Node.js
Riak Intro at Munich Node.jsRiak Intro at Munich Node.js
Riak Intro at Munich Node.js
 
Apache kafka big data track
Apache kafka   big data trackApache kafka   big data track
Apache kafka big data track
 
{EPITECH} - Keymetrics / Final studies internship report
{EPITECH} - Keymetrics / Final studies internship report{EPITECH} - Keymetrics / Final studies internship report
{EPITECH} - Keymetrics / Final studies internship report
 
Fast Data Intelligence in the IoT - real-time data analytics with Spark
Fast Data Intelligence in the IoT - real-time data analytics with SparkFast Data Intelligence in the IoT - real-time data analytics with Spark
Fast Data Intelligence in the IoT - real-time data analytics with Spark
 
Кратчайшее введение в docker по-русски
Кратчайшее введение в docker по-русскиКратчайшее введение в docker по-русски
Кратчайшее введение в docker по-русски
 
Что такое Docker
Что такое DockerЧто такое Docker
Что такое Docker
 
Scalable Realtime Analytics with declarative SQL like Complex Event Processin...
Scalable Realtime Analytics with declarative SQL like Complex Event Processin...Scalable Realtime Analytics with declarative SQL like Complex Event Processin...
Scalable Realtime Analytics with declarative SQL like Complex Event Processin...
 
Mohamed Amine Abdessemed – Real-time Data Integration with Apache Flink & Kafka
Mohamed Amine Abdessemed – Real-time Data Integration with Apache Flink & KafkaMohamed Amine Abdessemed – Real-time Data Integration with Apache Flink & Kafka
Mohamed Amine Abdessemed – Real-time Data Integration with Apache Flink & Kafka
 
[devops REX 2016] Retour d’expérience de la transformation DevOps de Microsoft
[devops REX 2016] Retour d’expérience de la transformation DevOps de Microsoft[devops REX 2016] Retour d’expérience de la transformation DevOps de Microsoft
[devops REX 2016] Retour d’expérience de la transformation DevOps de Microsoft
 
Devops the Microsoft Way
Devops the Microsoft WayDevops the Microsoft Way
Devops the Microsoft Way
 

Similar a Pm2 pres

Industrialisation PHP - Canal+
Industrialisation PHP - Canal+Industrialisation PHP - Canal+
Industrialisation PHP - Canal+ekino
 
Microservices based application development with Docker (French)
Microservices based application development with Docker (French)Microservices based application development with Docker (French)
Microservices based application development with Docker (French)Cédric Villa
 
CI-Jenkins.pptx
CI-Jenkins.pptxCI-Jenkins.pptx
CI-Jenkins.pptxMEDOBEST1
 
Université de la performance - Devoxx France
Université de la performance - Devoxx FranceUniversité de la performance - Devoxx France
Université de la performance - Devoxx FranceMarc Bojoly
 
Intellicore Tech Talk 10 - Apache Web Server Internals
Intellicore Tech Talk 10 - Apache Web Server InternalsIntellicore Tech Talk 10 - Apache Web Server Internals
Intellicore Tech Talk 10 - Apache Web Server InternalsNeil Armstrong
 
Quoi de neuf à Devoxx France 2017 ?
Quoi de neuf à Devoxx France 2017 ?Quoi de neuf à Devoxx France 2017 ?
Quoi de neuf à Devoxx France 2017 ?Antoine Rey
 
JFTL-2018-Comment-mettre-en-place-des-plateformes-de-test-grâce-à-Docker.pdf
JFTL-2018-Comment-mettre-en-place-des-plateformes-de-test-grâce-à-Docker.pdfJFTL-2018-Comment-mettre-en-place-des-plateformes-de-test-grâce-à-Docker.pdf
JFTL-2018-Comment-mettre-en-place-des-plateformes-de-test-grâce-à-Docker.pdfqsdqsd4
 
XebiCon'17 : Migration d’une application web vers un Paas Openshift - Akram B...
XebiCon'17 : Migration d’une application web vers un Paas Openshift - Akram B...XebiCon'17 : Migration d’une application web vers un Paas Openshift - Akram B...
XebiCon'17 : Migration d’une application web vers un Paas Openshift - Akram B...Publicis Sapient Engineering
 
Ops@viadeo : Puppet & Co... 6 mois après par Xavier Krantz
Ops@viadeo : Puppet & Co... 6 mois après par Xavier KrantzOps@viadeo : Puppet & Co... 6 mois après par Xavier Krantz
Ops@viadeo : Puppet & Co... 6 mois après par Xavier KrantzOlivier DASINI
 
XebiCon'16 : Choisissez votre style avec Docker & Amazon Web Services Par Al...
XebiCon'16 : Choisissez votre style avec Docker & Amazon Web Services  Par Al...XebiCon'16 : Choisissez votre style avec Docker & Amazon Web Services  Par Al...
XebiCon'16 : Choisissez votre style avec Docker & Amazon Web Services Par Al...Publicis Sapient Engineering
 
Node.js dans Windows Azure mobile services et web sites
Node.js dans Windows Azure mobile services et web sitesNode.js dans Windows Azure mobile services et web sites
Node.js dans Windows Azure mobile services et web sitesMicrosoft
 
08 01 mise en place d'un serveur web
08 01 mise en place d'un serveur web08 01 mise en place d'un serveur web
08 01 mise en place d'un serveur webNoël
 
Sébastien Coutu: Copy this Meetup Devops - microservices - infrastructure imm...
Sébastien Coutu: Copy this Meetup Devops - microservices - infrastructure imm...Sébastien Coutu: Copy this Meetup Devops - microservices - infrastructure imm...
Sébastien Coutu: Copy this Meetup Devops - microservices - infrastructure imm...MSDEVMTL
 
MS365 Developer Bootcamp 2020 à Montréal - Trucs & Astuces SharePoint Framework
MS365 Developer Bootcamp 2020 à Montréal - Trucs & Astuces SharePoint FrameworkMS365 Developer Bootcamp 2020 à Montréal - Trucs & Astuces SharePoint Framework
MS365 Developer Bootcamp 2020 à Montréal - Trucs & Astuces SharePoint FrameworkLaurent Sittler
 

Similar a Pm2 pres (20)

REX Openshift à la Poste
REX Openshift à la PosteREX Openshift à la Poste
REX Openshift à la Poste
 
Industrialisation PHP - Canal+
Industrialisation PHP - Canal+Industrialisation PHP - Canal+
Industrialisation PHP - Canal+
 
Microservices based application development with Docker (French)
Microservices based application development with Docker (French)Microservices based application development with Docker (French)
Microservices based application development with Docker (French)
 
Perf university
Perf universityPerf university
Perf university
 
Intro to docker
Intro to dockerIntro to docker
Intro to docker
 
CI-Jenkins.pptx
CI-Jenkins.pptxCI-Jenkins.pptx
CI-Jenkins.pptx
 
Université de la performance - Devoxx France
Université de la performance - Devoxx FranceUniversité de la performance - Devoxx France
Université de la performance - Devoxx France
 
Intellicore Tech Talk 10 - Apache Web Server Internals
Intellicore Tech Talk 10 - Apache Web Server InternalsIntellicore Tech Talk 10 - Apache Web Server Internals
Intellicore Tech Talk 10 - Apache Web Server Internals
 
Quoi de neuf à Devoxx France 2017 ?
Quoi de neuf à Devoxx France 2017 ?Quoi de neuf à Devoxx France 2017 ?
Quoi de neuf à Devoxx France 2017 ?
 
JFTL-2018-Comment-mettre-en-place-des-plateformes-de-test-grâce-à-Docker.pdf
JFTL-2018-Comment-mettre-en-place-des-plateformes-de-test-grâce-à-Docker.pdfJFTL-2018-Comment-mettre-en-place-des-plateformes-de-test-grâce-à-Docker.pdf
JFTL-2018-Comment-mettre-en-place-des-plateformes-de-test-grâce-à-Docker.pdf
 
Infrastructure as code drupal
Infrastructure as code drupalInfrastructure as code drupal
Infrastructure as code drupal
 
Jenkins
JenkinsJenkins
Jenkins
 
XebiCon'17 : Migration d’une application web vers un Paas Openshift - Akram B...
XebiCon'17 : Migration d’une application web vers un Paas Openshift - Akram B...XebiCon'17 : Migration d’une application web vers un Paas Openshift - Akram B...
XebiCon'17 : Migration d’une application web vers un Paas Openshift - Akram B...
 
Ops@viadeo : Puppet & Co... 6 mois après par Xavier Krantz
Ops@viadeo : Puppet & Co... 6 mois après par Xavier KrantzOps@viadeo : Puppet & Co... 6 mois après par Xavier Krantz
Ops@viadeo : Puppet & Co... 6 mois après par Xavier Krantz
 
XebiCon'16 : Choisissez votre style avec Docker & Amazon Web Services Par Al...
XebiCon'16 : Choisissez votre style avec Docker & Amazon Web Services  Par Al...XebiCon'16 : Choisissez votre style avec Docker & Amazon Web Services  Par Al...
XebiCon'16 : Choisissez votre style avec Docker & Amazon Web Services Par Al...
 
Node.js dans Windows Azure mobile services et web sites
Node.js dans Windows Azure mobile services et web sitesNode.js dans Windows Azure mobile services et web sites
Node.js dans Windows Azure mobile services et web sites
 
08 01 mise en place d'un serveur web
08 01 mise en place d'un serveur web08 01 mise en place d'un serveur web
08 01 mise en place d'un serveur web
 
Sébastien Coutu: Copy this Meetup Devops - microservices - infrastructure imm...
Sébastien Coutu: Copy this Meetup Devops - microservices - infrastructure imm...Sébastien Coutu: Copy this Meetup Devops - microservices - infrastructure imm...
Sébastien Coutu: Copy this Meetup Devops - microservices - infrastructure imm...
 
MS365 Developer Bootcamp 2020 à Montréal - Trucs & Astuces SharePoint Framework
MS365 Developer Bootcamp 2020 à Montréal - Trucs & Astuces SharePoint FrameworkMS365 Developer Bootcamp 2020 à Montréal - Trucs & Astuces SharePoint Framework
MS365 Developer Bootcamp 2020 à Montréal - Trucs & Astuces SharePoint Framework
 
Support NodeJS avec TypeScript Express MongoDB
Support NodeJS avec TypeScript Express MongoDBSupport NodeJS avec TypeScript Express MongoDB
Support NodeJS avec TypeScript Express MongoDB
 

Pm2 pres