Skip to content

Commit

Permalink
Bump OpenSearch version used for tests/devservices to 2.13
Browse files Browse the repository at this point in the history
  • Loading branch information
yrodiere committed Apr 25, 2024
1 parent f1f09ac commit d1b4071
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 9 deletions.
2 changes: 1 addition & 1 deletion build-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
<logstash.image>docker.io/elastic/logstash:${elasticsearch-server.version}</logstash.image>
<kibana.image>docker.io/elastic/kibana:${elasticsearch-server.version}</kibana.image>
<elasticsearch.protocol>http</elasticsearch.protocol>
<opensearch-server.version>2.11.1</opensearch-server.version>
<opensearch-server.version>2.13.0</opensearch-server.version>
<opensearch.image>docker.io/opensearchproject/opensearch:${opensearch-server.version}</opensearch.image>
<opensearch.protocol>http</opensearch.protocol>
<junit-pioneer.version>2.2.0</junit-pioneer.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ as shown below.

[source,properties]
----
quarkus.hibernate-search-orm.elasticsearch.version=opensearch:2.11
quarkus.hibernate-search-orm.elasticsearch.version=opensearch:2.13
----

All other configuration options and APIs are exactly the same as with Elasticsearch.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ as shown below.

[source,properties]
----
quarkus.hibernate-search-standalone.elasticsearch.version=opensearch:2.11
quarkus.hibernate-search-standalone.elasticsearch.version=opensearch:2.13
----

All other configuration options and APIs are exactly the same as with Elasticsearch.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,10 @@ private GenericContainer<?> createOpensearchContainer(ElasticsearchDevServicesBu
// See https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-settings/
container.addEnv("cluster.routing.allocation.disk.threshold_enabled", "false");
container.addEnv("OPENSEARCH_JAVA_OPTS", config.javaOpts);
// OpenSearch 2.12 and later requires an admin password, or it won't start.
// Considering dev services are transient and not intended for production by nature,
// we'll just set some hardcoded password.
container.addEnv("OPENSEARCH_INITIAL_ADMIN_PASSWORD", "NotActua11y$trongPa$$word");
return container;
}

Expand Down
3 changes: 3 additions & 0 deletions integration-tests/hibernate-search-orm-opensearch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@
-->
<plugins.index_state_management.enabled>false</plugins.index_state_management.enabled>
<OPENSEARCH_JAVA_OPTS>-Xms512m -Xmx512m</OPENSEARCH_JAVA_OPTS>
<!-- OpenSearch 2.12 and later requires an admin password, or it won't start.
Considering this is just tests, we'll just set some hardcoded password. -->
<OPENSEARCH_INITIAL_ADMIN_PASSWORD>NotActua11y$trongPa$$word</OPENSEARCH_INITIAL_ADMIN_PASSWORD>
<!-- Disable disk-based shard allocation thresholds: on large, relatively full disks (>90% used),
it will lead to index creation to get stuck waiting for other nodes to join the cluster,
which will never happen since we only have one node.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ public Map<String, String> getConfigOverrides() {
return Map.of(
"quarkus.elasticsearch.devservices.enabled", "true",
// This needs to be different from the default image, or the test makes no sense.
"quarkus.elasticsearch.devservices.image-name", "docker.io/opensearchproject/opensearch:2.10.0",
"quarkus.elasticsearch.devservices.image-name", "docker.io/opensearchproject/opensearch:2.12.0",
// This needs to match the version used just above,
// so that Hibernate Search itself will assert that we're using a custom version.
"quarkus.hibernate-search-orm.elasticsearch.version", "opensearch:2.10");
"quarkus.hibernate-search-orm.elasticsearch.version", "opensearch:2.12");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public Map<String, String> getConfigOverrides() {
// But here it doesn't matter as we won't send a request to OpenSearch anyway,
// so we're free to put anything.
// Just make sure to set something consistent with what we have in application.properties.
"quarkus.hibernate-search-orm.elasticsearch.version", "opensearch:2.11"));
"quarkus.hibernate-search-orm.elasticsearch.version", "opensearch:2.13"));
return config;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public Map<String, String> getConfigOverrides() {
// But here it doesn't matter as we won't send a request to OpenSearch anyway,
// so we're free to put anything.
// Just make sure to set something consistent with what we have in application.properties.
"quarkus.hibernate-search-orm.elasticsearch.version", "opensearch:2.11");
"quarkus.hibernate-search-orm.elasticsearch.version", "opensearch:2.13");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@
-->
<plugins.index_state_management.enabled>false</plugins.index_state_management.enabled>
<OPENSEARCH_JAVA_OPTS>-Xms512m -Xmx512m</OPENSEARCH_JAVA_OPTS>
<!-- OpenSearch 2.12 and later requires an admin password, or it won't start.
Considering this is just tests, we'll just set some hardcoded password. -->
<OPENSEARCH_INITIAL_ADMIN_PASSWORD>NotActua11y$trongPa$$word</OPENSEARCH_INITIAL_ADMIN_PASSWORD>
<!-- Disable disk-based shard allocation thresholds: on large, relatively full disks (>90% used),
it will lead to index creation to get stuck waiting for other nodes to join the cluster,
which will never happen since we only have one node.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public Map<String, String> getConfigOverrides() {
// But here it doesn't matter as we won't send a request to OpenSearch anyway,
// so we're free to put anything.
// Just make sure to set something consistent with what we have in application.properties.
"quarkus.hibernate-search-standalone.elasticsearch.version", "opensearch:2.9"));
"quarkus.hibernate-search-standalone.elasticsearch.version", "opensearch:2.13"));
return config;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public Map<String, String> getConfigOverrides() {
// But here it doesn't matter as we won't send a request to OpenSearch anyway,
// so we're free to put anything.
// Just make sure to set something consistent with what we have in application.properties.
"quarkus.hibernate-search-standalone.elasticsearch.version", "opensearch:2.9");
"quarkus.hibernate-search-standalone.elasticsearch.version", "opensearch:2.13");
}

@Override
Expand Down

0 comments on commit d1b4071

Please sign in to comment.