mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
commit
b8c2c33086
@ -20,7 +20,7 @@ esac
|
|||||||
|
|
||||||
echo "Adding puppet repository.."
|
echo "Adding puppet repository.."
|
||||||
rpm --import "https://yum.puppetlabs.com/RPM-GPG-KEY-puppetlabs"
|
rpm --import "https://yum.puppetlabs.com/RPM-GPG-KEY-puppetlabs"
|
||||||
rpm -ivh $PUPPET >/dev/null
|
rpm -Uvh $PUPPET >/dev/null
|
||||||
|
|
||||||
echo "Installing puppet.."
|
echo "Installing puppet.."
|
||||||
yum install -y puppet >/dev/null
|
yum install -y puppet >/dev/null
|
||||||
|
@ -15,10 +15,10 @@
|
|||||||
class epel {
|
class epel {
|
||||||
|
|
||||||
yumrepo { 'epel':
|
yumrepo { 'epel':
|
||||||
mirrorlist => "http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=${::architecture}",
|
mirrorlist => "http://mirrors.fedoraproject.org/mirrorlist?repo=epel-${::operatingsystemmajrelease}&arch=${::architecture}",
|
||||||
enabled => '1',
|
enabled => '1',
|
||||||
gpgcheck => '0',
|
gpgcheck => '0',
|
||||||
descr => "Extra Packages for Enterprise Linux 6 - ${::architecture}"
|
descr => "Extra Packages for Enterprise Linux ${::operatingsystemmajrelease} - ${::architecture}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,4 +39,8 @@ class icinga2 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
icinga2::feature { [ 'statusdata', 'command', 'compatlog' ]: }
|
icinga2::feature { [ 'statusdata', 'command', 'compatlog' ]: }
|
||||||
|
|
||||||
|
icinga2::feature { 'api':
|
||||||
|
ensure => absent,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#
|
#
|
||||||
class icinga_packages {
|
class icinga_packages {
|
||||||
yumrepo { 'icinga_packages':
|
yumrepo { 'icinga_packages':
|
||||||
baseurl => 'http://packages.icinga.org/epel/6/snapshot/',
|
baseurl => "http://packages.icinga.org/epel/${::operatingsystemmajrelease}/snapshot/",
|
||||||
enabled => '1',
|
enabled => '1',
|
||||||
gpgcheck => '1',
|
gpgcheck => '1',
|
||||||
gpgkey => 'http://packages.icinga.org/icinga.key',
|
gpgkey => 'http://packages.icinga.org/icinga.key',
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Class: mysql
|
# Class: mysql
|
||||||
#
|
#
|
||||||
# This class installs the mysql server and client software.
|
# This class installs the MySQL server and client software on a RHEL or CentOS
|
||||||
#
|
#
|
||||||
# Parameters:
|
# Parameters:
|
||||||
#
|
#
|
||||||
@ -16,21 +16,39 @@ class mysql {
|
|||||||
|
|
||||||
Exec { path => '/usr/bin' }
|
Exec { path => '/usr/bin' }
|
||||||
|
|
||||||
|
if versioncmp($::operatingsystemmajrelease, '7') >= 0 {
|
||||||
|
$client_package_name = 'mariadb'
|
||||||
|
$server_package_name = 'mariadb-server'
|
||||||
|
$server_service_name = 'mariadb'
|
||||||
|
$cnf = '/etc/my.cnf.d/server.cnf'
|
||||||
|
$log_error = '/var/log/mariadb/mariadb.log'
|
||||||
|
$pid_file = '/var/run/mariadb/mariadb.pid'
|
||||||
|
} else {
|
||||||
|
$client_package_name = 'mysql'
|
||||||
|
$server_package_name = 'mysql-server'
|
||||||
|
$server_service_name = 'mysqld'
|
||||||
|
$cnf = '/etc/my.cnf'
|
||||||
|
$log_error = '/var/log/mysqld.log'
|
||||||
|
$pid_file = '/var/run/mysqld/mysqld.pid'
|
||||||
|
}
|
||||||
|
|
||||||
package { [
|
package { [
|
||||||
'mysql', 'mysql-server'
|
$client_package_name, $server_package_name,
|
||||||
]:
|
]:
|
||||||
ensure => latest,
|
ensure => latest,
|
||||||
}
|
}
|
||||||
|
|
||||||
service { 'mysqld':
|
service { $server_service_name:
|
||||||
ensure => running,
|
alias => 'mysqld',
|
||||||
enable => true,
|
enable => true,
|
||||||
require => Package['mysql-server']
|
ensure => running,
|
||||||
|
require => Package[$server_package_name],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/etc/my.cnf':
|
file { $cnf:
|
||||||
content => template('mysql/my.cnf.erb'),
|
content => template('mysql/my.cnf.erb'),
|
||||||
require => Package['mysql-server'],
|
notify => Service['mysqld'],
|
||||||
notify => Service['mysqld']
|
recurse => true,
|
||||||
|
require => Package[$server_package_name],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -104,8 +104,8 @@ innodb_file_per_table
|
|||||||
innodb_log_file_size = 64M
|
innodb_log_file_size = 64M
|
||||||
|
|
||||||
[mysqld_safe]
|
[mysqld_safe]
|
||||||
log-error=/var/log/mysqld.log
|
log-error=<%= @log_error %>
|
||||||
pid-file=/var/run/mysqld/mysqld.pid
|
pid-file=<%= @pid_file %>
|
||||||
|
|
||||||
# Increase the amount of open files allowed per process. Warning: Make
|
# Increase the amount of open files allowed per process. Warning: Make
|
||||||
# sure you have set the global system limit high enough! The high value
|
# sure you have set the global system limit high enough! The high value
|
||||||
|
@ -25,7 +25,7 @@ define pgsql::database::create ($username, $password) {
|
|||||||
unless => "psql -tAc \"SELECT 1 FROM pg_roles WHERE rolname='${username}'\" | grep -q 1",
|
unless => "psql -tAc \"SELECT 1 FROM pg_roles WHERE rolname='${username}'\" | grep -q 1",
|
||||||
command => "psql -c \"CREATE ROLE ${username} WITH LOGIN PASSWORD '${password}';\" && \
|
command => "psql -c \"CREATE ROLE ${username} WITH LOGIN PASSWORD '${password}';\" && \
|
||||||
createdb -O ${username} -E UTF8 -T template0 ${name} && \
|
createdb -O ${username} -E UTF8 -T template0 ${name} && \
|
||||||
createlang plpgsql ${name}",
|
(createlang plpgsql ${name} || true)",
|
||||||
user => 'postgres',
|
user => 'postgres',
|
||||||
require => Class['pgsql']
|
require => Class['pgsql']
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Class: icinga2_dev
|
# Class: icinga2_dev
|
||||||
#
|
#
|
||||||
# This class installs Icinga 2 w/ MySQL and provides Icinga 2 test configuration.
|
# This class installs Icinga 2 w/ MySQL and PostgreSQL and provides Icinga 2 test configuration.
|
||||||
#
|
#
|
||||||
# Requires:
|
# Requires:
|
||||||
#
|
#
|
||||||
@ -19,7 +19,8 @@ class icinga2_dev {
|
|||||||
include monitoring_test_config
|
include monitoring_test_config
|
||||||
|
|
||||||
icinga2::config { [
|
icinga2::config { [
|
||||||
'conf.d/test-config', 'conf.d/commands', 'constants' ]:
|
'conf.d/test-config', 'conf.d/commands', 'constants',
|
||||||
|
]:
|
||||||
source => 'puppet:///modules/icinga2_dev',
|
source => 'puppet:///modules/icinga2_dev',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,15 +1,27 @@
|
|||||||
Alias /<%= @web_path %> /vagrant/public
|
Alias /<%= @web_path %> "/vagrant/public"
|
||||||
|
|
||||||
<Directory "/vagrant/public/">
|
<Directory "/vagrant/public">
|
||||||
Options FollowSymLinks
|
Options SymLinksIfOwnerMatch
|
||||||
AllowOverride None
|
AllowOverride None
|
||||||
|
|
||||||
|
<IfModule mod_authz_core.c>
|
||||||
|
# Apache 2.4
|
||||||
|
<RequireAll>
|
||||||
|
Require all granted
|
||||||
|
</RequireAll>
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
<IfModule !mod_authz_core.c>
|
||||||
|
# Apache 2.2
|
||||||
Order allow,deny
|
Order allow,deny
|
||||||
Allow from all
|
Allow from all
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
# SetEnv ICINGAWEB_CONFIGDIR <%= @config %>
|
SetEnv ICINGAWEB_CONFIGDIR <%= @config %>
|
||||||
|
|
||||||
EnableSendfile Off
|
EnableSendfile Off
|
||||||
|
|
||||||
|
<IfModule mod_rewrite.c>
|
||||||
RewriteEngine on
|
RewriteEngine on
|
||||||
RewriteBase /<%= @web_path %>/
|
RewriteBase /<%= @web_path %>/
|
||||||
RewriteCond %{REQUEST_FILENAME} -s [OR]
|
RewriteCond %{REQUEST_FILENAME} -s [OR]
|
||||||
@ -17,7 +29,10 @@ Alias /<%= @web_path %> /vagrant/public
|
|||||||
RewriteCond %{REQUEST_FILENAME} -d
|
RewriteCond %{REQUEST_FILENAME} -d
|
||||||
RewriteRule ^.*$ - [NC,L]
|
RewriteRule ^.*$ - [NC,L]
|
||||||
RewriteRule ^.*$ index.php [NC,L]
|
RewriteRule ^.*$ index.php [NC,L]
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
php_value xdebug.idekey PHPSTORM
|
<IfModule !mod_rewrite.c>
|
||||||
|
DirectoryIndex error_norewrite.html
|
||||||
|
ErrorDocument 404 /error_norewrite.html
|
||||||
|
</IfModule>
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
|
4
Vagrantfile
vendored
4
Vagrantfile
vendored
@ -22,13 +22,13 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|||||||
config.vm.provision :shell, :path => ".puppet/manifests/puppet.sh"
|
config.vm.provision :shell, :path => ".puppet/manifests/puppet.sh"
|
||||||
|
|
||||||
config.vm.provider :virtualbox do |v, override|
|
config.vm.provider :virtualbox do |v, override|
|
||||||
override.vm.box = "puppetlabs/centos-6.6-64-puppet"
|
override.vm.box = "puppetlabs/centos-7.0-64-puppet"
|
||||||
|
|
||||||
v.customize ["modifyvm", :id, "--memory", "1024"]
|
v.customize ["modifyvm", :id, "--memory", "1024"]
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.provider :parallels do |p, override|
|
config.vm.provider :parallels do |p, override|
|
||||||
override.vm.box = "parallels/centos-6.5"
|
override.vm.box = "parallels/centos-7.1"
|
||||||
|
|
||||||
p.name = "Icinga Web 2 Development"
|
p.name = "Icinga Web 2 Development"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user