Skip to content

Commit

Permalink
updated sidebar and prod dockerfile (#225)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
uma-kt and veenamj-avesha authored Oct 23, 2024
1 parent 3bf88be commit e622cb8
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 47 deletions.
2 changes: 1 addition & 1 deletion prod.dockerfile
Original file line number Diff line number Diff line change
@@ -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 ./
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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://<External Node IP>:<NodePort>
```
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://<External Node IP>:<NodePort>
```
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.
Expand Down Expand Up @@ -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)
![mongodb](/images/version1.3.0/use-cases/configure-mongodb/replicaset-deployment.png)
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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 - <<EOF
Expand Down
10 changes: 4 additions & 6 deletions versioned_sidebars/version-1.3.0-sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@
"get-started/prerequisites/prerequisites-gateway-node-label",
"get-started/prerequisites/prerequisites-configure-helm-repository",
"get-started/prerequisites/prerequisites-install-istio"


]
}

Expand Down Expand Up @@ -214,8 +212,8 @@
"collapsed": true,
"link": {
"type": "generated-index",
"title": "use-case",
"description": "The use case section provides details the use cases applicable to kubeslice",
"title": "Use Cases",
"description": "This section describes use cases for KubeSlice. Use cases offer a framework for articulating functional requirements within the framework of business and system processes. We will continue adding more KubeSlice use cases to this section.",
"keywords": [
"kubeslice"
]
Expand All @@ -227,8 +225,8 @@
"collapsed": true,
"link": {
"type": "generated-index",
"title": "use-case",
"description": "The use case section provides details the use cases applicable to kubeslice",
"title": "Distributed MongoDB",
"description": "This section provides the use case related to distributed MongoDB over multi cloud/clusters.",
"keywords": [
"kubeslice"
]
Expand Down

0 comments on commit e622cb8

Please sign in to comment.