Click on each badge for more details.
Branch | Build Status | Coverage |
---|---|---|
master |
MongoDB for Juju CAAS
To use, first pull in dependencies via git submodule
:
git submodule init
git submodule update
Then, deploy the charm with an appropriate image resource:
juju --debug deploy . --resource mongodb-image=mongo:3.1 --resource mongodb-sidecar-image=mongo-sidecar:3.1
To add a replica to an existing service:
juju add-unit mongodb-k8s
In order to scale the units down with MongoDB PVCs termination an action needs to be run against last unit. Example for setup with 3 mongodb units:
juju run-action mongodb-k8s/2 remove-pvc
juju remove-unit -n 1 mongodb-k8s
In order to connect to standalone mongodb host the URI is:
mongo mongodb://mongodb-k8s-0.mongodb-k8s:27017
Where bash mongodb-k8s-0
is the name of a pod.
In order to connect to a replicaSet 'rs0' the URI is:
mongo mongodb://mongodb-k8s-0.mongodb-k8s:27017,mongodb-k8s-1.mongodb-k8s:27017,mongodb-k8s-2.mongodb-k8s:27017/?replicaSet=rs0
For more information on connection to MongoDB see https://docs.mongodb.com/manual/reference/connection-string/#mongodb-uri.
No-HA scenario architecture overview:
HA-scanario architecture overview: