Skip to content

Commit b3bea15

Browse files
committed
Updated vagrant configuration to work with updated Puppet modules
1 parent 4ccb547 commit b3bea15

File tree

2 files changed

+28
-21
lines changed

2 files changed

+28
-21
lines changed

cookbook/map.rst.inc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,4 +209,3 @@
209209
* :doc:`/cookbook/workflow/new_project_git`
210210
* :doc:`/cookbook/workflow/new_project_svn`
211211
* :doc:`/cookbook/workflow/vagrant_configuration`
212-

cookbook/workflow/vagrant_configuration.rst

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -114,19 +114,19 @@ You will be creating a set of files under a new ``vagrant`` directory:
114114
fi
115115
116116
if [ ! -d "/etc/puppet/modules/apache" ]; then
117-
puppet module install puppetlabs-apache;
117+
puppet module install -v 1.0.1 puppetlabs-apache;
118118
fi
119119
120120
if [ ! -d "/etc/puppet/modules/mysql" ]; then
121-
puppet module install puppetlabs-mysql;
121+
puppet module install -v 2.2.3 puppetlabs-mysql;
122122
fi
123123
124124
if [ ! -d "/etc/puppet/modules/apt" ]; then
125-
puppet module install puppetlabs-apt;
125+
puppet module install -v 1.4.2 puppetlabs-apt;
126126
fi
127127
128128
if [ ! -d "/etc/puppet/modules/git" ]; then
129-
puppet module install puppetlabs-git;
129+
puppet module install -v 0.0.3 puppetlabs-git;
130130
fi
131131
132132
This script will be executed within the virtual machine to install necessary
@@ -145,16 +145,19 @@ You will be creating a set of files under a new ``vagrant`` directory:
145145
146146
147147
# install Apache
148-
class { 'apache': }
148+
class { 'apache':
149+
mpm_module => 'prefork',
150+
}
149151
class { 'apache::mod::php': }
150152
151153
152154
# install MySQL
153-
class { 'mysql': }
154-
class { 'mysql::server':
155-
config_hash => { 'root_password' => 'symfony' },
155+
class { '::mysql::server':
156+
root_password => 'symfony',
157+
}
158+
class { '::mysql::bindings':
159+
php_enable => true,
156160
}
157-
class { 'mysql::php': }
158161
159162
160163
# install Git for composer
@@ -164,7 +167,7 @@ You will be creating a set of files under a new ``vagrant`` directory:
164167
# install PHP Extensions used with Symfony
165168
class php-extensions {
166169
package { ['php-apc', 'php5-intl', 'php5-xdebug']:
167-
ensure => latest,
170+
ensure => present,
168171
require => Package['httpd'],
169172
notify => Service['httpd'],
170173
}
@@ -176,6 +179,7 @@ You will be creating a set of files under a new ``vagrant`` directory:
176179
# install a local composer.phar file
177180
class composer {
178181
exec { 'composerPhar':
182+
user => 'vagrant',
179183
cwd => '/vagrant',
180184
command => 'curl -s http://getcomposer.org/installer | php',
181185
path => ['/bin', '/usr/bin'],
@@ -194,13 +198,15 @@ You will be creating a set of files under a new ``vagrant`` directory:
194198
# install the Symfony vendors using composer
195199
class symfony {
196200
exec { 'vendorsInstall':
197-
cwd => '/vagrant',
198-
command => 'php composer.phar install',
199-
timeout => 1200,
200-
path => ['/bin', '/usr/bin'],
201-
creates => '/vagrant/vendor',
202-
logoutput => true,
203-
require => Exec['composerPhar'],
201+
user => 'vagrant',
202+
cwd => '/vagrant',
203+
environment => ['COMPOSER_HOME=/home/vagrant/.composer'],
204+
command => 'php composer.phar install',
205+
timeout => 1200,
206+
path => ['/bin', '/usr/bin'],
207+
creates => '/vagrant/vendor',
208+
logoutput => true,
209+
require => [ Class['php-extensions'], Exec['composerPhar'] ],
204210
}
205211
}
206212
@@ -232,14 +238,16 @@ You will be creating a set of files under a new ``vagrant`` directory:
232238
# by the web server
233239
234240
file_line { 'apache_user':
235-
path => '/etc/apache2/httpd.conf',
241+
path => '/etc/apache2/apache2.conf',
242+
match => 'User ',
236243
line => 'User vagrant',
237244
require => Package['httpd'],
238245
notify => Service['httpd'],
239246
}
240247
241248
file_line { 'apache_group':
242-
path => '/etc/apache2/httpd.conf',
249+
path => '/etc/apache2/apache2.conf',
250+
match => 'Group ',
243251
line => 'Group vagrant',
244252
require => Package['httpd'],
245253
notify => Service['httpd'],
@@ -425,7 +433,7 @@ project without having to worry about your local server setup or the setup of
425433
another developer's machine.
426434

427435
.. _`VirtualBox`: https://www.virtualbox.org/wiki/Downloads
428-
.. _`Vagrant`: http://downloads.vagrantup.com/
436+
.. _`Vagrant`: http://www.vagrantup.com/downloads.html
429437
.. _`Puppet`: http://www.puppetlabs.com/
430438
.. _`Vagrant Docs`: http://docs.vagrantup.com/v2/
431439
.. _`private network`: http://docs.vagrantup.com/v2/networking/private_network.html

0 commit comments

Comments
 (0)