SlideShare une entreprise Scribd logo
1  sur  27
Télécharger pour lire hors ligne
UTILISER SALT POUR TESTER
SON INFRASTRUCTURE SUR
OPENSTACK OU DOCKER
QUI?
David Douard (Logilab)
✉david.douard@logilab.fr
὆david@jabber.logilab.org
@douardda
douardda
QUOI ?
Salt
c'est chouette
Docker
c'est à la mode
OpenStack
tout le monde en a dans ses placards
sinon, ça marche aussi avec EC2
SALT C'EST CHOUETTE...
u s e r @ s a l t m a s t e r : ~ $ s a l t ' * ' s t a t e . h i g h s t a t e t e s t = T r u e
u s e r @ s a l t m a s t e r : ~ $ s a l t ' * ' s t a t e . h i g h s t a t e
ou
u s e r @ s a l t m a s t e r : ~ $ s a l t ' * ' p k g . r e f r e s h _ d b
u s e r @ s a l t m a s t e r : ~ $ s a l t ' * ' p k g . l i s t _ u p g r a d e s
u s e r @ s a l t m a s t e r : ~ $ s a l t ' * ' p k g . u p g r a d e _ a v a i l a b l e
mais aussi
r o o t @ s a l t e d : ~ $ s a l t - c a l l s t a t e . h i g h s t a t e t e s t = T r u e
SALT C'EST CHOUETTE...
u s e r @ s a l t m a s t e r : ~ $ s a l t - G ' r o l e s : a p a c h e ' a p a c h e . v h o s t s
1 9 2 . 1 6 8 . 1 . 1 0 0 : 8 0 :
- - - - - - - - - -
a s t r o i d . o r g :
- - - - - - - - - -
c o n f :
/ e t c / a p a c h e 2 / s i t e s - e n a b l e d / a s t r o i d . o r g . c o n f : 1
p o r t :
8 0
v h o s t :
a s t r o i d . o r g
c u b i c w e b . o r g :
- - - - - - - - - -
c o n f :
/ e t c / a p a c h e 2 / s i t e s - e n a b l e d / c u b i c w e b . o r g . c o n f : 7
[ . . . ]
PITCH OF SALT
Fast, scalable and flexible software for data
center automation, from infrastructure and
any cloud, to the entire application stack.
SALT - C'EST QUOI ?
exécution distante asynchrone
gestion de configuration centralisée
déploiement d'infrastructure à la demande
gestion de machines virtuelles
supervision et monitoring
une boîte à outils pour la gestion d'infrastructure !
SALT - C'EST COMMENT ?
Logiciel Libre
Rapide
Python
Récent (mars 2011)
ZMQ (PUB/SUB + REQ/REP)
Bien packagé pour Debian et RedHat
Communité très active
Très flexible et extensible
Supporte même Windows
EXECUTION À DISTANCE
u s e r @ m a s t e r : ~ # s a l t - G ' r o l e s : d e s k t o p ' g n o m e . g e t I d l e A c t i v a t i o n u s e r = d a v i d
u s e r @ m a s t e r : ~ # s a l t ' * ' p k g . i n s t a l l l i b s s l 1 . 0 . 0 r e f r e s h = T r u e
u s e r @ m a s t e r : ~ # s a l t ' * ' c m d . r u n c h e c k r e s t a r t
u s e r @ m a s t e r : ~ # s a l t ' * ' s e r v i c e . r e s t a r t s s h d
u s e r @ m a s t e r : ~ # s a l t ' * ' s e r v i c e . r e s t a r t a p a c h e 2
CONFIGURATION
m a k e s u r e n t p i s r u n n i n g :
p k g . i n s t a l l e d :
- n a m e : n t p
s e r v i c e . r u n n i n g :
- n a m e : n t p d
- w a t c h :
- f i l e : / e t c / n t p . c o n f
d e p l o y n t p c o n f i g u r a t i o n :
f i l e . m a n a g e d :
- n a m e : / e t c / n t p . c o n f
- s o u r c e : s a l t : / / n t p / n t p . c o n f
- r e q u i r e :
- p k g : n t p
CLIWeb
SSH
agent-less servers
salt-master
salt-minions
returners
salt-syndic
salt-minions
user
salt-masterless
SALT-CLOUD
Permet de piloter la plupart des plateformes de cloud ou de
virtualisation.
SALT-CLOUD
providers : les fournisseurs de machines
profiles : les types de machines
créer, supprimer, interroger des VMs
u s e r @ s a l t : ~ $ s a l t - c l o u d - p j e s s i e - i c e h o u s e w e b 1 w e b 2 d b 1 a p p 1 a p p 2
u s e r @ s a l t : ~ $ s a l t - c l o u d - d w e b 2 a p p 2
u s e r @ s a l t : ~ $ s a l t - c l o u d - Q
SALT-CLOUD
À LA CRÉATION D'UNE MACHINE
démarre la VM sur la plateforme choisie
provisionne un salt-minion
permet de provisionner un salt-master local
accepte sa clef
lance une mise en conformité (highstate)
PILOTER DOCKER AVEC SALT
s a l t d o c k e r . l o g i l a b . f r d o c k e r n g . p s
s a l t d o c k e r . l o g i l a b . f r d o c k e r n g . i n s p e c t m y d o c k e r
s a l t d o c k e r . l o g i l a b . f r d o c k e r n g . c o m m i t m y d o c k e r r e p o / m y d o c k e r : t a g
DÉCRIRE SES CONTENEURS
AVEC SALT
# s t a t e s / m y _ s e r v i c e . s l s
m y r e p o / m y a p p c o n t a i n e r :
d o c k e r n g . i m a g e _ p r e s e n t :
- b u i l d : h t t p s : / / g i t h u b . c o m / m y u s e r / m y r e p o . g i t
m y _ s e r v i c e :
d o c k e r n g . r u n n i n g :
- c o n t a i n e r : m y r e p o / m y a p p c o n t a i n e r
- p o r t _ b i n d i n g s : 5 0 0 0 : 5 0 0 0
déploiement :
u s e r @ s a l t m a s t e r : ~ $ s a l t d o c k e r . l o g i l a b . f r s t a t e . s l s m y _ s e r v i c e
SCALE!
{ % f o r p o r t i n r a n g e ( 5 0 0 0 , 5 1 0 0 ) % }
m y _ s e r v i c e { { p o r t } } :
d o c k e r n g . r u n n i n g :
- c o n t a i n e r : m y a p p c o n t a i n e r
- p o r t _ b i n d i n g s : { { p o r t } } : 5 0 0 0
{ % e n d f o r % }
GÉRER SES CONTENEURS
AVEC SALT
approche VM légère
on utilise salt-minion comme PID1
permet de provisionner ses conteneurs à partir du salt-
master
permet de piloter des conteneurs à partir du salt-master
F R O M d o c k e r . l o g i l a b . f r / l o g i l a b / d e b i a n : j e s s i e
R U N a p t - g e t u p d a t e
R U N a p t - g e t - y i n s t a l l s a l t - m i n i o n
E N T R Y P O I N T / u s r / b i n / s a l t - m i n i o n
Julien
salt-master dev
Hg
Arthur
David
front.logilab.fr db.logilab.fr
app1.logilab.fr app2.logilab.fr
Power Edge
2950
db.logilab.fr
Power Edge
2950
host.logilab.fr
front.logilab.fr
app1.logilab.fr
app2.logilab.fr
salt-master
MMeerrccuurriiaall
00:00
BÉNÉFICES
DE SALT + DOCKER + MERCURIAL
Versionnement de la configuration
avec les
avec une UI à peu près utilisable
mutable changesets
https://xkcd.com/1597
BÉNÉFICES
DE SALT + DOCKER + MERCURIAL
Déploiement en environment mixte
docker, lxc, kvm, esx, cloud, baremetal
Configuration indépendante de l'environnement
d'exécution
BÉNÉFICES
DE SALT + DOCKER + MERCURIAL
Approche devops : les développeurs
soumettent des patches pour l'infrastucture
peuvent reproduire la prod en quelques secondes
Revue de code
Intégration continue
Test Driven Infrastructure
DIFFICULTÉS
DE DOCKER + SALT
NÉCESSITE UNE CONF SOIGNÉE
Ne pas spammer l'IT quand on lance des conteneurs
Ne pas pourrir la supervision
Faire attention à ses service.running
DIFFICULTÉS
DE DOCKER + SALT
PAS DE INIT OU SYSTEMD COMME PID1
Respecter strictement la Docker way of life
Faire attention à ses service.running
Utiliser des outils comme supervisord comme PID1
Arrêter d'utiliser Docker ?
rkt rocks!
RKT
https://github.com/coreos/rkt
implémentation de la spec
conçu pour systemd
compatible avec Docker
architecture modulaire
App Container spec
MERCI !
✉david.douard@logilab.fr
὆david@jabber.logilab.org
@douardda
douardda
salt-fr@lists.afpy.fr
#salt-fr sur freenode

