Skip to content

Commit 68e56c1

Browse files
authored
Update 8.19 observabilitySRE testing based on using 9.2 stack (#18014)
When working on porting tests to #18001 the main LS branch we started testing against the 9.2 series of the ES stack. There were some required changes there (listed below) that are 8.19 compatable. This commit ports those changes to the 8.19 series to keep them as close as possible. 1. Elasticsearch container needs explicit fips config to boot 2. Filebeat needs > 64k file size to start filestream processing 3. Generally the logging in the shared helpers was updated to make reasoning about the state of failures easier in log output.
1 parent 1195743 commit 68e56c1

File tree

9 files changed

+24
-6
lines changed

9 files changed

+24
-6
lines changed

x-pack/distributions/internal/observabilitySRE/qa/acceptance/docker/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ services:
2323
- ./certs:/usr/share/elasticsearch/config/certs
2424
environment:
2525
- discovery.type=single-node
26-
- ES_JAVA_OPTS=-Xms1g -Xmx1g
26+
- "ES_JAVA_OPTS=-Djava.security.properties=/usr/share/elasticsearch/config/fips_java.security"
2727
- ELASTIC_PASSWORD=changeme
2828
networks:
2929
- elastic

x-pack/distributions/internal/observabilitySRE/qa/acceptance/docker/elasticsearch/config/elasticsearch-fips.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@ xpack.security.transport.ssl.certificate_authorities: ["/usr/share/elasticsearch
1212
xpack.security.http.ssl.enabled: true
1313
xpack.security.http.ssl.key: /usr/share/elasticsearch/config/certs/elasticsearch.key
1414
xpack.security.http.ssl.certificate: /usr/share/elasticsearch/config/certs/elasticsearch.crt
15-
xpack.security.http.ssl.certificate_authorities: ["/usr/share/elasticsearch/config/certs/ca.crt"]
15+
xpack.security.http.ssl.certificate_authorities: ["/usr/share/elasticsearch/config/certs/ca.crt"]
16+
# FIPS Configuration - Let Elasticsearch auto-detect and register providers
17+
xpack.security.fips_mode.enabled: true
18+
xpack.security.autoconfiguration.enabled: false

x-pack/distributions/internal/observabilitySRE/qa/acceptance/docker/filebeat/config/filebeat-fips.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
filebeat.inputs:
2-
- type: log
2+
- type: filestream
33
enabled: true
44
paths:
55
- /data/logs/sample_logs.txt
6+
id: test-logs-input
67

78
output.logstash:
89
hosts: ["logstash:5044"]
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
11
TEST-LOG: FIPS filebeat test message
2+
TEST-LOG: Error message with status=500
3+
TEST-LOG: Log with json={"user":"testuser","action":"login","status":"success"}
4+
TEST-LOG: Log with json={"user":"admin","action":"update","items":5,"details":{"category":"config","changed":true}}
5+
TEST-LOG: Log with timestamp=2025-04-01T12:00:00Z for testing date filter
6+
TEST-LOG: Debug log message DEBUG should be dropped
7+
TEST-LOG: Log with timestamp=2024-04-01T12:00:00Z should be tagged as old_event
8+
TEST-LOG: Padding to reach minimum file size xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

x-pack/distributions/internal/observabilitySRE/qa/smoke/docker/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ services:
33
image: docker.elastic.co/cloud-release/elasticsearch-cloud-ess-fips:${ELASTICSEARCH_IMAGE_VERSION:-8.19.0-SNAPSHOT}
44
environment:
55
- discovery.type=single-node
6-
- ES_JAVA_OPTS=-Xms1g -Xmx1g
6+
- "ES_JAVA_OPTS=-Djava.security.properties=/usr/share/elasticsearch/config/fips_java.security"
77
- ELASTIC_PASSWORD=changeme
88
ports:
99
- "9200:9200"

x-pack/distributions/internal/observabilitySRE/qa/smoke/docker/elasticsearch/config/elasticsearch-fips.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@ xpack.security.transport.ssl.certificate_authorities: ["/usr/share/elasticsearch
1212
xpack.security.http.ssl.enabled: true
1313
xpack.security.http.ssl.key: /usr/share/elasticsearch/config/certs/elasticsearch.key
1414
xpack.security.http.ssl.certificate: /usr/share/elasticsearch/config/certs/elasticsearch.crt
15-
xpack.security.http.ssl.certificate_authorities: ["/usr/share/elasticsearch/config/certs/ca.crt"]
15+
xpack.security.http.ssl.certificate_authorities: ["/usr/share/elasticsearch/config/certs/ca.crt"]
16+
# FIPS Configuration - Let Elasticsearch auto-detect and register providers
17+
xpack.security.fips_mode.enabled: true
18+
xpack.security.autoconfiguration.enabled: false

x-pack/distributions/internal/observabilitySRE/qa/smoke/docker/filebeat/filebeat.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
filebeat.inputs:
2-
- type: log
2+
- type: filestream
33
enabled: true
44
paths:
55
- /test-logs/*.log
6+
id: test-logs-input
67

78
output.logstash:
89
hosts: ["logstash:5044"]

x-pack/distributions/internal/observabilitySRE/qa/smoke/docker/test-logs/test.log

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ TEST-LOG: Log with json={"user":"admin","action":"update","items":5,"details":{"
55
TEST-LOG: Log with timestamp=2025-04-01T12:00:00Z for testing date filter
66
TEST-LOG: Debug log message DEBUG should be dropped
77
TEST-LOG: Log with timestamp=2024-04-01T12:00:00Z should be tagged as old_event
8+
TEST-LOG: Padding to reach minimum file size xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

x-pack/distributions/internal/observabilitySRE/qa/spec/shared_helpers.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ def wait_for_elasticsearch(max_retries = 120, require_documents: false, index_pa
5454
puts "Found #{count_data["count"]} documents in #{index_pattern} index"
5555
else
5656
puts "Waiting for documents in #{index_pattern} index..."
57+
puts "ES response: #{count_data.inspect}"
5758
end
5859
end
5960
else
@@ -78,6 +79,7 @@ def wait_for_elasticsearch(max_retries = 120, require_documents: false, index_pa
7879
def docker_compose_invoke(subcommand, env = {}, work_dir)
7980
env_str = env.map{ |k,v| "#{k.to_s.upcase}=#{Shellwords.escape(v)} "}.join
8081
command = "#{env_str}docker-compose --project-directory=#{Shellwords.escape(work_dir)} #{subcommand}"
82+
puts "Invoking Docker Compose with command: #{command}"
8183
system(command) or fail "Failed to invoke Docker Compose with command `#{command}`"
8284
end
8385

0 commit comments

Comments
 (0)