Skip to content

Commit

Permalink
Fixed assign network to vertica container (#2077)
Browse files Browse the repository at this point in the history
* Fixed assign network to vertica container
* update aerospike version
  • Loading branch information
Fameing authored Nov 8, 2024
1 parent b02712e commit 89ed4df
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
embedded.aerospike.dockerImage=aerospike/aerospike-server-enterprise:6.3.0.16_1
embedded.aerospike.dockerImage=aerospike/aerospike-server-enterprise:6.3.0.31_1
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ public AerospikeProperties() {

@Override
public String getDefaultDockerImage() {
return "aerospike/aerospike-server:6.2";
return "aerospike/aerospike-server:6.3.0.31_1";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,19 @@ ToxiproxyContainer.ContainerProxy verticaContainerProxy(ToxiproxyContainer toxip
public GenericContainer<?> embeddedVertica(ConfigurableEnvironment environment,
VerticaProperties properties,
Optional<Network> network) {
GenericContainer<?> verticaContainer = configureCommonsAndStart(createContainer(properties), properties, log)

GenericContainer<?> vertica = new GenericContainer<>(ContainerUtils.getDockerImageName(properties))
.withExposedPorts(properties.getPort())
.withEnv("DATABASE_NAME", properties.getDatabase())
.withEnv("DATABASE_PASSWORD", properties.getPassword())
.waitingFor(new HostPortWaitStrategy())
.withNetworkAliases(VERTICA_NETWORK_ALIAS);
network.ifPresent(verticaContainer::withNetwork);
registerVerticaEnvironment(verticaContainer, environment, properties);
return verticaContainer;
}

private GenericContainer<?> createContainer(VerticaProperties properties) {
LinkedHashMap<String, String> map = new LinkedHashMap<>();
map.put("DATABASE_NAME", properties.getDatabase());
map.put("DATABASE_PASSWORD", properties.getPassword());
network.ifPresent(vertica::withNetwork);

return new GenericContainer<>(ContainerUtils.getDockerImageName(properties))
.withExposedPorts(properties.getPort())
.withEnv(map)
.waitingFor(new HostPortWaitStrategy());
GenericContainer<?> verticaContainer = configureCommonsAndStart(vertica, properties, log);
registerVerticaEnvironment(verticaContainer, environment, properties);
return verticaContainer;
}

private void registerVerticaEnvironment(GenericContainer<?> verticaContainer,
Expand Down

0 comments on commit 89ed4df

Please sign in to comment.