-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d37f476
commit b5490ec
Showing
2 changed files
with
2,465 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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Deployments | ||
|
||
This directory contains the integration testing deployment artifacts for development and integration testing purposes. | ||
|
||
## Helm Deployment | ||
|
||
* Helm Charts for MongoDB: https://artifacthub.io/packages/helm/bitnami/mongodb | ||
* Kubectl Quick Ref: https://kubernetes.io/docs/reference/kubectl/quick-reference/ | ||
* Default Mongo Values Template: [values.yaml](./values.yaml) | ||
|
||
### Quick Deploy | ||
|
||
``` | ||
helm install my-release oci://registry-1.docker.io/bitnamicharts/mongodb | ||
``` | ||
|
||
TODO: add specific values and init scripts | ||
|
||
|
||
MongoDB® can be accessed on the following DNS name(s) and ports from within your cluster: | ||
|
||
my-release-mongodb.default.svc.cluster.local | ||
|
||
To get the root password run: | ||
|
||
export MONGODB_ROOT_PASSWORD=$(kubectl get secret --namespace default my-release-mongodb -o jsonpath="{.data.mongodb-root-password}" | base64 -d) | ||
|
||
To connect to your database, create a MongoDB® client container: | ||
|
||
kubectl run --namespace default my-release-mongodb-client --rm --tty -i --restart='Never' --env="MONGODB_ROOT_PASSWORD=$MONGODB_ROOT_PASSWORD" --image docker.io/bitnami/mongodb:8.0.5-debian-12-r0 --command -- bash | ||
|
||
Then, run the following command: | ||
mongosh admin --host "my-release-mongodb" --authenticationDatabase admin -u $MONGODB_ROOT_USER -p $MONGODB_ROOT_PASSWORD | ||
|
||
To connect to your database from outside the cluster execute the following commands: | ||
|
||
kubectl port-forward --namespace default svc/my-release-mongodb 27017:27017 & | ||
mongosh --host 127.0.0.1 --authenticationDatabase admin -p $MONGODB_ROOT_PASSWORD |
Oops, something went wrong.