This chart bootstraps a ProvenDB deployment on a Kubernetes cluster using the Helm package manager.
- You should have a kubernetes cluster running and
kubectl
should point to it. - There should be
helm3.x
installed on the client machine. For instructions, you can refer here https://helm.sh/docs/intro/install/ - Make sure you have enough resources in the k8s cluster. The following works on minikube
minikube start --cpus=6 --memory=8000mb
Kubernetes | 1.16.7 |
Helm client | 3.2.0 |
Underlying Infrastructure | GCP, Azure, Minikube and Kubernetes on Docker Desktop for Mac |
If you have a previously installed this chart and want to test the udpated helm chart, make sure you follow Tear Down first.
You can install the helm chart in any one of the following two ways:
- Download dependencies
Inside the provendb-helm
repository
helm dependency update
This will download the mongodb helm chart which is the only dependency.
- Install the helm charts
First, create the necessary namespace
kubectl create namespace prd
helm install myprovendb --namespace=prd . --set global.cloud=MINIKUBE
The release name can be anything. In this case myProvenDB.
By default, the config is set for kubernetes on docker desktop
. If you would like to change this, you can do it in the following way for instance for minikube:
helm install myprovendb --namespace=prd . --set global.cloud=MINIKUBE
Please refer values.yaml
to see other options available.
- If you run
kubectl get pods -n prd
, you should see the list of pods. They might error initially, but eventually they should all be healthy.
4a. On cloud providers that support load balancers, an external IP address would be provisioned to access the proxy service. You can get the external IP for the proxy service by running the folowing:
kubectl get svc myprovendb-provendb-proxy-service -n prd
and checking the EXTERNAL-IP field. The default port to connect to is 27018
4b. Otherwise, e.g. on minikube/kubernetes on docker desktop, you can do port forwarding like the following:
kubectl port-forward pods/myprovendb-provendb-proxy-statefulset-0 27018:27018 -n prd
The IP address in this case will be localhost
and port number 27018
- Then you can connect to the proxy using this command:
mongo mongodb://admin:password@localhost:27018/provendb
You can configure the credentials in the root values.yaml
file
- You should now be able to connect to proxy and create and submit proofs.
Once you have all the services marked as healthy, you can connect to proxy and submit proofs. By default, anchoring to only Ethereum testnet is configured. You can refer values.yaml here to support other blockchains.
mongo mongodb://admin:password@<ipaddress>:<port>/provendb
db.runCommand({submitProof: 1, anchorType: "ETH" })
db.runCommand({getProof: "<proofID>"})
Most of the important configuration can be set by modifying values in the root values.yaml
file. e.g. underlying infrastrcture, port numbers, credentials etc.
To tear down the setup down, simply
- Delete the helm the helm release
helm delete myProvenDB -n prd
- Delete the pvcs associated with it
kubectl delete $(kubectl get pvc -n prd -o name | grep myProvenDB ) -n prd
- The connection to provendb proxy is non-ssl.
- Some of the configuration is different for each cloud provider. This helm chart has been tested on [GCP](https://cloud.google.com/, Azure, Minikube and Kubernetes on Docker Desktop.
If you run into any issues, or wish to discuss a custom deployment of ProvenDB for your blockchain project, please email us at [email protected]
Copyright © 2019,2022 Southbank Software. All rights reserved.