
/opt/kibana was being chowned to 'kibana' on every run, but /opt/kibana/<git_version> was a vcsrepo that was being checked out as www-data. This caused a changed file resource for every file in the git repo for every puppet run, causing a bunch of noise in the logs and eventually running the puppetmaster out of disk space. Also changed directory mode to 755 because 644 doesn't make a ton of sense. Change-Id: I3cc511c4a5ae561ec30478d96d9745611d4b5b65
67 lines
1.9 KiB
Puppet
67 lines
1.9 KiB
Puppet
# Copyright 2013 Hewlett-Packard Development Company, L.P.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
#
|
|
# Class to install kibana frontend to logstash.
|
|
#
|
|
class kibana (
|
|
$discover_nodes = ['localhost:9200'],
|
|
$version = 'ruby',
|
|
$js_vhost_name = $::fqdn,
|
|
$js_vhost_aliases = [],
|
|
$js_vhost_template = 'kibana/dual-elasticsearch.vhost.erb',
|
|
$js_elasticsearch_prefix = '/',
|
|
$js_elasticsearch_url = 'http://localhost:9200',
|
|
) {
|
|
|
|
group { 'kibana':
|
|
ensure => present,
|
|
}
|
|
|
|
user { 'kibana':
|
|
ensure => present,
|
|
comment => 'Kibana User',
|
|
home => '/opt/kibana',
|
|
gid => 'kibana',
|
|
shell => '/bin/bash',
|
|
membership => 'minimum',
|
|
require => Group['kibana'],
|
|
}
|
|
|
|
file { '/opt/kibana':
|
|
ensure => directory,
|
|
owner => 'kibana',
|
|
group => 'kibana',
|
|
mode => '0755',
|
|
require => User['kibana'],
|
|
}
|
|
|
|
case $version {
|
|
'ruby': {
|
|
include ::kibana::ruby
|
|
}
|
|
'js': {
|
|
class { '::kibana::js':
|
|
vhost_name => $js_vhost_name,
|
|
vhost_aliases => $js_vhost_aliases,
|
|
vhost_template => $js_vhost_template,
|
|
elasticsearch_prefix => $js_elasticsearch_prefix,
|
|
elasticsearch_url => $js_elasticsearch_url,
|
|
}
|
|
}
|
|
default: {
|
|
fail("Unknown version: ${version}")
|
|
}
|
|
}
|
|
}
|