Skip to content

Commit 3497031

Browse files
committed
add missing dockerfiles
1 parent b893aef commit 3497031

File tree

35 files changed

+2122
-45
lines changed

35 files changed

+2122
-45
lines changed

.evergreen-functions.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -393,17 +393,6 @@ functions:
393393
echo "Enabling QEMU building for Docker"
394394
docker run --rm --privileged 268558157000.dkr.ecr.eu-west-1.amazonaws.com/docker-hub-mirrors/multiarch/qemu-user-static --reset -p yes
395395
396-
upload_dockerfiles:
397-
- command: s3.put
398-
params:
399-
aws_key: ${enterprise_aws_access_key_id}
400-
aws_secret: ${enterprise_aws_secret_access_key}
401-
local_file: src/github.com/mongodb/mongodb-kubernetes/public/dockerfiles-${triggered_by_git_tag}.tgz
402-
remote_file: bundles/dockerfiles-${triggered_by_git_tag}.tgz
403-
bucket: operator-e2e-bundles
404-
permissions: public-read
405-
content_type: application/x-binary
406-
407396
# upload_e2e_logs has the responsibility of dumping as much information as
408397
# possible into the S3 bucket that corresponds to this ${version}. The
409398
# Kubernetes cluster where the test finished running, should still be

.evergreen.yml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -316,15 +316,6 @@ tasks:
316316
vars:
317317
image_name: agent
318318

319-
- name: upload_dockerfiles
320-
tags: [ "image_release" ]
321-
allowed_requesters: [ "patch", "github_tag" ]
322-
commands:
323-
- func: clone
324-
- func: setup_building_host
325-
- func: build-dockerfiles
326-
- func: upload_dockerfiles
327-
328319
# pct only triggers this variant once a new agent image is out
329320
- name: release_agent
330321
# this enables us to run this variant either manually (patch) which pct does or during an OM bump (github_pr)
@@ -1782,20 +1773,6 @@ buildvariants:
17821773
tasks:
17831774
- name: run_conditionally_prepare_and_upload_openshift_bundles
17841775

