hlf-couchdb
CouchDB instance for Hyperledger Fabric (these charts are created by AID:Tech and are currently not directly associated with the Hyperledger project)
About this chart
Hyperledger Fabric CouchDB
Hyperledger Fabric CouchDB is the node holding the blockchain ledger of each peers for the Hyperledger Fabric permissioned blockchain framework.
TL;DR;
$ helm install <helm-repo>/hlf-couchdb
$ helm install stable/hlf-couchdb
Introduction
Hyperledger Fabric Peers can make use of CouchDB instances to permit rich query operations on ledger data. This chart utilises a modified version of CouchDB suitable for Hyperledger Fabric applications.
Prerequisites
- Kubernetes 1.9+
- PV provisioner support in the underlying infrastructure.
Installing the Chart
To install the chart with the release name cdb1:
$ helm install <helm-repo>/hlf-couchdb --name cdb1
$ helm install stable/hlf-couchdb --name cdb1 The command deploys the Hyperledger Fabric implementation of CouchDB on the Kubernetes cluster in the default configuration. The Configuration section lists the parameters that can be configured during installation.
Custom parameters
Specify each parameter using the --set key=value[,key=value] argument to helm install. For example:
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example:
$ helm install <helm-repo>/hlf-couchdb --name cdb1 --set couchdbUsername=couchdb,couchdbPassword=secretpassword
$ helm install stable/hlf-couchdb --name cdb1 --set couchdbUsername=couchdb,couchdbPassword=secretpassword
The above command creates a CouchDB user named couchdb with password secretpassword.
Alternatively, a YAML file can be provided while installing the chart. This file specifies values to override those provided in the default values.yaml. For example,
$ helm install <helm-repo>/hlf-couchdb --name cdb1 -f my-values.yaml
$ helm install stable/hlf-couchdb --name cdb1 -f my-values.yaml
Updating the chart
When updating the chart, make sure you provide the couchdbPassword, otherwise helm update will generate a new random (and invalid) password.
$ export COUCHDB_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} cdb1 -o jsonpath="{.data.COUCHDB_PASSWORD}" | base64 --decode; echo)
$ helm upgrade cdb1 stable/hlf-couchdb --set couchdbPassword=$COUCHDB_PASSWORD
Uninstalling the Chart
To uninstall/delete the cdb1 deployment:
$ helm delete cdb1
The command removes all the Kubernetes components associated with the chart and deletes the release.
Configuration
The following table lists the configurable parameters of the Hyperledger Fabric CouchDB chart and default values.
| Parameter | Description | Default |
|---|---|---|
image.repository | hlf-couchdb image repository | hyperledger/fabric-couchdb |
image.tag | hlf-couchdb image tag | x86_64-0.4.7 |
image.pullPolicy | Image pull policy | IfNotPresent |
service.port | TCP port | 5984 |
service.type | K8S service type exposing ports, e.g. ClusterIP | ClusterIP |
persistence.accessMode | Use volume as ReadOnly or ReadWrite | ReadWriteOnce |
persistence.annotations | Persistent Volume annotations | {} |
persistence.size | Size of data volume (adjust for production!) | 1Gi |
persistence.storageClass | Storage class of backing PVC | default |
couchdbUsername | Username for CouchDB | couchdb |
couchdbPassword | Password for CouchDB | Random 24 alphanumeric characters |
resources | CPU/Memory resource requests/limits | {} |
nodeSelector | Node labels for pod assignment | {} |
tolerations | Toleration labels for pod assignment | [] |
affinity | Affinity settings for pod assignment | {} |
Persistence
The volume stores the Fabric CouchDB data and configurations at the /opt/couchdb/data path of the container.
The chart mounts a Persistent Volume at this location. The volume is created using dynamic volume provisioning through a PersistentVolumeClaim managed by the chart.
Feedback and feature requests
This is a work in progress and we are happy to accept feature requests. We are even happier to accept pull requests implementing improvements :-)
Deploy hlf-couchdb with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has hlf-couchdb on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the charthlf-couchdb is pinned at v1.0.6 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply