Skip to content

Commit

Permalink
Kubernetes Enterprise Operator Release 1.22.0 (#263)
Browse files Browse the repository at this point in the history

Co-authored-by: nam <[email protected]>
  • Loading branch information
mms-build-account and nammn committed Sep 21, 2023
1 parent 76b4155 commit 042bf91
Show file tree
Hide file tree
Showing 10 changed files with 310 additions and 14 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.idea
*.iml
.DS_Store
98 changes: 91 additions & 7 deletions crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2011,29 +2011,75 @@ spec:
applicationDatabase:
properties:
additionalMongodConfig:
description: 'AdditionalMongodConfig is additional configuration
description: 'AdditionalMongodConfig are additional configurations
that can be passed to each data-bearing mongod at runtime. Uses
the same structure as the mongod configuration file: https://docs.mongodb.com/manual/reference/configuration-options/'
type: object
x-kubernetes-preserve-unknown-fields: true
agent:
description: specify startup flags for the AutomationAgent and
MonitoringAgent
description: specify configuration like startup flags and automation
config settings for the AutomationAgent and MonitoringAgent
properties:
logLevel:
type: string
logRotate:
description: LogRotate if enabled, will enable LogRotate for
all processes.
properties:
includeAuditLogsWithMongoDBLogs:
description: set to 'true' to have the Automation Agent
rotate the audit files along with mongodb log files
type: boolean
numTotal:
description: maximum number of log files to have total
type: integer
numUncompressed:
description: maximum number of log files to leave uncompressed
type: integer
percentOfDiskspace:
description: Maximum percentage of the total disk space
these log files should take up. The string needs to
be able to be converted to float64
type: string
sizeThresholdMB:
description: Maximum size for an individual log file before
rotation. The string needs to be able to be converted
to float64. Fractional values of MB are supported.
type: string
timeThresholdHrs:
description: maximum hours for an individual log file
before rotation
type: integer
required:
- sizeThresholdMB
- timeThresholdHrs
type: object
maxLogFileDurationHours:
type: integer
startupOptions:
additionalProperties:
type: string
type: object
systemLog:
description: SystemLog configures system log of mongod
properties:
destination:
type: string
logAppend:
type: boolean
path:
type: string
required:
- destination
- logAppend
- path
type: object
type: object
automationConfig:
description: AutomationConfigOverride holds any fields that will
be merged on top of the Automation Config that the operator
creates for the AppDB. Currently only the process.disabled field
is recognized.
creates for the AppDB. Currently only the process.disabled and
logRotate field is recognized.
properties:
processes:
items:
Expand All @@ -2042,6 +2088,43 @@ spec:
properties:
disabled:
type: boolean
logRotate:
description: CrdLogRotate is the crd definition of LogRotate
including fields in strings while the agent supports
them as float64
properties:
includeAuditLogsWithMongoDBLogs:
description: set to 'true' to have the Automation
Agent rotate the audit files along with mongodb
log files
type: boolean
numTotal:
description: maximum number of log files to have
total
type: integer
numUncompressed:
description: maximum number of log files to leave
uncompressed
type: integer
percentOfDiskspace:
description: Maximum percentage of the total disk
space these log files should take up. The string
needs to be able to be converted to float64
type: string
sizeThresholdMB:
description: Maximum size for an individual log
file before rotation. The string needs to be able
to be converted to float64. Fractional values
of MB are supported.
type: string
timeThresholdHrs:
description: maximum hours for an individual log
file before rotation
type: integer
required:
- sizeThresholdMB
- timeThresholdHrs
type: object
name:
type: string
required:
Expand Down Expand Up @@ -2206,8 +2289,9 @@ spec:
minimum: 3
type: integer
monitoringAgent:
description: specify startup flags for just the MonitoringAgent.
These take precedence over the flags set in AutomationAgent
description: Specify configuration like startup flags just for
the MonitoringAgent. These take precedence over the flags set
in AutomationAgent
properties:
logLevel:
type: string
Expand Down
35 changes: 35 additions & 0 deletions dockerfiles/mongodb-enterprise-init-appdb/1.0.18/ubi/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
ARG imagebase
FROM ${imagebase} as base

FROM registry.access.redhat.com/ubi8/ubi-minimal

ARG version
LABEL name="MongoDB Enterprise Init AppDB" \
version="mongodb-enterprise-init-appdb-${version}" \
summary="MongoDB Enterprise AppDB Init Image" \
description="Startup Scripts for MongoDB Enterprise Application Database for Ops Manager" \
release="1" \
vendor="MongoDB" \
maintainer="[email protected]"

COPY --from=base /data/readinessprobe /probes/readinessprobe
COPY --from=base /data/probe.sh /probes/probe.sh
COPY --from=base /data/scripts/ /scripts/
COPY --from=base /data/licenses /licenses/
COPY --from=base /data/version-upgrade-hook /probes/version-upgrade-hook


RUN microdnf update --nodocs \
&& microdnf -y install --nodocs tar gzip \
&& microdnf clean all

COPY --from=base /data/mongodb_tools_ubi.tgz /tools/mongodb_tools.tgz


RUN tar xfz /tools/mongodb_tools.tgz --directory /tools \
&& rm /tools/mongodb_tools.tgz

USER 2000
ENTRYPOINT [ "/bin/cp", "-f", "-r", "/scripts/agent-launcher.sh", "/scripts/agent-launcher-lib.sh", "/probes/readinessprobe", "/probes/probe.sh", "/tools", "/opt/scripts/" ]


34 changes: 34 additions & 0 deletions dockerfiles/mongodb-enterprise-init-database/1.0.18/ubi/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
ARG imagebase
FROM ${imagebase} as base

FROM registry.access.redhat.com/ubi8/ubi-minimal

ARG version
LABEL name="MongoDB Enterprise Init Database" \
version="mongodb-enterprise-init-database-${version}" \
summary="MongoDB Enterprise Database Init Image" \
description="Startup Scripts for MongoDB Enterprise Database" \
release="1" \
vendor="MongoDB" \
maintainer="[email protected]"

COPY --from=base /data/readinessprobe /probes/readinessprobe
COPY --from=base /data/probe.sh /probes/probe.sh
COPY --from=base /data/scripts/ /scripts/
COPY --from=base /data/licenses /licenses/


RUN microdnf update --nodocs \
&& microdnf -y install --nodocs tar gzip \
&& microdnf clean all

COPY --from=base /data/mongodb_tools_ubi.tgz /tools/mongodb_tools.tgz


RUN tar xfz /tools/mongodb_tools.tgz --directory /tools \
&& rm /tools/mongodb_tools.tgz

USER 2000
ENTRYPOINT [ "/bin/cp", "-f", "-r", "/scripts/agent-launcher.sh", "/scripts/agent-launcher-lib.sh", "/probes/readinessprobe", "/probes/probe.sh", "/tools", "/opt/scripts/" ]


Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
ARG imagebase
FROM ${imagebase} as base

FROM registry.access.redhat.com/ubi8/ubi-minimal

LABEL name="MongoDB Enterprise Ops Manager Init" \
maintainer="[email protected]" \
vendor="MongoDB" \
version="mongodb-enterprise-init-ops-manager-1.0.12" \
release="1" \
summary="MongoDB Enterprise Ops Manager Init Image" \
description="Startup Scripts for MongoDB Enterprise Ops Manager"


COPY --from=base /data/scripts /scripts
COPY --from=base /data/licenses /licenses


RUN microdnf update --nodocs \
&& microdnf clean all


USER 2000
ENTRYPOINT [ "/bin/cp", "-f", "/scripts/docker-entry-point.sh", "/scripts/backup-daemon-liveness-probe.sh", "/scripts/mmsconfiguration", "/scripts/backup-daemon-readiness-probe", "/opt/scripts/" ]


39 changes: 39 additions & 0 deletions dockerfiles/mongodb-enterprise-operator/1.22.0/ubi/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#
# Base Template Dockerfile for Operator Image.
#

ARG imagebase
FROM ${imagebase} as base

FROM registry.access.redhat.com/ubi8/ubi-minimal


LABEL name="MongoDB Enterprise Operator" \
maintainer="[email protected]" \
vendor="MongoDB" \
version="1.22.0" \
release="1" \
summary="MongoDB Enterprise Operator Image" \
description="MongoDB Enterprise Operator Image"


# Building an UBI-based image: https://red.ht/3n6b9y0
RUN microdnf update \
--disableplugin=subscription-manager \
--disablerepo=* --enablerepo=ubi-8-appstream-rpms --enablerepo=ubi-8-baseos-rpms -y \
&& rm -rf /var/cache/yum




COPY --from=base /data/mongodb-enterprise-operator /usr/local/bin/mongodb-enterprise-operator
COPY --from=base /data/om_version_mapping.json /usr/local/om_version_mapping.json
COPY --from=base /data/licenses /licenses/

USER 2000



ENTRYPOINT exec /usr/local/bin/mongodb-enterprise-operator


75 changes: 75 additions & 0 deletions dockerfiles/mongodb-enterprise-ops-manager/6.0.18/ubi/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
ARG imagebase
FROM ${imagebase} as base

FROM registry.access.redhat.com/ubi8/ubi-minimal


LABEL name="MongoDB Enterprise Ops Manager" \
maintainer="[email protected]" \
vendor="MongoDB" \
version="6.0.18" \
release="1" \
summary="MongoDB Enterprise Ops Manager Image" \
description="MongoDB Enterprise Ops Manager"


ENV MMS_HOME /mongodb-ops-manager
ENV MMS_PROP_FILE ${MMS_HOME}/conf/conf-mms.properties
ENV MMS_CONF_FILE ${MMS_HOME}/conf/mms.conf
ENV MMS_LOG_DIR ${MMS_HOME}/logs
ENV MMS_TMP_DIR ${MMS_HOME}/tmp

EXPOSE 8080

# OpsManager docker image needs to have the MongoDB dependencies because the
# backup daemon is running its database locally

RUN microdnf install --disableplugin=subscription-manager -y \
cyrus-sasl \
cyrus-sasl-gssapi \
cyrus-sasl-plain \
krb5-libs \
libcurl \
libpcap \
lm_sensors-libs \
net-snmp \
net-snmp-agent-libs \
openldap \
openssl \
tar \
rpm-libs \
net-tools \
procps-ng \
ncurses


COPY --from=base /data/licenses /licenses/



RUN curl --fail -L -o ops_manager.tar.gz https://downloads.mongodb.com/on-prem-mms/tar/mongodb-mms-6.0.18.100.20230905T1424Z.tar.gz \
&& tar -xzf ops_manager.tar.gz \
&& rm ops_manager.tar.gz \
&& mv mongodb-mms* "${MMS_HOME}"


# permissions
RUN chmod -R 0777 "${MMS_LOG_DIR}" \
&& chmod -R 0777 "${MMS_TMP_DIR}" \
&& chmod -R 0775 "${MMS_HOME}/conf" \
&& chmod -R 0775 "${MMS_HOME}/jdk" \
&& mkdir "${MMS_HOME}/mongodb-releases/" \
&& chmod -R 0775 "${MMS_HOME}/mongodb-releases" \
&& chmod -R 0777 "${MMS_CONF_FILE}" \
&& chmod -R 0777 "${MMS_PROP_FILE}"

# The "${MMS_HOME}/conf" will be populated by the docker-entry-point.sh.
# For now we need to move into the templates directory.
RUN cp -r "${MMS_HOME}/conf" "${MMS_HOME}/conf-template"

USER 2000

# operator to change the entrypoint to: /mongodb-ops-manager/bin/mongodb-mms start_mms (or a wrapper around this)
ENTRYPOINT [ "sleep infinity" ]


2 changes: 1 addition & 1 deletion mongodb-enterprise-multi-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ spec:
runAsUser: 2000
containers:
- name: mongodb-enterprise-operator-multi-cluster
image: "quay.io/mongodb/mongodb-enterprise-operator-ubi:1.21.0"
image: "quay.io/mongodb/mongodb-enterprise-operator-ubi:1.22.0"
imagePullPolicy: Always
args:
- -watch-resource=mongodb
Expand Down
Loading

0 comments on commit 042bf91

Please sign in to comment.