|
| 1 | +--- |
| 2 | +ref: configure-kubectl-om |
| 3 | +stepnum: 1 |
| 4 | +inherit: |
| 5 | + file: steps-configure-kubectl-namespace.yaml |
| 6 | + ref: configure-kubectl-namespace |
| 7 | +--- |
| 8 | +title: "Copy the highlighted fields of this |onprem| resource." |
| 9 | +stepnum: 2 |
| 10 | +level: 4 |
| 11 | +ref: copy-k8s-example |
| 12 | +content: | |
| 13 | +
|
| 14 | + The highlighted section: |
| 15 | +
|
| 16 | + - Uses the |onprem| configuration setting |
| 17 | + ``automation.versions.source: local`` in |
| 18 | + :opsmgrkube:`spec.configuration` to enable Local Mode. |
| 19 | +
|
| 20 | + - Defines a |k8s-pv| for the |onprem| StatefulSet to store the |
| 21 | + MongoDB installation tarball. MongoDB database resources |
| 22 | + you create with the |k8s-op-short| download these tarballs from the |
| 23 | + Persistent Volumes instead of from the Internet. |
| 24 | +
|
| 25 | + .. literalinclude:: /reference/k8s/example-opsmgr-local-mode.yaml |
| 26 | + :language: yaml |
| 27 | + :linenos: |
| 28 | + :emphasize-lines: 9-32 |
| 29 | +
|
| 30 | +--- |
| 31 | +title: "Paste the copied example section into your existing |onprem| resource." |
| 32 | +stepnum: 3 |
| 33 | +level: 4 |
| 34 | +ref: paste-k8s-example |
| 35 | +content: | |
| 36 | +
|
| 37 | + Open your preferred text editor and paste the |k8s-obj| |
| 38 | + specification into the appropriate location in your resource file. |
| 39 | +--- |
| 40 | +title: "Save your |onprem| config file." |
| 41 | +stepnum: 4 |
| 42 | +level: 4 |
| 43 | +ref: save-object-spec |
| 44 | + |
| 45 | +--- |
| 46 | +title: "Apply changes to your |onprem| deployment." |
| 47 | +stepnum: 5 |
| 48 | +level: 4 |
| 49 | +ref: apply-changes-om-k8s |
| 50 | +content: | |
| 51 | +
|
| 52 | + Invoke the following ``kubectl`` command on the filename of the |
| 53 | + |onprem| resource definition: |
| 54 | +
|
| 55 | + .. code-block:: sh |
| 56 | +
|
| 57 | + kubectl apply -f <opsmgr-resource>.yaml |
| 58 | +
|
| 59 | +--- |
| 60 | +title: "Track the status of your |onprem| instance." |
| 61 | +stepnum: 6 |
| 62 | +level: 4 |
| 63 | +ref: track-k8s-instance |
| 64 | +content: | |
| 65 | +
|
| 66 | + To check the status of your |onprem| resource, invoke the following |
| 67 | + command: |
| 68 | +
|
| 69 | + .. code-block:: sh |
| 70 | +
|
| 71 | + kubectl get om -o yaml -w |
| 72 | +
|
| 73 | + See :doc:`/reference/troubleshooting` for information about the |
| 74 | + resource deployment statuses. |
| 75 | +
|
| 76 | + After the |onprem| resource completes the ``Reconciling`` phase, the |
| 77 | + command returns output similar to the following: |
| 78 | +
|
| 79 | + .. literalinclude:: /reference/k8s/example-status-om-running-local-mode.yaml |
| 80 | + :language: yaml |
| 81 | + :copyable: false |
| 82 | + :linenos: |
| 83 | + :emphasize-lines: 12,14 |
| 84 | +
|
| 85 | + Copy the value of the ``status.opsManager.url`` field, which states |
| 86 | + the resource's connection |url|. You use this value when you create a |
| 87 | + |k8s-configmap| later in the procedure. |
| 88 | +--- |
| 89 | +title: "Download the MongoDB installation tarball to your local machine." |
| 90 | +level: 4 |
| 91 | +ref: download-mdb-tarball |
| 92 | +stepnum: 7 |
| 93 | +content: | |
| 94 | +
|
| 95 | + The installer you download depends on the environment to which |
| 96 | + you deployed the operator: |
| 97 | +
|
| 98 | + .. tabs:: |
| 99 | +
|
| 100 | + .. tab:: Vanilla Kubernetes |
| 101 | + :tabid: k8s |
| 102 | +
|
| 103 | + Download the Ubuntu 16.04 installer for the MongoDB version you |
| 104 | + want the |k8s-op-short| to deploy. For example, to download the |
| 105 | + ``4.2.0`` release: |
| 106 | +
|
| 107 | + .. code-block:: sh |
| 108 | +
|
| 109 | + curl -OL https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1604-4.2.0.tgz |
| 110 | +
|
| 111 | + .. tab:: OpenShift |
| 112 | + :tabid: os |
| 113 | +
|
| 114 | + Download the RHEL 7 installer for the MongoDB version you |
| 115 | + want the |k8s-op-short| to deploy. For example, to download the |
| 116 | + ``4.2.0`` release: |
| 117 | +
|
| 118 | + .. code-block:: sh |
| 119 | +
|
| 120 | + curl -OL https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel70-4.2.0.tgz |
| 121 | +
|
| 122 | +--- |
| 123 | + |
| 124 | +title: "Copy the MongoDB installation tarball to the |onprem| Persistent Volume for each |onprem| :opsmgrkube:`replica <spec.replicas>` you deployed." |
| 125 | +level: 4 |
| 126 | +ref: copy-mdb-tarball |
| 127 | +stepnum: 8 |
| 128 | +content: | |
| 129 | +
|
| 130 | + The command you use depends on the environment to which you deployed |
| 131 | + the operator: |
| 132 | +
|
| 133 | + .. note:: |
| 134 | +
|
| 135 | + Only copy the MongoDB installation file to ``Replica 1`` and beyond |
| 136 | + if you deployed more than one |onprem| :opsmgrkube:`replica |
| 137 | + <spec.replicas>`. |
| 138 | +
|
| 139 | + .. tabs:: |
| 140 | +
|
| 141 | + .. tab:: Vanilla Kubernetes |
| 142 | + :tabid: k8s |
| 143 | +
|
| 144 | + To copy the MongoDB ``4.2.0`` installation tarball to the |
| 145 | + |onprem| PersistentVolume: |
| 146 | +
|
| 147 | + Replica 0: |
| 148 | +
|
| 149 | + .. code-block:: sh |
| 150 | +
|
| 151 | + kubectl cp mongodb-linux-x86_64-ubuntu1604-4.2.0.tgz \ |
| 152 | + "ops-manager-localmode-0:/mongodb-ops-manager/mongodb-releases/mongodb-linux-x86_64-ubuntu1604-4.2.0.tgz" |
| 153 | +
|
| 154 | + Replica 1: |
| 155 | +
|
| 156 | + .. code-block:: sh |
| 157 | +
|
| 158 | + kubectl cp mongodb-linux-x86_64-ubuntu1604-4.2.0.tgz \ |
| 159 | + "ops-manager-localmode-1:/mongodb-ops-manager/mongodb-releases/mongodb-linux-x86_64-ubuntu1604-4.2.0.tgz" |
| 160 | +
|
| 161 | + .. tab:: OpenShift |
| 162 | + :tabid: os |
| 163 | +
|
| 164 | + To copy the MongoDB ``4.2.0`` installation tarball to the |
| 165 | + |onprem| PersistentVolume: |
| 166 | +
|
| 167 | + Replica 0: |
| 168 | +
|
| 169 | + .. code-block:: sh |
| 170 | +
|
| 171 | + oc rsync "ops-manager-localmode-0:/mongodb-ops-manager/mongodb-releases/mongodb-linux-x86_64-rhel70-4.2.0.tgz" \ |
| 172 | + mongodb-linux-x86_64-rhel70-4.2.0.tgz |
| 173 | +
|
| 174 | + Replica 1: |
| 175 | +
|
| 176 | + .. code-block:: sh |
| 177 | +
|
| 178 | + oc rsync "ops-manager-localmode-1:/mongodb-ops-manager/mongodb-releases/mongodb-linux-x86_64-rhel70-4.2.0.tgz" \ |
| 179 | + mongodb-linux-x86_64-rhel70-4.2.0.tgz |
| 180 | +--- |
| 181 | +title: "Deploy a MongoDB Database Resource." |
| 182 | +level: 4 |
| 183 | +ref: deploy-mdb-resource |
| 184 | +stepnum: 9 |
| 185 | +content: | |
| 186 | +
|
| 187 | + a. If you have not done so already, complete the following |
| 188 | + prerequisites: |
| 189 | +
|
| 190 | + - :doc:`/tutorial/create-operator-credentials` |
| 191 | + - :doc:`/tutorial/create-project-using-configmap` |
| 192 | +
|
| 193 | + #. Deploy a :ref:`MongoDB database resource <k8s-deploy-mdb-resources>` |
| 194 | + in the same namespace to which you deployed |onprem|. |
| 195 | + Ensure that you: |
| 196 | +
|
| 197 | + i. Match the ``spec.opsManager.configMapRef.name`` of the resource |
| 198 | + to the ``metadata.name`` of your ConfigMap. |
| 199 | + #. Match the ``spec.credentials`` of the resource to the name of |
| 200 | + the secret you created that contains an |onprem| programmatic |
| 201 | + API key pair. |
| 202 | +
|
| 203 | + The |k8s-op-short| downloads the installation tarballs for |
| 204 | + the MongoDB Database resources from the |onprem| Persistent Volumes |
| 205 | + instead of from the Internet. |
| 206 | +
|
| 207 | +... |
0 commit comments