From e622cb83272a1dc73e6de3e2258e0f820c9df204 Mon Sep 17 00:00:00 2001 From: uma-kt <105046156+uma-kt@users.noreply.github.com> Date: Wed, 23 Oct 2024 20:53:33 +0530 Subject: [PATCH] updated sidebar and prod dockerfile (#225) * updated sidebar and prod dockerfile * fixed the error * fixed the error * fixed the error * updated the command * updated the command * updated the command * updated the command * Update distributed-mongodb-for-multicloud.mdx * fixed alignment --------- Co-authored-by: veenamj-avesha <104770800+veenamj-avesha@users.noreply.github.com> --- prod.dockerfile | 2 +- .../distributed-mongodb-for-multicloud.mdx | 90 +++++++++++-------- .../mongodb/replicas-access-methods.mdx | 6 +- .../version-1.3.0-sidebars.json | 10 +-- 4 files changed, 61 insertions(+), 47 deletions(-) diff --git a/prod.dockerfile b/prod.dockerfile index 2691dd14..013d36bc 100644 --- a/prod.dockerfile +++ b/prod.dockerfile @@ -1,4 +1,4 @@ -FROM node:16.14.0-alpine3.15 as builder +FROM node:18.2.0-alpine as builder WORKDIR /build COPY package.json ./ COPY package-lock.json ./ diff --git a/versioned_docs/version-1.3.0/use-cases/mongodb/distributed-mongodb-for-multicloud.mdx b/versioned_docs/version-1.3.0/use-cases/mongodb/distributed-mongodb-for-multicloud.mdx index 7ee50afb..e0f788a3 100644 --- a/versioned_docs/version-1.3.0/use-cases/mongodb/distributed-mongodb-for-multicloud.mdx +++ b/versioned_docs/version-1.3.0/use-cases/mongodb/distributed-mongodb-for-multicloud.mdx @@ -131,10 +131,10 @@ To create a slice: ``` The `mongodb-slice.yaml` or `mongo-slice-lb.yaml` file contains the configuration to create a namespace called `mongodb`, and - also on board it onto the demo-slice. The configuration also enables namespace sameness, which means that the `mongodb` slice - will be onboarded onto any worker cluster that is connected to the `demo-slice`. + also on board it onto the demo-slice. The configuration also enables namespace sameness, which means that the `mongodb` namespace + will be onboarded onto any worker cluster that is connected to the demo-slice. -2. Apply the slice configuration yaml file on the project namespace. +2. Apply the slice configuration YAML file on the project namespace. Example @@ -410,10 +410,10 @@ To create a slice: ops-manager-svc-ext LoadBalancer 10.7.32.125 34.23.212.14 8080:31348/TCP,25999:31914/TCP 13m ``` -9. To generate Ops Manager URL address if the service is exposed as a LoadBalancer, use the following command: +9. Generate the Ops Manager URL address if the service is exposed as a LoadBalancer. :::caution - The command below works if your service is exposed as a LoadBalancer. In case, it is exposed as Nodeport service use the URL + The command below works if your service is exposed as a LoadBalancer. In case, it is exposed as NodePort service, use the URL as given below: ```yaml @@ -424,15 +424,22 @@ To create a slice: is exposed. ::: - Example - ``` - URL=http://$(kubectl -n "mongodb-operator" get svc ops-manager-svc-ext -o jsonpath='{.status.loadBalancer.ingress[0].ip}:{.spec.ports[0].port}') echo $URL - ``` - - Example Output - ``` - http://34.23.212.14:8080 - ``` + - When the LoadBalancer assigns an a DNS Name to the services, use hostname in the following command: + ``` + URL=http://$(kubectl -n "mongodb-operator" get svc ops-manager-svc-ext -o jsonpath='{.status.loadBalancer.ingress[0].hostname}:{.spec.ports[0].port}') echo $URL + ``` + + - When the LoadBalancer assigns an external IP address to the services, use the IP address in the following command: + + ``` + URL=http://$(kubectl -n "mongodb-operator" get svc ops-manager-svc-ext -o jsonpath='{.status.loadBalancer.ingress[0].ip}'):$(kubectl -n "mongodb-operator" get svc ops-manager-svc-ext -o jsonpath='{.spec.ports[0].port}') + echo $URL + ``` + + Example Output + ``` + http://34.23.212.14:8080 + ``` 10. Update the Ops Manager Kubernetes manifest to include an external IP address created by LoadBalancer in the `spec.configuration.mms.centralUrl` through `kubectl patch` using the following command: @@ -715,31 +722,40 @@ Setting the environment variables is a prerequisite. echo $URL ``` - 2. On the master cluster, use the following command to generate Ops Manager API keys and add IP addresses to the Ops Manager access list: + 2. On the master cluster, generate Ops Manager API keys and add IP addresses to the Ops Manager access list: - :::note - The command below works only if your service is exposed as a LoadBalancer. In case, it is exposed as node port service, use - the URL as given below. + :::note + The command below only works if your service is exposed as a LoadBalancer. In case, it is exposed as node port service, use + the URL as given below: - ``` - URL=http://: - ``` - where External Node IP of the worker node where Ops Manager is deployed & NodePort is the node port on which `ops-manager-svc-ext` - is exposed. - ::: - + ``` + URL=http://: + ``` + where External Node IP of the worker node where Ops Manager is deployed & NodePort is the node port on which `ops-manager-svc-ext` + is exposed. + ::: - ``` - kubectx $MASTER - URL=http://$(kubectl -n mongodb-operator get svc ops-manager-svc-ext -o jsonpath='{.status.loadBalancer.ingress[0].ip}:{.spec.ports[0].port}') - echo $URL - ``` - - Example Output - ``` - Switched to context "k8s-cluster-1". - http://34.23.212.14:8080 - ``` + - Use the IP address in the following command when the LoadBalancer assigns an external IP address to the service: + + ``` + kubectx $MASTER + URL=http://$(kubectl -n mongodb-operator get svc ops-manager-svc-ext -o jsonpath='{.status.loadBalancer.ingress[0].ip}:{.spec.ports[0].port}') + echo $URL + ``` + + Example Output + ``` + Switched to context "k8s-cluster-1". + http://34.23.212.14:8080 + ``` + + - Use the host name in the following command when the LoadBalancer assigns a DNS name to the service: + + ``` + kubectx $MASTER + URL=http://$(kubectl -n mongodb-operator get svc ops-manager-svc-ext -o jsonpath='{.status.loadBalancer.ingress[0].hostname}:{.spec.ports[0].port}') + echo $URL + ``` 15. Log in to Ops Manager, and generate public and private API keys. When you create API keys, be sure to add your current IP address to the API access list. To do so, log in to the Ops Manager and go to `ops-manager-db` organization. @@ -988,4 +1004,4 @@ k8s-cluster-1 k8s-cluster-2 k8s-cluster-3 2. Verify each multi-replica-set that you created. - ![mongodb](/images/version1.3.0/use-cases/configure-mongodb/replicaset-deployment.png) \ No newline at end of file + ![mongodb](/images/version1.3.0/use-cases/configure-mongodb/replicaset-deployment.png) diff --git a/versioned_docs/version-1.3.0/use-cases/mongodb/replicas-access-methods.mdx b/versioned_docs/version-1.3.0/use-cases/mongodb/replicas-access-methods.mdx index 8a3ed470..3813e709 100644 --- a/versioned_docs/version-1.3.0/use-cases/mongodb/replicas-access-methods.mdx +++ b/versioned_docs/version-1.3.0/use-cases/mongodb/replicas-access-methods.mdx @@ -1,7 +1,7 @@ # Replica Access Methods -Once the MongoDB replica sets are deployed over the slice across multiple clusters, there are different deployment models -that can be used to access the replicas. +After you deploy MongoDB replica sets over the slice across multiple clusters, there are different deployment models +you can use to access the replicas. ## Access Replicas from within the Clusters @@ -26,7 +26,7 @@ read and write to the primary replica set. ### Step 2: Deploy a MongoDB Shell Pod in the mongo-sh Namespace -Create and deploy a mongodb-sh pod in the mongo-sh namespace with the following configuration: +Create and deploy a `mongodb-sh` pod in the mongo-sh namespace with the following configuration: ``` kubectl apply -f - <