summaryrefslogtreecommitdiff
path: root/manifests/js.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/js.pp')
-rw-r--r--manifests/js.pp54
1 files changed, 54 insertions, 0 deletions
diff --git a/manifests/js.pp b/manifests/js.pp
new file mode 100644
index 0000000..646db02
--- /dev/null
+++ b/manifests/js.pp
@@ -0,0 +1,54 @@
1# Copyright 2015 Hewlett-Packard Development Company, L.P.
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may
4# not use this file except in compliance with the License. You may obtain
5# a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
14#
15# Class to install kibana frontend to logstash.
16#
17class kibana::js (
18 $vhost_template = 'kibana/dual-elasticsearch.vhost.erb',
19 $vhost_aliases = [],
20 $vhost_name = $::fqdn,
21 $vhost_proxy_timeout = '120',
22 $vhost_proxy_connect_timeout = '15',
23 $elasticsearch_url = 'http://localhost:9200',
24 $elasticsearch_prefix = '/', # Must contain trailing /
25 $git_revision = 'v3.1.2',
26) {
27
28 $base_path = "/opt/kibana/${git_revision}"
29
30 vcsrepo { $base_path:
31 ensure => latest,
32 provider => 'git',
33 source => 'https://github.com/elasticsearch/kibana.git',
34 revision => $git_revision,
35 owner => 'www-data',
36 }
37
38 file { "${base_path}/src/config.js":
39 ensure => present,
40 content => template('kibana/config.js.erb'),
41 owner => 'www-data',
42 require => Vcsrepo[$base_path],
43 subscribe => Vcsrepo[$base_path],
44 }
45
46 apache::vhost { 'kibana':
47 docroot => "${base_path}/src",
48 vhost_name => $vhost_name,
49 serveraliases => $vhost_aliases,
50 port => 80,
51 template => $vhost_template,
52 }
53
54}