Skip to content

Commit 1292c00

Browse files
authored
Update run-elasticsearch.sh script
1 parent a39466a commit 1292c00

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.ci/run-elasticsearch.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Export the TEST_SUITE variable, eg. 'free' or 'platinum' defaults to 'free'.
88
# Export the NUMBER_OF_NODES variable to start more than 1 node
99

10-
# Version 1.4.0
10+
# Version 1.6.0
1111
# - Initial version of the run-elasticsearch.sh script
1212
# - Deleting the volume should not dependent on the container still running
1313
# - Fixed `ES_JAVA_OPTS` config
@@ -18,6 +18,8 @@
1818
# - Added flags to make local CCR configurations work
1919
# - Added action.destructive_requires_name=false as the default will be true in v8
2020
# - Added ingest.geoip.downloader.enabled=false as it causes false positives in testing
21+
# - Moved ELASTIC_PASSWORD and xpack.security.enabled to the base arguments for "Security On by default"
22+
# - Use https only when TEST_SUITE is "platinum", when "free" use http
2123

2224
script_path=$(dirname $(realpath -s $0))
2325
source $script_path/functions/imports.sh
@@ -31,6 +33,8 @@ cluster_name=${moniker}${suffix}
3133

3234
declare -a volumes
3335
environment=($(cat <<-END
36+
--env ELASTIC_PASSWORD=$elastic_password
37+
--env xpack.security.enabled=true
3438
--env node.name=$es_node_name
3539
--env cluster.name=$cluster_name
3640
--env cluster.initial_master_nodes=$master_node_name
@@ -42,13 +46,12 @@ environment=($(cat <<-END
4246
--env repositories.url.allowed_urls=http://snapshot.test*
4347
--env action.destructive_requires_name=false
4448
--env ingest.geoip.downloader.enabled=false
49+
--env cluster.deprecation_indexing.enabled=false
4550
END
4651
))
4752
if [[ "$TEST_SUITE" == "platinum" ]]; then
4853
environment+=($(cat <<-END
49-
--env ELASTIC_PASSWORD=$elastic_password
5054
--env xpack.license.self_generated.type=trial
51-
--env xpack.security.enabled=true
5255
--env xpack.security.http.ssl.enabled=true
5356
--env xpack.security.http.ssl.verification_mode=certificate
5457
--env xpack.security.http.ssl.key=certs/testnode.key
@@ -67,6 +70,11 @@ END
6770
--volume $ssl_ca:/usr/share/elasticsearch/config/certs/ca.crt
6871
END
6972
))
73+
else
74+
environment+=($(cat <<-END
75+
--env xpack.security.http.ssl.enabled=false
76+
END
77+
))
7078
fi
7179

7280
cert_validation_flags=""
@@ -130,3 +138,4 @@ END
130138
fi
131139

132140
done
141+

0 commit comments

Comments
 (0)