Skip to content

Commit

Permalink
Moved modules installation to VM
Browse files Browse the repository at this point in the history
  • Loading branch information
norberttech committed Dec 10, 2013
1 parent ae130ab commit 4a75727
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 75 deletions.
27 changes: 0 additions & 27 deletions .gitmodules

This file was deleted.

9 changes: 1 addition & 8 deletions vagrant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions vagrant/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 14 additions & 0 deletions vagrant/bootstrap.sh
Original file line number Diff line number Diff line change
@@ -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
34 changes: 5 additions & 29 deletions vagrant/manifests/default.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down
1 change: 0 additions & 1 deletion vagrant/modules/apache
Submodule apache deleted from 5c4b1c
1 change: 0 additions & 1 deletion vagrant/modules/apt
Submodule apt deleted from 3e3de6
1 change: 0 additions & 1 deletion vagrant/modules/composer
Submodule composer deleted from 527ee1
1 change: 0 additions & 1 deletion vagrant/modules/mysql
Submodule mysql deleted from e0c443
1 change: 0 additions & 1 deletion vagrant/modules/php
Submodule php deleted from b8f2e3
1 change: 0 additions & 1 deletion vagrant/modules/puphpet
Submodule puphpet deleted from b98b7e
1 change: 0 additions & 1 deletion vagrant/modules/puppi
Submodule puppi deleted from c03f52
1 change: 0 additions & 1 deletion vagrant/modules/stdlib
Submodule stdlib deleted from d60d87
1 change: 0 additions & 1 deletion vagrant/modules/xdebug
Submodule xdebug deleted from b15bba

0 comments on commit 4a75727

Please sign in to comment.