SlideShare una empresa de Scribd logo
1 de 11
Descargar para leer sin conexión
Symfony development with
Vagrant and Ansible

Symfony User Group Belgium Meetup - http://symfonians.be
January 2014
Me, myself and I
Jean-Christophe Cuvelier
Partner @ Morris & Chapman Belgium
Founder @ Pictawall.com
!
•
•
•

Web entrepreneur
Begun with a Commodore 64
Creative PHP developer
!

be.linkedin.com/in/totophe
!

github.com/totophe
!

@totophe
Vagrant
“Vagrant provides easy to
configure, reproducible, and
portable work environments built
on top of industry-standard
technology and controlled by a
single consistent workflow to help
maximize the productivity and
flexibility of you and your team.”
!
Basically, Vagrant is a nice way to
create virtual machines on the fly,
and distribute a common
configuration across multiple
developers to avoid the “But it
work on my machine” famous
quote.
Getting started with Vagrant
•

vagrant init mymachine http://files.vagrantup.com/
precise64.box

•

vagrant up
•

Vagrantfile

•

vagrant halt

•

vagrant destroy
Some Vagrantfile recipes
•

Forwarding a local port:
config.vm.network :forwarded_port, guest: 80, host: 81

•

Adding a dedicated private ip:
config.vm.network "private_network", ip: “192.168.100.100"

•

Provisioning with a shell script:
config.vm.provision :shell, :path => “db.sh"

•

Changing the memory for the virtual machine
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "1024"]
end
Ansible
“Ansible is the simplest way to
automate.”
Ansible is a provisioning system
that allows you to create
recipes to build a specific
environment and to replicate it
on as many machines as you
want. It allows you to build a
very specific version of a
system and to ensure that this
configuration works with your
project.
Getting started with Ansible
•

hosts file

•

ansible all -m ping -i hosts

•

ansible-playbook playbook.yml -i hosts

•

ansible folder structure with tasks & templates using
Yaml and Jinja2 (very similar to Twig*)

* Obviously, Twig is based on Jinja2
Ansible with Vagrant

config.vm.provision "ansible" do |ansible|
ansible.playbook = "provisioning/playbook.yml"
ansible.extra_vars = {private_interface: "192.168.100.1"}
end
Ansible with Vagrant and
Symfony
Symfony with Vagrant and
Ansible
https://github.com/symfonians/symfony-vagrant-ansible
!

git clone https://github.com/symfonians/symfony-vagrant-ansible.git
vagrant up
Thank you!
jcc@pictawall.com - @totophe
be.linkedin.com/in/totophe - github.com/totophe
http://www.meetup.com/Symfony-User-Group-Belgium/

Más contenido relacionado

La actualidad más candente

Jakarta WordPress Meetup #9: Introducing VVV 2
Jakarta WordPress Meetup #9: Introducing VVV 2Jakarta WordPress Meetup #9: Introducing VVV 2
Jakarta WordPress Meetup #9: Introducing VVV 2WordPress
 
What have you learnt about technology from the
What have you learnt about technology from theWhat have you learnt about technology from the
What have you learnt about technology from theEmily236
 
Whathaveyoulearntabouttechnologyfromthe final
Whathaveyoulearntabouttechnologyfromthe finalWhathaveyoulearntabouttechnologyfromthe final
Whathaveyoulearntabouttechnologyfromthe finalEmily236
 
How to prevent big disasters when updating WordPress
How to prevent big disasters when updating WordPressHow to prevent big disasters when updating WordPress
How to prevent big disasters when updating WordPressRodolfo Melogli
 
Mastering vagrant in 1 hour
Mastering vagrant  in 1 hourMastering vagrant  in 1 hour
Mastering vagrant in 1 hourBien Hoang
 
Tools for HTML5
Tools for HTML5Tools for HTML5
Tools for HTML5lillianabe
 
Firefox OS - HTML5 for a truly world-wide-web
Firefox OS - HTML5 for a truly world-wide-webFirefox OS - HTML5 for a truly world-wide-web
Firefox OS - HTML5 for a truly world-wide-webChristian Heilmann
 
Vim Plugin Deployment
Vim Plugin DeploymentVim Plugin Deployment
Vim Plugin Deployment偉格 高
 
Refactor Me presentation
Refactor Me presentationRefactor Me presentation
Refactor Me presentationJustin Smestad
 
How To: Mobile "Hello World" With Xamarin and VS-2013
How To: Mobile "Hello World" With Xamarin and VS-2013How To: Mobile "Hello World" With Xamarin and VS-2013
How To: Mobile "Hello World" With Xamarin and VS-2013Brad Pillow
 
Mobile web application
Mobile web applicationMobile web application
Mobile web application偉格 高
 