Contenu connexe

En vedette

Gestion des vulnérabilités dans le cas de Shellshock
Gestion des vulnérabilités dans le cas de ShellshockGestion des vulnérabilités dans le cas de Shellshock
Gestion des vulnérabilités dans le cas de ShellshockJohan Moreau
 
A user's perspective on SaltStack and other configuration management tools
A user's perspective on SaltStack and other configuration management toolsA user's perspective on SaltStack and other configuration management tools
A user's perspective on SaltStack and other configuration management toolsSaltStack
 
Integration testing for salt states using aws ec2 container service
Integration testing for salt states using aws ec2 container serviceIntegration testing for salt states using aws ec2 container service
Integration testing for salt states using aws ec2 container serviceSaltStack
 
Get Rid of Visual SourceSafe Codemash 2010
Get Rid of Visual SourceSafe Codemash 2010Get Rid of Visual SourceSafe Codemash 2010
Get Rid of Visual SourceSafe Codemash 2010Joe Kuemerle
 
The SaltStack Pub Crawl - Fosscomm 2016
The SaltStack Pub Crawl - Fosscomm 2016The SaltStack Pub Crawl - Fosscomm 2016
The SaltStack Pub Crawl - Fosscomm 2016effie mouzeli
 
Intégration de la Police Municipale de Rivière-du-Loup à la Sûreté du Québec
Intégration de la Police Municipale de Rivière-du-Loup à la Sûreté du Québec Intégration de la Police Municipale de Rivière-du-Loup à la Sûreté du Québec
Intégration de la Police Municipale de Rivière-du-Loup à la Sûreté du Québec Pascal Gagnon
 
Salt conf 2014 - Using SaltStack in high availability environments
Salt conf 2014 - Using SaltStack in high availability environmentsSalt conf 2014 - Using SaltStack in high availability environments
Salt conf 2014 - Using SaltStack in high availability environmentsBenjamin Cane
 
Salt Presentation
Salt PresentationSalt Presentation
Salt Presentationmcmetzger01
 
SaltConf14 - Matthew Williams, Flowroute - Salt Virt for Linux contatiners an...
SaltConf14 - Matthew Williams, Flowroute - Salt Virt for Linux contatiners an...SaltConf14 - Matthew Williams, Flowroute - Salt Virt for Linux contatiners an...
SaltConf14 - Matthew Williams, Flowroute - Salt Virt for Linux contatiners an...SaltStack
 
Scaling Docker with Kubernetes
Scaling Docker with KubernetesScaling Docker with Kubernetes
Scaling Docker with KubernetesCarlos Sanchez
 
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...Brian Grant
 
DEVNET-1007 Network Infrastructure as Code with Chef and Cisco
DEVNET-1007	Network Infrastructure as Code with Chef and CiscoDEVNET-1007	Network Infrastructure as Code with Chef and Cisco
DEVNET-1007 Network Infrastructure as Code with Chef and CiscoCisco DevNet
 
Kubernetes Architecture and Introduction – Paris Kubernetes Meetup
Kubernetes Architecture and Introduction – Paris Kubernetes MeetupKubernetes Architecture and Introduction – Paris Kubernetes Meetup
Kubernetes Architecture and Introduction – Paris Kubernetes MeetupStefan Schimanski
 
An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to KubernetesImesh Gunaratne
 
Générer des stats sur son infra salt
Générer des stats sur son infra saltGénérer des stats sur son infra salt
Générer des stats sur son infra saltArthur Lutz
 
PyConFR 2015 : Utiliser salt pour tester son infrastructure sur open stack ou...
PyConFR 2015 : Utiliser salt pour tester son infrastructure sur open stack ou...PyConFR 2015 : Utiliser salt pour tester son infrastructure sur open stack ou...
PyConFR 2015 : Utiliser salt pour tester son infrastructure sur open stack ou...Arthur Lutz
 
A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...
A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...
A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...SlideShare
 

En vedette (20)

Gestion des vulnérabilités dans le cas de Shellshock
Gestion des vulnérabilités dans le cas de ShellshockGestion des vulnérabilités dans le cas de Shellshock
Gestion des vulnérabilités dans le cas de Shellshock
 
A user's perspective on SaltStack and other configuration management tools
A user's perspective on SaltStack and other configuration management toolsA user's perspective on SaltStack and other configuration management tools
A user's perspective on SaltStack and other configuration management tools
 
Integration testing for salt states using aws ec2 container service
Integration testing for salt states using aws ec2 container serviceIntegration testing for salt states using aws ec2 container service
Integration testing for salt states using aws ec2 container service
 
Get Rid of Visual SourceSafe Codemash 2010
Get Rid of Visual SourceSafe Codemash 2010Get Rid of Visual SourceSafe Codemash 2010
Get Rid of Visual SourceSafe Codemash 2010
 
Salt stack
Salt stackSalt stack
Salt stack
 
The SaltStack Pub Crawl - Fosscomm 2016
The SaltStack Pub Crawl - Fosscomm 2016The SaltStack Pub Crawl - Fosscomm 2016
The SaltStack Pub Crawl - Fosscomm 2016
 
Intégration de la Police Municipale de Rivière-du-Loup à la Sûreté du Québec
Intégration de la Police Municipale de Rivière-du-Loup à la Sûreté du Québec Intégration de la Police Municipale de Rivière-du-Loup à la Sûreté du Québec
Intégration de la Police Municipale de Rivière-du-Loup à la Sûreté du Québec
 
Salt conf 2014 - Using SaltStack in high availability environments
Salt conf 2014 - Using SaltStack in high availability environmentsSalt conf 2014 - Using SaltStack in high availability environments
Salt conf 2014 - Using SaltStack in high availability environments
 
Salt Presentation
Salt PresentationSalt Presentation
Salt Presentation
 
SaltConf14 - Matthew Williams, Flowroute - Salt Virt for Linux contatiners an...
SaltConf14 - Matthew Williams, Flowroute - Salt Virt for Linux contatiners an...SaltConf14 - Matthew Williams, Flowroute - Salt Virt for Linux contatiners an...
SaltConf14 - Matthew Williams, Flowroute - Salt Virt for Linux contatiners an...
 
kubernetes, pourquoi et comment
kubernetes, pourquoi et commentkubernetes, pourquoi et comment
kubernetes, pourquoi et comment
 
Scaling Docker with Kubernetes
Scaling Docker with KubernetesScaling Docker with Kubernetes
Scaling Docker with Kubernetes
 
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
WSO2Con US 2015 Kubernetes: a platform for automating deployment, scaling, an...
 
DEVNET-1007 Network Infrastructure as Code with Chef and Cisco
DEVNET-1007	Network Infrastructure as Code with Chef and CiscoDEVNET-1007	Network Infrastructure as Code with Chef and Cisco
DEVNET-1007 Network Infrastructure as Code with Chef and Cisco
 
Kubernetes Architecture and Introduction – Paris Kubernetes Meetup
Kubernetes Architecture and Introduction – Paris Kubernetes MeetupKubernetes Architecture and Introduction – Paris Kubernetes Meetup
Kubernetes Architecture and Introduction – Paris Kubernetes Meetup
 
An Introduction to Kubernetes
An Introduction to KubernetesAn Introduction to Kubernetes
An Introduction to Kubernetes
 
Salt I et II
Salt I et IISalt I et II
Salt I et II
 
Générer des stats sur son infra salt
Générer des stats sur son infra saltGénérer des stats sur son infra salt
Générer des stats sur son infra salt
 
PyConFR 2015 : Utiliser salt pour tester son infrastructure sur open stack ou...
PyConFR 2015 : Utiliser salt pour tester son infrastructure sur open stack ou...PyConFR 2015 : Utiliser salt pour tester son infrastructure sur open stack ou...
PyConFR 2015 : Utiliser salt pour tester son infrastructure sur open stack ou...
 
A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...
A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...
A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...
 

Similaire à Utiliser salt pour tester son infrastructure sur open stack ou docker

Newsletter février 2017 - Transtech
Newsletter février 2017 - TranstechNewsletter février 2017 - Transtech
Newsletter février 2017 - TranstechTranstech Aquitaine
 
Discrete Wire Crimper
Discrete Wire CrimperDiscrete Wire Crimper
Discrete Wire CrimperPhil Heft
 
PRAINSA CEVICO ALGERIE
PRAINSA CEVICO ALGERIEPRAINSA CEVICO ALGERIE
PRAINSA CEVICO ALGERIENadjib BELKADI
 
Les patrons de conception du composant Form
Les patrons de conception du composant FormLes patrons de conception du composant Form
Les patrons de conception du composant FormVladyslav Riabchenko
 
SkillValue Master Class NodeJS 101
SkillValue Master Class NodeJS 101SkillValue Master Class NodeJS 101
SkillValue Master Class NodeJS 101Benoit Fillon
 
Catalogue Doux Joaillier 2014 2015
Catalogue Doux Joaillier 2014 2015Catalogue Doux Joaillier 2014 2015
Catalogue Doux Joaillier 2014 2015leamarcone
 
ACCIONA 100% ECOPOWERED REVIENT SUR LE DAKAR
ACCIONA 100% ECOPOWERED REVIENT SUR LE DAKARACCIONA 100% ECOPOWERED REVIENT SUR LE DAKAR
ACCIONA 100% ECOPOWERED REVIENT SUR LE DAKARacciona
 
TRANSTECH - Lettre information - janvier
TRANSTECH - Lettre information - janvierTRANSTECH - Lettre information - janvier
TRANSTECH - Lettre information - janvierCynthia JEGO
 
TRANSTECH - Lettre information - janvier
TRANSTECH - Lettre information - janvierTRANSTECH - Lettre information - janvier
TRANSTECH - Lettre information - janvierTranstech Aquitaine
 
Éclipse by minimal disruption
Éclipse by minimal disruptionÉclipse by minimal disruption
Éclipse by minimal disruptionMicka Touillaud
 
formation-administration-reseau-linux.pdf
formation-administration-reseau-linux.pdfformation-administration-reseau-linux.pdf
formation-administration-reseau-linux.pdfssusere8c939
 
Beyond F5 - windbg et .Net
Beyond F5 - windbg et .NetBeyond F5 - windbg et .Net
Beyond F5 - windbg et .NetYann Schwartz
 
Newsletter Août 2017 - Transtech
Newsletter Août 2017 - TranstechNewsletter Août 2017 - Transtech
Newsletter Août 2017 - TranstechTranstech Aquitaine
 

Similaire à Utiliser salt pour tester son infrastructure sur open stack ou docker (20)

Newsletter février 2017 - Transtech
Newsletter février 2017 - TranstechNewsletter février 2017 - Transtech
Newsletter février 2017 - Transtech
 
Kenwood KM262
Kenwood KM262Kenwood KM262
Kenwood KM262
 
Discrete Wire Crimper
Discrete Wire CrimperDiscrete Wire Crimper
Discrete Wire Crimper
 
PRAINSA CEVICO ALGERIE
PRAINSA CEVICO ALGERIEPRAINSA CEVICO ALGERIE
PRAINSA CEVICO ALGERIE
 
Les patrons de conception du composant Form
Les patrons de conception du composant FormLes patrons de conception du composant Form
Les patrons de conception du composant Form
 
SkillValue Master Class NodeJS 101
SkillValue Master Class NodeJS 101SkillValue Master Class NodeJS 101
SkillValue Master Class NodeJS 101
 
Presentation
PresentationPresentation
Presentation
 
Msgi(fr)
Msgi(fr) Msgi(fr)
Msgi(fr)
 
Catalogue Doux Joaillier 2014 2015
Catalogue Doux Joaillier 2014 2015Catalogue Doux Joaillier 2014 2015
Catalogue Doux Joaillier 2014 2015
 
Auto formation *WinDev
Auto formation *WinDev Auto formation *WinDev
Auto formation *WinDev
 
Gestion de projets
Gestion de projetsGestion de projets
Gestion de projets
 
ACCIONA 100% ECOPOWERED REVIENT SUR LE DAKAR
ACCIONA 100% ECOPOWERED REVIENT SUR LE DAKARACCIONA 100% ECOPOWERED REVIENT SUR LE DAKAR
ACCIONA 100% ECOPOWERED REVIENT SUR LE DAKAR
 
TRANSTECH - Lettre information - janvier
TRANSTECH - Lettre information - janvierTRANSTECH - Lettre information - janvier
TRANSTECH - Lettre information - janvier
 
TRANSTECH - Lettre information - janvier
TRANSTECH - Lettre information - janvierTRANSTECH - Lettre information - janvier
TRANSTECH - Lettre information - janvier
 
Éclipse by minimal disruption
Éclipse by minimal disruptionÉclipse by minimal disruption
Éclipse by minimal disruption
 
formation-administration-reseau-linux.pdf
formation-administration-reseau-linux.pdfformation-administration-reseau-linux.pdf
formation-administration-reseau-linux.pdf
 
Beyond F5 - windbg et .Net
Beyond F5 - windbg et .NetBeyond F5 - windbg et .Net
Beyond F5 - windbg et .Net
 
Kenwood km010
Kenwood km010Kenwood km010
Kenwood km010
 
Newsletter Août 2017 - Transtech
Newsletter Août 2017 - TranstechNewsletter Août 2017 - Transtech
Newsletter Août 2017 - Transtech
 
Code, ship and run
Code, ship and runCode, ship and run
Code, ship and run
 

Plus de Logilab

Testinfra pyconfr 2017
Testinfra pyconfr 2017Testinfra pyconfr 2017
Testinfra pyconfr 2017Logilab
 
Open Source & Open Data : les bienfaits des communs
Open Source & Open Data : les bienfaits des communsOpen Source & Open Data : les bienfaits des communs
Open Source & Open Data : les bienfaits des communsLogilab
 
Salon Open Data
Salon Open DataSalon Open Data
Salon Open DataLogilab
 
Pydata Paris Python for manufacturing musical instruments
Pydata Paris Python for manufacturing musical instrumentsPydata Paris Python for manufacturing musical instruments
Pydata Paris Python for manufacturing musical instrumentsLogilab
 
Présentation Logilab
Présentation LogilabPrésentation Logilab
Présentation LogilabLogilab
 
Système d'archivage électronique mutualisé
Système d'archivage électronique mutualiséSystème d'archivage électronique mutualisé
Système d'archivage électronique mutualiséLogilab
 
Importer des données en Python avec CubicWeb 3.21
Importer des données en Python avec CubicWeb 3.21Importer des données en Python avec CubicWeb 3.21
Importer des données en Python avec CubicWeb 3.21Logilab
 
Simulagora au service d'un grand défi industriel
Simulagora au service d'un grand défi industrielSimulagora au service d'un grand défi industriel
Simulagora au service d'un grand défi industrielLogilab
 
Simulagora - Salon du Bourget
Simulagora - Salon du BourgetSimulagora - Salon du Bourget
Simulagora - Salon du BourgetLogilab
 
Innover par et pour la donnée - Logilab ADBU Bibcamp 2015
Innover par et pour la donnée - Logilab ADBU Bibcamp 2015Innover par et pour la donnée - Logilab ADBU Bibcamp 2015
Innover par et pour la donnée - Logilab ADBU Bibcamp 2015Logilab
 
Study of the dynamic behavior of a pump with Code_ASTER on Simulagora
Study of the dynamic behavior of a pump with Code_ASTER on SimulagoraStudy of the dynamic behavior of a pump with Code_ASTER on Simulagora
Study of the dynamic behavior of a pump with Code_ASTER on SimulagoraLogilab
 
Battle Opendata - Logilab - Cubicweb
Battle Opendata - Logilab - CubicwebBattle Opendata - Logilab - Cubicweb
Battle Opendata - Logilab - CubicwebLogilab
 
Debconf14 : Putting some salt in your Debian systems -- Julien Cristau
Debconf14 : Putting some salt in your Debian systems -- Julien CristauDebconf14 : Putting some salt in your Debian systems -- Julien Cristau
Debconf14 : Putting some salt in your Debian systems -- Julien CristauLogilab
 
Simulagora (Euroscipy2014 - Logilab)
Simulagora (Euroscipy2014 - Logilab)Simulagora (Euroscipy2014 - Logilab)
Simulagora (Euroscipy2014 - Logilab)Logilab
 
PAFI (Euroscipy2014 - Logilab)
PAFI (Euroscipy2014 - Logilab)PAFI (Euroscipy2014 - Logilab)
PAFI (Euroscipy2014 - Logilab)Logilab
 
Open Legislative Data Conference 2014
Open Legislative Data Conference 2014Open Legislative Data Conference 2014
Open Legislative Data Conference 2014Logilab
 
Pylint : 10 ans, état des lieux
Pylint : 10 ans, état des lieuxPylint : 10 ans, état des lieux
Pylint : 10 ans, état des lieuxLogilab
 
BRAINOMICS A management system for exploring and merging heterogeneous brain ...
BRAINOMICS A management system for exploring and merging heterogeneous brain ...BRAINOMICS A management system for exploring and merging heterogeneous brain ...
BRAINOMICS A management system for exploring and merging heterogeneous brain ...Logilab
 
Présentation sur le stand à l'OpenWorldForum 2013
Présentation sur le stand à l'OpenWorldForum 2013Présentation sur le stand à l'OpenWorldForum 2013
Présentation sur le stand à l'OpenWorldForum 2013Logilab
 
Cubicweb lauréat Dataconnexions 2013
Cubicweb lauréat Dataconnexions 2013Cubicweb lauréat Dataconnexions 2013
Cubicweb lauréat Dataconnexions 2013Logilab
 

Plus de Logilab (20)

Testinfra pyconfr 2017
Testinfra pyconfr 2017Testinfra pyconfr 2017
Testinfra pyconfr 2017
 
Open Source & Open Data : les bienfaits des communs
Open Source & Open Data : les bienfaits des communsOpen Source & Open Data : les bienfaits des communs
Open Source & Open Data : les bienfaits des communs
 
Salon Open Data
Salon Open DataSalon Open Data
Salon Open Data
 
Pydata Paris Python for manufacturing musical instruments
Pydata Paris Python for manufacturing musical instrumentsPydata Paris Python for manufacturing musical instruments
Pydata Paris Python for manufacturing musical instruments
 
Présentation Logilab
Présentation LogilabPrésentation Logilab
Présentation Logilab
 
Système d'archivage électronique mutualisé
Système d'archivage électronique mutualiséSystème d'archivage électronique mutualisé
Système d'archivage électronique mutualisé
 
Importer des données en Python avec CubicWeb 3.21
Importer des données en Python avec CubicWeb 3.21Importer des données en Python avec CubicWeb 3.21
Importer des données en Python avec CubicWeb 3.21
 
Simulagora au service d'un grand défi industriel
Simulagora au service d'un grand défi industrielSimulagora au service d'un grand défi industriel
Simulagora au service d'un grand défi industriel
 
Simulagora - Salon du Bourget
Simulagora - Salon du BourgetSimulagora - Salon du Bourget
Simulagora - Salon du Bourget
 
Innover par et pour la donnée - Logilab ADBU Bibcamp 2015
Innover par et pour la donnée - Logilab ADBU Bibcamp 2015Innover par et pour la donnée - Logilab ADBU Bibcamp 2015
Innover par et pour la donnée - Logilab ADBU Bibcamp 2015
 
Study of the dynamic behavior of a pump with Code_ASTER on Simulagora
Study of the dynamic behavior of a pump with Code_ASTER on SimulagoraStudy of the dynamic behavior of a pump with Code_ASTER on Simulagora
Study of the dynamic behavior of a pump with Code_ASTER on Simulagora
 
Battle Opendata - Logilab - Cubicweb
Battle Opendata - Logilab - CubicwebBattle Opendata - Logilab - Cubicweb
Battle Opendata - Logilab - Cubicweb
 
Debconf14 : Putting some salt in your Debian systems -- Julien Cristau
Debconf14 : Putting some salt in your Debian systems -- Julien CristauDebconf14 : Putting some salt in your Debian systems -- Julien Cristau
Debconf14 : Putting some salt in your Debian systems -- Julien Cristau
 
