Skip to content

Commit 12a1b69

Browse files
committed
Remove wolfi ess image
1 parent 3339be8 commit 12a1b69

File tree

17 files changed

+60
-204
lines changed

17 files changed

+60
-204
lines changed

.buildkite/pipelines/periodic-packaging.template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ steps:
33
steps:
44
- label: "{{matrix.image}} / packaging-tests-unix"
55
command: ./.ci/scripts/packaging-test.sh destructivePackagingTest
6-
timeout_in_minutes: 420
6+
timeout_in_minutes: 300
77
matrix:
88
setup:
99
image:

.buildkite/pipelines/periodic-packaging.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ steps:
44
steps:
55
- label: "{{matrix.image}} / packaging-tests-unix"
66
command: ./.ci/scripts/packaging-test.sh destructivePackagingTest
7-
timeout_in_minutes: 420
7+
timeout_in_minutes: 300
88
matrix:
99
setup:
1010
image:

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/DockerBase.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,8 @@ public enum DockerBase {
3131
WOLFI("docker.elastic.co/wolfi/chainguard-base:latest@sha256:bfdeddb33330a281950c2a54adef991dbbe6a42832bc505d13b11beaf50ae73f",
3232
"-wolfi",
3333
"apk"
34-
),
34+
);
3535
// spotless:on
36-
37-
// Based on WOLFI above, with more extras. We don't set a base image because
38-
// we programmatically extend from the Wolfi image.
39-
WOLFI_ESS(null, "-wolfi-ess", "apk");
40-
4136
private final String image;
4237
private final String suffix;
4338
private final String packageManager;

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/InternalDistributionDownloadPlugin.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,6 @@ private static String distributionProjectName(ElasticsearchDistribution distribu
185185
if (distribution.getType() == InternalElasticsearchDistributionTypes.DOCKER_WOLFI) {
186186
return projectName + "wolfi-docker" + archString + "-export";
187187
}
188-
if (distribution.getType() == InternalElasticsearchDistributionTypes.DOCKER_WOLFI_ESS) {
189-
return projectName + "wolfi-ess-docker" + archString + "-export";
190-
}
191188
return projectName + distribution.getType().getName();
192189
}
193190

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/distribution/DockerWolfiEssElasticsearchDistributionType.java

