7
7
# Export the TEST_SUITE variable, eg. 'free' or 'platinum' defaults to 'free'.
8
8
# Export the NUMBER_OF_NODES variable to start more than 1 node
9
9
10
- # Version 1.3.0
10
+ # Version 1.6.1
11
11
# - Initial version of the run-elasticsearch.sh script
12
12
# - Deleting the volume should not dependent on the container still running
13
13
# - Fixed `ES_JAVA_OPTS` config
17
17
# - Added 5 retries on docker pull for fixing transient network errors
18
18
# - Added flags to make local CCR configurations work
19
19
# - Added action.destructive_requires_name=false as the default will be true in v8
20
+ # - 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
23
+ # - Set xpack.security.enabled=false for "free" and xpack.security.enabled=true for "platinum"
20
24
21
25
script_path=$( dirname $( realpath -s $0 ) )
22
26
source $script_path /functions/imports.sh
@@ -30,6 +34,7 @@ cluster_name=${moniker}${suffix}
30
34
31
35
declare -a volumes
32
36
environment=($( cat << -END
37
+ --env ELASTIC_PASSWORD=$elastic_password
33
38
--env node.name=$es_node_name
34
39
--env cluster.name=$cluster_name
35
40
--env cluster.initial_master_nodes=$master_node_name
@@ -40,29 +45,44 @@ environment=($(cat <<-END
40
45
--env path.repo=/tmp
41
46
--env repositories.url.allowed_urls=http://snapshot.test*
42
47
--env action.destructive_requires_name=false
43
- --env ELASTIC_PASSWORD=$elastic_password
44
- --env xpack.license.self_generated.type=trial
45
- --env xpack.security.enabled=true
46
- --env xpack.security.http.ssl.enabled=true
47
- --env xpack.security.http.ssl.verification_mode=certificate
48
- --env xpack.security.http.ssl.key=certs/testnode.key
49
- --env xpack.security.http.ssl.certificate=certs/testnode.crt
50
- --env xpack.security.http.ssl.certificate_authorities=certs/ca.crt
51
- --env xpack.security.transport.ssl.enabled=true
52
- --env xpack.security.transport.ssl.verification_mode=certificate
53
- --env xpack.security.transport.ssl.key=certs/testnode.key
54
- --env xpack.security.transport.ssl.certificate=certs/testnode.crt
55
- --env xpack.security.transport.ssl.certificate_authorities=certs/ca.crt
48
+ --env ingest.geoip.downloader.enabled=false
49
+ --env cluster.deprecation_indexing.enabled=false
50
+ END
51
+ ) )
52
+ if [[ " $TEST_SUITE " == " platinum" ]]; then
53
+ environment+=($( cat << -END
54
+ --env xpack.security.enabled=true
55
+ --env xpack.license.self_generated.type=trial
56
+ --env xpack.security.http.ssl.enabled=true
57
+ --env xpack.security.http.ssl.verification_mode=certificate
58
+ --env xpack.security.http.ssl.key=certs/testnode.key
59
+ --env xpack.security.http.ssl.certificate=certs/testnode.crt
60
+ --env xpack.security.http.ssl.certificate_authorities=certs/ca.crt
61
+ --env xpack.security.transport.ssl.enabled=true
62
+ --env xpack.security.transport.ssl.verification_mode=certificate
63
+ --env xpack.security.transport.ssl.key=certs/testnode.key
64
+ --env xpack.security.transport.ssl.certificate=certs/testnode.crt
65
+ --env xpack.security.transport.ssl.certificate_authorities=certs/ca.crt
56
66
END
57
67
) )
58
- volumes+=($( cat << -END
59
- --volume $ssl_cert :/usr/share/elasticsearch/config/certs/testnode.crt
60
- --volume $ssl_key :/usr/share/elasticsearch/config/certs/testnode.key
61
- --volume $ssl_ca :/usr/share/elasticsearch/config/certs/ca.crt
68
+ volumes+=($( cat << -END
69
+ --volume $ssl_cert :/usr/share/elasticsearch/config/certs/testnode.crt
70
+ --volume $ssl_key :/usr/share/elasticsearch/config/certs/testnode.key
71
+ --volume $ssl_ca :/usr/share/elasticsearch/config/certs/ca.crt
72
+ END
73
+ ) )
74
+ else
75
+ environment+=($( cat << -END
76
+ --env xpack.security.enabled=false
77
+ --env xpack.security.http.ssl.enabled=false
62
78
END
63
79
) )
80
+ fi
64
81
65
- cert_validation_flags=" --insecure --cacert /usr/share/elasticsearch/config/certs/ca.crt --resolve ${es_node_name} :443:127.0.0.1"
82
+ cert_validation_flags=" "
83
+ if [[ " $TEST_SUITE " == " platinum" ]]; then
84
+ cert_validation_flags=" --insecure --cacert /usr/share/elasticsearch/config/certs/ca.crt --resolve ${es_node_name} :443:127.0.0.1"
85
+ fi
66
86
67
87
# Pull the container, retry on failures up to 5 times with
68
88
# short delays between each attempt. Fixes most transient network errors.
0 commit comments