- Openshift Tutorials >
- Deploy in Restricted Networks
Deploy in Restricted Networks¶
This tutorial demonstrates how to deploy MongoDB Enterprise Operator, an Ops Manager instance, and a MongoDB replica set using the Kubernetes Operator in a restricted network OpenShift environment.
Procedure¶
Mirror the Operator catalog and disable the default catalog.¶
Red Hat Operator catalogs contain metadata that OLM queries to install Operators and their dependencies on a cluster. You must create a copy of the Operator catalog and then disable the default catalog as a cluster administrator.
The relatedImages
in the operator bundle lists the following
images:
- Images directly used by the operator, which are the current
version of
mongodb-enterprise-init-database-ubi
,mongodb-enterprise-init-ops-manager-ubi
,mongodb-enterprise-init-appdb-ubi
,mongodb-enterprise-init-database-ubi
. - All currently supported images of Ops Manager, AppDB and
mongodb-agent-ubi
that can be configured in an Ops Manager deployment.
For init
images, use only the version that is present in the
latest Kubernetes Operator version.
The size of all related images referenced by the operator bundle is over 26 GB.
Your mirroring command won’t pick unsupported versions of the AppDB images. If you want to use any other unsupported version, you must manually provide these images to the mirror registry. For other versions for a given operator version, see image for Deployment.
For the full list of images defined in the RELATED_IMAGE_*
environment variables, see the CSV
file.
To mirror, see Mirroring images for a disconnected installation.
When you run the
oc adm catalog mirror
command to mirror the catalog, it generates theimageContentSourcePolicy.yaml
file, which you must apply to remap original source to mirrored images. For example:To learn more, see Mirroring Operator catalogs for use with disconnected clusters. For a list of supported MongoDB versions for each Ops Manager version, see Compatible MongoDB Version.
To disable the default catalog, add
disableAllDefaultSources: true
to theOperatorHub
object.
To learn more, see Using Operator Lifecycle Manager on restricted networks.
Install the Kubernetes Operator.¶
To learn more, see:
Deploy Ops Manager in Local Mode.¶
To deploy Ops Manager in Local Mode, you must do the following:
Copy the following example Ops Manager Kubernetes object and save it as a
.yaml
file.- Use the Ops Manager configuration setting
automation.versions.source: local
inspec.configuration
to enable Local Mode. - Define a Persistent Volume for the Ops Manager StatefulSet to store the MongoDB installation archive. MongoDB Agents running in MongoDB database resource containers that you create with the Kubernetes Operator download the installation archives from Ops Manager instead of from the Internet.
To learn more about the settings, see Deploy an Ops Manager Resource.
- Use the Ops Manager configuration setting
Configure
oc
to default to your namespace.Copy the following Ops Manager resource settings, paste into your existing Ops Manager resource, and save your Ops Manager config file.
Copy the MongoDB installation archive to the Ops Manager Persistent Volume.
To learn how to copy MongoDB installation archive, see step 10 in the Configure an Ops Manager Resource to use Local Mode procedure.
Create credentials and store them as a secret.
Run the following command:
Note
Provide your public and private key values for the following parameters. To learn more, see Create Credentials for the Kubernetes Operator.
Create a ConfigMap similar to the following:
To learn more about the settings in the ConfigMap, see step 7 in the OpenShift Quick Start.
To learn more about deploying Ops Manager in Local Mode, see Configure an Ops Manager Resource to use Local Mode.
Deploy a MongoDB Database Resource.¶
You can Deploy a Replica Set or a Deploy a Sharded Cluster. To learn more, see Deploy a MongoDB Database Resource.