SlideShare a Scribd company logo
1 of 28
Download to read offline
Vagrant
Construire des environnements de
développement virtualisés
Human Talks - Paris - 9 juillet 2013
Julien Dubreuil
Développeur PHP / Drupal
Commerce Guys
Animateur du groupe utilisateur Drupal à Paris
@juliendubreuil
www.juliendubreuil.fr
dubreuil.julien@gmail.com
Quelques constats
Vagrant, c'est quoi ?
Vagrant comment ça marche ?
SOMMAIRE
Quelques constats simples
PROBLÈME #1
Accueillir un nouveau développeur
- Un poste à configurer
- Des projets à installer
=
Une journée de perdue
Uniformité des environnements
“Pourtant ça marche chez moi”
Environnement Développeur
!=
Environnement Dev
!=
Environnement Prod
PROBLÈME #2
PROBLÈME #3
Faire cohabiter différents environnements
PHP
5.2
PHP
5.3
PHP
5.4
MySQL
5.20
MySQL
5.33
MongoDB
2.2.5
MongoDB
2.4.5
Pas d'isolation
PROBLÈME #4
Espace
utilisateur
OS
PHP
PHP
Storm
FilesMySQL Apache
MongoDB
Mail
Chrome Firefox
http://jrcommercialcleaning.com
CONSTATS
Pas d'isolation
Pas exportable
Compliqué à installer / réinstaller
Espace
utilisateur
VIRTUALISATION
OS
VM
PHP
PHP
Storm
Files
MySQL
Apache
MongoDB
Mail
Chrome
Firefox
Virtualisation
Exportable
Isolation Hôte / VM
Simple à installer
Simple à utiliser
Compliqué à faire évoluer
SOLUTION ?
+
-
+
+
+
Vagrant
" Vagrant est un fantastique outil pour configurer,
administrer et distribuer des machines virtuelles via
une interface simple en ligne de commande. "
Par Mitch Hashimoto and John Bender
VAGRANT
VAGRANT
Vagrant
INDÉPENDANCE
La machine hôte n'est pas
polluée
UNIFORMITÉ
Les développeurs ont la même
configuration
CONFIGURABLE
Toute la configuration
réside dans des fichiers
VERSIONNABLE
RAPIDE À DÉPLOYER
3 commandes avant de commencer à
travailler
SIMPLE À UTILISER
Pas besoin d'être SysAdmin ou
DevOps
Répertoire
partagé
FONCTIONNALITÉS
Provisionning
automatisé
Port
forwarding
VirtualBox
VMWare
Accès SSH
Configuration
du réseau
VAGRANTFILE
Vagrantfile est à Vagrant ce que Makefile est au
Make
Description de la VM dans du code.
Un fichier par répertoire / projet
VAGRANT : BOXES
BOX = Environnement pré-installé
Des boxes prêtes à l'emploi : http://vagrantbox.es
- Debian
- Ubuntu
- CentOS
- ...
VEEWEE
VAGRANTFILE
Vagrant.configure("2") do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://example.com/precise64.box"
end
VAGRANTFILE - SHARED FOLDER
Vagrant.configure("2") do |config|
# Add a shared folder
config.vm.synced_folder "src/", "/src/website"
end
VM Host
/home/vagrant/folder
/home/bob/folder
Vagrant.configure("2") do |config|
# Network configuration
config.vm.network :private_network, ip:
"192.168.50.4"
# Port forwarding
config.vm.network :forwarded_port, guest: 80,
host: 8090
end
VAGRANTFILE - NETWORK & PORT
FORWARDING
VM Host
80 8090
3306 13306
COMMENT ÇA MARCHE
VAGRANT BOX
(Os image)
VAGRANTFILE
(Configuration)
VAGRANT
(CLI + API)
VIRTUAL BOX
(VM management)
VM
vagrant init
vagrant add box Precise64 http:/.../precise64.box
vagrant up
DÉMARRER LA MACHINE
$ vagrant --help
vagrant box
vagrant destroy
vagrant halt
vagrant init
vagrant provision
vagrant reload
vagrant resume
vagrant ssh
vagrant status
vagrant suspend
vagrant up
COMMANDES
VAGRANT
+ Exportable
+ Isolation Hôte / VM
+ Simple à installer
+ Simple à utiliser
+ Simple à faire évoluer
PROBLÈME RÉSOLU ?
+
+
+
+
+
Le site officiel
- http://www.vagrantup.com/
Des squelettes de boxes prêtes à l'emploi
- http://www.vagrantbox.es/
Veewee un outil pour construire vos boxes Vagrant.
- https://github.com/jedi4ever/veewee
RESSOURCES
Questions ?
Merci !
@juliendubreuil
www.juliendubreuil.fr
dubreuil.julien@gmail.com

More Related Content

What's hot (20)

Docker Kubernetes Istio
Docker Kubernetes IstioDocker Kubernetes Istio
Docker Kubernetes Istio
 
CI-CD WITH GITLAB WORKFLOW
CI-CD WITH GITLAB WORKFLOWCI-CD WITH GITLAB WORKFLOW
CI-CD WITH GITLAB WORKFLOW
 
Packer by HashiCorp
Packer by HashiCorpPacker by HashiCorp
Packer by HashiCorp
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
DevOps avec Ansible et Docker
DevOps avec Ansible et DockerDevOps avec Ansible et Docker
DevOps avec Ansible et Docker
 
Docker compose
Docker composeDocker compose
Docker compose
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
FD.io Vector Packet Processing (VPP)
FD.io Vector Packet Processing (VPP)FD.io Vector Packet Processing (VPP)
FD.io Vector Packet Processing (VPP)
 
Docker 101: An Introduction
Docker 101: An IntroductionDocker 101: An Introduction
Docker 101: An Introduction
 
Versioning avec Git
Versioning avec GitVersioning avec Git
Versioning avec Git
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Docker Basics
Docker BasicsDocker Basics
Docker Basics
 
Introduction to k3s and k3sup
Introduction to k3s and k3supIntroduction to k3s and k3sup
Introduction to k3s and k3sup
 
OpenShift 4, the smarter Kubernetes platform
OpenShift 4, the smarter Kubernetes platformOpenShift 4, the smarter Kubernetes platform
OpenShift 4, the smarter Kubernetes platform
 
Gitlab ci-cd
Gitlab ci-cdGitlab ci-cd
Gitlab ci-cd
 
Présentation Docker
Présentation DockerPrésentation Docker
Présentation Docker
 
Kubernetes networking & Security
Kubernetes networking & SecurityKubernetes networking & Security
Kubernetes networking & Security
 
Helm 3
Helm 3Helm 3
Helm 3
 
kubernetes, pourquoi et comment
kubernetes, pourquoi et commentkubernetes, pourquoi et comment
kubernetes, pourquoi et comment
 

Viewers also liked

Hands on para (web)Developers Docker vs Vagrant
Hands on para (web)Developers Docker vs VagrantHands on para (web)Developers Docker vs Vagrant
Hands on para (web)Developers Docker vs VagrantIngo Jauch
 
Gérer ses environnements de développement avec vagrant - PHP Tour Nantes 2012
Gérer ses environnements de développement avec vagrant - PHP Tour Nantes 2012Gérer ses environnements de développement avec vagrant - PHP Tour Nantes 2012
Gérer ses environnements de développement avec vagrant - PHP Tour Nantes 2012Jean-Marc Fontaine
 
Provisioning your Environment with Vagrant and Ansible
Provisioning your Environment with Vagrant and AnsibleProvisioning your Environment with Vagrant and Ansible
Provisioning your Environment with Vagrant and AnsibleRichard Gwozdz
 
D-DAY 2015 Paas ORACLE
D-DAY 2015 Paas ORACLED-DAY 2015 Paas ORACLE
D-DAY 2015 Paas ORACLEDEVOPS D-DAY
 
Introduction à DevOps
Introduction à DevOpsIntroduction à DevOps
Introduction à DevOpsMicrosoft
 
Agile Wake Up #3 : Lean UX
Agile Wake Up #3 : Lean UXAgile Wake Up #3 : Lean UX
Agile Wake Up #3 : Lean UXZenika
 
Introduction à la démarche Devops
Introduction à la démarche DevopsIntroduction à la démarche Devops
Introduction à la démarche DevopsRomain Chalumeau
 

Viewers also liked (9)

Hands on para (web)Developers Docker vs Vagrant
Hands on para (web)Developers Docker vs VagrantHands on para (web)Developers Docker vs Vagrant
Hands on para (web)Developers Docker vs Vagrant
 
Gérer ses environnements de développement avec vagrant - PHP Tour Nantes 2012
Gérer ses environnements de développement avec vagrant - PHP Tour Nantes 2012Gérer ses environnements de développement avec vagrant - PHP Tour Nantes 2012
Gérer ses environnements de développement avec vagrant - PHP Tour Nantes 2012
 
Provisioning your Environment with Vagrant and Ansible
Provisioning your Environment with Vagrant and AnsibleProvisioning your Environment with Vagrant and Ansible
Provisioning your Environment with Vagrant and Ansible
 
D-DAY 2015 Paas ORACLE
D-DAY 2015 Paas ORACLED-DAY 2015 Paas ORACLE
D-DAY 2015 Paas ORACLE
 
Introduction à DevOps
Introduction à DevOpsIntroduction à DevOps
Introduction à DevOps
 
DevOps
DevOpsDevOps
DevOps
 
DevOps 101
DevOps 101DevOps 101
DevOps 101
 
Agile Wake Up #3 : Lean UX
Agile Wake Up #3 : Lean UXAgile Wake Up #3 : Lean UX
Agile Wake Up #3 : Lean UX
 
Introduction à la démarche Devops
Introduction à la démarche DevopsIntroduction à la démarche Devops
Introduction à la démarche Devops
 

Similar to Vagrant - Concept

5390997 Support formation : Construire et administrer vos conteneurs avec Doc...
5390997 Support formation : Construire et administrer vos conteneurs avec Doc...5390997 Support formation : Construire et administrer vos conteneurs avec Doc...
5390997 Support formation : Construire et administrer vos conteneurs avec Doc...AbdellahELMAMOUN
 
PHP Composer : Pourquoi ? Comment ? Et plus ...
PHP Composer : Pourquoi ? Comment ? Et plus ...PHP Composer : Pourquoi ? Comment ? Et plus ...
PHP Composer : Pourquoi ? Comment ? Et plus ...Romain Cambien
 
Spring Boot & Containers - Do's & Don'ts
Spring Boot & Containers - Do's & Don'tsSpring Boot & Containers - Do's & Don'ts
Spring Boot & Containers - Do's & Don'tsJulien Wittouck
 
Oxalide Workshop #4 - Docker, des tours dans le petit bassin
Oxalide Workshop #4 - Docker, des tours dans le petit bassinOxalide Workshop #4 - Docker, des tours dans le petit bassin
Oxalide Workshop #4 - Docker, des tours dans le petit bassinLudovic Piot
 
Oxalide Workshop #4 - Docker, des tours dans le petit bassin
Oxalide Workshop #4 - Docker, des tours dans le petit bassinOxalide Workshop #4 - Docker, des tours dans le petit bassin
Oxalide Workshop #4 - Docker, des tours dans le petit bassinOxalide
 
Installation magento 2 avec mamp
 Installation magento 2 avec mamp Installation magento 2 avec mamp
Installation magento 2 avec mampBlackbird
 
Introduction à docker - Meetup WP Rennes
Introduction à docker - Meetup WP RennesIntroduction à docker - Meetup WP Rennes
Introduction à docker - Meetup WP RennesYann Nave
 
Déploiement et débogage à distance
Déploiement et débogage à distanceDéploiement et débogage à distance
Déploiement et débogage à distancepprem
 
Docker en Production (Docker Paris)
Docker en Production (Docker Paris)Docker en Production (Docker Paris)
Docker en Production (Docker Paris)Jérôme Petazzoni
 
Dev cloud java : la tête dans les nuages
Dev cloud java : la tête dans les nuagesDev cloud java : la tête dans les nuages
Dev cloud java : la tête dans les nuagesSOAT
 
Gérer ses environnements de développement avec Vagrant - RMLL 2012
Gérer ses environnements de développement avec Vagrant - RMLL 2012Gérer ses environnements de développement avec Vagrant - RMLL 2012
Gérer ses environnements de développement avec Vagrant - RMLL 2012Jean-Marc Fontaine
 
Faire des applications web avec Delphi
Faire des applications web avec DelphiFaire des applications web avec Delphi
Faire des applications web avec Delphipprem
 
20111220 lyon jug-packaging-natif
20111220 lyon jug-packaging-natif20111220 lyon jug-packaging-natif
20111220 lyon jug-packaging-natifHenri Gomez
 
Docker, ça mange quoi au printemps
Docker, ça mange quoi au printempsDocker, ça mange quoi au printemps
Docker, ça mange quoi au printempsJulien Maitrehenry
 
Julien Maitrehenry - Docker, ça mange quoi au printemps
Julien Maitrehenry - Docker, ça mange quoi au printempsJulien Maitrehenry - Docker, ça mange quoi au printemps
Julien Maitrehenry - Docker, ça mange quoi au printempsWeb à Québec
 
WordCamp Lyon 2015 - WordPress, Git et l'intégration continue
 WordCamp Lyon 2015 - WordPress, Git et l'intégration continue WordCamp Lyon 2015 - WordPress, Git et l'intégration continue
WordCamp Lyon 2015 - WordPress, Git et l'intégration continueStéphane HULARD
 
Rapport d’installation d’un serveur de messagerie avec le Webmail Roundcube
Rapport d’installation d’un serveur de  messagerie avec le Webmail RoundcubeRapport d’installation d’un serveur de  messagerie avec le Webmail Roundcube
Rapport d’installation d’un serveur de messagerie avec le Webmail RoundcubeBalla Moussa Doumbouya
 
Apache flink - prise en main rapide
Apache flink - prise en main rapideApache flink - prise en main rapide
Apache flink - prise en main rapideBilal Baltagi
 
Drush make driven development
Drush make driven developmentDrush make driven development
Drush make driven developmentSébastien Corbin
 
