Skip to content

Commit 945abea

Browse files
committed
WIP upgraded ELS Stack from 5.6.16 to 6.8.0 jenkins-ignore
1 parent 0d95c20 commit 945abea

File tree

3 files changed

+39
-18
lines changed

3 files changed

+39
-18
lines changed

integration-tests/src/test/java/oracle/kubernetes/operator/ItElasticLogging.java

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -124,37 +124,60 @@ public static void staticUnPrepare() throws Exception {
124124
logger.info("SUCCESS");
125125
}
126126
}
127-
127+
128128
private static void verifyElasticStackReady() throws Exception {
129129
// Get Logstash info
130130
String healthStatus = execElasticStackStatusCheck("*logstash*", "$1");
131131
String indexStatus = execElasticStackStatusCheck("*logstash*", "$2");
132132
String indexName = execElasticStackStatusCheck("*logstash*", "$3");
133133

134-
// Verify that the health status of Logstash
135134
Assume.assumeNotNull(healthStatus);
135+
Assume.assumeNotNull(indexStatus);
136+
Assume.assumeNotNull(indexName);
137+
// Verify that the health status of Logstash
136138
Assume.assumeTrue(
137139
"Logstash is not ready!",
138-
healthStatus.equalsIgnoreCase("yellow") || healthStatus.equalsIgnoreCase("green"));
140+
healthStatus.equalsIgnoreCase("yellow") ||
141+
healthStatus.equalsIgnoreCase("green"));
139142
// Verify that the index is open for use
140-
Assume.assumeNotNull(indexStatus);
141-
Assume.assumeTrue("Logstash index is not open!", indexStatus.equalsIgnoreCase("open"));
143+
Assume.assumeTrue("Logstash index is not open!",
144+
indexStatus.equalsIgnoreCase("open"));
142145
// Add the index name to a Map
143-
Assume.assumeNotNull(indexName);
144146
testVarMap.put("indexName", indexName);
145147

146148
// Get Kibana info
147149
healthStatus = execElasticStackStatusCheck("*kibana*", "$1");
148150
indexStatus = execElasticStackStatusCheck("*kibana*", "$2");
149-
150-
// Verify that the health status of Kibana
151+
indexName = execElasticStackStatusCheck("*kibana*", "$3");
152+
151153
Assume.assumeNotNull(healthStatus);
152-
Assume.assumeTrue(
153-
"Kibana is not ready!",
154-
healthStatus.equalsIgnoreCase("yellow") || healthStatus.equalsIgnoreCase("green"));
155-
// Verify that the index is open for use
156154
Assume.assumeNotNull(indexStatus);
157-
Assume.assumeTrue("Kibana index is not open!", indexStatus.equalsIgnoreCase("open"));
155+
Assume.assumeNotNull(indexName);
156+
157+
//There are multiple indexes from Kibana 6.8.0
158+
String[] kibanahealthStatusArr =
159+
healthStatus.split(System.getProperty("line.separator"));
160+
String[] kibanaindexStatusArr =
161+
indexStatus.split(System.getProperty("line.separator"));
162+
String[] kibanaindexNameArr =
163+
indexName.split(System.getProperty("line.separator"));
164+
165+
for(int i = 0; i < kibanaindexStatusArr.length; i++) {
166+
logger.info("Health status of " + kibanaindexNameArr[i] +
167+
"is:" + kibanahealthStatusArr[i]);
168+
logger.info("Index status of " + kibanaindexNameArr[i] +
169+
"is:" + kibanaindexStatusArr[i]);
170+
// Verify that the health status of Kibana
171+
Assume.assumeTrue(
172+
"Kibana is not ready!",
173+
kibanahealthStatusArr[i].trim().equalsIgnoreCase("yellow") ||
174+
kibanahealthStatusArr[i].trim().equalsIgnoreCase("green"));
175+
// Verify that the index is open for use
176+
Assume.assumeTrue("Kibana index is not open!",
177+
kibanaindexStatusArr[i].trim().equalsIgnoreCase("open"));
178+
}
179+
180+
logger.info("ELK Stack is up and running and ready to use!");
158181
}
159182

160183
private static String execElasticStackStatusCheck(String indexName, String varLoc)

integration-tests/src/test/resources/operator_elk.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ domainNamespaces: [ "default", "test1" ]
99
externalRestEnabled: true
1010
javaLoggingLevel: INFO
1111
elkIntegrationEnabled: true
12-
logStashImage: "logstash:6.6.0"
12+
logStashImage: "logstash:6.8.0"
1313
elasticSearchHost: "elasticsearch.default.svc.cluster.local"
1414
elasticSearchPort: 9200

kubernetes/samples/scripts/elasticsearch-and-kibana/elasticsearch_and_kibana.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,13 @@ spec:
4343
spec:
4444
containers:
4545
- name: "elasticsearch"
46-
image: "elasticsearch:5"
46+
image: "elasticsearch:6.8.0"
4747
ports:
4848
- containerPort: 9200
4949
- containerPort: 9300
5050
env:
5151
- name: ES_JAVA_OPTS
5252
value: -Xms1024m -Xmx1024m
53-
- name: bootstrap.memory_lock
54-
value: "true"
5553

5654
---
5755
kind: "Service"
@@ -92,7 +90,7 @@ spec:
9290
spec:
9391
containers:
9492
- name: "kibana"
95-
image: "kibana:5"
93+
image: "kibana:6.8.0"
9694
ports:
9795
- containerPort: 5601
9896

0 commit comments

Comments
 (0)