Skip to content

Commit 5ad6567

Browse files
committed
Port fixture image from ubuntu 24.04 to latest alpine
1 parent 543e079 commit 5ad6567

File tree

8 files changed

+15
-18
lines changed

8 files changed

+15
-18
lines changed

muted-tests.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,6 @@ tests:
229229
issue: https://github.com/elastic/elasticsearch/issues/116777
230230
- class: org.elasticsearch.xpack.security.authc.ldap.ActiveDirectoryRunAsIT
231231
issue: https://github.com/elastic/elasticsearch/issues/115727
232-
- class: org.elasticsearch.xpack.security.authc.kerberos.KerberosAuthenticationIT
233-
issue: https://github.com/elastic/elasticsearch/issues/118414
234232
- class: org.elasticsearch.smoketest.DocsClientYamlTestSuiteIT
235233
method: test {yaml=reference/search/search-your-data/retrievers-examples/line_98}
236234
issue: https://github.com/elastic/elasticsearch/issues/119155

test/fixtures/krb5kdc-fixture/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
FROM ubuntu:24.04
1+
FROM alpine:3.21.0
22

3-
ADD . /fixture
4-
RUN apt-get update && apt-get install -y --no-install-recommends python3 krb5-kdc krb5-admin-server && apt-get clean && rm -rf /var/lib/apt/lists/*
3+
ADD src/main/resources /fixture
4+
RUN apk update && apk add -y --no-cache python3 krb5 krb5-server
55

66
RUN echo kerberos.build.elastic.co > /etc/hostname
7-
RUN bash /fixture/src/main/resources/provision/installkdc.sh
7+
RUN sh /fixture/provision/installkdc.sh
88

99
EXPOSE 88
1010
EXPOSE 88/udp

test/fixtures/krb5kdc-fixture/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ dockerFixtures {
1717
krb5dc {
1818
dockerContext = projectDir
1919
version = "1.1"
20-
baseImages = ["ubuntu:24.04"]
20+
baseImages = ["alpine:3.21.0"]
2121
}
2222
}
2323

test/fixtures/krb5kdc-fixture/src/main/java/org/elasticsearch/test/fixtures/krb5kdc/Krb5kDcContainer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ public final class Krb5kDcContainer extends DockerEnvironmentAwareTestContainer
3939
public enum ProvisioningId {
4040
HDFS(
4141
"hdfs",
42-
"/fixture/src/main/resources/provision/hdfs.sh",
42+
"/fixture/provision/hdfs.sh",
4343
"/fixture/build/keytabs/hdfs_hdfs.build.elastic.co.keytab",
4444
"/fixture/build/keytabs/elasticsearch.keytab",
4545
4646
),
4747
PEPPA(
4848
"peppa",
49-
"/fixture/src/main/resources/provision/peppa.sh",
49+
"/fixture/provision/peppa.sh",
5050
"/fixture/build/keytabs/peppa.keytab",
5151
"/fixture/build/keytabs/HTTP_localhost.keytab",
5252
@@ -94,7 +94,7 @@ public Krb5kDcContainer(ProvisioningId provisioningId) {
9494
withNetworkAliases("kerberos.build.elastic.co", "build.elastic.co");
9595
withCopyFileToContainer(MountableFile.forHostPath("/dev/urandom"), "/dev/random");
9696
withExtraHost("kerberos.build.elastic.co", "127.0.0.1");
97-
withCommand("bash", provisioningId.scriptPath);
97+
withCommand("sh", provisioningId.scriptPath);
9898
}
9999

100100
@Override

test/fixtures/krb5kdc-fixture/src/main/resources/provision/addprinc.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/bin/sh
22

33
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
44
# or more contributor license agreements. Licensed under the "Elastic License
@@ -24,7 +24,7 @@ PASSWD="$2"
2424
USER=$(echo $PRINC | tr "/" "_")
2525

2626
VDIR=/fixture
27-
RESOURCES=$VDIR/src/main/resources
27+
RESOURCES=$VDIR
2828
PROV_DIR=$RESOURCES/provision
2929
ENVPROP_FILE=$RESOURCES/env.properties
3030
BUILD_DIR=$VDIR/build

test/fixtures/krb5kdc-fixture/src/main/resources/provision/hdfs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/bin/sh
22

33
set -e
44

test/fixtures/krb5kdc-fixture/src/main/resources/provision/installkdc.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/bin/sh
22

33
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
44
# or more contributor license agreements. Licensed under the "Elastic License
@@ -12,8 +12,7 @@ set -e
1212
# KDC installation steps and considerations based on https://web.mit.edu/kerberos/krb5-latest/doc/admin/install_kdc.html
1313
# and helpful input from https://help.ubuntu.com/community/Kerberos
1414

15-
VDIR=/fixture
16-
RESOURCES=$VDIR/src/main/resources
15+
RESOURCES=/fixture
1716
PROV_DIR=$RESOURCES/provision
1817
ENVPROP_FILE=$RESOURCES/env.properties
1918
LOCALSTATEDIR=/etc
@@ -53,7 +52,7 @@ touch $LOGDIR/krb5lib.log
5352
kdb5_util create -s -r $REALM_NAME -P zyxwvutsrpqonmlk9876
5453

5554
# Set up admin acls
56-
cat << EOF > /etc/krb5kdc/kadm5.acl
55+
cat << EOF > /var/lib/krb5kdc/kadm5.acl
5756
*/admin@$REALM_NAME *
5857
*/*@$REALM_NAME i
5958
EOF

test/fixtures/krb5kdc-fixture/src/main/resources/provision/peppa.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/bin/sh
22

33
set -e
44

0 commit comments

Comments
 (0)