UNCLASSIFIED

Commit aaed77d7 authored by Andy Maksymowicz's avatar Andy Maksymowicz
Browse files

Merge branch 'development' into 'master'

Development

See merge request !4
parents b971150c a2e993bc
Pipeline #184156 failed with stages
in 39 seconds
# Dockerfile for Ops Manager init container.
ARG BASE_REGISTRY=registry1.dsop.io
ARG BASE_IMAGE=redhat/ubi/ubi7
ARG BASE_TAG=7.8
ARG VERSION=1.0.0
FROM quay.io/mongodb/mongodb-enterprise-init-ops-manager:${VERSION} as official
FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG}
LABEL name="MongoDB Enterprise Ops Manager Init" \
maintainer="support@mongodb.com" \
vendor="MongoDB" \
version="mongodb-enterprise-init-ops-manager-${VERSION}" \
release="1" \
summary="MongoDB Enterprise Ops Manager Init Image" \
description="Startup Scripts for MongoDB Enterprise Ops Manager"
COPY --from=official /scripts/mmsconfiguration /scripts/
COPY --from=official /licenses/mongodb-enterprise-ops-manager /licenses/
COPY ./scripts/docker-entry-point.sh /scripts/
USER 2000
ENTRYPOINT [ "/bin/cp", "-f", "/scripts/docker-entry-point.sh", "/scripts/mmsconfiguration", "/opt/scripts/" ]
HEALTHCHECK --timeout=30s CMD ls /scripts/docker-entry-point.sh || exit 1
@Library('DCCSCR@master') _
dccscrPipeline(version: "1.0.1")
Usage of the MongoDB Enterprise Operator for Kubernetes indicates
agreement with the MongoDB Development, Test, and Evaluation Agreement
* https://www.mongodb.com/legal/evaluation-agreement
# MongoDB Ops Manager Init
# MongoDB Enterprise Ops Manager - Init Container #
Init container for MongoDB Enterprise Ops Manager. This container image is used exclusively by the MongoDB Enterprise Kubernetes Operator to deploy MongoDB Ops Manager to Kubernetes or OpenShift clusters.
For more information about MongoDB Ops Manager, please visit <https://www.mongodb.com/products/ops-manager>.
Information about MongoDB can be found at <https://www.mongodb.com>.
## Documentation ##
Documentation for MongoDB Ops Manager is available at <https://docs.opsmanager.mongodb.com/current/>.
Documentation for the MongoDB Enterprise Kubernetes Operator is available at <https://docs.mongodb.com/kubernetes-operator>.
{
"resources": [
{
"url": "docker://quay.io/mongodb/mongodb-enterprise-init-ops-manager@sha256:3577d0279a4a6fa409374d5a11a986ea93bf015a998fffe8a78de4d78c3e6b0d",
"tag": "quay.io/mongodb/mongodb-enterprise-init-ops-manager:1.0.0"
}
]
}
#!/usr/bin/env bash
set -euo pipefail
# the function reacting on SIGTERM command sent by the container on its shutdown. Redirects the signal
# to the child process ("tail" in this case)
cleanup () {
echo "Caught SIGTERM signal."
kill -TERM "$child"
}
# we need to change the Home directory for current bash so that the gen key was found correctly
# (the key is searched in "${HOME}/.mongodb-mms/gen.key")
HOME=${MMS_HOME}
# Execute script that updates properties and conf file used to start ops manager
echo "Updating configuration properties file ${MMS_PROP_FILE} and conf file ${MMS_CONF_FILE}"
/opt/scripts/mmsconfiguration ${MMS_CONF_FILE} ${MMS_PROP_FILE}
if [[ -z ${BACKUP_DAEMON+x} ]]; then
echo "Starting Ops Manager"
${MMS_HOME}/bin/mongodb-mms start_mms || {
echo "Startup of Ops Manager failed with code $?"
if [[ -f ${MMS_LOG_DIR}/mms0-startup.log ]]; then
echo
echo "mms0-startup.log:"
echo
cat "${MMS_LOG_DIR}/mms0-startup.log"
fi
if [[ -f ${MMS_LOG_DIR}/mms0.log ]]; then
echo
echo "mms0.log:"
echo
cat "${MMS_LOG_DIR}/mms0.log"
fi
if [[ -f ${MMS_LOG_DIR}/mms-migration.log ]]; then
echo
echo "mms-migration.log"
echo
cat "${MMS_LOG_DIR}/mms-migration.log"
fi
exit 1
}
trap cleanup SIGTERM
tail -F -n 1000 "${MMS_LOG_DIR}/mms0.log" "${MMS_LOG_DIR}/mms0-startup.log" "${MMS_LOG_DIR}/mms-migration.log" &
else
echo "Starting Ops Manager Backup Daemon"
${MMS_HOME}/bin/mongodb-mms start_backup_daemon
trap cleanup SIGTERM
tail -F "${MMS_LOG_DIR}/daemon.log" &
fi
child=$!
wait "$child"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment