Vagrant: Set up dev environment without any config file yet

refs #5638
resolves #5554
This commit is contained in:
Eric Lippmann 2014-02-18 16:41:53 +01:00
parent 8edf421c45
commit 2b7f11a752
3 changed files with 87 additions and 24 deletions

View File

@ -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

View File

@ -0,0 +1,4 @@
<?php
require_once '/vagrant/library/Icinga/Application/Web.php';
use Icinga\Application\Web;
Web::start('/etc/icingaweb')->dispatch();

View File

@ -338,31 +338,25 @@ package { ['cmake', 'boost-devel', 'bison', 'flex']:
# make_timeout => 900 # make_timeout => 900
#} #}
configure { 'icingaweb': #configure { 'icingaweb':
path => '/vagrant', # path => '/vagrant',
flags => '--prefix=/vagrant \ # flags => '--prefix=/vagrant \
--with-icinga-commandpipe="/usr/local/icinga-mysql/var/rw/icinga.cmd" \ # --with-icinga-commandpipe="/usr/local/icinga-mysql/var/rw/icinga.cmd" \
--with-statusdat-file="/usr/local/icinga-mysql/var/status.dat" \ # --with-statusdat-file="/usr/local/icinga-mysql/var/status.dat" \
--with-objects-cache-file=/usr/local/icinga-mysql/var/objects.cache \ # --with-objects-cache-file=/usr/local/icinga-mysql/var/objects.cache \
--with-icinga-backend=ido \ # --with-icinga-backend=ido \
--with-httpd-config-path="/etc/httpd/conf.d" \ # --with-httpd-config-path="/etc/httpd/conf.d" \
--with-ldap-authentication \ # --with-ldap-authentication \
--with-internal-authentication \ # --with-internal-authentication \
--with-livestatus-socket="/usr/local/icinga-mysql/var/rw/live"', # --with-livestatus-socket="/usr/local/icinga-mysql/var/rw/live"',
require => Exec['install php-ZendFramework'] # require => Exec['install php-ZendFramework']
} #}
file { 'icingaweb-public': #file { 'icingaweb-public':
ensure => '/vagrant/public', # ensure => '/vagrant/public',
path => '/var/www/html/icingaweb', # path => '/var/www/html/icingaweb',
require => Class['apache'] # 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']
}
exec { 'install php-ZendFramework-Db-Adapter-Pdo-Mysql': exec { 'install php-ZendFramework-Db-Adapter-Pdo-Mysql':
command => 'yum -d 0 -e 0 -y --enablerepo=epel 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', 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'] ] 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']
}