Skip to content

Commit a0cc410

Browse files
DOCSP-28103-a airgapped environment tutorial (#1288)
* parent e98a41e9df614305c8dcf74d03b727a80520c785 author Kanchana Sekhar <[email protected]> 1664200126 -0700 committer Kanchana Sekhar <[email protected]> 1681233229 -0700 DOCSP-25416 deploying OM/MDB in airgapped openshift environments tutorial Apply suggestions from code review Co-authored-by: John Williams <[email protected]> DOCSP-25416 updates for CR feedback DOCSP=25416 updates for feedback DOCSP-25416 another round of updates for feedback Apply suggestions from code review Co-authored-by: John Williams <[email protected]> DOCSP-25416 updates for JW feedback DOCSP-25416 updates for operator bundle size DOCSP-25416 latest round of revisions Update source/includes/steps-openshift-airgapped-env-tutorial.yaml Co-authored-by: dan-mckean <[email protected]> Update source/includes/steps-openshift-airgapped-env-tutorial.yaml Co-authored-by: John Williams <[email protected]> DOCSP-25416 updates for JW feedback DOCSP-25416 updates to add link DOCSP-28103 updates for changes suggested in the ticket DOCSP-28103 updates to the local mode installation step DOCSP-28103 updates for feedback Apply suggestions from code review Co-authored-by: John Williams <[email protected]> DOCSP-28103 updates for JW's feedback DOCSP=25416 updates for feedback DOCSP-25416 updates to add link (DOCSP-27047): Updated the resource image table with links to versions. (#1239) * (DOCSP-27047): Updated the resource image table with links to versions. * (DOCSP-27047): Incorporated JW's feedback. (DOCSP-25801) Fixed the steps for QS install TLS (#1246) * (DOCSP-25801) Fixed the steps for QS install TLS * Fix indentation * Fix indentation (DOCSP-26667)(DOCSP-26668): Clarify FCV behavior for DB resources & AppDB on OM resources (#1143) * (DOCSP-26667): AppDB will not change FCV automatically when upgrading version * (DOCSP-26668): Data Deployment will change FCV automatically when upgrading version * Fix link * Reword to avoid space in param name remove deprecated/unused files (#1250) (DOCSP-27430): Fixed cert-manager setup issues. (#1244) * (DOCSP-27430): Fixed cert-manager setup issues. * (DOCSP-27430): Incorporated Nam's feedback. * (DOCSP-27430): Incorporated Will's feedback. Fixed one ref and one bulleted list (#1254) DOCSP-28103 updates for LS's feedback DOCSP-28103 removed detailed steps for deploying OM in local mode * DOCSP-28103 redirects for prior versions * DOCSP-28103 updates for JW's feedback
1 parent e286003 commit a0cc410

File tree

6 files changed

+276
-1
lines changed

6 files changed

+276
-1
lines changed

conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@
261261
'npmjs' : ('https://www.npmjs.com/package%s',''),
262262
'osi' : ('https://opensource.org%s', ''),
263263
'osil' : ('https://opensource.org/licenses/%s', ''),
264+
'oshft-doc' : ('https://docs.openshift.com/container-platform/latest%s', ''),
264265
'cc' : ('http://creativecommons.org/licenses%s', ''),
265266
'tldrl' : ('https://www.tldrlegal.com/l/%s', ''),
266267
'aws': ('http://docs.aws.amazon.com%s', ''),

config/redirects

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,8 @@ raw: docs/kubernetes-operator/release-notes -> ${base}/stable/release-notes/
105105
[*]: docs/kubernetes-operator/${version}/tutorial/secure-om-with-tls -> ${base}/${version}/tutorial/deploy-om-container/
106106
[*]: docs/kubernetes-operator/${version}/tutorial/secure-tls -> ${base}/${version}/tutorial/deploy-replica-set/
107107
[*]: docs/kubernetes-operator/${version}/tutorial/multi-cluster-secure-tls -> ${base}/${version}/tutorial/mutli-cluster-quick-start-procedure/
108+
109+
# v1.18 and earlier - Add redirects for Airgapped Environment tutorial
110+
111+
[*-v1.18]: docs/kubernetes-operator/${version}/openshift-tutorials -> ${base}/
112+
[*-v1.18]: docs/kubernetes-operator/${version}/restricted-network-tutorial -> ${base}/
Lines changed: 231 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,231 @@
1+
---
2+
stepnum: 1
3+
level: 4
4+
ref: airgapped-env-tutorial-step1
5+
title: Mirror the Operator catalog and disable the default catalog.
6+
content: |
7+
Red Hat Operator catalogs contain metadata that :abbr:`OLM
8+
(Operator Lifecycle Manager)` queries to install Operators
9+
and their dependencies on a cluster. You must create a copy of
10+
the Operator catalog and then disable the default catalog as a
11+
cluster administrator.
12+
13+
The ``relatedImages`` in the operator bundle lists the following
14+
images:
15+
16+
- Images directly used by the operator, which are the current
17+
version of ``mongodb-enterprise-init-database-ubi``,
18+
``mongodb-enterprise-init-ops-manager-ubi``,
19+
``mongodb-enterprise-init-appdb-ubi``,
20+
``mongodb-enterprise-init-database-ubi``.
21+
- All currently supported images of |onprem|, AppDB and
22+
``mongodb-agent-ubi`` that can be configured in an |onprem|
23+
deployment.
24+
25+
For ``init`` images, use only the version that is present in the
26+
latest |k8s-op-short| version.
27+
28+
The size of all related images referenced by the operator bundle
29+
is over 26 GB.
30+
31+
Your mirroring command won't pick unsupported versions of the
32+
AppDB images. If you want to use any other unsupported version,
33+
you must manually provide these images to the mirror registry. For
34+
other versions for a given operator version, see `image for Deployment
35+
<https://github.com/mongodb/mongodb-enterprise-kubernetes/blob/master/mongodb-enterprise.yaml>`__.
36+
37+
For the full list of images defined in the ``RELATED_IMAGE_*``
38+
environment variables, see the :abbr:`CSV (cluster service versions)`
39+
`file <https://github.com/redhat-openshift-ecosystem/certified-operators/blob/main/operators/mongodb-enterprise/1.18.0/manifests/mongodb-enterprise.clusterserviceversion.yaml>`__.
40+
41+
a. To mirror, see :oshft-doc:`Mirroring images for a disconnected
42+
installation </installing/disconnected_install/installing-mirroring-installation-images.html#olm-mirroring-catalog_installing-mirroring-installation-images>`.
43+
44+
When you run the ``oc adm catalog mirror`` command to mirror the
45+
catalog, it generates the ``imageContentSourcePolicy.yaml`` file,
46+
which you must `apply <https://access.redhat.com/documentation/en-us/red_hat_openshift_container_storage/4.5/html/preparing_to_deploy_in_a_disconnected_environment/creating-operator-imagecontentsourcepolicy_rhocs>`__
47+
to remap original source to mirrored images. For example:
48+
49+
.. code-block:: shell
50+
51+
oc apply -f ./<output dir>/imageContentSourcePolicy.yaml
52+
53+
To learn more, see :oshft-doc:`Mirroring Operator catalogs for use
54+
with disconnected clusters
55+
</installing/disconnected_install/installing-mirroring-installation-images.html#olm-mirror-catalog_installing-mirroring-installation-images>`.
56+
For a list of supported MongoDB versions for each |onprem| version,
57+
see :opsmgr:`Compatible MongoDB Version
58+
</tutorial/prepare-backing-mongodb-instances/#use-a-compatible-mongodb-version>`.
59+
60+
#. To disable the default catalog, add
61+
``disableAllDefaultSources: true`` to the ``OperatorHub`` object.
62+
63+
To learn more, see :oshft-doc:`Using Operator Lifecycle Manager on
64+
restricted networks </operators/admin/olm-restricted-networks.html>`.
65+
66+
---
67+
stepnum: 2
68+
level: 4
69+
ref: airgapped-env-tutorial-step2
70+
title: Install the |k8s-op-short|.
71+
content: |
72+
To learn more, see:
73+
74+
- :ref:`plan-k8s-operator-install`
75+
- :ref:`install-k8s`
76+
77+
---
78+
stepnum: 3
79+
level: 4
80+
ref: airgapped-env-tutorial-step3
81+
title: "Deploy |onprem| in Local Mode."
82+
content: |
83+
84+
To deploy |onprem| in Local Mode, you must do the following:
85+
86+
a. Copy the following example |onprem| |k8s| |k8s-obj| and save it as
87+
a ``.yaml`` file.
88+
89+
- Use the |onprem| configuration setting
90+
``automation.versions.source: local`` in
91+
:opsmgrkube:`spec.configuration` to enable Local Mode.
92+
93+
- Define a |k8s-pv| for the |onprem| StatefulSet to store the
94+
MongoDB installation archive. {+mdbagent+}\s running in MongoDB
95+
database resource containers that you create with the |k8s-op-short|
96+
download the installation archives from |onprem| instead of from the
97+
Internet.
98+
99+
.. code-block:: yaml
100+
:linenos:
101+
102+
apiVersion: mongodb.com/v1
103+
kind: MongoDBOpsManager
104+
metadata:
105+
name: ops-manager-localmode
106+
spec:
107+
replicas: 2
108+
version: "6.0.0"
109+
adminCredentials: ops-manager-admin-secret
110+
configuration:
111+
# this enables local mode in Ops Manager
112+
automation.versions.source: local
113+
statefulSet:
114+
spec:
115+
# the Persistent Volume Claim will be created for each Ops Manager Pod
116+
volumeClaimTemplates:
117+
- metadata:
118+
name: mongodb-versions
119+
spec:
120+
accessModes: [ "ReadWriteOnce" ]
121+
resources:
122+
requests:
123+
storage: "20Gi"
124+
template:
125+
spec:
126+
containers:
127+
- name: mongodb-ops-manager
128+
volumeMounts:
129+
- name: mongodb-versions
130+
# this is the directory in each Pod where all MongoDB
131+
# archives must be put
132+
mountPath: /mongodb-ops-manager/mongodb-releases
133+
backup:
134+
enabled: false
135+
applicationDatabase:
136+
members: 3
137+
persistent: true
138+
139+
To learn more about the settings, see :ref:`deploy-om-container`.
140+
141+
#. Configure ``oc`` to default to your namespace.
142+
143+
.. code-block:: sh
144+
145+
oc config set-context $(oc config current-context) --namespace=<metadata.namespace>
146+
147+
#. Copy the following |onprem| resource settings, paste into
148+
your existing |onprem| resource, and save your |onprem| config
149+
file.
150+
151+
.. code-block:: yaml
152+
:linenos:
153+
154+
configuration:
155+
# this enables local mode in Ops Manager
156+
automation.versions.source: local
157+
statefulSet:
158+
spec:
159+
# the Persistent Volume Claim will be created for each Ops Manager Pod
160+
volumeClaimTemplates:
161+
- metadata:
162+
name: mongodb-versions
163+
spec:
164+
accessModes: [ "ReadWriteOnce" ]
165+
resources:
166+
requests:
167+
storage: "20Gi"
168+
template:
169+
spec:
170+
containers:
171+
- name: mongodb-ops-manager
172+
volumeMounts:
173+
- name: mongodb-versions
174+
# this is the directory in each Pod where all MongoDB
175+
# archives must be put
176+
mountPath: /mongodb-ops-manager/mongodb-releases
177+
178+
#. Copy the MongoDB installation archive to the |onprem| Persistent
179+
Volume.
180+
181+
To learn how to copy MongoDB installation archive, see step 10 in
182+
the :ref:`Configure an Ops Manager Resource to use Local Mode
183+
<deploy-om-container-local-mode>` procedure.
184+
185+
#. Create credentials and store them as a secret.
186+
187+
Run the following command:
188+
189+
.. note::
190+
191+
Provide your public and private key values for the following
192+
parameters. To learn more, see :ref:`create-k8s-credentials`.
193+
194+
.. code-block:: sh
195+
196+
oc \
197+
create secret generic ops-manager-admin-key \
198+
--from-literal="publicKey=<publicKey>" \
199+
--from-literal="privateKey=<privateKey>"
200+
201+
#. Create a ConfigMap similar to the following:
202+
203+
.. code-block:: sh
204+
205+
cat <<EOF | oc apply -f -
206+
apiVersion: v1
207+
kind: ConfigMap
208+
metadata:
209+
name: my-project
210+
namespace: mongodb
211+
data:
212+
projectName: myProjectName # this is an optional parameter
213+
orgId: 5b890e0feacf0b76ff3e7183 # this is an optional parameter
214+
baseUrl: https://ops.example.com:8443
215+
EOF
216+
217+
To learn more about the settings in the ConfigMap, see step 7 in
218+
the :ref:`openshift-quick-start-ref`.
219+
220+
To learn more about deploying |onprem| in Local Mode, see
221+
:ref:`deploy-om-container-local-mode`.
222+
223+
---
224+
stepnum: 4
225+
level: 4
226+
ref: airgapped-env-tutorial-step4
227+
title: Deploy a MongoDB Database Resource.
228+
content: |
229+
You can :ref:`deploy-replica-set` or a :ref:`deploy-sharded-cluster`.
230+
To learn more, see :ref:`k8s-deploy-mdb-resources`.
231+
...

source/index.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ optimal performance.
5050
:titlesonly:
5151

5252
Quick Start </kind-quick-start>
53-
OpenShift Quick Start </openshift-quick-start>
53+
OpenShift Tutorials </openshift-tutorials>
5454
Kubernetes Operator Architecture </tutorial/plan-k8s-op-architecture>
5555
Install the Operator </installation>
5656
Deploy Ops Manager Resources </om-resources>

source/openshift-tutorials.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.. _k8s-operator-openshift-tutorials:
2+
3+
:noprevnext:
4+
5+
======================================
6+
Openshift Tutorials
7+
======================================
8+
9+
.. default-domain:: mongodb
10+
11+
This section contains the following:
12+
13+
- :ref:`openshift-quick-start-ref`
14+
- :ref:`openshift-restricted-network-tutorial`
15+
16+
.. class:: hidden
17+
18+
.. toctree::
19+
:titlesonly:
20+
21+
Quick Start </openshift-quick-start>
22+
Deploy in Restricted Network Environment </tutorial/restricted-network-tutorial>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
.. _openshift-restricted-network-tutorial:
2+
3+
=============================
4+
Deploy in Restricted Networks
5+
=============================
6+
7+
.. default-domain:: mongodb
8+
9+
This tutorial demonstrates how to deploy MongoDB Enterprise Operator,
10+
an |onprem| instance, and a MongoDB replica set using the
11+
|k8s-op-short| in a restricted network OpenShift environment.
12+
13+
Procedure
14+
---------
15+
16+
.. include:: /includes/steps/openshift-airgapped-env-tutorial.rst

0 commit comments

Comments
 (0)