Skip to content

Commit 196f202

Browse files
author
Nikolas De Giorgis
authored
Add missing updates (#204)
1 parent 61ae858 commit 196f202

File tree

29 files changed

+1766
-118
lines changed

29 files changed

+1766
-118
lines changed

crds.yaml

Lines changed: 553 additions & 14 deletions
Large diffs are not rendered by default.
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
ARG imagebase
2+
FROM ${imagebase} as base
3+
4+
FROM registry.access.redhat.com/ubi8/ubi-minimal
5+
6+
7+
8+
LABEL name="MongoDB Enterprise Database" \
9+
version="2.0.2" \
10+
summary="MongoDB Enterprise Database Image" \
11+
description="MongoDB Enterprise Database Image" \
12+
vendor="MongoDB" \
13+
release="1" \
14+
maintainer="support@mongodb.com"
15+
16+
17+
18+
19+
20+
ENV MMS_HOME /mongodb-automation
21+
ENV MMS_LOG_DIR /var/log/mongodb-mms-automation
22+
23+
24+
25+
RUN microdnf update -y && rm -rf /var/cache/yum
26+
27+
# these are the packages needed for the agent
28+
RUN microdnf install -y --disableplugin=subscription-manager \
29+
hostname \
30+
nss_wrapper \
31+
procps
32+
33+
34+
# these are the packages needed for MongoDB
35+
# (https://docs.mongodb.com/manual/tutorial/install-mongodb-enterprise-on-red-hat-tarball/ "RHEL/CentOS 8" tab)
36+
RUN microdnf install -y --disableplugin=subscription-manager \
37+
cyrus-sasl \
38+
cyrus-sasl-gssapi \
39+
cyrus-sasl-plain \
40+
krb5-libs \
41+
libcurl \
42+
lm_sensors-libs \
43+
net-snmp \
44+
net-snmp-agent-libs \
45+
openldap \
46+
openssl \
47+
jq \
48+
tar \
49+
findutils
50+
51+
52+
RUN microdnf remove perl-IO-Socket-SSL
53+
54+
RUN ln -s /usr/lib64/libsasl2.so.3 /usr/lib64/libsasl2.so.2
55+
56+
57+
# Set the required perms
58+
RUN mkdir -p "${MMS_LOG_DIR}" \
59+
&& chmod 0775 "${MMS_LOG_DIR}" \
60+
&& mkdir -p /var/lib/mongodb-mms-automation \
61+
&& chmod 0775 /var/lib/mongodb-mms-automation \
62+
&& mkdir -p /data \
63+
&& chmod 0775 /data \
64+
&& mkdir -p /journal \
65+
&& chmod 0775 /journal \
66+
&& mkdir -p "${MMS_HOME}" \
67+
&& chmod -R 0775 "${MMS_HOME}"
68+
69+
70+
71+
72+
# USER needs to be set for this image to pass RedHat verification. Some customers have these requirements as well
73+
# It does not matter what number it is, as long as it is set to something.
74+
# However, OpenShift will run the container as a random user,
75+
# and the number in this configuration is not relevant.
76+
USER 2000
77+
78+
79+
# The docker image doesn't have any scripts so by default does nothing
80+
# The script will be copied in runtime from init containers and the operator is expected
81+
# to override the COMMAND
82+
ENTRYPOINT ["sleep infinity"]
83+
84+
85+
COPY --from=base /data/licenses/mongodb-enterprise-database /licenses/mongodb-enterprise-database
86+
87+
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
ARG imagebase
2+
FROM ${imagebase} as base
3+
4+
FROM ubuntu:18.04
5+
6+
7+
8+
LABEL name="MongoDB Enterprise Database" \
9+
version="2.0.2" \
10+
summary="MongoDB Enterprise Database Image" \
11+
description="MongoDB Enterprise Database Image" \
12+
vendor="MongoDB" \
13+
release="1" \
14+
maintainer="support@mongodb.com"
15+
16+
17+
18+
19+
20+
ENV MMS_HOME /mongodb-automation
21+
ENV MMS_LOG_DIR /var/log/mongodb-mms-automation
22+
23+
24+
25+
RUN apt-get -qq update \
26+
&& apt-get -y -qq install \
27+
curl \
28+
jq \
29+
libcurl4 \
30+
libgssapi-krb5-2 \
31+
libkrb5-dbg \
32+
libldap-2.4-2 \
33+
liblzma5 \
34+
libpcap0.8 \
35+
libsasl2-2 \
36+
libsasl2-modules \
37+
libsasl2-modules-gssapi-mit \
38+
libwrap0 \
39+
openssl \
40+
snmp \
41+
libnss-wrapper \
42+
&& apt-get upgrade -y -qq \
43+
&& apt-get dist-upgrade -y -qq \
44+
&& rm -rf /var/lib/apt/lists/*
45+
46+
47+
# Set the required perms
48+
RUN mkdir -p "${MMS_LOG_DIR}" \
49+
&& chmod 0775 "${MMS_LOG_DIR}" \
50+
&& mkdir -p /var/lib/mongodb-mms-automation \
51+
&& chmod 0775 /var/lib/mongodb-mms-automation \
52+
&& mkdir -p /data \
53+
&& chmod 0775 /data \
54+
&& mkdir -p /journal \
55+
&& chmod 0775 /journal \
56+
&& mkdir -p "${MMS_HOME}" \
57+
&& chmod -R 0775 "${MMS_HOME}"
58+
59+
60+
61+
62+
# USER needs to be set for this image to pass RedHat verification. Some customers have these requirements as well
63+
# It does not matter what number it is, as long as it is set to something.
64+
# However, OpenShift will run the container as a random user,
65+
# and the number in this configuration is not relevant.
66+
USER 2000
67+
68+
69+
# The docker image doesn't have any scripts so by default does nothing
70+
# The script will be copied in runtime from init containers and the operator is expected
71+
# to override the COMMAND
72+
ENTRYPOINT ["sleep infinity"]
73+
74+
75+
COPY --from=base /data/licenses/mongodb-enterprise-database /licenses/mongodb-enterprise-database
76+
77+
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
ARG imagebase
2+
FROM ${imagebase} as base
3+
4+
FROM registry.access.redhat.com/ubi8/ubi-minimal
5+
6+
ARG version
7+
LABEL name="MongoDB Enterprise Init Database" \
8+
version="mongodb-enterprise-init-database-${version}" \
9+
summary="MongoDB Enterprise Database Init Image" \
10+
description="Startup Scripts for MongoDB Enterprise Database" \
11+
release="1" \
12+
vendor="MongoDB" \
13+
maintainer="support@mongodb.com"
14+
15+
COPY --from=base /data/readinessprobe /probes/readinessprobe
16+
COPY --from=base /data/probe.sh /probes/probe.sh
17+
COPY --from=base /data/scripts/ /scripts/
18+
COPY --from=base /data/licenses /licenses/
19+
20+
21+
RUN microdnf update --nodocs \
22+
&& microdnf -y install --nodocs tar gzip \
23+
&& microdnf clean all
24+
25+
COPY --from=base /data/mongodb_tools_ubi.tgz /tools/mongodb_tools.tgz
26+
27+
28+
RUN tar xfz /tools/mongodb_tools.tgz --directory /tools \
29+
&& rm /tools/mongodb_tools.tgz
30+
31+
USER 2000
32+
ENTRYPOINT [ "/bin/cp", "-f", "-r", "/scripts/agent-launcher.sh", "/scripts/agent-launcher-lib.sh", "/probes/readinessprobe", "/probes/probe.sh", "/tools", "/opt/scripts/" ]
33+
34+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
ARG imagebase
2+
FROM ${imagebase} as base
3+
4+
FROM busybox
5+
6+
ARG version
7+
LABEL name="MongoDB Enterprise Init Database" \
8+
version="mongodb-enterprise-init-database-${version}" \
9+
summary="MongoDB Enterprise Database Init Image" \
10+
description="Startup Scripts for MongoDB Enterprise Database" \
11+
release="1" \
12+
vendor="MongoDB" \
13+
maintainer="support@mongodb.com"
14+
15+
COPY --from=base /data/readinessprobe /probes/readinessprobe
16+
COPY --from=base /data/probe.sh /probes/probe.sh
17+
COPY --from=base /data/scripts/ /scripts/
18+
COPY --from=base /data/licenses /licenses/
19+
20+
21+
COPY --from=base /data/mongodb_tools_ubuntu.tgz /tools/mongodb_tools.tgz
22+
23+
24+
RUN tar xfz /tools/mongodb_tools.tgz --directory /tools \
25+
&& rm /tools/mongodb_tools.tgz
26+
27+
USER 2000
28+
ENTRYPOINT [ "/bin/cp", "-f", "-r", "/scripts/agent-launcher.sh", "/scripts/agent-launcher-lib.sh", "/probes/readinessprobe", "/probes/probe.sh", "/tools", "/opt/scripts/" ]
29+
30+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#
2+
# Base Template Dockerfile for Operator Image.
3+
#
4+
5+
ARG imagebase
6+
FROM ${imagebase} as base
7+
8+
FROM registry.access.redhat.com/ubi8/ubi-minimal
9+
10+
11+
LABEL name="MongoDB Enterprise Operator" \
12+
maintainer="support@mongodb.com" \
13+
vendor="MongoDB" \
14+
version="1.13.0" \
15+
release="1" \
16+
summary="MongoDB Enterprise Operator Image" \
17+
description="MongoDB Enterprise Operator Image"
18+
19+
20+
# Building an UBI-based image: https://red.ht/3n6b9y0
21+
RUN microdnf update \
22+
--disableplugin=subscription-manager \
23+
--disablerepo=* --enablerepo=ubi-8-appstream --enablerepo=ubi-8-baseos -y \
24+
&& rm -rf /var/cache/yum
25+
26+
27+
28+
29+
COPY --from=base /data/mongodb-enterprise-operator /usr/local/bin/mongodb-enterprise-operator
30+
COPY --from=base /data/om_version_mapping.json /usr/local/om_version_mapping.json
31+
COPY --from=base /data/licenses /licenses/
32+
33+
USER 2000
34+
35+
36+
37+
ENTRYPOINT exec /usr/local/bin/mongodb-enterprise-operator
38+
39+
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#
2+
# Base Template Dockerfile for Operator Image.
3+
#
4+
5+
ARG imagebase
6+
FROM ${imagebase} as base
7+
8+
FROM ubuntu:20.04
9+
10+
11+
LABEL name="MongoDB Enterprise Operator" \
12+
maintainer="support@mongodb.com" \
13+
vendor="MongoDB" \
14+
version="1.13.0" \
15+
release="1" \
16+
summary="MongoDB Enterprise Operator Image" \
17+
description="MongoDB Enterprise Operator Image"
18+
19+
20+
21+
# Adds up-to-date CA certificates.
22+
RUN apt-get -qq update && \
23+
apt-get -y -qq install ca-certificates curl && \
24+
apt-get upgrade -y -qq && \
25+
apt-get dist-upgrade -y -qq && \
26+
rm -rf /var/lib/apt/lists/*
27+
28+
29+
30+
31+
COPY --from=base /data/mongodb-enterprise-operator /usr/local/bin/mongodb-enterprise-operator
32+
COPY --from=base /data/om_version_mapping.json /usr/local/om_version_mapping.json
33+
COPY --from=base /data/licenses /licenses/
34+
35+
USER 2000
36+
37+
38+
39+
ENTRYPOINT exec /usr/local/bin/mongodb-enterprise-operator
40+
41+
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
ARG imagebase
2+
FROM ${imagebase} as base
3+
4+
FROM registry.access.redhat.com/ubi8/ubi
5+
6+
7+
LABEL name="MongoDB Enterprise Ops Manager" \
8+
maintainer="support@mongodb.com" \
9+
vendor="MongoDB" \
10+
version="4.2.26" \
11+
release="1" \
12+
summary="MongoDB Enterprise Ops Manager Image" \
13+
description="MongoDB Enterprise Ops Manager"
14+
15+
16+
ENV MMS_HOME /mongodb-ops-manager
17+
ENV MMS_PROP_FILE ${MMS_HOME}/conf/conf-mms.properties
18+
ENV MMS_CONF_FILE ${MMS_HOME}/conf/mms.conf
19+
ENV MMS_LOG_DIR ${MMS_HOME}/logs
20+
21+
EXPOSE 8080
22+
23+
# OpsManager docker image needs to have the MongoDB dependencies because the
24+
# backup daemon is running its database locally
25+
26+
RUN yum install --disableplugin=subscription-manager -y \
27+
cyrus-sasl \
28+
cyrus-sasl-gssapi \
29+
cyrus-sasl-plain \
30+
krb5-libs \
31+
libcurl \
32+
libpcap \
33+
lm_sensors-libs \
34+
net-snmp \
35+
net-snmp-agent-libs \
36+
openldap \
37+
openssl \
38+
rpm-libs \
39+
net-tools \
40+
procps-ng \
41+
ncurses
42+
43+
44+
COPY --from=base /data/licenses /licenses/
45+
46+
47+
48+
RUN curl --fail -L -o ops_manager.tar.gz https://downloads.mongodb.com/on-prem-mms/tar/mongodb-mms-4.2.26.57139.20210727T2031Z-1.x86_64.tar.gz \
49+
&& tar -xzf ops_manager.tar.gz \
50+
&& rm ops_manager.tar.gz \
51+
&& mv mongodb-mms-* "${MMS_HOME}"
52+
53+
54+
# permissions
55+
RUN chmod -R 0775 "${MMS_LOG_DIR}" \
56+
&& chmod -R 0775 "${MMS_HOME}/conf" \
57+
&& chmod -R 0775 "${MMS_HOME}/tmp" \
58+
&& mkdir "${MMS_HOME}/mongodb-releases/" \
59+
&& chmod -R 0775 "${MMS_HOME}/mongodb-releases"
60+
61+
USER 2000
62+
63+
# operator to change the entrypoint to: /mongodb-ops-manager/bin/mongodb-mms start_mms (or a wrapper around this)
64+
ENTRYPOINT [ "sleep infinity" ]
65+
66+

0 commit comments

Comments
 (0)