-
Notifications
You must be signed in to change notification settings - Fork 25.7k
[ci] Add Alma Linux 9 to matrix in packaging and platform jobs #118331
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
Changes from all commits
5462e00
0e4ce20
fef99c7
6821d99
2035fb0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,6 +21,7 @@ steps: | |
| - rhel-8 | ||
| - rhel-9 | ||
| - almalinux-8 | ||
| - almalinux-9 | ||
| PACKAGING_TASK: | ||
| - docker | ||
| - docker-cloud-ess | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,28 +7,34 @@ | |
|
|
||
| package org.elasticsearch.test.fixtures.smb; | ||
|
|
||
| import com.github.dockerjava.api.model.Capability; | ||
|
|
||
| import org.elasticsearch.test.fixtures.testcontainers.DockerEnvironmentAwareTestContainer; | ||
| import org.testcontainers.containers.wait.strategy.Wait; | ||
| import org.testcontainers.containers.wait.strategy.WaitAllStrategy; | ||
| import org.testcontainers.images.builder.ImageFromDockerfile; | ||
|
|
||
| import java.time.Duration; | ||
|
|
||
| public final class SmbTestContainer extends DockerEnvironmentAwareTestContainer { | ||
|
|
||
| private static final String DOCKER_BASE_IMAGE = "ubuntu:16.04"; | ||
| private static final String DOCKER_BASE_IMAGE = "ubuntu:24.04"; | ||
| public static final int AD_LDAP_PORT = 636; | ||
| public static final int AD_LDAP_GC_PORT = 3269; | ||
|
|
||
| public SmbTestContainer() { | ||
| super( | ||
| new ImageFromDockerfile("es-smb-fixture").withDockerfileFromBuilder( | ||
| builder -> builder.from(DOCKER_BASE_IMAGE) | ||
| .run("apt-get update -qqy && apt-get install -qqy samba ldap-utils") | ||
| .env("TZ", "Etc/UTC") | ||
| .run("DEBIAN_FRONTEND=noninteractive apt-get update -qqy && apt-get install -qqy tzdata winbind samba ldap-utils") | ||
| .copy("fixture/provision/installsmb.sh", "/fixture/provision/installsmb.sh") | ||
| .copy("fixture/certs/ca.key", "/fixture/certs/ca.key") | ||
| .copy("fixture/certs/ca.pem", "/fixture/certs/ca.pem") | ||
| .copy("fixture/certs/cert.pem", "/fixture/certs/cert.pem") | ||
| .copy("fixture/certs/key.pem", "/fixture/certs/key.pem") | ||
| .run("chmod +x /fixture/provision/installsmb.sh") | ||
| .run("/fixture/provision/installsmb.sh") | ||
| .cmd("service samba-ad-dc restart && sleep infinity") | ||
| .cmd("/fixture/provision/installsmb.sh && service samba-ad-dc restart && echo Samba started && sleep infinity") | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Samba configuration script has been moved from building to starting the container, because it requires
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that's unfortunate |
||
| .build() | ||
| ) | ||
| .withFileFromClasspath("fixture/provision/installsmb.sh", "/smb/provision/installsmb.sh") | ||
|
|
@@ -37,10 +43,20 @@ public SmbTestContainer() { | |
| .withFileFromClasspath("fixture/certs/cert.pem", "/smb/certs/cert.pem") | ||
| .withFileFromClasspath("fixture/certs/key.pem", "/smb/certs/key.pem") | ||
| ); | ||
| // addExposedPort(389); | ||
| // addExposedPort(3268); | ||
|
|
||
| addExposedPort(AD_LDAP_PORT); | ||
| addExposedPort(AD_LDAP_GC_PORT); | ||
|
|
||
| setWaitStrategy( | ||
| new WaitAllStrategy().withStartupTimeout(Duration.ofSeconds(120)) | ||
| .withStrategy(Wait.forLogMessage(".*Samba started.*", 1)) | ||
| .withStrategy(Wait.forListeningPort()) | ||
| ); | ||
|
Comment on lines
+50
to
+54
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wait strategy needed now since the Samba configuration script has been moved from building the container to starting it. |
||
|
|
||
| getCreateContainerCmdModifiers().add(createContainerCmd -> { | ||
| createContainerCmd.getHostConfig().withCapAdd(Capability.SYS_ADMIN); | ||
| return createContainerCmd; | ||
| }); | ||
| } | ||
|
|
||
| public String getAdLdapUrl() { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,7 +21,7 @@ cat $SSL_DIR/ca.pem >> /etc/ssl/certs/ca-certificates.crt | |
|
|
||
| mv /etc/samba/smb.conf /etc/samba/smb.conf.orig | ||
|
|
||
| samba-tool domain provision --server-role=dc --use-rfc2307 --dns-backend=SAMBA_INTERNAL --realm=AD.TEST.ELASTICSEARCH.COM --domain=ADES --adminpass=Passw0rd --use-ntvfs | ||
| samba-tool domain provision --server-role=dc --use-rfc2307 --dns-backend=SAMBA_INTERNAL --realm=AD.TEST.ELASTICSEARCH.COM --domain=ADES --adminpass=Passw0rd | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| cp /var/lib/samba/private/krb5.conf /etc/krb5.conf | ||
|
|
||
|
|
||
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.
There is a problem with installation of Samba in Ubuntu 16.04 on specific Docker configuration. The installation hangs on some Python modules compilation.
Python modules compilation hangs because in RHEL9-based distros, during Docker build,
ulimitset tounlimited. This is hard to change so instead I've decided to upgrade Ubuntu image to avoid this problem.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.
awesome!