Simulagora (Euroscipy2014 - Logilab)
Simulagora (Euroscipy2014 - Logilab)Simulagora (Euroscipy2014 - Logilab)
Simulagora (Euroscipy2014 - Logilab)
 
PAFI (Euroscipy2014 - Logilab)
PAFI (Euroscipy2014 - Logilab)PAFI (Euroscipy2014 - Logilab)
PAFI (Euroscipy2014 - Logilab)
 
Open Legislative Data Conference 2014
Open Legislative Data Conference 2014Open Legislative Data Conference 2014
Open Legislative Data Conference 2014
 
Pylint : 10 ans, état des lieux
Pylint : 10 ans, état des lieuxPylint : 10 ans, état des lieux
Pylint : 10 ans, état des lieux
 
BRAINOMICS A management system for exploring and merging heterogeneous brain ...
BRAINOMICS A management system for exploring and merging heterogeneous brain ...BRAINOMICS A management system for exploring and merging heterogeneous brain ...
BRAINOMICS A management system for exploring and merging heterogeneous brain ...
 
Présentation sur le stand à l'OpenWorldForum 2013
Présentation sur le stand à l'OpenWorldForum 2013Présentation sur le stand à l'OpenWorldForum 2013
Présentation sur le stand à l'OpenWorldForum 2013
 
Cubicweb lauréat Dataconnexions 2013
Cubicweb lauréat Dataconnexions 2013Cubicweb lauréat Dataconnexions 2013
Cubicweb lauréat Dataconnexions 2013
 

