-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change default container image to be based on UBI minimal instead of Ubuntu #116739
Conversation
|
||
<% if (docker_base == 'ubi') { %> | ||
LABEL name="Elasticsearch" \\ | ||
maintainer="infra@elastic.co" \\ | ||
vendor="Elastic" \\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@breskeby I've tried to keep the logic unchanged, but here I have decided to change it to simplify the logic a bit.
Is it OK that wolfi Docker image will also have these labels?
@@ -117,27 +115,6 @@ RUN sed -i -e 's/ES_DISTRIBUTION_TYPE=tar/ES_DISTRIBUTION_TYPE=docker/' bin/elas | |||
chmod 0775 bin config config/jvm.options.d data logs plugins && \\ | |||
find config -type f -exec chmod 0664 {} + | |||
|
|||
<% if (docker_base == "cloud") { %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed the blocks for cloud
from Dockerfile template, because I believe it is no longer used. I couldn't see any code which would use that. Please let me know if I am missing something here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for cleaning that up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes it was removed here: #115357
@@ -23,14 +22,7 @@ the [DockerBase] enum. | |||
software (FOSS) and Commercial off-the-shelf (COTS). In practice, this is | |||
another UBI build, this time on the regular UBI image, with extra | |||
hardening. See below for more details. | |||
* Cloud - this is mostly the same as the default image, with some notable differences: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for cleaning up
* <li>Another UBI image for Iron Bank</li> | ||
* <li>A WOLFI-based image</li> | ||
* <li>Images for Cloud</li> | ||
* <li>Image for Cloud ESS</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its a mess. but we should just name that "Image for Cloud" sorry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed
public void test200UbiImagesHaveLicenseDirectory() { | ||
assumeTrue(distribution.packaging == Packaging.DOCKER_UBI); | ||
public void test200ImagesHaveLicenseDirectory() { | ||
assumeTrue(distribution.packaging != Packaging.DOCKER_IRON_BANK); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these tests haven't run before for wolfi or cloud-less right? If they now pass also for those even better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. They should run for more images now. This is also the reason I've changed the Dockerfile to add license for all images.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I noticed our test coverage for docker in PRs could be better here. Can you tweak our pr packaging tests to test against cloud-ess and against our default docker image?
command: ./.ci/scripts/packaging-test.sh destructiveDistroTest.docker-cloud-ess |
- label: "{{matrix.image}} / docker / packaging-tests-unix" | ||
key: "packaging-tests-unix-docker" | ||
command: ./.ci/scripts/packaging-test.sh destructiveDistroTest.docker | ||
timeout_in_minutes: 300 | ||
matrix: | ||
setup: | ||
image: | ||
- debian-11 | ||
- opensuse-leap-15 | ||
- oraclelinux-7 | ||
- oraclelinux-8 | ||
- sles-12 | ||
- sles-15 | ||
- ubuntu-1804 | ||
- ubuntu-2004 | ||
- ubuntu-2204 | ||
- rocky-8 | ||
- rocky-9 | ||
- rhel-7 | ||
- rhel-8 | ||
- rhel-9 | ||
- almalinux-8 | ||
agents: | ||
provider: gcp | ||
image: family/elasticsearch-{{matrix.image}} | ||
diskSizeGb: 350 | ||
machineType: custom-16-32768 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added the testing for default Docker image here. Done by copying the whole step to keep the steps naming.
I was trying to do it with matrix with 2 params (similar to this), but AFAIK that would require changing names of all steps. I am not sure how much we are attached to these names.
Let me know what you think about it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're not attached to the names. I think using a 2 axis matrix makes the most sense vs duplicating the step.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 on using matrix with changed names we usually don't care about.
Pinging @elastic/es-delivery (Team:Delivery) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. FYI, we want to also move to UBI9, but that can be done in a follow up.
3970ce5
to
a67269d
Compare
Previously default Docker image was based on Ubuntu. This changes the base image for default to be UBI minimal.
Removed switch expression from Gradle as it is not supported in this version of Groovy
a67269d
to
718971a
Compare
…Ubuntu (elastic#116739) Previously default Docker image was based on Ubuntu. This changes the base image for default to be UBI minimal.
The image has been changed in elastic#116739
The image has been changed in elastic#116739
The image has been changed in elastic#116739
The image has been changed in #116739
The image has been changed in elastic#116739
…Ubuntu (elastic#116739) Previously default Docker image was based on Ubuntu. This changes the base image for default to be UBI minimal.
The image has been changed in elastic#116739
Previously default Docker image was based on Ubuntu. This changes the base image for default to be UBI minimal.