Merge branch 'bugfix/vagrant-missing-software-4307'

fixes #4307
This commit is contained in:
Eric Lippmann 2013-06-28 13:48:40 +02:00
commit 04af3b8ce7
6 changed files with 71 additions and 26 deletions

3
.gitignore vendored
View File

@ -1,8 +1,9 @@
# Exclude all hidden files # Exclude all hidden files
.* .*
# But not .gitignore and .vagrant-puppet # But not .gitignore, .vagrant-puppet and .htaccess
!.gitignore !.gitignore
!.vagrant-puppet !.vagrant-puppet
!public/.htaccess
build/ build/
test/js/npm-debug.log test/js/npm-debug.log

View File

@ -0,0 +1,8 @@
<Directory "/var/www/html/icinga2-web">
Options -Indexes
AllowOverride All
Order allow,deny
Allow from all
</Directory>

View File

@ -285,7 +285,7 @@ exec { 'install npm/mocha':
exec { 'install npm/mocha-cobertura-reporter': exec { 'install npm/mocha-cobertura-reporter':
command => 'npm install -g mocha-cobertura-reporter', command => 'npm install -g mocha-cobertura-reporter',
creates => '/usr/lib/node_modules/cobertura', creates => '/usr/lib/node_modules/mocha-cobertura-reporter',
require => Exec['install npm/mocha'] require => Exec['install npm/mocha']
} }
@ -318,16 +318,35 @@ package { 'boost-devel':
} }
cmmi { 'icinga2': cmmi { 'icinga2':
url => 'http://sourceforge.net/projects/icinga/files/icinga2/0.0.1/icinga2-0.0.1.tar.gz/download', url => 'http://sourceforge.net/projects/icinga/files/icinga2/0.0.1/icinga2-0.0.1.tar.gz/download',
output => 'icinga2-0.0.1.tar.gz', output => 'icinga2-0.0.1.tar.gz',
flags => '--prefix=/usr/local/icinga2', flags => '--prefix=/usr/local/icinga2',
creates => '/usr/local/icinga2', creates => '/usr/local/icinga2',
make => 'make && make install', make => 'make && make install',
require => Package['boost-devel'], require => Package['boost-devel'],
timeout => 600 make_timeout => 600
} }
file { 'icinga2-web-public': file { 'icinga2-web-public':
ensure => '/vagrant/public', ensure => '/vagrant/public',
path => '/var/www/html/icinga2-web' path => '/var/www/html/icinga2-web',
require => Class['apache']
}
file { '/etc/httpd/conf.d/icinga2-web.conf':
source => 'puppet:////vagrant/.vagrant-puppet/files/etc/httpd/conf.d/icinga2-web.conf',
require => Class['apache']
}
exec { 'install php-ZendFramework-Db-Adapter-Pdo-Mysql':
command => 'yum -d 0 -e 0 -y --enablerepo=epel install php-ZendFramework-Db-Adapter-Pdo-Mysql',
unless => 'rpm -qa | grep php-ZendFramework-Db-Adapter-Pdo-Mysql',
require => Exec['install ZendFramework']
}
file { ['/etc/icinga2-web/',
'/etc/icinga2-web/enabledModules/']:
ensure => 'directory',
owner => 'apache',
group => 'apache'
} }

View File

@ -6,12 +6,12 @@
# *Note* make sure to install build essentials before running cmmi. # *Note* make sure to install build essentials before running cmmi.
# #
# Parameters: # Parameters:
# [*url*] - fetch archive via wget from this url. # [*url*] - fetch archive via wget from this url.
# [*output*] - filename to fetch the archive into. # [*output*] - filename to fetch the archive into.
# [*flags*] - configure options. # [*flags*] - configure options.
# [*creates*] - target directory the software will install to. # [*creates*] - target directory the software will install to.
# [*make* ] - command to make and make install the software. # [*make* ] - command to make and make install the software.
# [*timeout* ] - timeout for the make command. # [*make_timeout* ] - timeout for the make command.
# #
# Actions: # Actions:
# #
@ -20,11 +20,12 @@
# Sample Usage: # Sample Usage:
# #
# cmmi { 'example-software': # cmmi { 'example-software':
# url => 'http://example-software.com/download/', # url => 'http://example-software.com/download/',
# output => 'example-software.tar.gz', # output => 'example-software.tar.gz',
# flags => '--prefix=/opt/example-software', # flags => '--prefix=/opt/example-software',
# creates => '/opt/example-software', # creates => '/opt/example-software',
# make => 'make && make install' # make => 'make && make install'
# make_timeout => 600
# } # }
# #
define cmmi( define cmmi(
@ -33,7 +34,7 @@ define cmmi(
$flags, $flags,
$creates, $creates,
$make, $make,
$timeout=300 $make_timeout=300
) { ) {
Exec { path => '/bin:/usr/bin' } Exec { path => '/bin:/usr/bin' }
@ -46,7 +47,6 @@ define cmmi(
cwd => $cwd, cwd => $cwd,
command => "wget -q ${url} -O ${output}", command => "wget -q ${url} -O ${output}",
creates => "${cwd}/${output}", creates => "${cwd}/${output}",
timeout => 120,
require => Class['wget'] require => Class['wget']
} }
@ -73,6 +73,6 @@ define cmmi(
command => $make, command => $make,
creates => $creates, creates => $creates,
require => Exec["configure-${name}"], require => Exec["configure-${name}"],
timeout => $timeout timeout => $make_timeout
} }
} }

8
Vagrantfile vendored
View File

@ -56,6 +56,12 @@ Vagrant::Config.run do |config|
config.vm.provision :puppet do |puppet| config.vm.provision :puppet do |puppet|
puppet.module_path = ".vagrant-puppet/modules" puppet.module_path = ".vagrant-puppet/modules"
puppet.manifests_path = ".vagrant-puppet/manifests" puppet.manifests_path = ".vagrant-puppet/manifests"
puppet.options = "-v -d" #puppet.options = "-v -d"
end
# The npm module jquery won't install via puppet because of an mysterious error
# when node-gyp rebuilding the dependent contextify module
config.vm.provision :shell do |shell|
shell.inline = "[ -d /usr/lib/node_modules/jquery ] || npm install --silent -g jquery"
end end
end end

11
public/.htaccess Normal file
View File

@ -0,0 +1,11 @@
SetEnv APPLICATION_ENV development
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
php_flag short_open_tag on
php_value short_open_tag 1