mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 09:28:55 -04:00
Remove unused elasticsearch cloud docker image (#115357)
This commit is contained in:
parent
fb6c729858
commit
482d2aced5
13 changed files with 12 additions and 56 deletions
|
@ -21,9 +21,6 @@ public enum DockerBase {
|
||||||
// The Iron Bank base image is UBI (albeit hardened), but we are required to parameterize the Docker build
|
// The Iron Bank base image is UBI (albeit hardened), but we are required to parameterize the Docker build
|
||||||
IRON_BANK("${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG}", "-ironbank", "yum"),
|
IRON_BANK("${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG}", "-ironbank", "yum"),
|
||||||
|
|
||||||
// Base image with extras for Cloud
|
|
||||||
CLOUD("ubuntu:20.04", "-cloud", "apt-get"),
|
|
||||||
|
|
||||||
// Chainguard based wolfi image with latest jdk
|
// Chainguard based wolfi image with latest jdk
|
||||||
// This is usually updated via renovatebot
|
// This is usually updated via renovatebot
|
||||||
// spotless:off
|
// spotless:off
|
||||||
|
|
|
@ -288,20 +288,6 @@ void addBuildDockerContextTask(Architecture architecture, DockerBase base) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (base == DockerBase.CLOUD) {
|
|
||||||
// If we're performing a release build, but `build.id` hasn't been set, we can
|
|
||||||
// infer that we're not at the Docker building stage of the build, and therefore
|
|
||||||
// we should skip the beats part of the build.
|
|
||||||
String buildId = providers.systemProperty('build.id').getOrNull()
|
|
||||||
boolean includeBeats = VersionProperties.isElasticsearchSnapshot() == true || buildId != null || useDra
|
|
||||||
|
|
||||||
if (includeBeats) {
|
|
||||||
from configurations.getByName("filebeat_${architecture.classifier}")
|
|
||||||
from configurations.getByName("metricbeat_${architecture.classifier}")
|
|
||||||
}
|
|
||||||
// For some reason, the artifact name can differ depending on what repository we used.
|
|
||||||
rename ~/((?:file|metric)beat)-.*\.tar\.gz$/, "\$1-${VersionProperties.elasticsearch}.tar.gz"
|
|
||||||
}
|
|
||||||
Provider<DockerSupportService> serviceProvider = GradleUtils.getBuildService(
|
Provider<DockerSupportService> serviceProvider = GradleUtils.getBuildService(
|
||||||
project.gradle.sharedServices,
|
project.gradle.sharedServices,
|
||||||
DockerSupportPlugin.DOCKER_SUPPORT_SERVICE_NAME
|
DockerSupportPlugin.DOCKER_SUPPORT_SERVICE_NAME
|
||||||
|
@ -381,7 +367,7 @@ private static List<String> generateTags(DockerBase base, Architecture architect
|
||||||
String image = "elasticsearch${base.suffix}"
|
String image = "elasticsearch${base.suffix}"
|
||||||
|
|
||||||
String namespace = 'elasticsearch'
|
String namespace = 'elasticsearch'
|
||||||
if (base == DockerBase.CLOUD || base == DockerBase.CLOUD_ESS) {
|
if (base == base == DockerBase.CLOUD_ESS) {
|
||||||
namespace += '-ci'
|
namespace += '-ci'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -439,7 +425,7 @@ void addBuildDockerImageTask(Architecture architecture, DockerBase base) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (base != DockerBase.IRON_BANK && base != DockerBase.CLOUD && base != DockerBase.CLOUD_ESS) {
|
if (base != DockerBase.IRON_BANK && base != DockerBase.CLOUD_ESS) {
|
||||||
tasks.named("assemble").configure {
|
tasks.named("assemble").configure {
|
||||||
dependsOn(buildDockerImageTask)
|
dependsOn(buildDockerImageTask)
|
||||||
}
|
}
|
||||||
|
@ -548,10 +534,6 @@ subprojects { Project subProject ->
|
||||||
base = DockerBase.IRON_BANK
|
base = DockerBase.IRON_BANK
|
||||||
} else if (subProject.name.contains('cloud-ess-')) {
|
} else if (subProject.name.contains('cloud-ess-')) {
|
||||||
base = DockerBase.CLOUD_ESS
|
base = DockerBase.CLOUD_ESS
|
||||||
} else if (subProject.name.contains('cloud-')) {
|
|
||||||
base = DockerBase.CLOUD
|
|
||||||
} else if (subProject.name.contains('wolfi-ess')) {
|
|
||||||
base = DockerBase.WOLFI_ESS
|
|
||||||
} else if (subProject.name.contains('wolfi-')) {
|
} else if (subProject.name.contains('wolfi-')) {
|
||||||
base = DockerBase.WOLFI
|
base = DockerBase.WOLFI
|
||||||
}
|
}
|
||||||
|
@ -559,10 +541,9 @@ subprojects { Project subProject ->
|
||||||
final String arch = architecture == Architecture.AARCH64 ? '-aarch64' : ''
|
final String arch = architecture == Architecture.AARCH64 ? '-aarch64' : ''
|
||||||
final String extension = base == DockerBase.UBI ? 'ubi.tar' :
|
final String extension = base == DockerBase.UBI ? 'ubi.tar' :
|
||||||
(base == DockerBase.IRON_BANK ? 'ironbank.tar' :
|
(base == DockerBase.IRON_BANK ? 'ironbank.tar' :
|
||||||
(base == DockerBase.CLOUD ? 'cloud.tar' :
|
|
||||||
(base == DockerBase.CLOUD_ESS ? 'cloud-ess.tar' :
|
(base == DockerBase.CLOUD_ESS ? 'cloud-ess.tar' :
|
||||||
(base == DockerBase.WOLFI ? 'wolfi.tar' :
|
(base == DockerBase.WOLFI ? 'wolfi.tar' :
|
||||||
'docker.tar'))))
|
'docker.tar')))
|
||||||
final String artifactName = "elasticsearch${arch}${base.suffix}_test"
|
final String artifactName = "elasticsearch${arch}${base.suffix}_test"
|
||||||
|
|
||||||
final String exportTaskName = taskName("export", architecture, base, 'DockerImage')
|
final String exportTaskName = taskName("export", architecture, base, 'DockerImage')
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
// This file is intentionally blank. All configuration of the
|
|
||||||
// export is done in the parent project.
|
|
|
@ -1,2 +0,0 @@
|
||||||
// This file is intentionally blank. All configuration of the
|
|
||||||
// export is done in the parent project.
|
|
|
@ -1,2 +0,0 @@
|
||||||
// This file is intentionally blank. All configuration of the
|
|
||||||
// export is done in the parent project.
|
|
|
@ -1,2 +0,0 @@
|
||||||
// This file is intentionally blank. All configuration of the
|
|
||||||
// export is done in the parent project.
|
|
|
@ -169,10 +169,7 @@ public class DockerTests extends PackagingTestCase {
|
||||||
* Checks that no plugins are initially active.
|
* Checks that no plugins are initially active.
|
||||||
*/
|
*/
|
||||||
public void test020PluginsListWithNoPlugins() {
|
public void test020PluginsListWithNoPlugins() {
|
||||||
assumeTrue(
|
assumeTrue("Only applies to non-Cloud images", distribution().packaging != Packaging.DOCKER_CLOUD_ESS);
|
||||||
"Only applies to non-Cloud images",
|
|
||||||
distribution.packaging != Packaging.DOCKER_CLOUD && distribution().packaging != Packaging.DOCKER_CLOUD_ESS
|
|
||||||
);
|
|
||||||
|
|
||||||
final Installation.Executables bin = installation.executables();
|
final Installation.Executables bin = installation.executables();
|
||||||
final Result r = sh.run(bin.pluginTool + " list");
|
final Result r = sh.run(bin.pluginTool + " list");
|
||||||
|
@ -1116,8 +1113,8 @@ public class DockerTests extends PackagingTestCase {
|
||||||
*/
|
*/
|
||||||
public void test171AdditionalCliOptionsAreForwarded() throws Exception {
|
public void test171AdditionalCliOptionsAreForwarded() throws Exception {
|
||||||
assumeTrue(
|
assumeTrue(
|
||||||
"Does not apply to Cloud and Cloud ESS images, because they don't use the default entrypoint",
|
"Does not apply to Cloud ESS images, because they don't use the default entrypoint",
|
||||||
distribution.packaging != Packaging.DOCKER_CLOUD && distribution().packaging != Packaging.DOCKER_CLOUD_ESS
|
distribution().packaging != Packaging.DOCKER_CLOUD_ESS
|
||||||
);
|
);
|
||||||
|
|
||||||
runContainer(distribution(), builder().runArgs("bin/elasticsearch", "-Ecluster.name=kimchy").envVar("ELASTIC_PASSWORD", PASSWORD));
|
runContainer(distribution(), builder().runArgs("bin/elasticsearch", "-Ecluster.name=kimchy").envVar("ELASTIC_PASSWORD", PASSWORD));
|
||||||
|
@ -1204,7 +1201,7 @@ public class DockerTests extends PackagingTestCase {
|
||||||
* Check that the Cloud image contains the required Beats
|
* Check that the Cloud image contains the required Beats
|
||||||
*/
|
*/
|
||||||
public void test400CloudImageBundlesBeats() {
|
public void test400CloudImageBundlesBeats() {
|
||||||
assumeTrue(distribution.packaging == Packaging.DOCKER_CLOUD || distribution.packaging == Packaging.DOCKER_CLOUD_ESS);
|
assumeTrue(distribution.packaging == Packaging.DOCKER_CLOUD_ESS);
|
||||||
|
|
||||||
final List<String> contents = listContents("/opt");
|
final List<String> contents = listContents("/opt");
|
||||||
assertThat("Expected beats in /opt", contents, hasItems("filebeat", "metricbeat"));
|
assertThat("Expected beats in /opt", contents, hasItems("filebeat", "metricbeat"));
|
||||||
|
|
|
@ -436,10 +436,7 @@ public class KeystoreManagementTests extends PackagingTestCase {
|
||||||
switch (distribution.packaging) {
|
switch (distribution.packaging) {
|
||||||
case TAR, ZIP -> assertThat(keystore, file(File, ARCHIVE_OWNER, ARCHIVE_OWNER, p660));
|
case TAR, ZIP -> assertThat(keystore, file(File, ARCHIVE_OWNER, ARCHIVE_OWNER, p660));
|
||||||
case DEB, RPM -> assertThat(keystore, file(File, "root", "elasticsearch", p660));
|
case DEB, RPM -> assertThat(keystore, file(File, "root", "elasticsearch", p660));
|
||||||
case DOCKER, DOCKER_UBI, DOCKER_IRON_BANK, DOCKER_CLOUD, DOCKER_CLOUD_ESS, DOCKER_WOLFI -> assertThat(
|
case DOCKER, DOCKER_UBI, DOCKER_IRON_BANK, DOCKER_CLOUD_ESS, DOCKER_WOLFI -> assertThat(keystore, DockerFileMatcher.file(p660));
|
||||||
keystore,
|
|
||||||
DockerFileMatcher.file(p660)
|
|
||||||
);
|
|
||||||
default -> throw new IllegalStateException("Unknown Elasticsearch packaging type.");
|
default -> throw new IllegalStateException("Unknown Elasticsearch packaging type.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -245,7 +245,7 @@ public abstract class PackagingTestCase extends Assert {
|
||||||
installation = Packages.installPackage(sh, distribution);
|
installation = Packages.installPackage(sh, distribution);
|
||||||
Packages.verifyPackageInstallation(installation, distribution, sh);
|
Packages.verifyPackageInstallation(installation, distribution, sh);
|
||||||
}
|
}
|
||||||
case DOCKER, DOCKER_UBI, DOCKER_IRON_BANK, DOCKER_CLOUD, DOCKER_CLOUD_ESS, DOCKER_WOLFI -> {
|
case DOCKER, DOCKER_UBI, DOCKER_IRON_BANK, DOCKER_CLOUD_ESS, DOCKER_WOLFI -> {
|
||||||
installation = Docker.runContainer(distribution);
|
installation = Docker.runContainer(distribution);
|
||||||
Docker.verifyContainerInstallation(installation);
|
Docker.verifyContainerInstallation(installation);
|
||||||
}
|
}
|
||||||
|
@ -335,7 +335,6 @@ public abstract class PackagingTestCase extends Assert {
|
||||||
case DOCKER:
|
case DOCKER:
|
||||||
case DOCKER_UBI:
|
case DOCKER_UBI:
|
||||||
case DOCKER_IRON_BANK:
|
case DOCKER_IRON_BANK:
|
||||||
case DOCKER_CLOUD:
|
|
||||||
case DOCKER_CLOUD_ESS:
|
case DOCKER_CLOUD_ESS:
|
||||||
case DOCKER_WOLFI:
|
case DOCKER_WOLFI:
|
||||||
// nothing, "installing" docker image is running it
|
// nothing, "installing" docker image is running it
|
||||||
|
@ -358,7 +357,6 @@ public abstract class PackagingTestCase extends Assert {
|
||||||
case DOCKER:
|
case DOCKER:
|
||||||
case DOCKER_UBI:
|
case DOCKER_UBI:
|
||||||
case DOCKER_IRON_BANK:
|
case DOCKER_IRON_BANK:
|
||||||
case DOCKER_CLOUD:
|
|
||||||
case DOCKER_CLOUD_ESS:
|
case DOCKER_CLOUD_ESS:
|
||||||
case DOCKER_WOLFI:
|
case DOCKER_WOLFI:
|
||||||
// nothing, "installing" docker image is running it
|
// nothing, "installing" docker image is running it
|
||||||
|
@ -373,7 +371,7 @@ public abstract class PackagingTestCase extends Assert {
|
||||||
switch (distribution.packaging) {
|
switch (distribution.packaging) {
|
||||||
case TAR, ZIP -> Archives.assertElasticsearchStarted(installation);
|
case TAR, ZIP -> Archives.assertElasticsearchStarted(installation);
|
||||||
case DEB, RPM -> Packages.assertElasticsearchStarted(sh, installation);
|
case DEB, RPM -> Packages.assertElasticsearchStarted(sh, installation);
|
||||||
case DOCKER, DOCKER_UBI, DOCKER_IRON_BANK, DOCKER_CLOUD, DOCKER_CLOUD_ESS, DOCKER_WOLFI -> Docker.waitForElasticsearchToStart();
|
case DOCKER, DOCKER_UBI, DOCKER_IRON_BANK, DOCKER_CLOUD_ESS, DOCKER_WOLFI -> Docker.waitForElasticsearchToStart();
|
||||||
default -> throw new IllegalStateException("Unknown Elasticsearch packaging type.");
|
default -> throw new IllegalStateException("Unknown Elasticsearch packaging type.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,8 +33,6 @@ public class Distribution {
|
||||||
this.packaging = Packaging.DOCKER_UBI;
|
this.packaging = Packaging.DOCKER_UBI;
|
||||||
} else if (filename.endsWith(".ironbank.tar")) {
|
} else if (filename.endsWith(".ironbank.tar")) {
|
||||||
this.packaging = Packaging.DOCKER_IRON_BANK;
|
this.packaging = Packaging.DOCKER_IRON_BANK;
|
||||||
} else if (filename.endsWith(".cloud.tar")) {
|
|
||||||
this.packaging = Packaging.DOCKER_CLOUD;
|
|
||||||
} else if (filename.endsWith(".cloud-ess.tar")) {
|
} else if (filename.endsWith(".cloud-ess.tar")) {
|
||||||
this.packaging = Packaging.DOCKER_CLOUD_ESS;
|
this.packaging = Packaging.DOCKER_CLOUD_ESS;
|
||||||
} else if (filename.endsWith(".wolfi.tar")) {
|
} else if (filename.endsWith(".wolfi.tar")) {
|
||||||
|
@ -63,7 +61,7 @@ public class Distribution {
|
||||||
*/
|
*/
|
||||||
public boolean isDocker() {
|
public boolean isDocker() {
|
||||||
return switch (packaging) {
|
return switch (packaging) {
|
||||||
case DOCKER, DOCKER_UBI, DOCKER_IRON_BANK, DOCKER_CLOUD, DOCKER_CLOUD_ESS, DOCKER_WOLFI -> true;
|
case DOCKER, DOCKER_UBI, DOCKER_IRON_BANK, DOCKER_CLOUD_ESS, DOCKER_WOLFI -> true;
|
||||||
default -> false;
|
default -> false;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -77,7 +75,6 @@ public class Distribution {
|
||||||
DOCKER(".docker.tar", Platforms.isDocker()),
|
DOCKER(".docker.tar", Platforms.isDocker()),
|
||||||
DOCKER_UBI(".ubi.tar", Platforms.isDocker()),
|
DOCKER_UBI(".ubi.tar", Platforms.isDocker()),
|
||||||
DOCKER_IRON_BANK(".ironbank.tar", Platforms.isDocker()),
|
DOCKER_IRON_BANK(".ironbank.tar", Platforms.isDocker()),
|
||||||
DOCKER_CLOUD(".cloud.tar", Platforms.isDocker()),
|
|
||||||
DOCKER_CLOUD_ESS(".cloud-ess.tar", Platforms.isDocker()),
|
DOCKER_CLOUD_ESS(".cloud-ess.tar", Platforms.isDocker()),
|
||||||
DOCKER_WOLFI(".wolfi.tar", Platforms.isDocker());
|
DOCKER_WOLFI(".wolfi.tar", Platforms.isDocker());
|
||||||
|
|
||||||
|
|
|
@ -532,7 +532,7 @@ public class Docker {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (es.distribution.packaging == Packaging.DOCKER_CLOUD || es.distribution.packaging == Packaging.DOCKER_CLOUD_ESS) {
|
if (es.distribution.packaging == Packaging.DOCKER_CLOUD_ESS) {
|
||||||
verifyCloudContainerInstallation(es);
|
verifyCloudContainerInstallation(es);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,7 +165,6 @@ public class DockerRun {
|
||||||
case DOCKER -> "";
|
case DOCKER -> "";
|
||||||
case DOCKER_UBI -> "-ubi";
|
case DOCKER_UBI -> "-ubi";
|
||||||
case DOCKER_IRON_BANK -> "-ironbank";
|
case DOCKER_IRON_BANK -> "-ironbank";
|
||||||
case DOCKER_CLOUD -> "-cloud";
|
|
||||||
case DOCKER_CLOUD_ESS -> "-cloud-ess";
|
case DOCKER_CLOUD_ESS -> "-cloud-ess";
|
||||||
case DOCKER_WOLFI -> "-wolfi";
|
case DOCKER_WOLFI -> "-wolfi";
|
||||||
default -> throw new IllegalStateException("Unexpected distribution packaging type: " + distribution.packaging);
|
default -> throw new IllegalStateException("Unexpected distribution packaging type: " + distribution.packaging);
|
||||||
|
|
|
@ -63,8 +63,6 @@ List projects = [
|
||||||
'distribution:archives:linux-aarch64-tar',
|
'distribution:archives:linux-aarch64-tar',
|
||||||
'distribution:archives:linux-tar',
|
'distribution:archives:linux-tar',
|
||||||
'distribution:docker',
|
'distribution:docker',
|
||||||
'distribution:docker:cloud-docker-export',
|
|
||||||
'distribution:docker:cloud-docker-aarch64-export',
|
|
||||||
'distribution:docker:cloud-ess-docker-export',
|
'distribution:docker:cloud-ess-docker-export',
|
||||||
'distribution:docker:cloud-ess-docker-aarch64-export',
|
'distribution:docker:cloud-ess-docker-aarch64-export',
|
||||||
'distribution:docker:docker-aarch64-export',
|
'distribution:docker:docker-aarch64-export',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue