Fix errors reported by puppet-lint
This is required to enable the Fuel Plugins CI. Change-Id: I56aec27b6ad03c3794d03757238a21f598eeb8d1
This commit is contained in:
parent
01d2ad7342
commit
711fd4bcbe
|
@ -4,12 +4,12 @@ if $fuel_settings['elasticsearch_kibana']['node_name'] == $fuel_settings['user_n
|
|||
|
||||
# Params related to Elasticsearch.
|
||||
$es_dir = $fuel_settings['elasticsearch_kibana']['data_dir']
|
||||
$es_instance = "es-01"
|
||||
$es_instance = 'es-01'
|
||||
|
||||
# Java
|
||||
$java = $::operatingsystem ? {
|
||||
CentOS => "java-1.8.0-openjdk-headless",
|
||||
Ubuntu => "openjdk-7-jre-headless"
|
||||
CentOS => 'java-1.8.0-openjdk-headless',
|
||||
Ubuntu => 'openjdk-7-jre-headless'
|
||||
}
|
||||
|
||||
# Ensure that java is installed
|
||||
|
@ -18,7 +18,7 @@ if $fuel_settings['elasticsearch_kibana']['node_name'] == $fuel_settings['user_n
|
|||
}
|
||||
|
||||
# Install elasticsearch
|
||||
class { "elasticsearch":
|
||||
class { 'elasticsearch':
|
||||
datadir => ["${es_dir}/elasticsearch_data"],
|
||||
require => [Package[$java]],
|
||||
}
|
||||
|
@ -26,8 +26,8 @@ if $fuel_settings['elasticsearch_kibana']['node_name'] == $fuel_settings['user_n
|
|||
# Start an instance of elasticsearch
|
||||
elasticsearch::instance { $es_instance:
|
||||
config => {
|
||||
"http.cors.allow-origin" => "/.*/",
|
||||
"http.cors.enabled" => "true"
|
||||
'http.cors.allow-origin' => '/.*/',
|
||||
'http.cors.enabled' => true
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
@ -9,13 +9,13 @@ if $fuel_settings['elasticsearch_kibana']['node_name'] == $fuel_settings['user_n
|
|||
|
||||
if empty($disks) {
|
||||
file { $directory:
|
||||
ensure => "directory",
|
||||
ensure => 'directory',
|
||||
}
|
||||
} else {
|
||||
disk_management::lvm_fs { $directory:
|
||||
disks => $disks,
|
||||
lv_name => "es",
|
||||
vg_name => "data",
|
||||
lv_name => 'es',
|
||||
vg_name => 'data',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# Class disk_management
|
||||
|
||||
class disk_management (
|
||||
$script = $disk_management::params::script,
|
||||
$puppet_source = $disk_management::params::puppet_source,
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
# Define Resource Type: disk_management::lvm_fs
|
||||
|
||||
define disk_management::lvm_fs (
|
||||
$disks,
|
||||
$lv_name,
|
||||
$vg_name,
|
||||
$fstype = "ext3",
|
||||
$fstype = 'ext3',
|
||||
) {
|
||||
|
||||
$directory = $title
|
||||
|
@ -23,10 +25,10 @@ define disk_management::lvm_fs (
|
|||
|
||||
# Mount the directory
|
||||
mount { $directory:
|
||||
device => $device,
|
||||
ensure => mounted,
|
||||
device => $device,
|
||||
fstype => $fstype,
|
||||
options => "defaults",
|
||||
options => 'defaults',
|
||||
require => [File[$directory], Lvm::Volume[$lv_name]],
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
# Class disk_management::params
|
||||
|
||||
class disk_management::params {
|
||||
$script = "add_partition.sh"
|
||||
$script = 'add_partition.sh'
|
||||
$puppet_source = "puppet:///modules/disk_management/${script}"
|
||||
$script_location = "/usr/local/bin/${script}"
|
||||
}
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
# Class that partition the disk
|
||||
# If a disk is given as title we check for free space and allocated
|
||||
# this free space by calling the script given as parameter.
|
||||
|
||||
define disk_management::partition {
|
||||
|
||||
include disk_management::params
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# Defined type lma_logging_analytics::es_template
|
||||
|
||||
define lma_logging_analytics::es_template (
|
||||
$number_of_shards = 3
|
||||
) {
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
# Class lma_logging_analytics::kibana
|
||||
|
||||
class lma_logging_analytics::kibana (
|
||||
$kibana_dir = $lma_logging_analytics::params::kibana_dir,
|
||||
$kibana_conf = $lma_logging_analytics::params::kibana_config,
|
||||
$kibana_dash = $lma_logging_analytics::params::kibana_dashboard,
|
||||
) inherits lma_logging_analytics::params {
|
||||
|
||||
# Deploy kibana
|
||||
# Deploy kibana
|
||||
file { $kibana_dir:
|
||||
source => "puppet:///modules/lma_logging_analytics/kibana/src",
|
||||
source => 'puppet:///modules/lma_logging_analytics/kibana/src',
|
||||
recurse => true,
|
||||
}
|
||||
|
||||
|
@ -18,15 +20,21 @@ class lma_logging_analytics::kibana (
|
|||
}
|
||||
|
||||
file { $kibana_dash:
|
||||
source => "puppet:///modules/lma_logging_analytics/kibana_dashboards/logs.json",
|
||||
source => 'puppet:///modules/lma_logging_analytics/kibana_dashboards/logs.json',
|
||||
require => File[$kibana_dir],
|
||||
}
|
||||
|
||||
# Install nginx
|
||||
class { 'nginx':
|
||||
manage_repo => false,
|
||||
nginx_vhosts => { 'kibana.local' => { 'www_root' => $kibana_dir } },
|
||||
nginx_vhosts_defaults => { 'listen_options' => 'default_server' },
|
||||
nginx_vhosts => {
|
||||
'kibana.local' => {
|
||||
'www_root' => $kibana_dir
|
||||
}
|
||||
},
|
||||
nginx_vhosts_defaults => {
|
||||
'listen_options' => 'default_server'
|
||||
},
|
||||
require => File[$kibana_conf],
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
# Class lma_logging_analytics::params
|
||||
|
||||
class lma_logging_analytics::params {
|
||||
$kibana_dir = "/opt/kibana"
|
||||
$kibana_dir = '/opt/kibana'
|
||||
$kibana_config = "${kibana_dir}/config.js"
|
||||
$kibana_dashboard = "${kibana_dir}/app/dashboards/logs.json"
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ fuel_version: ['6.1']
|
|||
licenses: ['Apache License Version 2.0']
|
||||
# Specify author or company name
|
||||
authors: ['Mirantis Inc.']
|
||||
# A link to the plugin homepage
|
||||
# A link to the plugin homepage
|
||||
homepage: 'https://github.com/stackforge/fuel-plugin-elasticsearch-kibana'
|
||||
groups: []
|
||||
|
||||
|
|
Loading…
Reference in New Issue