Lines changed: 0 additions & 27 deletions
This file was deleted.

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/distribution/InternalElasticsearchDistributionTypes.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ public class InternalElasticsearchDistributionTypes {
2121
public static ElasticsearchDistributionType DOCKER_IRONBANK = new DockerIronBankElasticsearchDistributionType();
2222
public static ElasticsearchDistributionType DOCKER_CLOUD_ESS = new DockerCloudEssElasticsearchDistributionType();
2323
public static ElasticsearchDistributionType DOCKER_WOLFI = new DockerWolfiElasticsearchDistributionType();
24-
public static ElasticsearchDistributionType DOCKER_WOLFI_ESS = new DockerWolfiEssElasticsearchDistributionType();
2524

2625
public static List<ElasticsearchDistributionType> ALL_INTERNAL = List.of(
2726
DEB,
@@ -30,7 +29,6 @@ public class InternalElasticsearchDistributionTypes {
3029
DOCKER_UBI,
3130
DOCKER_IRONBANK,
3231
DOCKER_CLOUD_ESS,
33-
DOCKER_WOLFI,
34-
DOCKER_WOLFI_ESS
32+
DOCKER_WOLFI
3533
);
3634
}

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test/DistroTestPlugin.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
import static org.elasticsearch.gradle.internal.distribution.InternalElasticsearchDistributionTypes.DOCKER_IRONBANK;
5454
import static org.elasticsearch.gradle.internal.distribution.InternalElasticsearchDistributionTypes.DOCKER_UBI;
5555
import static org.elasticsearch.gradle.internal.distribution.InternalElasticsearchDistributionTypes.DOCKER_WOLFI;
56-
import static org.elasticsearch.gradle.internal.distribution.InternalElasticsearchDistributionTypes.DOCKER_WOLFI_ESS;
5756
import static org.elasticsearch.gradle.internal.distribution.InternalElasticsearchDistributionTypes.RPM;
5857
import static org.elasticsearch.gradle.internal.util.ParamsUtils.loadBuildParams;
5958

@@ -153,7 +152,6 @@ private static Map<ElasticsearchDistributionType, TaskProvider<?>> lifecycleTask
153152
lifecyleTasks.put(DOCKER_IRONBANK, project.getTasks().register(taskPrefix + ".docker-ironbank"));
154153
lifecyleTasks.put(DOCKER_CLOUD_ESS, project.getTasks().register(taskPrefix + ".docker-cloud-ess"));
155154
lifecyleTasks.put(DOCKER_WOLFI, project.getTasks().register(taskPrefix + ".docker-wolfi"));
156-
lifecyleTasks.put(DOCKER_WOLFI_ESS, project.getTasks().register(taskPrefix + ".docker-wolfi-ess"));
157155
lifecyleTasks.put(ARCHIVE, project.getTasks().register(taskPrefix + ".archives"));
158156
lifecyleTasks.put(DEB, project.getTasks().register(taskPrefix + ".packages"));
159157
lifecyleTasks.put(RPM, lifecyleTasks.get(DEB));

distribution/docker/README.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,6 @@ the [DockerBase] enum.
77
* UBI - the same as the default image, but based upon [RedHat's UBI
88
images][ubi], specifically their minimal flavour.
99
* Wolfi - the same as the default image, but based upon [Wolfi](https://github.com/wolfi-dev)
10-
* Wolfi ESS - this directly extends the Wolfi image, and adds all ES plugins
11-
that the ES build generates in an archive directory. It also sets an
12-
environment variable that points at this directory. This allows plugins to
13-
be installed from the archive instead of the internet, speeding up
14-
deployment times. Furthermore this image has
15-
* `filebeat` and `metricbeat` included
16-
* `wget` included
17-
* The `ENTRYPOINT` is just `/sbin/tini`, and the `CMD` is
18-
`/app/elasticsearch.sh`. In normal use this file would be bind-mounted
19-
in, but the image ships a stub version of this file so that the image
20-
can still be tested.
2110
* Iron Bank - this is the US Department of Defence's repository of digitally
2211
signed, binary container images including both Free and Open-Source
2312
software (FOSS) and Commercial off-the-shelf (COTS). In practice, this is
@@ -28,7 +17,7 @@ the [DockerBase] enum.
2817
* `filebeat` and `metricbeat` are included
2918
* `wget` is included
3019
* The `ENTRYPOINT` is just `/bin/tini`, and the `CMD` is
31-
`/app/elasticsearch.sh`. In normal use this file would be bind-mounted
20+
`/app/elasticsearc.sh`. In normal use this file would be bind-mounted
3221
in, but the image ships a stub version of this file so that the image
3322
can still be tested.
3423
* Cloud ESS - this directly extends the Cloud image, and adds all ES plugins

distribution/docker/build.gradle

Lines changed: 28 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import org.elasticsearch.gradle.Architecture
12
import org.elasticsearch.gradle.LoggedExec
23
import org.elasticsearch.gradle.VersionProperties
34
import org.elasticsearch.gradle.internal.DockerBase
@@ -9,7 +10,6 @@ import org.elasticsearch.gradle.internal.docker.ShellRetry
910
import org.elasticsearch.gradle.internal.docker.TransformLog4jConfigFilter
1011
import org.elasticsearch.gradle.internal.docker.*
1112
import org.elasticsearch.gradle.util.GradleUtils
12-
import org.elasticsearch.gradle.Architecture
1313
import java.nio.file.Path
1414
import java.time.temporal.ChronoUnit
1515

@@ -99,9 +99,9 @@ String tiniArch = Architecture.current() == Architecture.AARCH64 ? 'arm64' : 'am
9999

100100
dependencies {
101101
aarch64DockerSource project(":distribution:archives:linux-aarch64-tar")
102-
aarch64DockerSourceTar project(path: ":distribution:archives:linux-aarch64-tar", configuration: "default")
102+
aarch64DockerSourceTar project(path: ":distribution:archives:linux-aarch64-tar", configuration:"default")
103103
dockerSource project(":distribution:archives:linux-tar")
104-
dockerSourceTar project(path: ":distribution:archives:linux-tar", configuration: "default")
104+
dockerSourceTar project(path: ":distribution:archives:linux-tar", configuration:"default")
105105
log4jConfig project(path: ":distribution", configuration: 'log4jConfig')
106106
tini "krallin:tini:0.19.0:${tiniArch}"
107107
allPlugins project(path: ':plugins', configuration: 'allPlugins')
@@ -112,7 +112,7 @@ dependencies {
112112
}
113113

114114
ext.expansions = { Architecture architecture, DockerBase base ->
115-
def (major, minor) = VersionProperties.elasticsearch.split("\\.")
115+
def (major,minor) = VersionProperties.elasticsearch.split("\\.")
116116

117117
// We tag our Docker images with various pieces of information, including a timestamp
118118
// for when the image was built. However, this makes it impossible completely cache
@@ -216,8 +216,7 @@ elasticsearch_distributions {
216216
}
217217

218218
interface Injected {
219-
@Inject
220-
FileSystemOperations getFs()
219+
@Inject FileSystemOperations getFs()
221220
}
222221

223222
tasks.named("preProcessFixture").configure {
@@ -327,9 +326,9 @@ void addTransformDockerContextTask(Architecture architecture, DockerBase base) {
327326
into "${project.buildDir}/docker-context/${archiveName}"
328327

329328
// Since we replaced the remote URL in the Dockerfile, copy in the required file
330-
if (base == DockerBase.IRON_BANK) {
329+
if(base == DockerBase.IRON_BANK) {
331330
from(architecture == Architecture.AARCH64 ? configurations.aarch64DockerSourceTar : configurations.dockerSourceTar)
332-
from(configurations.tini) {
331+
from (configurations.tini) {
333332
rename { _ -> 'tini' }
334333
}
335334
} else {
@@ -339,10 +338,7 @@ void addTransformDockerContextTask(Architecture architecture, DockerBase base) {
339338
expansions(architecture, base).findAll { it.key != 'build_date' }.each { k, v ->
340339
inputs.property(k, { v.toString() })
341340
}
342-
Provider<DockerSupportService> serviceProvider = GradleUtils.getBuildService(
343-
project.gradle.sharedServices,
344-
DockerSupportPlugin.DOCKER_SUPPORT_SERVICE_NAME
345-
)
341+
Provider<DockerSupportService> serviceProvider = GradleUtils.getBuildService(project.gradle.sharedServices, DockerSupportPlugin.DOCKER_SUPPORT_SERVICE_NAME)
346342
onlyIf("$architecture supported") { serviceProvider.get().isArchitectureSupported(architecture) }
347343
}
348344

@@ -366,7 +362,7 @@ private static List<String> generateTags(DockerBase base, Architecture architect
366362
String image = "elasticsearch${base.suffix}"
367363

368364
String namespace = 'elasticsearch'
369-
if (base == DockerBase.CLOUD_ESS || base == DockerBase.WOLFI_ESS) {
365+
if (base == DockerBase.CLOUD_ESS) {
370366
namespace += '-ci'
371367
}
372368

@@ -416,10 +412,7 @@ void addBuildDockerImageTask(Architecture architecture, DockerBase base) {
416412
baseImages = [base.image]
417413
}
418414

419-
Provider<DockerSupportService> serviceProvider = GradleUtils.getBuildService(
420-
project.gradle.sharedServices,
421-
DockerSupportPlugin.DOCKER_SUPPORT_SERVICE_NAME
422-
)
415+
Provider<DockerSupportService> serviceProvider = GradleUtils.getBuildService(project.gradle.sharedServices, DockerSupportPlugin.DOCKER_SUPPORT_SERVICE_NAME)
423416
onlyIf("$architecture supported") { serviceProvider.get().isArchitectureSupported(architecture) }
424417

425418
}
@@ -431,12 +424,13 @@ void addBuildDockerImageTask(Architecture architecture, DockerBase base) {
431424
}
432425
}
433426

434-
void addBuildEssDockerImageTask(Architecture architecture, DockerBase dockerBase) {
427+
void addBuildEssDockerImageTask(Architecture architecture) {
428+
DockerBase base = DockerBase.CLOUD_ESS
435429
String arch = architecture == Architecture.AARCH64 ? '-aarch64' : ''
436-
String contextDir = "${project.buildDir}/docker-context/elasticsearch${dockerBase.suffix}-${VersionProperties.elasticsearch}-docker-build-context${arch}"
430+
String contextDir = "${project.buildDir}/docker-context/elasticsearch${base.suffix}-${VersionProperties.elasticsearch}-docker-build-context${arch}"
437431

438432
final TaskProvider<Sync> buildContextTask =
439-
tasks.register(taskName('build', architecture, dockerBase, 'DockerContext'), Sync) {
433+
tasks.register(taskName('build', architecture, base, 'DockerContext'), Sync) {
440434
into contextDir
441435

442436
final Path projectDir = project.projectDir.toPath()
@@ -445,54 +439,28 @@ void addBuildEssDockerImageTask(Architecture architecture, DockerBase dockerBase
445439
from configurations.allPlugins
446440
}
447441

448-
if (dockerBase == DockerBase.WOLFI_ESS) {
449-
// If we're performing a release build, but `build.id` hasn't been set, we can
450-
// infer that we're not at the Docker building stage of the build, and therefore
451-
// we should skip the beats part of the build.
452-
String buildId = providers.systemProperty('build.id').getOrNull()
453-
boolean includeBeats = VersionProperties.isElasticsearchSnapshot() == true || buildId != null || useDra
454-
455-
if (includeBeats) {
456-
from configurations.getByName("filebeat_${architecture.classifier}")
457-
from configurations.getByName("metricbeat_${architecture.classifier}")
458-
}
459-
// For some reason, the artifact name can differ depending on what repository we used.
460-
rename ~/((?:file|metric)beat)-.*\.tar\.gz$/, "\$1-${VersionProperties.elasticsearch}.tar.gz"
461-
}
462-
463-
String baseSuffix = dockerBase == DockerBase.CLOUD_ESS ? DockerBase.CLOUD.suffix : DockerBase.WOLFI.suffix
464-
from(projectDir.resolve("src/docker/Dockerfile.ess")) {
465-
expand(
466-
[
467-
base_image: "elasticsearch${baseSuffix}:${architecture.classifier}",
468-
docker_base: "${dockerBase.name().toLowerCase()}",
469-
version: "${VersionProperties.elasticsearch}",
470-
retry: ShellRetry
471-
]
472-
)
442+
from(projectDir.resolve("src/docker/Dockerfile.cloud-ess")) {
443+
expand([
444+
base_image: "elasticsearch${DockerBase.CLOUD.suffix}:${architecture.classifier}"
445+
])
473446
filter SquashNewlinesFilter
474-
rename ~/Dockerfile\.ess$/, 'Dockerfile'
447+
rename ~/Dockerfile\.cloud-ess$/, 'Dockerfile'
475448
}
476449
}
477450

478451
final TaskProvider<DockerBuildTask> buildDockerImageTask =
479-
tasks.register(taskName("build", architecture, dockerBase, "DockerImage"), DockerBuildTask) {
480-
481-
DockerBase base = dockerBase == DockerBase.CLOUD_ESS ? DockerBase.CLOUD : DockerBase.WOLFI
452+
tasks.register(taskName("build", architecture, base, "DockerImage"), DockerBuildTask) {
482453

483-
TaskProvider<DockerBuildTask> buildBaseTask = tasks.named(taskName("build", architecture, base, "DockerImage"))
484-
inputs.files(buildBaseTask)
454+
TaskProvider<DockerBuildTask> buildCloudTask = tasks.named(taskName("build", architecture, DockerBase.CLOUD, "DockerImage"))
455+
inputs.files(buildCloudTask)
485456

486457
dockerContext.fileProvider(buildContextTask.map { it.getDestinationDir() })
487458

488459
noCache = buildParams.isCi()
489460
baseImages = []
490-
tags = generateTags(dockerBase, architecture)
461+
tags = generateTags(base, architecture)
491462
platforms.add(architecture.dockerPlatform)
492-
Provider<DockerSupportService> serviceProvider = GradleUtils.getBuildService(
493-
project.gradle.sharedServices,
494-
DockerSupportPlugin.DOCKER_SUPPORT_SERVICE_NAME
495-
)
463+
Provider<DockerSupportService> serviceProvider = GradleUtils.getBuildService(project.gradle.sharedServices, DockerSupportPlugin.DOCKER_SUPPORT_SERVICE_NAME)
496464
onlyIf("$architecture supported") { serviceProvider.get().isArchitectureSupported(architecture) }
497465

498466
}
@@ -504,16 +472,15 @@ void addBuildEssDockerImageTask(Architecture architecture, DockerBase dockerBase
504472

505473
for (final Architecture architecture : Architecture.values()) {
506474
for (final DockerBase base : DockerBase.values()) {
507-
if (base == DockerBase.CLOUD_ESS || base == DockerBase.WOLFI_ESS) {
475+
if (base == DockerBase.CLOUD_ESS) {
508476
continue
509477
}
510478
addBuildDockerContextTask(architecture, base)
511479
addTransformDockerContextTask(architecture, base)
512480
addBuildDockerImageTask(architecture, base)
513481
}
514482

515-
addBuildEssDockerImageTask(architecture, DockerBase.CLOUD_ESS)
516-
addBuildEssDockerImageTask(architecture, DockerBase.WOLFI_ESS)
483+
addBuildEssDockerImageTask(architecture)
517484
}
518485

519486
def exportDockerImages = tasks.register("exportDockerImages")
@@ -544,8 +511,7 @@ subprojects { Project subProject ->
544511
(base == DockerBase.IRON_BANK ? 'ironbank.tar' :
545512
(base == DockerBase.CLOUD_ESS ? 'cloud-ess.tar' :
546513
(base == DockerBase.WOLFI ? 'wolfi.tar' :
547-
(base == DockerBase.WOLFI_ESS ? 'wolfi-ess.tar' :
548-
'docker.tar'))));
514+
'docker.tar')))
549515
final String artifactName = "elasticsearch${arch}${base.suffix}_test"
550516

551517
final String exportTaskName = taskName("export", architecture, base, 'DockerImage')
@@ -561,10 +527,7 @@ subprojects { Project subProject ->
561527
tarFile,
562528
"elasticsearch${base.suffix}:${architecture.classifier}"
563529
dependsOn(parent.path + ":" + buildTaskName)
564-
Provider<DockerSupportService> serviceProvider = GradleUtils.getBuildService(
565-
project.gradle.sharedServices,
566-
DockerSupportPlugin.DOCKER_SUPPORT_SERVICE_NAME
567-
)
530+
Provider<DockerSupportService> serviceProvider = GradleUtils.getBuildService(project.gradle.sharedServices, DockerSupportPlugin.DOCKER_SUPPORT_SERVICE_NAME)
568531
onlyIf("$architecture supported") { serviceProvider.get().isArchitectureSupported(architecture) }
569532
}
570533

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM ${base_image} AS builder
2+
3+
USER root
4+
5+
COPY plugins/*.zip /opt/plugins/archive/
6+
7+
RUN chown root.root /opt/plugins/archive/*
8+
RUN chmod 0444 /opt/plugins/archive/*
9+
10+
FROM ${base_image}
11+
12+
COPY --from=builder /opt/plugins /opt/plugins
13+
ENV ES_PLUGIN_ARCHIVE_DIR /opt/plugins/archive

0 commit comments

Comments
 (0)