Wp cli- intro and basics
Wp cli- intro and basicsWp cli- intro and basics
Wp cli- intro and basicsDwayne McDaniel
 
What Visual Studio Code can do for Java Development
What Visual Studio Code can do for Java DevelopmentWhat Visual Studio Code can do for Java Development
What Visual Studio Code can do for Java DevelopmentEd Burns
 
Silverlight vs HTML5 - Lessons learned from the real world...
Silverlight vs HTML5 - Lessons learned from the real world...Silverlight vs HTML5 - Lessons learned from the real world...
Silverlight vs HTML5 - Lessons learned from the real world...Peter Gfader
 
20 minuti di zappa e non ci pensi più
20 minuti di zappa e non ci pensi più20 minuti di zappa e non ci pensi più
20 minuti di zappa e non ci pensi piùDaniel Depaoli
 
Composer Tips/Tricks
Composer Tips/TricksComposer Tips/Tricks
Composer Tips/TricksChris Haynes
 

La actualidad más candente (19)

Jakarta WordPress Meetup #9: Introducing VVV 2
Jakarta WordPress Meetup #9: Introducing VVV 2Jakarta WordPress Meetup #9: Introducing VVV 2
Jakarta WordPress Meetup #9: Introducing VVV 2
 
Q6
Q6Q6
Q6
 
What have you learnt about technology from the
What have you learnt about technology from theWhat have you learnt about technology from the
What have you learnt about technology from the
 
Whathaveyoulearntabouttechnologyfromthe final
Whathaveyoulearntabouttechnologyfromthe finalWhathaveyoulearntabouttechnologyfromthe final
Whathaveyoulearntabouttechnologyfromthe final
 
How to prevent big disasters when updating WordPress
How to prevent big disasters when updating WordPressHow to prevent big disasters when updating WordPress
How to prevent big disasters when updating WordPress
 
Mastering vagrant in 1 hour
Mastering vagrant  in 1 hourMastering vagrant  in 1 hour
Mastering vagrant in 1 hour
 
Tools for HTML5
Tools for HTML5Tools for HTML5
Tools for HTML5
 
Firefox OS - HTML5 for a truly world-wide-web
Firefox OS - HTML5 for a truly world-wide-webFirefox OS - HTML5 for a truly world-wide-web
Firefox OS - HTML5 for a truly world-wide-web
 
Question 6
Question 6Question 6
Question 6
 
Vim Plugin Deployment
Vim Plugin DeploymentVim Plugin Deployment
Vim Plugin Deployment
 
Refactor Me presentation
Refactor Me presentationRefactor Me presentation
Refactor Me presentation
 
How To: Mobile "Hello World" With Xamarin and VS-2013
How To: Mobile "Hello World" With Xamarin and VS-2013How To: Mobile "Hello World" With Xamarin and VS-2013
How To: Mobile "Hello World" With Xamarin and VS-2013
 
Mobile web application
Mobile web applicationMobile web application
Mobile web application
 
Wp cli- intro and basics
Wp cli- intro and basicsWp cli- intro and basics
Wp cli- intro and basics
 
What Visual Studio Code can do for Java Development
What Visual Studio Code can do for Java DevelopmentWhat Visual Studio Code can do for Java Development
What Visual Studio Code can do for Java Development
 
Silverlight vs HTML5 - Lessons learned from the real world...
Silverlight vs HTML5 - Lessons learned from the real world...Silverlight vs HTML5 - Lessons learned from the real world...
Silverlight vs HTML5 - Lessons learned from the real world...
 
Meetup 2013.01.17
Meetup 2013.01.17Meetup 2013.01.17
Meetup 2013.01.17
 
20 minuti di zappa e non ci pensi più
20 minuti di zappa e non ci pensi più20 minuti di zappa e non ci pensi più
20 minuti di zappa e non ci pensi più
 
Composer Tips/Tricks
Composer Tips/TricksComposer Tips/Tricks
Composer Tips/Tricks
 

Destacado

Destacado (8)

111 physicsdynamics research
111 physicsdynamics research111 physicsdynamics research
111 physicsdynamics research
 
Symfony User Group Belgium Introduction
Symfony User Group Belgium IntroductionSymfony User Group Belgium Introduction
Symfony User Group Belgium Introduction
 
Graphic design
Graphic designGraphic design
Graphic design
 
Marketing keynote finished
Marketing keynote finishedMarketing keynote finished
Marketing keynote finished
 
La politique des déchets en RBC
La politique des déchets en RBCLa politique des déchets en RBC
La politique des déchets en RBC
 
10 jeunes entrepreneurs : pourquoi ils ont le feu sacré ?
10 jeunes entrepreneurs : pourquoi ils ont le feu sacré ?10 jeunes entrepreneurs : pourquoi ils ont le feu sacré ?
10 jeunes entrepreneurs : pourquoi ils ont le feu sacré ?
 
