Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6e3c10a

Browse files
committed
Install MongoDB, PHPUnit and other PHP QA tools using existing puppet modules
1 parent 6e96e9b commit 6e3c10a

File tree

9 files changed

+41
-35
lines changed

9 files changed

+41
-35
lines changed

.gitmodules

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,18 @@
1010
[submodule "puppet/modules/nginx"]
1111
path = puppet/modules/nginx
1212
url = https://github.com/example42/puppet-nginx
13+
[submodule "puppet/modules/mongodb"]
14+
path = puppet/modules/mongodb
15+
url = https://github.com/puppetlabs/puppetlabs-mongodb.git
16+
[submodule "puppet/modules/apt"]
17+
path = puppet/modules/apt
18+
url = https://github.com/puppetlabs/puppetlabs-apt.git
19+
[submodule "puppet/modules/stdlib"]
20+
path = puppet/modules/stdlib
21+
url = https://github.com/puppetlabs/puppetlabs-stdlib.git
22+
[submodule "puppet/modules/pear"]
23+
path = puppet/modules/pear
24+
url = https://github.com/rafaelfelix/puppet-pear.git
25+
[submodule "puppet/modules/phpqatools"]
26+
path = puppet/modules/phpqatools
27+
url = https://github.com/rafaelfelix/puppet-phpqatools.git

Readme.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@ Installed components
2424
* [less](http://lesscss.org/)
2525
* [Symfony2 Standard Edition](https://github.com/symfony/symfony-standard)
2626
* [MySQL](http://dev.mysql.com/downloads/mysql/) using puppet module (https://github.com/example42/puppet-mysql)
27-
* [MongoDB](http://www.mongodb.org/)
27+
* [MongoDB](http://www.mongodb.org/) using puppet module (https://github.com/puppetlabs/puppetlabs-mongodb.git)
2828
* [Capistrano](https://github.com/capistrano/capistrano)
2929
* [capifony](http://capifony.org/)
30-
* [phpunit](http://www.phpunit.de)
31-
32-
33-
30+
* Most of the [phpqatools](http://www.phpqatools.org) using puppet module (https://github.com/rafaelfelix/puppet-phpqatools)

Vagrantfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ Vagrant::Config.run do |config|
2929

3030
# Forward a port from the guest to the host, which allows for outside
3131
# computers to access the VM, whereas host only networking does not.
32-
config.vm.forward_port 80, 9090
33-
config.vm.forward_port 81, 9191
34-
config.vm.forward_port 27017, 27017
32+
config.vm.forward_port 80, 9090 #apache
33+
config.vm.forward_port 81, 9191 #nginx
34+
config.vm.forward_port 27017, 27017 #mongodb
3535

3636
# Share an additional folder to the guest VM. The first argument is
3737
# an identifier, the second is the path on the guest to mount the

puppet/manifests/default.pp

Lines changed: 16 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,8 @@
44

55
class system-update {
66

7-
file { "/etc/apt/sources.list.d/10gen.list":
8-
owner => root,
9-
group => root,
10-
mode => 664,
11-
source => "/vagrant/conf/apt/10gen.list",
12-
}
13-
14-
exec { 'import the 10gen public GPG key':
15-
command => 'apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10'
16-
}
17-
187
exec { 'apt-get update':
198
command => 'apt-get update',
20-
require => Exec['import the 10gen public GPG key'],
219
}
2210

2311
$sysPackages = [ "build-essential" ]
@@ -114,7 +102,7 @@
114102

115103
class development {
116104

117-
$devPackages = [ "curl", "git", "php-pear", "nodejs", "npm", "mongodb-10gen", "capistrano", "rubygems", "openjdk-7-jdk" ]
105+
$devPackages = [ "curl", "git", "nodejs", "npm", "capistrano", "rubygems", "openjdk-7-jdk" ]
118106
package { $devPackages:
119107
ensure => "installed",
120108
require => Exec['apt-get update'],
@@ -135,21 +123,16 @@
135123
require => Package["capistrano"],
136124
}
137125

138-
service { "mongodb":
139-
ensure => running,
140-
require => Package["mongodb-10gen"],
141-
}
142-
143-
exec { 'set pear autodiscover':
144-
command => 'pear config-set auto_discover 1',
145-
require => Package["php-pear"],
146-
}
126+
# exec { 'set pear autodiscover':
127+
# command => 'pear config-set auto_discover 1',
128+
# require => Package["php-pear"],
129+
# }
147130

148-
exec { 'install phpunit':
149-
command => 'pear install pear.phpunit.de/PHPUnit',
150-
require => Exec['set pear autodiscover'],
151-
creates => "/usr/bin/phpunit",
152-
}
131+
# exec { 'install phpunit':
132+
# command => 'pear install pear.phpunit.de/PHPUnit',
133+
# require => Exec['set pear autodiscover'],
134+
# creates => "/usr/bin/phpunit",
135+
# }
153136
}
154137

155138
class symfony-standard {
@@ -185,6 +168,12 @@
185168
include nginx-setup
186169
include apache
187170
include mysql
171+
172+
class {'mongodb':
173+
enable_10gen => true,
174+
}
175+
176+
include phpqatools
188177
include development
189178
include symfony-standard
190179

puppet/modules/apt

Submodule apt added at 710b1c6

puppet/modules/mongodb

Submodule mongodb added at 691620d

puppet/modules/pear

Submodule pear added at fb04d87

puppet/modules/phpqatools

Submodule phpqatools added at bc1a394

puppet/modules/stdlib

Submodule stdlib added at cc414a4

0 commit comments

Comments
 (0)