forked from realityforge/chef-kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkibana3.rb
35 lines (31 loc) · 1.02 KB
/
kibana3.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Encoding: utf-8
include_recipe 'kibana'
if node['kibana']['install_method'] == 'source'
package 'git'
git File.join(node['kibana']['base_dir'], 'current') do
repository node['kibana']['git']['url']
reference node['kibana']['git']['reference']
user node['kibana']['user']
group node['kibana']['group']
action :checkout
end
config_path = 'current/src/config.js'
else
ark 'kibana' do
url node['kibana']['url']
version node['kibana']['kibana3_version']
checksum node['kibana']['checksum']
path node['kibana']['base_dir']
home_dir File.join(node['kibana']['base_dir'], 'current')
owner node['kibana']['user']
end
config_path = 'current/config.js'
end
template File.join(node['kibana']['base_dir'], config_path) do
cookbook node['kibana']['config']['cookbook']
source node['kibana']['config']['source']
owner node['kibana']['user']
group node['kibana']['group']
mode '0644'
variables('es_port' => node['kibana']['elasticsearch']['port'], 'index' => node['kibana']['index'])
end