Twitter Basics
Twitter BasicsTwitter Basics
Twitter Basics
 
Cmsms, open source & business model
Cmsms, open source & business modelCmsms, open source & business model
Cmsms, open source & business model
 

Similar a Symfony development with Vagrant and Ansible

Developing Great Apps with Apache Cordova
Developing Great Apps with Apache CordovaDeveloping Great Apps with Apache Cordova
Developing Great Apps with Apache CordovaShekhar Gulati
 
Avoiding surprises with Chef and Vagrant
Avoiding surprises with Chef and VagrantAvoiding surprises with Chef and Vagrant
Avoiding surprises with Chef and Vagrantandygale
 
Using Vagrant
Using VagrantUsing Vagrant
Using Vagrantandygale
 
Vagrant Binding JayDay 2013
Vagrant Binding JayDay 2013Vagrant Binding JayDay 2013
Vagrant Binding JayDay 2013Hendrik Ebbers
 
Powering Development and Testing Environments with Vagrant
Powering Development and Testing Environments with VagrantPowering Development and Testing Environments with Vagrant
Powering Development and Testing Environments with VagrantCoen Jacobs
 
Progressively enhance your Symfony 4 app using Vue, API Platform, Mercure and...
Progressively enhance your Symfony 4 app using Vue, API Platform, Mercure and...Progressively enhance your Symfony 4 app using Vue, API Platform, Mercure and...
Progressively enhance your Symfony 4 app using Vue, API Platform, Mercure and...Les-Tilleuls.coop
 
