Skip to content

Commit e62f0bc

Browse files
authored
Merge pull request #184 from chatton/master
2 parents 157d9a5 + 7d19aa1 commit e62f0bc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1323
-57
lines changed

crds.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1475,6 +1475,11 @@ spec:
14751475
items:
14761476
type: string
14771477
type: array
1478+
members:
1479+
description: Members indicate the number of backup daemon pods
1480+
to create.
1481+
minimum: 1
1482+
type: integer
14781483
opLogStores:
14791484
description: OplogStoreConfigs describes the list of oplog store
14801485
configs used for backup
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.1" \
10+
summary="MongoDB Enterprise Database Image" \
11+
description="MongoDB Enterprise Database Image" \
12+
vendor="MongoDB" \
13+
release="1" \
14+
maintainer="[email protected]"
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: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
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.1" \
10+
summary="MongoDB Enterprise Database Image" \
11+
description="MongoDB Enterprise Database Image" \
12+
vendor="MongoDB" \
13+
release="1" \
14+
maintainer="[email protected]"
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+
lsb-release \
40+
openssl \
41+
snmp \
42+
libnss-wrapper \
43+
&& apt-get upgrade -y -qq \
44+
&& apt-get dist-upgrade -y -qq \
45+
&& rm -rf /var/lib/apt/lists/*
46+
47+
48+
# Set the required perms
49+
RUN mkdir -p "${MMS_LOG_DIR}" \
50+
&& chmod 0775 "${MMS_LOG_DIR}" \
51+
&& mkdir -p /var/lib/mongodb-mms-automation \
52+
&& chmod 0775 /var/lib/mongodb-mms-automation \
53+
&& mkdir -p /data \
54+
&& chmod 0775 /data \
55+
&& mkdir -p /journal \
56+
&& chmod 0775 /journal \
57+
&& mkdir -p "${MMS_HOME}" \
58+
&& chmod -R 0775 "${MMS_HOME}"
59+
60+
61+
62+
63+
# USER needs to be set for this image to pass RedHat verification. Some customers have these requirements as well
64+
# It does not matter what number it is, as long as it is set to something.
65+
# However, OpenShift will run the container as a random user,
66+
# and the number in this configuration is not relevant.
67+
USER 2000
68+
69+
70+
# The docker image doesn't have any scripts so by default does nothing
71+
# The script will be copied in runtime from init containers and the operator is expected
72+
# to override the COMMAND
73+
ENTRYPOINT ["sleep infinity"]
74+
75+
76+
COPY --from=base /data/licenses/mongodb-enterprise-database /licenses/mongodb-enterprise-database
77+
78+
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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 AppDB" \
8+
version="mongodb-enterprise-init-appdb-${version}" \
9+
summary="MongoDB Enterprise AppDB Init Image" \
10+
description="Startup Scripts for MongoDB Enterprise Application Database for Ops Manager" \
11+
release="1" \
12+
vendor="MongoDB" \
13+
maintainer="[email protected]"
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+
COPY --from=base /data/version-upgrade-hook /probes/version-upgrade-hook
20+
21+
22+
RUN microdnf update --nodocs \
23+
&& microdnf -y install --nodocs tar gzip \
24+
&& microdnf clean all
25+
26+
COPY --from=base /data/mongodb_tools_ubi.tgz /tools/mongodb_tools.tgz
27+
28+
29+
RUN tar xfz /tools/mongodb_tools.tgz --directory /tools \
30+
&& rm /tools/mongodb_tools.tgz
31+
32+
USER 2000
33+
ENTRYPOINT [ "/bin/cp", "-f", "-r", "/scripts/agent-launcher.sh", "/scripts/agent-launcher-lib.sh", "/probes/readinessprobe", "/probes/probe.sh", "/tools", "/opt/scripts/" ]
34+
35+
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
ARG imagebase
2+
FROM ${imagebase} as base
3+
4+
FROM busybox
5+
6+
ARG version
7+
LABEL name="MongoDB Enterprise Init AppDB" \
8+
version="mongodb-enterprise-init-appdb-${version}" \
9+
summary="MongoDB Enterprise AppDB Init Image" \
10+
description="Startup Scripts for MongoDB Enterprise Application Database for Ops Manager" \
11+
release="1" \
12+
vendor="MongoDB" \
13+
maintainer="[email protected]"
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+
COPY --from=base /data/version-upgrade-hook /probes/version-upgrade-hook
20+
21+
22+
COPY --from=base /data/mongodb_tools_ubuntu.tgz /tools/mongodb_tools.tgz
23+
24+
25+
RUN tar xfz /tools/mongodb_tools.tgz --directory /tools \
26+
&& rm /tools/mongodb_tools.tgz
27+
28+
USER 2000
29+
ENTRYPOINT [ "/bin/cp", "-f", "-r", "/scripts/agent-launcher.sh", "/scripts/agent-launcher-lib.sh", "/probes/readinessprobe", "/probes/probe.sh", "/tools", "/opt/scripts/" ]
30+
31+
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="[email protected]"
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="[email protected]"
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: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
ARG imagebase
2+
FROM ${imagebase} as base
3+
4+
FROM registry.access.redhat.com/ubi8/ubi-minimal
5+
6+
LABEL name="MongoDB Enterprise Ops Manager Init" \
7+
maintainer="[email protected]" \
8+
vendor="MongoDB" \
9+
version="mongodb-enterprise-init-ops-manager-1.0.5" \
10+
release="1" \
11+
summary="MongoDB Enterprise Ops Manager Init Image" \
12+
description="Startup Scripts for MongoDB Enterprise Ops Manager"
13+
14+
15+
COPY --from=base /data/scripts /scripts
16+
COPY --from=base /data/licenses /licenses
17+
18+
19+
RUN microdnf update --nodocs \
20+
&& microdnf clean all
21+
22+
23+
USER 2000
24+
ENTRYPOINT [ "/bin/cp", "-f", "/scripts/docker-entry-point.sh", "/scripts/backup-daemon-liveness-probe.sh", "/scripts/mmsconfiguration", "/scripts/backup-daemon-readiness-probe", "/opt/scripts/" ]
25+
26+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
ARG imagebase
2+
FROM ${imagebase} as base
3+
4+
FROM busybox
5+
6+
LABEL name="MongoDB Enterprise Ops Manager Init" \
7+
maintainer="[email protected]" \
8+
vendor="MongoDB" \
9+
version="mongodb-enterprise-init-ops-manager-1.0.5" \
10+
release="1" \
11+
summary="MongoDB Enterprise Ops Manager Init Image" \
12+
description="Startup Scripts for MongoDB Enterprise Ops Manager"
13+
14+
15+
COPY --from=base /data/scripts /scripts
16+
COPY --from=base /data/licenses /licenses
17+
18+
19+
20+
21+
USER 2000
22+
ENTRYPOINT [ "/bin/cp", "-f", "/scripts/docker-entry-point.sh", "/scripts/backup-daemon-liveness-probe.sh", "/scripts/mmsconfiguration", "/scripts/backup-daemon-readiness-probe", "/opt/scripts/" ]
23+
24+

0 commit comments

Comments
 (0)