Skip to content

Commit 72ffd6d

Browse files
committed
Copy premis.xsd into enduro image
This file should only be needed by the AM and a3m workers to do PREMIS validation when it's enabled. However, config validation is the same for all commands and, when PREMIS validation is enabled, it checks the existence of the XSD file in the filesystem. We tried to disable PREMIS validation only in the enduro container, but that config value is read in the workflow context, disabling the scheduling of the activity from the workflow worker.
1 parent a8191df commit 72ffd6d

File tree

3 files changed

+23
-24
lines changed

3 files changed

+23
-24
lines changed

Dockerfile

+19-18
Original file line numberDiff line numberDiff line change
@@ -56,30 +56,31 @@ FROM gcr.io/distroless/base-debian12:latest AS base
5656
USER 1000
5757

5858
FROM base AS enduro
59-
COPY --from=build-enduro --link /out/enduro /home/enduro/bin/enduro
60-
COPY --from=build-enduro --link /src/enduro.toml /home/enduro/.config/enduro.toml
59+
COPY --link --from=build-enduro /out/enduro /home/enduro/bin/enduro
60+
COPY --link --from=build-enduro /src/enduro.toml /home/enduro/.config/enduro.toml
61+
COPY --link hack/xsd/premis.xsd /home/enduro/premis.xsd
6162
CMD ["/home/enduro/bin/enduro", "--config", "/home/enduro/.config/enduro.toml"]
6263

6364
FROM base AS enduro-a3m-worker
64-
COPY --from=build-enduro-a3m-worker --link /out/enduro-a3m-worker /home/enduro/bin/enduro-a3m-worker
65-
COPY --from=build-enduro-a3m-worker --link /src/enduro.toml /home/enduro/.config/enduro.toml
65+
COPY --link --from=build-libxml /usr/bin/xmllint /usr/bin/xmllint
66+
COPY --link --from=build-libxml /usr/lib/libxml2.so.2 /usr/lib/libxml2.so.2
67+
COPY --link --from=build-libxml /lib/ld-musl-x86_64.so.1 /lib/ld-musl-x86_64.so.1
68+
COPY --link --from=build-libxml /lib/libz.so.1 /lib/libz.so.1
69+
COPY --link --from=build-libxml /usr/lib/liblzma.so.5 /usr/lib/liblzma.so.5
70+
COPY --link --from=build-enduro-a3m-worker /out/enduro-a3m-worker /home/enduro/bin/enduro-a3m-worker
71+
COPY --link --from=build-enduro-a3m-worker /src/enduro.toml /home/enduro/.config/enduro.toml
72+
COPY --link hack/xsd/premis.xsd /home/enduro/premis.xsd
6673
CMD ["/home/enduro/bin/enduro-a3m-worker", "--config", "/home/enduro/.config/enduro.toml"]
67-
COPY hack/xsd/premis.xsd /home/enduro/premis.xsd
68-
COPY --from=build-libxml /usr/bin/xmllint /usr/bin/xmllint
69-
COPY --from=build-libxml /usr/lib/libxml2.so.2 /usr/lib/libxml2.so.2
70-
COPY --from=build-libxml /lib/ld-musl-x86_64.so.1 /lib/ld-musl-x86_64.so.1
71-
COPY --from=build-libxml /lib/libz.so.1 /lib/libz.so.1
72-
COPY --from=build-libxml /usr/lib/liblzma.so.5 /usr/lib/liblzma.so.5
7374

7475
FROM base AS enduro-am-worker
75-
COPY --from=build-enduro-am-worker --link /out/enduro-am-worker /home/enduro/bin/enduro-am-worker
76-
COPY --from=build-enduro-am-worker --link /src/enduro.toml /home/enduro/.config/enduro.toml
76+
COPY --link --from=build-libxml /usr/bin/xmllint /usr/bin/xmllint
77+
COPY --link --from=build-libxml /usr/lib/libxml2.so.2 /usr/lib/libxml2.so.2
78+
COPY --link --from=build-libxml /lib/ld-musl-x86_64.so.1 /lib/ld-musl-x86_64.so.1
79+
COPY --link --from=build-libxml /lib/libz.so.1 /lib/libz.so.1
80+
COPY --link --from=build-libxml /usr/lib/liblzma.so.5 /usr/lib/liblzma.so.5
81+
COPY --link --from=build-enduro-am-worker /out/enduro-am-worker /home/enduro/bin/enduro-am-worker
82+
COPY --link --from=build-enduro-am-worker /src/enduro.toml /home/enduro/.config/enduro.toml
83+
COPY --link hack/xsd/premis.xsd /home/enduro/premis.xsd
7784
CMD ["/home/enduro/bin/enduro-am-worker", "--config", "/home/enduro/.config/enduro.toml"]
78-
COPY hack/xsd/premis.xsd /home/enduro/premis.xsd
79-
COPY --from=build-libxml /usr/bin/xmllint /usr/bin/xmllint
80-
COPY --from=build-libxml /usr/lib/libxml2.so.2 /usr/lib/libxml2.so.2
81-
COPY --from=build-libxml /lib/ld-musl-x86_64.so.1 /lib/ld-musl-x86_64.so.1
82-
COPY --from=build-libxml /lib/libz.so.1 /lib/libz.so.1
83-
COPY --from=build-libxml /usr/lib/liblzma.so.5 /usr/lib/liblzma.so.5
8485

8586
FROM ${TARGET}

enduro.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@ redisChannel = "enduro-events"
8484
dirMode = "0o700"
8585
fileMode = "0o600"
8686

87+
[validatePremis]
88+
enabled = true
89+
xsdPath = "/home/enduro/premis.xsd"
90+
8791
[watcher.embedded]
8892
name = "dev-minio"
8993
redisAddress = "redis://redis.enduro-sdps:6379"
@@ -232,10 +236,6 @@ namespace = "default"
232236
taskQueue = "preprocessing"
233237
workflowName = "preprocessing"
234238

235-
[validatePremis]
236-
enabled = true
237-
xsdPath = "/home/enduro/premis.xsd"
238-
239239
# Temporal configurations to trigger poststorage child workflows, allows multiple sections.
240240
# [[poststorage]]
241241
# namespace = "default"

hack/kube/base/enduro.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ spec:
7070
value: "grafana-alloy.enduro-sdps:4317"
7171
- name: ENDURO_TELEMETRY_TRACES_SAMPLING_RATIO
7272
value: "1.0"
73-
- name: ENDURO_VALIDATEPREMIS_ENABLED
74-
value: "false"
7573
ports:
7674
- containerPort: 9000
7775
- containerPort: 9002

0 commit comments

Comments
 (0)