Share onvibe the productivity booster for your vibe platform(gwava-con emea...
Share onvibe   the productivity booster for your vibe platform(gwava-con emea...Share onvibe   the productivity booster for your vibe platform(gwava-con emea...
Share onvibe the productivity booster for your vibe platform(gwava-con emea...GWAVA
 
News scavenger a SharePoint and Apps Story
News scavenger  a SharePoint and Apps StoryNews scavenger  a SharePoint and Apps Story
News scavenger a SharePoint and Apps StoryInnoTech
 
Pharo IoT Installation Improvements and Continuous Integration
Pharo IoT Installation Improvements and Continuous IntegrationPharo IoT Installation Improvements and Continuous Integration
Pharo IoT Installation Improvements and Continuous IntegrationAllex Oliveira
 
PHARO IoT: Installation Improvements and Continuous Integration
PHARO IoT: Installation Improvements and Continuous IntegrationPHARO IoT: Installation Improvements and Continuous Integration
PHARO IoT: Installation Improvements and Continuous IntegrationPharo
 
Continuous Integration at Mollie
Continuous Integration at MollieContinuous Integration at Mollie
Continuous Integration at Molliewillemstuursma
 
OpenStack Murano Application Catalog
OpenStack Murano Application CatalogOpenStack Murano Application Catalog
OpenStack Murano Application CatalogAl Sayed Gamal
 
Development with Vagrant
Development with VagrantDevelopment with Vagrant
Development with VagrantJohn Coggeshall
 
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopPuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopOlinData
 
Using Vagrant, Puppet, Testing & Hadoop
Using Vagrant, Puppet, Testing & HadoopUsing Vagrant, Puppet, Testing & Hadoop
Using Vagrant, Puppet, Testing & HadoopPuppet
 
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopPuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopWalter Heck
 
Learning C# iPad Programming
Learning C# iPad ProgrammingLearning C# iPad Programming
Learning C# iPad ProgrammingRich Helton
 
FPC-Virtual Business
FPC-Virtual BusinessFPC-Virtual Business
FPC-Virtual BusinessMike Pugh
 

Similar a Symfony development with Vagrant and Ansible (20)

Developing Great Apps with Apache Cordova
Developing Great Apps with Apache CordovaDeveloping Great Apps with Apache Cordova
Developing Great Apps with Apache Cordova
 
Avoiding surprises with Chef and Vagrant
Avoiding surprises with Chef and VagrantAvoiding surprises with Chef and Vagrant
Avoiding surprises with Chef and Vagrant
 
Using Vagrant
Using VagrantUsing Vagrant
Using Vagrant
 
Vagrant Binding JayDay 2013
Vagrant Binding JayDay 2013Vagrant Binding JayDay 2013
Vagrant Binding JayDay 2013
 
Powering Development and Testing Environments with Vagrant
Powering Development and Testing Environments with VagrantPowering Development and Testing Environments with Vagrant
Powering Development and Testing Environments with Vagrant
 
Progressively enhance your Symfony 4 app using Vue, API Platform, Mercure and...
Progressively enhance your Symfony 4 app using Vue, API Platform, Mercure and...Progressively enhance your Symfony 4 app using Vue, API Platform, Mercure and...
Progressively enhance your Symfony 4 app using Vue, API Platform, Mercure and...
 
Share onvibe the productivity booster for your vibe platform(gwava-con emea...
Share onvibe   the productivity booster for your vibe platform(gwava-con emea...Share onvibe   the productivity booster for your vibe platform(gwava-con emea...
Share onvibe the productivity booster for your vibe platform(gwava-con emea...
 
News scavenger a SharePoint and Apps Story
News scavenger  a SharePoint and Apps StoryNews scavenger  a SharePoint and Apps Story
News scavenger a SharePoint and Apps Story
 
Pharo IoT Installation Improvements and Continuous Integration
Pharo IoT Installation Improvements and Continuous IntegrationPharo IoT Installation Improvements and Continuous Integration
Pharo IoT Installation Improvements and Continuous Integration
 
PHARO IoT: Installation Improvements and Continuous Integration
PHARO IoT: Installation Improvements and Continuous IntegrationPHARO IoT: Installation Improvements and Continuous Integration
PHARO IoT: Installation Improvements and Continuous Integration
 
Continuous Integration at Mollie
Continuous Integration at MollieContinuous Integration at Mollie
Continuous Integration at Mollie
 
OpenStack Murano Application Catalog
OpenStack Murano Application CatalogOpenStack Murano Application Catalog
OpenStack Murano Application Catalog
 
Development with Vagrant
Development with VagrantDevelopment with Vagrant
Development with Vagrant
 
Vagrant
VagrantVagrant
Vagrant
 
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopPuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
 
Using Vagrant, Puppet, Testing & Hadoop
Using Vagrant, Puppet, Testing & HadoopUsing Vagrant, Puppet, Testing & Hadoop
Using Vagrant, Puppet, Testing & Hadoop
 
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopPuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
 
Learning C# iPad Programming
Learning C# iPad ProgrammingLearning C# iPad Programming
Learning C# iPad Programming
 
DevOps demystified
DevOps demystifiedDevOps demystified
DevOps demystified
 
FPC-Virtual Business
FPC-Virtual BusinessFPC-Virtual Business
FPC-Virtual Business
 

Symfony development with Vagrant and Ansible

  • 1. Symfony development with Vagrant and Ansible Symfony User Group Belgium Meetup - http://symfonians.be January 2014
  • 2. Me, myself and I Jean-Christophe Cuvelier Partner @ Morris & Chapman Belgium Founder @ Pictawall.com ! • • • Web entrepreneur Begun with a Commodore 64 Creative PHP developer ! be.linkedin.com/in/totophe ! github.com/totophe ! @totophe
  • 3. Vagrant “Vagrant provides easy to configure, reproducible, and portable work environments built on top of industry-standard technology and controlled by a single consistent workflow to help maximize the productivity and flexibility of you and your team.” ! Basically, Vagrant is a nice way to create virtual machines on the fly, and distribute a common configuration across multiple developers to avoid the “But it work on my machine” famous quote.
  • 4. Getting started with Vagrant • vagrant init mymachine http://files.vagrantup.com/ precise64.box • vagrant up • Vagrantfile • vagrant halt • vagrant destroy
  • 5. Some Vagrantfile recipes • Forwarding a local port: config.vm.network :forwarded_port, guest: 80, host: 81 • Adding a dedicated private ip: config.vm.network "private_network", ip: “192.168.100.100" • Provisioning with a shell script: config.vm.provision :shell, :path => “db.sh" • Changing the memory for the virtual machine config.vm.provider :virtualbox do |vb| vb.customize ["modifyvm", :id, "--memory", "1024"] end
  • 6. Ansible “Ansible is the simplest way to automate.” Ansible is a provisioning system that allows you to create recipes to build a specific environment and to replicate it on as many machines as you want. It allows you to build a very specific version of a system and to ensure that this configuration works with your project.
  • 7. Getting started with Ansible • hosts file • ansible all -m ping -i hosts • ansible-playbook playbook.yml -i hosts • ansible folder structure with tasks & templates using Yaml and Jinja2 (very similar to Twig*) * Obviously, Twig is based on Jinja2
  • 8. Ansible with Vagrant config.vm.provision "ansible" do |ansible| ansible.playbook = "provisioning/playbook.yml" ansible.extra_vars = {private_interface: "192.168.100.1"} end
  • 9. Ansible with Vagrant and Symfony
  • 10. Symfony with Vagrant and Ansible https://github.com/symfonians/symfony-vagrant-ansible ! git clone https://github.com/symfonians/symfony-vagrant-ansible.git vagrant up
  • 11. Thank you! jcc@pictawall.com - @totophe be.linkedin.com/in/totophe - github.com/totophe http://www.meetup.com/Symfony-User-Group-Belgium/