[icinga-checkins] icinga.org: icinga-web/master: Fix vagrant environment

git at icinga.org git at icinga.org
Tue Aug 2 12:54:32 CEST 2016


Module: icinga-web
Branch: master
Commit: 65542b12ea1cc8d86334233f735370970ff478e6
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=65542b12ea1cc8d86334233f735370970ff478e6

Author: Marius Hein <marius.hein at netways.de>
Date:   Tue Aug  2 12:21:29 2016 +0200

Fix vagrant environment

---

 .vagrant-puppet/modules/apache/manifests/init.pp       |    5 +++++
 .vagrant-puppet/modules/icinga-mysql/manifests/init.pp |    2 +-
 .vagrant-puppet/modules/icinga-web/manifests/init.pp   |    2 +-
 .vagrant-puppet/modules/mysql/manifests/init.pp        |   10 +++++-----
 .vagrant-puppet/modules/mysql/templates/my.cnf.erb     |    4 ++--
 Vagrantfile                                            |    6 +++---
 6 files changed, 17 insertions(+), 12 deletions(-)

diff --git a/.vagrant-puppet/modules/apache/manifests/init.pp b/.vagrant-puppet/modules/apache/manifests/init.pp
index 98c1723..a3fde3b 100644
--- a/.vagrant-puppet/modules/apache/manifests/init.pp
+++ b/.vagrant-puppet/modules/apache/manifests/init.pp
@@ -23,10 +23,15 @@ class apache {
     ensure  => installed,
   }
 
+  package { 'system-config-firewall-base':
+    ensure => installed
+  }
+
   exec { 'iptables-allow-http':
     path    => '/bin:/usr/bin:/sbin:/usr/sbin',
     unless  => 'grep -Fxqe "-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT" /etc/sysconfig/iptables',
     command => 'lokkit --enabled --service=http',
+    require => [ Package['system-config-firewall-base'] ]
   }
 
   service { $apache:
diff --git a/.vagrant-puppet/modules/icinga-mysql/manifests/init.pp b/.vagrant-puppet/modules/icinga-mysql/manifests/init.pp
index 73db58d..9734bab 100644
--- a/.vagrant-puppet/modules/icinga-mysql/manifests/init.pp
+++ b/.vagrant-puppet/modules/icinga-mysql/manifests/init.pp
@@ -42,7 +42,7 @@ class icinga-mysql {
     path    => '/bin:/usr/bin',
     unless  => 'mysql -uicinga -picinga icinga',
     command => 'mysql -uroot -e "CREATE DATABASE icinga; GRANT ALL ON icinga.* TO icinga at localhost IDENTIFIED BY \'icinga\';"',
-    require => Service['mysqld']
+    require => Service['mariadb']
   }
 
   exec { 'populate-icinga-mysql-db':
diff --git a/.vagrant-puppet/modules/icinga-web/manifests/init.pp b/.vagrant-puppet/modules/icinga-web/manifests/init.pp
index 7bbef72..57d88ac 100644
--- a/.vagrant-puppet/modules/icinga-web/manifests/init.pp
+++ b/.vagrant-puppet/modules/icinga-web/manifests/init.pp
@@ -47,7 +47,7 @@ class icinga-web {
     path    => '/bin:/usr/bin',
     unless  => 'mysql -uicinga_web -picinga_web icinga_web',
     command => 'mysql -uroot -e "CREATE DATABASE icinga_web; GRANT ALL ON icinga_web.* TO icinga_web at localhost IDENTIFIED BY \'icinga_web\';"',
-    require => Service['mysqld']
+    require => Service['mariadb']
   }
 
   exec { 'populate-icinga-web-mysql-db':
diff --git a/.vagrant-puppet/modules/mysql/manifests/init.pp b/.vagrant-puppet/modules/mysql/manifests/init.pp
index de35a89..4ac2d40 100644
--- a/.vagrant-puppet/modules/mysql/manifests/init.pp
+++ b/.vagrant-puppet/modules/mysql/manifests/init.pp
@@ -13,19 +13,19 @@
 #   include mysql
 #
 class mysql {
-  package { [ 'mysql', 'mysql-server', ]:
+  package { [ 'mariadb', 'mariadb-server', ]:
       ensure => installed,
   }
 
-  service { 'mysqld':
+  service { 'mariadb':
     enable  => true,
     ensure  => running,
-    require => Package['mysql-server']
+    require => Package['mariadb-server']
   }
 
   file { '/etc/my.cnf':
     content => template('mysql/my.cnf.erb'),
-    require => Package['mysql-server'],
-    notify  => Service['mysqld']
+    require => Package['mariadb-server'],
+    notify  => Service['mariadb']
   }
 }
diff --git a/.vagrant-puppet/modules/mysql/templates/my.cnf.erb b/.vagrant-puppet/modules/mysql/templates/my.cnf.erb
index d26583e..ef7e3e9 100644
--- a/.vagrant-puppet/modules/mysql/templates/my.cnf.erb
+++ b/.vagrant-puppet/modules/mysql/templates/my.cnf.erb
@@ -104,8 +104,8 @@ innodb_file_per_table
 innodb_log_file_size = 64M
 
 [mysqld_safe]
-log-error=/var/log/mysqld.log
-pid-file=/var/run/mysqld/mysqld.pid
+log-error=/var/log/mariadb/mariadb.log
+pid-file=/var/run/mariadb/mariadb.pid
 
 # Increase the amount of open files allowed per process. Warning: Make
 # sure you have set the global system limit high enough! The high value
diff --git a/Vagrantfile b/Vagrantfile
index faee382..32e54c6 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -22,13 +22,13 @@ end
 
 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
   config.vm.network "forwarded_port", guest: 80, host: 8080, auto_correct: true
-
+  config.ssh.insert_key = false
   config.vm.synced_folder "./app/cache",    "/vagrant/app/cache"
   config.vm.synced_folder "./app/data/tmp", "/vagrant/app/data/tmp"
   config.vm.synced_folder "./log",          "/vagrant/log"
 
   # puphet/centos65 is not tied to CentOS 6.5 as its name may imply
-  config.vm.box = "puphpet/centos65-x64"
+  config.vm.box = "bento/centos-7.2"
 
   config.vm.provider :virtualbox do |v, override|
     v.customize ["modifyvm", :id, "--memory", "1024"]
@@ -41,7 +41,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
     p.update_guest_tools = true
 
     # Set power consumption mode to "Better Performance"
-    p.optimize_power_consumption = false
+    p.customize ["set", :id, "--longer-battery-life", "off"]
 
     p.memory = 1024
     p.cpus = 2



More information about the icinga-checkins mailing list