Vagrant

2,662 views
2,417 views

Published on

Talk from /dev/var/2, Toulon, 21/11/2013

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,662
On SlideShare
0
From Embeds
0
Number of Embeds
24
Actions
Shares
0
Downloads
13
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Vagrant

  1. 1. Vagrant /dev/var/2, Toulon, 21/11/2013 by @FedirFR
  2. 2. Oxford English Dictionary Vagrant ● “a person without a settled home or regular work who wanders from place to place and lives by begging” ● archaic a wanderer
  3. 3. Un vagabond => Mobilité, minimalisme, poyvalence
  4. 4. Géré des environnements virtuels
  5. 5. Socle de Virtualbox
  6. 6. Mais à la manière /dev/ ++
  7. 7. Scripting Scénarios Boxes
  8. 8. L'ADN de votre projet
  9. 9. Vagrantfile
  10. 10. Vagrantfile = Un grain, qui devient une arbre
  11. 11. Vagrantfile = Un atome, qui devient l’Univers
  12. 12. Vagrant.configure("2") do |config| config.vm.box = "quantal" config.vm.box_url = "https://github.com/downloads/roderik/VagrantQuantal64Box/quantal64.box" config.ssh.forward_agent = true config.vm.network :private_network, ip: "192.168.23.4" config.vm.provision :chef_solo do |chef| chef.cookbooks_path = [ "cookbooks", "site-cookbooks" ] chef.log_level = :debug chef.add_recipe "typo3-neos" end config.vm.provider "virtualbox" do |v| v.name = "TYPO3 Neos" v.customize ["modifyvm", :id, "--memory", "2048"] end end
  13. 13. Gestionnaires de configuration salt puppet chef
  14. 14. Quelques recettes du chef
  15. 15. Installation des paquets include_recipe 'apache2' ['rewrite', 'deflate', 'php5', 'headers', 'expires', 'status', 'negotiation', 'setenvif'].each do |mod| include_recipe "apache2::mod_#{mod}" end include_recipe "php::package" ['apc', 'curl', 'gd', 'mysql', 'sqlite3'].each do |mod| include_recipe "php::module_#{mod}" end include_recipe 'mysql::server' include_recipe 'git'
  16. 16. Configuration de serveur cookbook_file "/etc/apache2/sites-available/typo3.neos" do source "typo3.neos" mode 0755 end apache_site "000-default" do enable false end apache_site "typo3.neos" do enable true end execute "reload apache" do command "/etc/init.d/apache2 reload" end
  17. 17. Installation de CMS execute "clone typo3.neos base" do command "git clone git://git.typo3.org/Neos/Distributions/Base.git /var/www/typo3.neos" creates "/var/www/typo3.neos/" end execute "get composer" do command "curl -s https://getcomposer.org/installer | php" cwd "/var/www/typo3.neos" end execute "install TYPO3 Neos" do command "php composer.phar install --dev" cwd "/var/www/typo3.neos" end execute "fixing permissions" do command "Packages/Framework/TYPO3.Flow/Scripts/setfilepermissions.sh vagrant vagrant www-data" cwd "/var/www/typo3.neos/" end
  18. 18. Essentiel de runtime
  19. 19. Commandes de base init up ssh reload suspend halt destroy
  20. 20. Essayez du nouveau
  21. 21. TYPO3 Neos Django RoR Symfony Erlang https://github.com/fedir/vagrant-typo3neos https://github.com/torchbox/vagrant-django-template https://github.com/rails/rails-dev-box https://github.com/seiffert/symfony-vagrant/tree/2.2 https://github.com/rpt/vagrant-erlang Beaucoup de boîtes déjà prêtes
  22. 22. Up and running gem install vagrant vagrant clone https://github.com/user/vagrant-project vagrant up
  23. 23. Ressources ● ● ● ● ● ● ● https://github.com/fedir/vagrant-typo3neos http://www.vagrantbox.es/ http://ajohnstone.com/achives/vagrant-automating-php-installation-with-bashslack-forcontinuous-deployment/ http://docs.vagrantup.com/v2/ http://www.slideshare.net/khokhlova1991/vagrant-19053161 http://habrahabr.ru/post/140714/ https://github.com/WinRb/vagrant-windows
  24. 24. Let’s box & cook @FedirFr github.com/fedir

×