1785-
- name: upload_dockerfiles
1786-
display_name: upload_dockerfiles
1787-
tags: [ "release" ]
1788-
allowed_requesters: [ "patch", "github_tag" ]
1789-
# CLOUDP-182323 This ensures that there will be Operator Dockerfile available in S3 before
1790-
# syncing and uploading the bundle TAR archive.
1791-
depends_on:
1792-
- name: release_operator
1793-
variant: release_images
1794-
run_on:
1795-
- ubuntu2204-small
1796-
tasks:
1797-
- name: upload_dockerfiles
1798-
17991776
# It will be called by pct while bumping the agent cloud manager image
18001777
- name: release_agent
18011778
display_name: (Static Containers) Release Agent matrix
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
ARG imagebase
2+
FROM ${imagebase} as base
3+
4+
FROM registry.access.redhat.com/ubi9/ubi-minimal
5+
6+
ARG version
7+
8+
LABEL name="MongoDB Agent" \
9+
version="${version}" \
10+
summary="MongoDB Agent" \
11+
description="MongoDB Agent" \
12+
vendor="MongoDB" \
13+
release="1" \
14+
maintainer="support@mongodb.com"
15+
16+
# Replace libcurl-minimal and curl-minimal with the full versions
17+
# https://bugzilla.redhat.com/show_bug.cgi?id=1994521
18+
RUN microdnf install -y libssh libpsl libbrotli \
19+
&& microdnf download curl libcurl \
20+
&& rpm -Uvh --nodeps --replacefiles "*curl*$( uname -i ).rpm" \
21+
&& microdnf remove -y libcurl-minimal curl-minimal
22+
23+
RUN microdnf install -y --disableplugin=subscription-manager --setopt=install_weak_deps=0 nss_wrapper
24+
# Copy-pasted from https://www.mongodb.com/docs/manual/tutorial/install-mongodb-enterprise-on-red-hat-tarball/
25+
RUN microdnf install -y --disableplugin=subscription-manager \
26+
cyrus-sasl cyrus-sasl-gssapi cyrus-sasl-plain krb5-libs openldap openssl xz-libs
27+
# Dependencies for the Agent
28+
RUN microdnf install -y --disableplugin=subscription-manager --setopt=install_weak_deps=0 \
29+
net-snmp \
30+
net-snmp-agent-libs
31+
RUN microdnf install -y --disableplugin=subscription-manager \
32+
hostname tar gzip procps jq \
33+
&& microdnf upgrade -y \
34+
&& rm -rf /var/lib/apt/lists/*
35+
36+
RUN mkdir -p /agent \
37+
&& mkdir -p /var/lib/mongodb-mms-automation \
38+
&& mkdir -p /var/log/mongodb-mms-automation/ \
39+
&& chmod -R +wr /var/log/mongodb-mms-automation/ \
40+
# ensure that the agent user can write the logs in OpenShift
41+
&& touch /var/log/mongodb-mms-automation/readiness.log \
42+
&& chmod ugo+rw /var/log/mongodb-mms-automation/readiness.log
43+
44+
45+
COPY --from=base /data/mongodb-agent.tar.gz /agent
46+
COPY --from=base /data/mongodb-tools.tgz /agent
47+
COPY --from=base /data/LICENSE /licenses/LICENSE
48+
49+
RUN tar xfz /agent/mongodb-agent.tar.gz \
50+
&& mv mongodb-mms-automation-agent-*/mongodb-mms-automation-agent /agent/mongodb-agent \
51+
&& chmod +x /agent/mongodb-agent \
52+
&& mkdir -p /var/lib/automation/config \
53+
&& chmod -R +r /var/lib/automation/config \
54+
&& rm /agent/mongodb-agent.tar.gz \
55+
&& rm -r mongodb-mms-automation-agent-*
56+
57+
RUN tar xfz /agent/mongodb-tools.tgz --directory /var/lib/mongodb-mms-automation/ && rm /agent/mongodb-tools.tgz
58+
59+
USER 2000
60+
CMD ["/agent/mongodb-agent", "-cluster=/var/lib/automation/config/automation-config.json"]
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
ARG imagebase
2+
FROM ${imagebase} as base
3+
4+
FROM registry.access.redhat.com/ubi9/ubi-minimal
5+
6+
ARG version
7+
8+
LABEL name="MongoDB Agent" \
9+
version="${version}" \
10+
summary="MongoDB Agent" \
11+
description="MongoDB Agent" \
12+
vendor="MongoDB" \
13+
release="1" \
14+
maintainer="support@mongodb.com"
15+
16+
COPY --from=base /data/probe.sh /opt/scripts/probe.sh
17+
COPY --from=base /data/readinessprobe /opt/scripts/readinessprobe
18+
COPY --from=base /data/version-upgrade-hook /opt/scripts/version-upgrade-hook
19+
COPY --from=base /data/agent-launcher-lib.sh /opt/scripts/agent-launcher-lib.sh
20+
COPY --from=base /data/agent-launcher.sh /opt/scripts/agent-launcher.sh
21+
COPY --from=base /data/LICENSE /licenses/LICENSE
22+
23+
# Replace libcurl-minimal and curl-minimal with the full versions
24+
# https://bugzilla.redhat.com/show_bug.cgi?id=1994521
25+
RUN microdnf install -y libssh libpsl libbrotli \
26+
&& microdnf download curl libcurl \
27+
&& rpm -Uvh --nodeps --replacefiles "*curl*$( uname -i ).rpm" \
28+
&& microdnf remove -y libcurl-minimal curl-minimal
29+
30+
RUN microdnf install -y --disableplugin=subscription-manager --setopt=install_weak_deps=0 nss_wrapper
31+
# Copy-pasted from https://www.mongodb.com/docs/manual/tutorial/install-mongodb-enterprise-on-red-hat-tarball/
32+
RUN microdnf install -y --disableplugin=subscription-manager \
33+
cyrus-sasl cyrus-sasl-gssapi cyrus-sasl-plain krb5-libs openldap openssl xz-libs
34+
# Dependencies for the Agent
35+
RUN microdnf install -y --disableplugin=subscription-manager --setopt=install_weak_deps=0 \
36+
net-snmp \
37+
net-snmp-agent-libs
38+
RUN microdnf install -y --disableplugin=subscription-manager \
39+
hostname tar gzip procps jq \
40+
&& microdnf upgrade -y \
41+
&& rm -rf /var/lib/apt/lists/*
42+
43+
44+
COPY --from=base /data/mongodb_tools_ubi.tgz /tools/mongodb_tools.tgz
45+
COPY --from=base /data/mongodb_agent_ubi.tgz /agent/mongodb_agent.tgz
46+
47+
RUN tar xfz /tools/mongodb_tools.tgz
48+
RUN mv mongodb-database-tools-*/bin/* /tools
49+
RUN chmod +x /tools/*
50+
RUN rm /tools/mongodb_tools.tgz
51+
RUN rm -rf /mongodb-database-tools-*
52+
53+
RUN tar xfz /agent/mongodb_agent.tgz
54+
RUN mv mongodb-mms-automation-agent-*/mongodb-mms-automation-agent /agent/mongodb-agent
55+
RUN chmod +x /agent/mongodb-agent
56+
RUN rm /agent/mongodb_agent.tgz
57+
RUN rm -rf mongodb-mms-automation-agent-*
58+
59+
RUN mkdir -p /var/lib/automation/config
60+
RUN chmod -R +r /var/lib/automation/config
61+
62+
USER 2000
63+
64+
HEALTHCHECK --timeout=30s CMD ls /opt/scripts/readinessprobe || exit 1
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
ARG imagebase
2+
FROM ${imagebase} as base
3+
4+
FROM registry.access.redhat.com/ubi9/ubi-minimal
5+
6+
ARG version
7+
8+
LABEL name="MongoDB Agent" \
9+
version="${version}" \
10+
summary="MongoDB Agent" \
11+
description="MongoDB Agent" \
12+
vendor="MongoDB" \
13+
release="1" \
14+
maintainer="support@mongodb.com"
15+
16+
# Replace libcurl-minimal and curl-minimal with the full versions
17+
# https://bugzilla.redhat.com/show_bug.cgi?id=1994521
18+
RUN microdnf install -y libssh libpsl libbrotli \
19+
&& microdnf download curl libcurl \
20+
&& rpm -Uvh --nodeps --replacefiles "*curl*$( uname -i ).rpm" \
21+
&& microdnf remove -y libcurl-minimal curl-minimal
22+
23+
RUN microdnf install -y --disableplugin=subscription-manager --setopt=install_weak_deps=0 nss_wrapper
24+
# Copy-pasted from https://www.mongodb.com/docs/manual/tutorial/install-mongodb-enterprise-on-red-hat-tarball/
25+
RUN microdnf install -y --disableplugin=subscription-manager \
26+
cyrus-sasl cyrus-sasl-gssapi cyrus-sasl-plain krb5-libs openldap openssl xz-libs
27+
# Dependencies for the Agent
28+
RUN microdnf install -y --disableplugin=subscription-manager --setopt=install_weak_deps=0 \
29+
net-snmp \
30+
net-snmp-agent-libs
31+
RUN microdnf install -y --disableplugin=subscription-manager \
32+
hostname tar gzip procps jq \
33+
&& microdnf upgrade -y \
34+
&& rm -rf /var/lib/apt/lists/*
35+
36+
RUN mkdir -p /agent \
37+
&& mkdir -p /var/lib/mongodb-mms-automation \
38+
&& mkdir -p /var/log/mongodb-mms-automation/ \
39+
&& chmod -R +wr /var/log/mongodb-mms-automation/ \
40+
# ensure that the agent user can write the logs in OpenShift
41+
&& touch /var/log/mongodb-mms-automation/readiness.log \
42+
&& chmod ugo+rw /var/log/mongodb-mms-automation/readiness.log
43+
44+
45+
COPY --from=base /data/mongodb-agent.tar.gz /agent
46+
COPY --from=base /data/mongodb-tools.tgz /agent
47+
COPY --from=base /data/LICENSE /licenses/LICENSE
48+
49+
RUN tar xfz /agent/mongodb-agent.tar.gz \
50+
&& mv mongodb-mms-automation-agent-*/mongodb-mms-automation-agent /agent/mongodb-agent \
51+
&& chmod +x /agent/mongodb-agent \
52+
&& mkdir -p /var/lib/automation/config \
53+
&& chmod -R +r /var/lib/automation/config \
54+
&& rm /agent/mongodb-agent.tar.gz \
55+
&& rm -r mongodb-mms-automation-agent-*
56+
57+
RUN tar xfz /agent/mongodb-tools.tgz --directory /var/lib/mongodb-mms-automation/ && rm /agent/mongodb-tools.tgz
58+
59+
USER 2000
60+
CMD ["/agent/mongodb-agent", "-cluster=/var/lib/automation/config/automation-config.json"]
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
ARG imagebase
2+
FROM ${imagebase} as base
3+
4+
FROM registry.access.redhat.com/ubi9/ubi-minimal
5+
6+
ARG version
7+
8+
LABEL name="MongoDB Agent" \
9+
version="${version}" \
10+
summary="MongoDB Agent" \
11+
description="MongoDB Agent" \
12+
vendor="MongoDB" \
13+
release="1" \
14+
maintainer="support@mongodb.com"
15+
16+
COPY --from=base /data/probe.sh /opt/scripts/probe.sh
17+
COPY --from=base /data/readinessprobe /opt/scripts/readinessprobe
18+
COPY --from=base /data/version-upgrade-hook /opt/scripts/version-upgrade-hook
19+
COPY --from=base /data/agent-launcher-lib.sh /opt/scripts/agent-launcher-lib.sh
20+
COPY --from=base /data/agent-launcher.sh /opt/scripts/agent-launcher.sh
21+
COPY --from=base /data/LICENSE /licenses/LICENSE
22+
23+
# Replace libcurl-minimal and curl-minimal with the full versions
24+
# https://bugzilla.redhat.com/show_bug.cgi?id=1994521
25+
RUN microdnf install -y libssh libpsl libbrotli \
26+
&& microdnf download curl libcurl \
27+
&& rpm -Uvh --nodeps --replacefiles "*curl*$( uname -i ).rpm" \
28+
&& microdnf remove -y libcurl-minimal curl-minimal
29+
30+
RUN microdnf install -y --disableplugin=subscription-manager --setopt=install_weak_deps=0 nss_wrapper
31+
# Copy-pasted from https://www.mongodb.com/docs/manual/tutorial/install-mongodb-enterprise-on-red-hat-tarball/
32+
RUN microdnf install -y --disableplugin=subscription-manager \
33+
cyrus-sasl cyrus-sasl-gssapi cyrus-sasl-plain krb5-libs openldap openssl xz-libs
34+
# Dependencies for the Agent
35+
RUN microdnf install -y --disableplugin=subscription-manager --setopt=install_weak_deps=0 \
36+
net-snmp \
37+
net-snmp-agent-libs
38+
RUN microdnf install -y --disableplugin=subscription-manager \
39+
hostname tar gzip procps jq \
40+
&& microdnf upgrade -y \
41+
&& rm -rf /var/lib/apt/lists/*
42+
43+
44+
COPY --from=base /data/mongodb_tools_ubi.tgz /tools/mongodb_tools.tgz
45+
COPY --from=base /data/mongodb_agent_ubi.tgz /agent/mongodb_agent.tgz
46+
47+
RUN tar xfz /tools/mongodb_tools.tgz
48+
RUN mv mongodb-database-tools-*/bin/* /tools
49+
RUN chmod +x /tools/*
50+
RUN rm /tools/mongodb_tools.tgz
51+
RUN rm -rf /mongodb-database-tools-*
52+
53+
RUN tar xfz /agent/mongodb_agent.tgz
54+
RUN mv mongodb-mms-automation-agent-*/mongodb-mms-automation-agent /agent/mongodb-agent
55+
RUN chmod +x /agent/mongodb-agent
56+
RUN rm /agent/mongodb_agent.tgz
57+
RUN rm -rf mongodb-mms-automation-agent-*
58+
59+
RUN mkdir -p /var/lib/automation/config
60+
RUN chmod -R +r /var/lib/automation/config
61+
62+
USER 2000
63+
64+
HEALTHCHECK --timeout=30s CMD ls /opt/scripts/readinessprobe || exit 1
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
ARG imagebase
2+
FROM ${imagebase} as base
3+
4+
FROM registry.access.redhat.com/ubi9/ubi-minimal
5+
6+
ARG version
7+
8+
LABEL name="MongoDB Agent" \
9+
version="${version}" \
10+
summary="MongoDB Agent" \
11+
description="MongoDB Agent" \
12+
vendor="MongoDB" \
13+
release="1" \
14+
maintainer="support@mongodb.com"
15+
16+
# Replace libcurl-minimal and curl-minimal with the full versions
17+
# https://bugzilla.redhat.com/show_bug.cgi?id=1994521
18+
RUN microdnf install -y libssh libpsl libbrotli \
19+
&& microdnf download curl libcurl \
20+
&& rpm -Uvh --nodeps --replacefiles "*curl*$( uname -i ).rpm" \
21+
&& microdnf remove -y libcurl-minimal curl-minimal
22+
23+
RUN microdnf install -y --disableplugin=subscription-manager --setopt=install_weak_deps=0 nss_wrapper
24+
# Copy-pasted from https://www.mongodb.com/docs/manual/tutorial/install-mongodb-enterprise-on-red-hat-tarball/
25+
RUN microdnf install -y --disableplugin=subscription-manager \
26+
cyrus-sasl cyrus-sasl-gssapi cyrus-sasl-plain krb5-libs openldap openssl xz-libs
27+
# Dependencies for the Agent
28+
RUN microdnf install -y --disableplugin=subscription-manager --setopt=install_weak_deps=0 \
29+
net-snmp \
30+
net-snmp-agent-libs
31+
RUN microdnf install -y --disableplugin=subscription-manager \
32+
hostname tar gzip procps jq \
33+
&& microdnf upgrade -y \
34+
&& rm -rf /var/lib/apt/lists/*
35+
36+
RUN mkdir -p /agent \
37+
&& mkdir -p /var/lib/mongodb-mms-automation \
38+
&& mkdir -p /var/log/mongodb-mms-automation/ \
39+
&& chmod -R +wr /var/log/mongodb-mms-automation/ \
40+
# ensure that the agent user can write the logs in OpenShift
41+
&& touch /var/log/mongodb-mms-automation/readiness.log \
42+
&& chmod ugo+rw /var/log/mongodb-mms-automation/readiness.log
43+
44+
45+
COPY --from=base /data/mongodb-agent.tar.gz /agent
46+
COPY --from=base /data/mongodb-tools.tgz /agent
47+
COPY --from=base /data/LICENSE /licenses/LICENSE
48+
49+
RUN tar xfz /agent/mongodb-agent.tar.gz \
50+
&& mv mongodb-mms-automation-agent-*/mongodb-mms-automation-agent /agent/mongodb-agent \
51+
&& chmod +x /agent/mongodb-agent \
52+
&& mkdir -p /var/lib/automation/config \
53+
&& chmod -R +r /var/lib/automation/config \
54+
&& rm /agent/mongodb-agent.tar.gz \
55+
&& rm -r mongodb-mms-automation-agent-*
56+
57+
RUN tar xfz /agent/mongodb-tools.tgz --directory /var/lib/mongodb-mms-automation/ && rm /agent/mongodb-tools.tgz
58+
59+
USER 2000
60+
CMD ["/agent/mongodb-agent", "-cluster=/var/lib/automation/config/automation-config.json"]

0 commit comments

Comments
 (0)