Vagrant: Set up dev environment without any config file yet
refs #5638 resolves #5554
This commit is contained in:
parent
8edf421c45
commit
2b7f11a752
|
@ -0,0 +1,12 @@
|
|||
RewriteEngine on
|
||||
RewriteBase /icingaweb
|
||||
RewriteRule ^css/icinga.css css.php
|
||||
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 xdebug.idekey PHPSTORM
|
|
@ -0,0 +1,4 @@
|
|||
<?php
|
||||
require_once '/vagrant/library/Icinga/Application/Web.php';
|
||||
use Icinga\Application\Web;
|
||||
Web::start('/etc/icingaweb')->dispatch();
|
|
@ -338,31 +338,25 @@ package { ['cmake', 'boost-devel', 'bison', 'flex']:
|
|||
# make_timeout => 900
|
||||
#}
|
||||
|
||||
configure { 'icingaweb':
|
||||
path => '/vagrant',
|
||||
flags => '--prefix=/vagrant \
|
||||
--with-icinga-commandpipe="/usr/local/icinga-mysql/var/rw/icinga.cmd" \
|
||||
--with-statusdat-file="/usr/local/icinga-mysql/var/status.dat" \
|
||||
--with-objects-cache-file=/usr/local/icinga-mysql/var/objects.cache \
|
||||
--with-icinga-backend=ido \
|
||||
--with-httpd-config-path="/etc/httpd/conf.d" \
|
||||
--with-ldap-authentication \
|
||||
--with-internal-authentication \
|
||||
--with-livestatus-socket="/usr/local/icinga-mysql/var/rw/live"',
|
||||
require => Exec['install php-ZendFramework']
|
||||
}
|
||||
#configure { 'icingaweb':
|
||||
# path => '/vagrant',
|
||||
# flags => '--prefix=/vagrant \
|
||||
# --with-icinga-commandpipe="/usr/local/icinga-mysql/var/rw/icinga.cmd" \
|
||||
# --with-statusdat-file="/usr/local/icinga-mysql/var/status.dat" \
|
||||
# --with-objects-cache-file=/usr/local/icinga-mysql/var/objects.cache \
|
||||
# --with-icinga-backend=ido \
|
||||
# --with-httpd-config-path="/etc/httpd/conf.d" \
|
||||
# --with-ldap-authentication \
|
||||
# --with-internal-authentication \
|
||||
# --with-livestatus-socket="/usr/local/icinga-mysql/var/rw/live"',
|
||||
# require => Exec['install php-ZendFramework']
|
||||
#}
|
||||
|
||||
file { 'icingaweb-public':
|
||||
ensure => '/vagrant/public',
|
||||
path => '/var/www/html/icingaweb',
|
||||
require => Class['apache']
|
||||
}
|
||||
|
||||
file { '/etc/httpd/conf.d/icingaweb.conf':
|
||||
source => 'puppet:////vagrant/.vagrant-puppet/files/etc/httpd/conf.d/icingaweb.conf',
|
||||
require => Package['apache'],
|
||||
notify => Service['apache']
|
||||
}
|
||||
#file { 'icingaweb-public':
|
||||
# ensure => '/vagrant/public',
|
||||
# path => '/var/www/html/icingaweb',
|
||||
# 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',
|
||||
|
@ -570,3 +564,56 @@ exec { 'populate-icinga_web-mysql-db':
|
|||
command => 'mysql -uicinga_web -picinga_web icinga_web < /usr/local/src/icinga-web/icinga-web-1.10.0-beta/etc/schema/mysql.sql',
|
||||
require => [ Exec['create-mysql-icinga_web-db'], Cmmi['icinga-web'] ]
|
||||
}
|
||||
|
||||
#
|
||||
# Development environment (Feature #5554)
|
||||
#
|
||||
file { '/var/www/html/icingaweb':
|
||||
ensure => 'directory',
|
||||
owner => 'apache',
|
||||
group => 'apache'
|
||||
}
|
||||
|
||||
file { '/var/www/html/icingaweb/css':
|
||||
ensure => 'link',
|
||||
target => '/vagrant/public/css',
|
||||
owner => 'apache',
|
||||
group => 'apache',
|
||||
require => File['/var/www/html/icingaweb']
|
||||
}
|
||||
|
||||
file { '/var/www/html/icingaweb/img':
|
||||
ensure => 'link',
|
||||
target => '/vagrant/public/css',
|
||||
owner => 'apache',
|
||||
group => 'apache',
|
||||
require => File['/var/www/html/icingaweb']
|
||||
}
|
||||
|
||||
file { '/var/www/html/icingaweb/js':
|
||||
ensure => 'link',
|
||||
target => '/vagrant/public/css',
|
||||
owner => 'apache',
|
||||
group => 'apache',
|
||||
require => File['/var/www/html/icingaweb']
|
||||
}
|
||||
|
||||
file { '/var/www/html/icingaweb/index.php':
|
||||
source => 'puppet:////vagrant/.vagrant-puppet/files/var/www/html/icingaweb/index.php',
|
||||
owner => 'apache',
|
||||
group => 'apache',
|
||||
require => File['/var/www/html/icingaweb']
|
||||
}
|
||||
|
||||
file { '/var/www/html/icingaweb/.htaccess':
|
||||
source => 'puppet:////vagrant/.vagrant-puppet/files/var/www/html/icingaweb/.htaccess',
|
||||
owner => 'apache',
|
||||
group => 'apache',
|
||||
require => File['/var/www/html/icingaweb']
|
||||
}
|
||||
|
||||
file { '/etc/httpd/conf.d/icingaweb.conf':
|
||||
source => 'puppet:////vagrant/.vagrant-puppet/files/etc/httpd/conf.d/icingaweb.conf',
|
||||
require => Package['apache'],
|
||||
notify => Service['apache']
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue