From 4a757276c10f5ccd9e86b1d2793df4a94fed8e68 Mon Sep 17 00:00:00 2001 From: Norbert Orzechowicz Date: Tue, 10 Dec 2013 19:29:14 +0100 Subject: [PATCH] Moved modules installation to VM --- .gitmodules | 27 --------------------------- vagrant/README.md | 9 +-------- vagrant/Vagrantfile | 5 +++-- vagrant/bootstrap.sh | 14 ++++++++++++++ vagrant/manifests/default.pp | 34 +++++----------------------------- vagrant/modules/apache | 1 - vagrant/modules/apt | 1 - vagrant/modules/composer | 1 - vagrant/modules/mysql | 1 - vagrant/modules/php | 1 - vagrant/modules/puphpet | 1 - vagrant/modules/puppi | 1 - vagrant/modules/stdlib | 1 - vagrant/modules/xdebug | 1 - 14 files changed, 23 insertions(+), 75 deletions(-) delete mode 100644 .gitmodules create mode 100644 vagrant/bootstrap.sh delete mode 160000 vagrant/modules/apache delete mode 160000 vagrant/modules/apt delete mode 160000 vagrant/modules/composer delete mode 160000 vagrant/modules/mysql delete mode 160000 vagrant/modules/php delete mode 160000 vagrant/modules/puphpet delete mode 160000 vagrant/modules/puppi delete mode 160000 vagrant/modules/stdlib delete mode 160000 vagrant/modules/xdebug diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index f453e73fc6f..00000000000 --- a/.gitmodules +++ /dev/null @@ -1,27 +0,0 @@ -[submodule "vagrant/modules/stdlib"] - path = vagrant/modules/stdlib - url = https://github.com/puppetlabs/puppetlabs-stdlib.git -[submodule "vagrant/modules/puppi"] - path = vagrant/modules/puppi - url = https://github.com/example42/puppi.git -[submodule "vagrant/modules/apache"] - path = vagrant/modules/apache - url = https://github.com/example42/puppet-apache.git -[submodule "vagrant/modules/apt"] - path = vagrant/modules/apt - url = https://github.com/puppetlabs/puppetlabs-apt.git -[submodule "vagrant/modules/composer"] - path = vagrant/modules/composer - url = https://github.com/vagrantee/puppet-composer.git -[submodule "vagrant/modules/mysql"] - path = vagrant/modules/mysql - url = https://github.com/puppetlabs/puppetlabs-mysql.git -[submodule "vagrant/modules/php"] - path = vagrant/modules/php - url = https://github.com/example42/puppet-php.git -[submodule "vagrant/modules/puphpet"] - path = vagrant/modules/puphpet - url = https://github.com/puphpet/puppet-puphpet.git -[submodule "vagrant/modules/xdebug"] - path = vagrant/modules/xdebug - url = https://github.com/puphpet/puphpet-xdebug.git diff --git a/vagrant/README.md b/vagrant/README.md index b7fb17c19f9..a4a6a51151b 100644 --- a/vagrant/README.md +++ b/vagrant/README.md @@ -8,18 +8,11 @@ This configuration includes following software: * Vim * MC (Midnight commander) * Curl -* Xdebug * Composer # Usage -First you need to install git submodules. Go to your project root folder and execute following commands: -``` -$ git submodule init -$ git submodule update -``` - -Now you are ready to run +First you need to create vagrant VM ``` $ cd vagrant diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile index c8698e5c53e..883fe648219 100644 --- a/vagrant/Vagrantfile +++ b/vagrant/Vagrantfile @@ -13,11 +13,12 @@ Vagrant.configure("2") do |config| nfs_setting = RUBY_PLATFORM =~ /darwin/ || RUBY_PLATFORM =~ /linux/ config.vm.synced_folder "./../", "/var/www/sylius", id: "vagrant-root" , :nfs => nfs_setting - config.vm.provision :shell, :inline => "sudo apt-get update" + config.vm.provision :shell do |shell| + shell.path = "bootstrap.sh" + end config.vm.provision :puppet do |puppet| puppet.manifests_path = "manifests" - puppet.module_path = "modules" puppet.options = ['--verbose'] end end diff --git a/vagrant/bootstrap.sh b/vagrant/bootstrap.sh new file mode 100644 index 00000000000..4968e9ff97f --- /dev/null +++ b/vagrant/bootstrap.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# +set -x +sudo apt-get update +mkdir -p /etc/puppet/modules + +puppet module install example42/puppi --version 2.1.7 --force +puppet module install example42/apache --version 2.1.4 --force +puppet module install puppetlabs/stdlib --version 4.1.0 --force +puppet module install puppetlabs/apt --version 1.4.0 --force +puppet module install example42/php --version 2.0.17 --force +puppet module install puppetlabs/mysql --version 2.1.0 --force +puppet module install willdurand/composer --version 0.0.6 --force +puppet module install maestrodev/wget --version 1.2.3 --force \ No newline at end of file diff --git a/vagrant/manifests/default.pp b/vagrant/manifests/default.pp index 5e8784f463b..08e063f69e1 100644 --- a/vagrant/manifests/default.pp +++ b/vagrant/manifests/default.pp @@ -104,48 +104,24 @@ use_package => "no", } -class { 'xdebug': - service => 'apache', -} - class { 'composer': + command_name => 'composer', + target_dir => '/usr/local/bin', + auto_update => true, require => Package['php5', 'curl'], } -puphpet::ini { 'xdebug': - value => [ - 'xdebug.default_enable = 1', - 'xdebug.remote_autostart = 0', - 'xdebug.remote_connect_back = 1', - 'xdebug.remote_enable = 1', - 'xdebug.remote_handler = "dbgp"', - 'xdebug.remote_port = 9000' - ], - ini => '/etc/php5/conf.d/sylius_xdebug.ini', - notify => Service['apache'], - require => Class['php'], -} -puphpet::ini { 'mongo': +php::ini { 'php_ini_configuration': value => [ 'extension=mongo.so', - ], - ini => '/etc/php5/conf.d/sylius_mongo.ini', - notify => Service['apache'], - require => Class['php'], -} - -puphpet::ini { 'custom': - value => [ 'date.timezone = "UTC"', 'display_errors = On', 'error_reporting = -1', 'short_open_tag = 0', - 'xdebug.max_nesting_level = 1000' ], - ini => '/etc/php5/conf.d/sylius_custom.ini', notify => Service['apache'], - require => Class['php'], + require => Class['php'] } class { 'mysql::server': diff --git a/vagrant/modules/apache b/vagrant/modules/apache deleted file mode 160000 index 5c4b1ccfd42..00000000000 --- a/vagrant/modules/apache +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5c4b1ccfd42d691567feb0ec2ce5fe0e215940f4 diff --git a/vagrant/modules/apt b/vagrant/modules/apt deleted file mode 160000 index 3e3de6ee924..00000000000 --- a/vagrant/modules/apt +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3e3de6ee924ea75463e9df4ffdb5712c0e145403 diff --git a/vagrant/modules/composer b/vagrant/modules/composer deleted file mode 160000 index 527ee1dc4b3..00000000000 --- a/vagrant/modules/composer +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 527ee1dc4b33ce262ad1484ebfde334b6dcba3f5 diff --git a/vagrant/modules/mysql b/vagrant/modules/mysql deleted file mode 160000 index e0c4434815b..00000000000 --- a/vagrant/modules/mysql +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e0c4434815bbe0dc6851d9c40c1ba8cd84c73942 diff --git a/vagrant/modules/php b/vagrant/modules/php deleted file mode 160000 index b8f2e3f3dbe..00000000000 --- a/vagrant/modules/php +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b8f2e3f3dbeefa2e42eb5cbd35a2576cd11b14e3 diff --git a/vagrant/modules/puphpet b/vagrant/modules/puphpet deleted file mode 160000 index b98b7e1c567..00000000000 --- a/vagrant/modules/puphpet +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b98b7e1c5679628d0a9811c568f7bb4fdda3f878 diff --git a/vagrant/modules/puppi b/vagrant/modules/puppi deleted file mode 160000 index c03f5291b46..00000000000 --- a/vagrant/modules/puppi +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c03f5291b468a25869f3787819c9ea76de91b5ee diff --git a/vagrant/modules/stdlib b/vagrant/modules/stdlib deleted file mode 160000 index d60d872c1ab..00000000000 --- a/vagrant/modules/stdlib +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d60d872c1ab676298824dad863237fa390e1ddd6 diff --git a/vagrant/modules/xdebug b/vagrant/modules/xdebug deleted file mode 160000 index b15bbabf6ff..00000000000 --- a/vagrant/modules/xdebug +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b15bbabf6ffab5b90a269d9b83834b825cc956d1