Browse Source

Add support for dynamic scripting

This change is required for the Telemetry plugin that leverages dynamic
scripting.

Change-Id: I330cd17fbd5867b3e3180b4ac6dbfe79dde50f43
tags/1.0rc1
Roman Babyuk 2 years ago
parent
commit
46bada8ee6

+ 6
- 0
deployment_scripts/puppet/manifests/elasticsearch.pp View File

@@ -37,6 +37,12 @@ class { 'lma_logging_analytics::elasticsearch':
37 37
   minimum_master_nodes => hiera('lma::elasticsearch::minimum_master_nodes'),
38 38
   recover_after_time   => hiera('lma::elasticsearch::recover_after_time'),
39 39
   recover_after_nodes  => hiera('lma::elasticsearch::recover_after_nodes'),
40
+# The Telemetry plugin creates values for 'script_inline' and 'script_indexed' in hiera if enabled
41
+# default value is 'sandbox';
42
+# related documentation:
43
+# https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html#enable-dynamic-scripting
44
+  script_inline        => hiera('lma::elasticsearch::script_inline', 'sandbox'),
45
+  script_indexed       => hiera('lma::elasticsearch::script_indexed', 'sandbox'),
40 46
   version              => '2.3.3',
41 47
   require              => Package[$java],
42 48
 }

+ 4
- 0
deployment_scripts/puppet/modules/lma_logging_analytics/manifests/elasticsearch.pp View File

@@ -28,6 +28,8 @@ class lma_logging_analytics::elasticsearch (
28 28
   $heap_size = 1,
29 29
   $listen_port = 9200,
30 30
   $version = 'latest',
31
+  $script_inline = 'sandbox',
32
+  $script_indexed = 'sandbox',
31 33
 ){
32 34
 
33 35
   validate_bool($is_master)
@@ -73,6 +75,8 @@ class lma_logging_analytics::elasticsearch (
73 75
     'http.bind_host'                     => $listen_address,
74 76
     'transport.bind_host'                => $listen_address,
75 77
     'transport.publish_host'             => $listen_address,
78
+    'script.inline'                      => $script_inline,
79
+    'script.indexed'                     => $script_indexed,
76 80
   }
77 81
   # Start an instance of elasticsearch
78 82
   ::elasticsearch::instance { $instance_name:

+ 2
- 0
deployment_tasks.yaml View File

@@ -172,6 +172,8 @@
172 172
   version: 2.0.0
173 173
   requires: [elasticsearch-haproxy]
174 174
   required_for: [deploy_end]
175
+  cross-depends:
176
+    - name: telemetry-hiera
175 177
   parameters:
176 178
     puppet_manifest: puppet/manifests/elasticsearch.pp
177 179
     puppet_modules: puppet/modules:/etc/puppet/modules

Loading…
Cancel
Save