-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Docs][Add] Added docs for v0.1.0 (#29)
* Added documentation for v0.1.0 Signed-off-by: iamabhishek-dubey <[email protected]>
- Loading branch information
1 parent
6753290
commit facc90e
Showing
10 changed files
with
206 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ | |
# Ignore build and test binaries. | ||
bin/ | ||
testbin/ | ||
docs/ | ||
examples/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,4 @@ testbin/* | |
*.swp | ||
*.swo | ||
*~ | ||
.hugo_build.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
### v0.1.0 | ||
##### Feburary 5, 2022 | ||
|
||
#### :tada: Features | ||
|
||
- Added standalone MongoDB functionality | ||
- Added cluster MongoDB functionality | ||
- Helm chart installation support | ||
- Monitoring support for MongoDB | ||
- Documentation for setup and management | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: "Development" | ||
linkTitle: "Development" | ||
weight: 5 | ||
description: > | ||
Development related information for MongoDB Operator | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
--- | ||
title: "Development Guide" | ||
weight: 2 | ||
linkTitle: "Development Guide" | ||
description: > | ||
Development guide for MongoDB Operator | ||
--- | ||
|
||
## Pre-requisites | ||
|
||
**Access to Kubernetes cluster** | ||
|
||
First, you will need access to a Kubernetes cluster. The easiest way to start is minikube. | ||
|
||
- [Virtualbox](https://www.virtualbox.org/wiki/Downloads) | ||
- [Minikube](https://kubernetes.io/docs/setup/minikube/) | ||
- [Kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) | ||
|
||
**Tools to build an Operator** | ||
|
||
Apart from kubernetes cluster, there are some tools which are needed to build and test the MongoDB Operator. | ||
|
||
- [Git](https://git-scm.com/downloads) | ||
- [Go](https://golang.org/dl/) | ||
- [Docker](https://docs.docker.com/install/) | ||
- [Operator SDK](https://github.com/operator-framework/operator-sdk/blob/v0.8.1/doc/user/install-operator-sdk.md) | ||
- [Make](https://www.gnu.org/software/make/manual/make.html) | ||
|
||
## Building Operator | ||
|
||
To build the operator on local system, we can use `make` command. | ||
|
||
```shell | ||
$ make manager | ||
... | ||
go build -o bin/manager main.go | ||
``` | ||
|
||
MongoDB operator gets packaged as a container image for running on the Kubernetes cluster. | ||
|
||
```shell | ||
$ make docker-build | ||
``` | ||
|
||
If you want to play it on Kubernetes. You can use a minikube. | ||
|
||
```shell | ||
$ minikube start --vm-driver virtualbox | ||
... | ||
😄 minikube v1.0.1 on linux (amd64) | ||
🤹 Downloading Kubernetes v1.14.1 images in the background ... | ||
🔥 Creating kvm2 VM (CPUs=2, Memory=2048MB, Disk=20000MB) ... | ||
📶 "minikube" IP address is 192.168.39.240 | ||
🐳 Configuring Docker as the container runtime ... | ||
🐳 Version of container runtime is 18.06.3-ce | ||
⌛ Waiting for image downloads to complete ... | ||
✨ Preparing Kubernetes environment ... | ||
🚜 Pulling images required by Kubernetes v1.14.1 ... | ||
🚀 Launching Kubernetes v1.14.1 using kubeadm ... | ||
⌛ Waiting for pods: apiserver proxy etcd scheduler controller dns | ||
🔑 Configuring cluster permissions ... | ||
🤔 Verifying component health ..... | ||
💗 kubectl is now configured to use "minikube" | ||
🏄 Done! Thank you for using minikube! | ||
``` | ||
|
||
```shell | ||
$ make test | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: "Monitoring" | ||
linkTitle: "Monitoring" | ||
weight: 4 | ||
description: > | ||
Monitoring of MongoDB standalone and cluster | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: "Grafana Dashboard" | ||
weight: 3 | ||
linkTitle: "Grafana Dashboard" | ||
description: > | ||
Monitoring dashboard of MongoDB database for Grafana | ||
--- | ||
|
||
### Coming Soon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
--- | ||
title: "Prometheus Monitoring" | ||
weight: 2 | ||
linkTitle: "Prometheus Monitoring" | ||
description: > | ||
Monitoring of MongoDB standalone and replicaset cluster using Prometheus | ||
--- | ||
|
||
In MongoDB Operator, we are using [mongodb-exporter](https://github.com/percona/mongodb_exporter) to collect the stats, metrics for MongoDB database. This exporter is capable to capture the stats for standalone and cluster mode of MongoDB. | ||
|
||
If we are using the `helm` chart for installation purpose, we can simply enable this configuration inside the [values.yaml](https://github.com/OT-CONTAINER-KIT/helm-charts/blob/main/charts/mongodb-cluster/values.yaml). | ||
|
||
```yaml | ||
mongoDBMonitoring: | ||
enabled: true | ||
image: | ||
name: bitnami/mongodb-exporter | ||
tag: 0.11.2-debian-10-r382 | ||
imagePullPolicy: IfNotPresent | ||
resources: {} | ||
``` | ||
In case of `kubectl` installation, we can add a code snippet in yaml manifest like this:- | ||
|
||
```yaml | ||
mongoDBMonitoring: | ||
enableExporter: true | ||
image: bitnami/mongodb-exporter:0.11.2-debian-10-r382 | ||
imagePullPolicy: IfNotPresent | ||
resources: {} | ||
``` | ||
|
||
## ServiceMonitor for Prometheus Operator | ||
|
||
Once the exporter is configured, the next aligned task would be to ask [Prometheus](https://prometheus.io) to monitor it. For [Prometheus Operator](https://github.com/prometheus-operator/prometheus-operator), we have to create CRD object in Kubernetes called "ServiceMonitor". We can update this using the `helm` as well. | ||
|
||
```yaml | ||
serviceMonitor: | ||
enabled: false | ||
interval: 30s | ||
scrapeTimeout: 10s | ||
namespace: monitoring | ||
``` | ||
|
||
For kubectl related configuration, we may have to create `ServiceMonitor` definition in a yaml file and apply it using kubectl command. A `ServiceMonitor` definition looks like this:- | ||
|
||
```yaml | ||
--- | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: ServiceMonitor | ||
metadata: | ||
name: mongodb-prometheus-monitoring | ||
labels: | ||
app.kubernetes.io/name: mongodb | ||
app.kubernetes.io/managed-by: mongodb | ||
app.kubernetes.io/instance: mongodb | ||
app.kubernetes.io/version: v0.1.0 | ||
app.kubernetes.io/component: middleware | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: mongodb | ||
mongodb_setup: standalone | ||
role: standalone | ||
endpoints: | ||
- port: metrics | ||
interval: 30s | ||
scrapeTimeout: 30s | ||
namespaceSelector: | ||
matchNames: | ||
- middleware-production | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: "Release History" | ||
linkTitle: "Release History" | ||
weight: 6 | ||
description: > | ||
Release information for MongoDB Operator | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
title: "CHANGELOG" | ||
weight: 2 | ||
linkTitle: "CHANGELOG" | ||
description: > | ||
Changelog version history for MongoDB | ||
--- | ||
|
||
### v0.1.0 | ||
|
||
**Feburary 5, 2022** | ||
|
||
**🏄 Features** | ||
|
||
- Added standalone MongoDB functionality | ||
- Added cluster MongoDB functionality | ||
- Helm chart installation support | ||
- Monitoring support for MongoDB | ||
- Documentation for setup and management |