From 12a7e7abbc722497e625c369efa948f59c86f343 Mon Sep 17 00:00:00 2001 From: Russ Cam Date: Wed, 24 Feb 2021 15:03:28 +1000 Subject: [PATCH] Add Elastic Stack 7.11 (#381) This commit updates the versions of the Elastic Stack that the template deploys. - Add 7.11.1 - Update 7.10 version to 7.10.2 - Remove EOL versions, 7.2.1 and 7.3.2 - Don't use --allow root for 7.11 Relates: https://github.com/elastic/kibana/pull/76465 --- build/allowedValues.json | 5 ++--- build/arm-tests/3d-3m-3c-int-jp.json | 2 +- src/createUiDefinition.json | 18 +++++++----------- src/mainTemplate.json | 7 +++---- src/scripts/kibana-install.sh | 19 ++++++++++++------- 5 files changed, 25 insertions(+), 26 deletions(-) diff --git a/build/allowedValues.json b/build/allowedValues.json index 4aeb586b..411717c5 100644 --- a/build/allowedValues.json +++ b/build/allowedValues.json @@ -1,15 +1,14 @@ { "versions": [ "6.8.14", - "7.2.1", - "7.3.2", "7.4.2", "7.5.2", "7.6.2", "7.7.1", "7.8.1", "7.9.3", - "7.10.0" + "7.10.2", + "7.11.1" ], "numberOfDataNodes" : 50, "numberOfClientNodes" : 20, diff --git a/build/arm-tests/3d-3m-3c-int-jp.json b/build/arm-tests/3d-3m-3c-int-jp.json index 54a07f57..74d36961 100644 --- a/build/arm-tests/3d-3m-3c-int-jp.json +++ b/build/arm-tests/3d-3m-3c-int-jp.json @@ -13,7 +13,7 @@ "vmDataDiskCount":{"value":40}, "vmDataDiskSize":{"value":"32GiB"}, "storageAccountType":{"value":"Default"}, - "dataNodesAreMasterEligible":{"value":"Yes"}, + "dataNodesAreMasterEligible":{"value":"No"}, "vmSizeMasterNodes":{"value":"Standard_DS2_v2"}, "vmClientNodeCount":{"value":3}, "vmSizeClientNodes":{"value":"Standard_DS1_v2"}, diff --git a/src/createUiDefinition.json b/src/createUiDefinition.json index 0338f01a..25b9c355 100644 --- a/src/createUiDefinition.json +++ b/src/createUiDefinition.json @@ -54,7 +54,7 @@ "name": "esVersion", "type": "Microsoft.Common.DropDown", "label": "Elasticsearch version", - "defaultValue": "v7.10.0", + "defaultValue": "v7.11.1", "toolTip": "Choose a version of Elasticsearch.", "constraints": { "allowedValues": [ @@ -62,14 +62,6 @@ "label": "v6.8.14", "value": "6.8.14" }, - { - "label": "v7.2.1", - "value": "7.2.1" - }, - { - "label": "v7.3.2", - "value": "7.3.2" - }, { "label": "v7.4.2", "value": "7.4.2" @@ -95,8 +87,12 @@ "value": "7.9.3" }, { - "label": "v7.10.0", - "value": "7.10.0" + "label": "v7.10.2", + "value": "7.10.2" + }, + { + "label": "v7.11.1", + "value": "7.11.1" } ] } diff --git a/src/mainTemplate.json b/src/mainTemplate.json index 4a79b213..15d4ad86 100644 --- a/src/mainTemplate.json +++ b/src/mainTemplate.json @@ -28,18 +28,17 @@ }, "esVersion": { "type": "string", - "defaultValue": "7.10.0", + "defaultValue": "7.11.1", "allowedValues": [ "6.8.14", - "7.2.1", - "7.3.2", "7.4.2", "7.5.2", "7.6.2", "7.7.1", "7.8.1", "7.9.3", - "7.10.0" + "7.10.2", + "7.11.1" ], "metadata": { "description": "Elastic Stack version to install" diff --git a/src/scripts/kibana-install.sh b/src/scripts/kibana-install.sh index 0ae39679..5f2d8678 100644 --- a/src/scripts/kibana-install.sh +++ b/src/scripts/kibana-install.sh @@ -163,12 +163,12 @@ random_password() keystore_cmd() { - # keystore is created in /etc/kibana/kibana.keystore in 7.9.0+ - # but need to create with root due to permissions - if dpkg --compare-versions "$KIBANA_VERSION" "ge" "7.9.0"; then - /usr/share/kibana/bin/kibana-keystore "$@" --allow-root - else + if [[ $(dpkg --compare-versions "$KIBANA_VERSION" "ge" "7.11.0"; echo $?) -eq 0 || $(dpkg --compare-versions "$KIBANA_VERSION" "lt" "7.9.0"; echo $?) -eq 0 ]]; then sudo -u kibana /usr/share/kibana/bin/kibana-keystore "$@" + else + # keystore is created in /etc/kibana/kibana.keystore in 7.9.x and 7.10.x + # but need to create with root due to permissions + /usr/share/kibana/bin/kibana-keystore "$@" --allow-root fi } @@ -178,8 +178,13 @@ create_keystore_if_not_exists() if dpkg --compare-versions "$KIBANA_VERSION" "ge" "7.9.0"; then KEYSTORE_FILE=/etc/kibana/kibana.keystore fi - - [[ -f $KEYSTORE_FILE ]] || (keystore_cmd create) + + if [[ -f $KEYSTORE_FILE ]]; then + log "[create_keystore_if_not_exists] kibana.keystore exists at $KEYSTORE_FILE" + else + log "[create_keystore_if_not_exists] create kibana.keystore" + keystore_cmd create + fi } install_kibana()