Alphorm.com Formation Nagios et Cacti : Installation et Administration
Alphorm.com Formation Nagios et Cacti : Installation et AdministrationAlphorm.com Formation Nagios et Cacti : Installation et Administration
Alphorm.com Formation Nagios et Cacti : Installation et AdministrationAlphorm
 

Similar to Vagrant - Concept (20)

5390997 Support formation : Construire et administrer vos conteneurs avec Doc...
5390997 Support formation : Construire et administrer vos conteneurs avec Doc...5390997 Support formation : Construire et administrer vos conteneurs avec Doc...
5390997 Support formation : Construire et administrer vos conteneurs avec Doc...
 
PHP Composer : Pourquoi ? Comment ? Et plus ...
PHP Composer : Pourquoi ? Comment ? Et plus ...PHP Composer : Pourquoi ? Comment ? Et plus ...
PHP Composer : Pourquoi ? Comment ? Et plus ...
 
Spring Boot & Containers - Do's & Don'ts
Spring Boot & Containers - Do's & Don'tsSpring Boot & Containers - Do's & Don'ts
Spring Boot & Containers - Do's & Don'ts
 
Oxalide Workshop #4 - Docker, des tours dans le petit bassin
Oxalide Workshop #4 - Docker, des tours dans le petit bassinOxalide Workshop #4 - Docker, des tours dans le petit bassin
Oxalide Workshop #4 - Docker, des tours dans le petit bassin
 
Oxalide Workshop #4 - Docker, des tours dans le petit bassin
Oxalide Workshop #4 - Docker, des tours dans le petit bassinOxalide Workshop #4 - Docker, des tours dans le petit bassin
Oxalide Workshop #4 - Docker, des tours dans le petit bassin
 
Installation magento 2 avec mamp
 Installation magento 2 avec mamp Installation magento 2 avec mamp
Installation magento 2 avec mamp
 
Introduction à docker - Meetup WP Rennes
Introduction à docker - Meetup WP RennesIntroduction à docker - Meetup WP Rennes
Introduction à docker - Meetup WP Rennes
 
Déploiement et débogage à distance
Déploiement et débogage à distanceDéploiement et débogage à distance
Déploiement et débogage à distance
 
Docker en Production (Docker Paris)
Docker en Production (Docker Paris)Docker en Production (Docker Paris)
Docker en Production (Docker Paris)
 
Dev cloud java : la tête dans les nuages
Dev cloud java : la tête dans les nuagesDev cloud java : la tête dans les nuages
Dev cloud java : la tête dans les nuages
 
Gérer ses environnements de développement avec Vagrant - RMLL 2012
Gérer ses environnements de développement avec Vagrant - RMLL 2012Gérer ses environnements de développement avec Vagrant - RMLL 2012
Gérer ses environnements de développement avec Vagrant - RMLL 2012
 
Faire des applications web avec Delphi
Faire des applications web avec DelphiFaire des applications web avec Delphi
Faire des applications web avec Delphi
 
20111220 lyon jug-packaging-natif
20111220 lyon jug-packaging-natif20111220 lyon jug-packaging-natif
20111220 lyon jug-packaging-natif
 
Docker, ça mange quoi au printemps
Docker, ça mange quoi au printempsDocker, ça mange quoi au printemps
Docker, ça mange quoi au printemps
 
Julien Maitrehenry - Docker, ça mange quoi au printemps
Julien Maitrehenry - Docker, ça mange quoi au printempsJulien Maitrehenry - Docker, ça mange quoi au printemps
Julien Maitrehenry - Docker, ça mange quoi au printemps
 
WordCamp Lyon 2015 - WordPress, Git et l'intégration continue
 WordCamp Lyon 2015 - WordPress, Git et l'intégration continue WordCamp Lyon 2015 - WordPress, Git et l'intégration continue
WordCamp Lyon 2015 - WordPress, Git et l'intégration continue
 
Rapport d’installation d’un serveur de messagerie avec le Webmail Roundcube
Rapport d’installation d’un serveur de  messagerie avec le Webmail RoundcubeRapport d’installation d’un serveur de  messagerie avec le Webmail Roundcube
Rapport d’installation d’un serveur de messagerie avec le Webmail Roundcube
 
Apache flink - prise en main rapide
Apache flink - prise en main rapideApache flink - prise en main rapide
Apache flink - prise en main rapide
 
Drush make driven development
Drush make driven developmentDrush make driven development
Drush make driven development
 
Alphorm.com Formation Nagios et Cacti : Installation et Administration
Alphorm.com Formation Nagios et Cacti : Installation et AdministrationAlphorm.com Formation Nagios et Cacti : Installation et Administration
Alphorm.com Formation Nagios et Cacti : Installation et Administration
 

Vagrant - Concept