Utiliser salt pour tester son infrastructure sur open stack ou docker

  • 1. UTILISER SALT POUR TESTER SON INFRASTRUCTURE SUR OPENSTACK OU DOCKER
  • 3. QUOI ? Salt c'est chouette Docker c'est à la mode OpenStack tout le monde en a dans ses placards sinon, ça marche aussi avec EC2
  • 4. SALT C'EST CHOUETTE... u s e r @ s a l t m a s t e r : ~ $ s a l t ' * ' s t a t e . h i g h s t a t e t e s t = T r u e u s e r @ s a l t m a s t e r : ~ $ s a l t ' * ' s t a t e . h i g h s t a t e ou u s e r @ s a l t m a s t e r : ~ $ s a l t ' * ' p k g . r e f r e s h _ d b u s e r @ s a l t m a s t e r : ~ $ s a l t ' * ' p k g . l i s t _ u p g r a d e s u s e r @ s a l t m a s t e r : ~ $ s a l t ' * ' p k g . u p g r a d e _ a v a i l a b l e mais aussi r o o t @ s a l t e d : ~ $ s a l t - c a l l s t a t e . h i g h s t a t e t e s t = T r u e
  • 5. SALT C'EST CHOUETTE... u s e r @ s a l t m a s t e r : ~ $ s a l t - G ' r o l e s : a p a c h e ' a p a c h e . v h o s t s 1 9 2 . 1 6 8 . 1 . 1 0 0 : 8 0 : - - - - - - - - - - a s t r o i d . o r g : - - - - - - - - - - c o n f : / e t c / a p a c h e 2 / s i t e s - e n a b l e d / a s t r o i d . o r g . c o n f : 1 p o r t : 8 0 v h o s t : a s t r o i d . o r g c u b i c w e b . o r g : - - - - - - - - - - c o n f : / e t c / a p a c h e 2 / s i t e s - e n a b l e d / c u b i c w e b . o r g . c o n f : 7 [ . . . ]
  • 6. PITCH OF SALT Fast, scalable and flexible software for data center automation, from infrastructure and any cloud, to the entire application stack.
  • 7. SALT - C'EST QUOI ? exécution distante asynchrone gestion de configuration centralisée déploiement d'infrastructure à la demande gestion de machines virtuelles supervision et monitoring une boîte à outils pour la gestion d'infrastructure !
  • 8. SALT - C'EST COMMENT ? Logiciel Libre Rapide Python Récent (mars 2011) ZMQ (PUB/SUB + REQ/REP) Bien packagé pour Debian et RedHat Communité très active Très flexible et extensible Supporte même Windows
  • 9. EXECUTION À DISTANCE u s e r @ m a s t e r : ~ # s a l t - G ' r o l e s : d e s k t o p ' g n o m e . g e t I d l e A c t i v a t i o n u s e r = d a v i d u s e r @ m a s t e r : ~ # s a l t ' * ' p k g . i n s t a l l l i b s s l 1 . 0 . 0 r e f r e s h = T r u e u s e r @ m a s t e r : ~ # s a l t ' * ' c m d . r u n c h e c k r e s t a r t u s e r @ m a s t e r : ~ # s a l t ' * ' s e r v i c e . r e s t a r t s s h d u s e r @ m a s t e r : ~ # s a l t ' * ' s e r v i c e . r e s t a r t a p a c h e 2
  • 10. CONFIGURATION m a k e s u r e n t p i s r u n n i n g : p k g . i n s t a l l e d : - n a m e : n t p s e r v i c e . r u n n i n g : - n a m e : n t p d - w a t c h : - f i l e : / e t c / n t p . c o n f d e p l o y n t p c o n f i g u r a t i o n : f i l e . m a n a g e d : - n a m e : / e t c / n t p . c o n f - s o u r c e : s a l t : / / n t p / n t p . c o n f - r e q u i r e : - p k g : n t p
  • 12. SALT-CLOUD Permet de piloter la plupart des plateformes de cloud ou de virtualisation.
  • 13. SALT-CLOUD providers : les fournisseurs de machines profiles : les types de machines créer, supprimer, interroger des VMs u s e r @ s a l t : ~ $ s a l t - c l o u d - p j e s s i e - i c e h o u s e w e b 1 w e b 2 d b 1 a p p 1 a p p 2 u s e r @ s a l t : ~ $ s a l t - c l o u d - d w e b 2 a p p 2 u s e r @ s a l t : ~ $ s a l t - c l o u d - Q
  • 14. SALT-CLOUD À LA CRÉATION D'UNE MACHINE démarre la VM sur la plateforme choisie provisionne un salt-minion permet de provisionner un salt-master local accepte sa clef lance une mise en conformité (highstate)
  • 15. PILOTER DOCKER AVEC SALT s a l t d o c k e r . l o g i l a b . f r d o c k e r n g . p s s a l t d o c k e r . l o g i l a b . f r d o c k e r n g . i n s p e c t m y d o c k e r s a l t d o c k e r . l o g i l a b . f r d o c k e r n g . c o m m i t m y d o c k e r r e p o / m y d o c k e r : t a g
  • 16. DÉCRIRE SES CONTENEURS AVEC SALT # s t a t e s / m y _ s e r v i c e . s l s m y r e p o / m y a p p c o n t a i n e r : d o c k e r n g . i m a g e _ p r e s e n t : - b u i l d : h t t p s : / / g i t h u b . c o m / m y u s e r / m y r e p o . g i t m y _ s e r v i c e : d o c k e r n g . r u n n i n g : - c o n t a i n e r : m y r e p o / m y a p p c o n t a i n e r - p o r t _ b i n d i n g s : 5 0 0 0 : 5 0 0 0 déploiement : u s e r @ s a l t m a s t e r : ~ $ s a l t d o c k e r . l o g i l a b . f r s t a t e . s l s m y _ s e r v i c e
  • 17. SCALE! { % f o r p o r t i n r a n g e ( 5 0 0 0 , 5 1 0 0 ) % } m y _ s e r v i c e { { p o r t } } : d o c k e r n g . r u n n i n g : - c o n t a i n e r : m y a p p c o n t a i n e r - p o r t _ b i n d i n g s : { { p o r t } } : 5 0 0 0 { % e n d f o r % }
  • 18. GÉRER SES CONTENEURS AVEC SALT approche VM légère on utilise salt-minion comme PID1 permet de provisionner ses conteneurs à partir du salt- master permet de piloter des conteneurs à partir du salt-master F R O M d o c k e r . l o g i l a b . f r / l o g i l a b / d e b i a n : j e s s i e R U N a p t - g e t u p d a t e R U N a p t - g e t - y i n s t a l l s a l t - m i n i o n E N T R Y P O I N T / u s r / b i n / s a l t - m i n i o n
  • 19. Julien salt-master dev Hg Arthur David front.logilab.fr db.logilab.fr app1.logilab.fr app2.logilab.fr Power Edge 2950 db.logilab.fr Power Edge 2950 host.logilab.fr front.logilab.fr app1.logilab.fr app2.logilab.fr salt-master MMeerrccuurriiaall
  • 20. 00:00
  • 21. BÉNÉFICES DE SALT + DOCKER + MERCURIAL Versionnement de la configuration avec les avec une UI à peu près utilisable mutable changesets https://xkcd.com/1597
  • 22. BÉNÉFICES DE SALT + DOCKER + MERCURIAL Déploiement en environment mixte docker, lxc, kvm, esx, cloud, baremetal Configuration indépendante de l'environnement d'exécution
  • 23. BÉNÉFICES DE SALT + DOCKER + MERCURIAL Approche devops : les développeurs soumettent des patches pour l'infrastucture peuvent reproduire la prod en quelques secondes Revue de code Intégration continue Test Driven Infrastructure
  • 24. DIFFICULTÉS DE DOCKER + SALT NÉCESSITE UNE CONF SOIGNÉE Ne pas spammer l'IT quand on lance des conteneurs Ne pas pourrir la supervision Faire attention à ses service.running
  • 25. DIFFICULTÉS DE DOCKER + SALT PAS DE INIT OU SYSTEMD COMME PID1 Respecter strictement la Docker way of life Faire attention à ses service.running Utiliser des outils comme supervisord comme PID1 Arrêter d'utiliser Docker ? rkt rocks!
  • 26. RKT https://github.com/coreos/rkt implémentation de la spec conçu pour systemd compatible avec Docker architecture modulaire App Container spec