Back to Charts

⚠️ Repo Archive Notice

stable/hlf-ca/README.md

latest11.6 KB
Original Source

⚠️ Repo Archive Notice

As of Nov 13, 2020, charts in this repo will no longer be updated. For more information, see the Helm Charts Deprecation and Archive Notice, and Update.

Hyperledger Fabric CA

Hyperledger Fabric CA is a Certificate Authority node for the Hyperledger Fabric permissioned blockchain framework. Learn more about it by visiting the user's guide.

DEPRECATION NOTICE

This chart is deprecated and no longer supported.

TL;DR;

bash
$ helm install stable/hlf-ca

Introduction

The Hyperledger Fabric CA can be installed as either a Root CA, or an intermediate CA (by pointing to a parent CA, which can itself be a Root CA or an intermediate).

This CA can then be used to register and enroll identities for clients, admins and nodes of the Hyperledger Fabric network.

Prerequisites

  • Kubernetes 1.9+
  • PV provisioner support in the underlying infrastructure.

Installing the Chart

To install the chart with the release name org1-ca:

bash
$ helm install stable/hlf-ca --name org1-ca

The command deploys the Hyperledger Fabric CA 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:

bash
$ helm install stable/hlf-ca --name org1-ca --set adminUsername=ca-admin,adminPassword=secretpassword

The above command creates a CA Admin user named ca-admin 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,

bash
$ helm install stable/hlf-ca --name org1-ca -f my-values.yaml

Updating the chart

When updating the chart, make sure you provide the adminPassword, otherwise helm update will generate a new random (and invalid) password.

bash
$ export CA_PASSWORD=$(kubectl get secret --namespace {{ .Release.Namespace }} org1-ca -o jsonpath="{.data.CA_PASSWORD}" | base64 --decode; echo)
$ helm upgrade org1-ca stable/hlf-ca --set adminPassword=$CA_PASSWORD

Uninstalling the Chart

To uninstall/delete the org1-ca deployment:

bash
$ helm delete org1-ca

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 CA chart and default values.

ParameterDescriptionDefault
image.repositoryhlf-ca image repositoryhyperledger/fabric-ca
image.taghlf-ca image tag1.4.3
image.pullPolicyImage pull policyIfNotPresent
service.portTCP port7054
service.typeK8S service type exposing ports, e.g. ClusterIPClusterIP
ingress.enabledIf true, Ingress will be createdfalse
ingress.annotationsIngress annotations{}
ingress.pathIngress path/
ingress.hostsIngress hostnames[]
ingress.tlsIngress TLS configuration[]
persistence.existingClaimName of an existing PVC to use for Fabric CAnil
persistence.accessModeUse volume as ReadOnly or ReadWriteReadWriteOnce
persistence.annotationsPersistent Volume annotations{}
persistence.sizeSize of data volume1Gi
persistence.storageClassStorage class of backing PVCdefault
adminUsernameAdmin Username for CAadmin
adminPasswordAdmin PasswordRandom 24 alphanumeric characters
caNameName of CAorg1-ca
db.sslSSL Authenticationdisable
postgresql.enabledDeploy a PostgreSQL container holding the CA datafalse
mysql.enabledDeploy a MySQL container holding the CA datafalse
externalDatabase.typeDatabase type (either postgres or mysql )nil
externalDatabase.hostHost of the external databaselocalhost
externalDatabase.usernameExisting username in the external db``
externalDatabase.passwordPassword for the above username``
externalDatabase.databaseName of the existing database``
externalDatabase.portDatabase port number``
config.hlfToolsVersionVersion of Hyperledger Fabric tools used1.4.3
config.mountTLSIf TLS secrets are generated, do we mount them?false
config.debugEnable debug loggingtrue
config.csr.ca.pathlengthPathlength of CA certificate hierarchy1
config.csr.names.cCountry to which CA belongsUS
config.csr.names.stState to which CA belongsNorth Carolina
config.csr.names.lLocality to which CA belongs``
config.csr.names.oOrganization to which CA belongsHyperledger
config.csr.names.ouOrganizational Unit to which CA belongsFabric
config.intermediateStructure defining that CA is intermediatenil
config.intermediate.parent.chartWhich hlf-ca chart acts as parent to this CAnil
config.intermediate.parent.urlURL of parent CAnil
config.intermediate.parent.portPort of parent CAnil
config.affiliationsAffiliations for CA{org1: [] }
resourcesCPU/Memory resource requests/limits{}
nodeSelectorNode labels for pod assignment{}
tolerationsToleration labels for pod assignment[]
affinityAffinity settings for pod assignment{}

Database

The Fabric CA server needs a database to store the users registered.

By default the chart is configured to use an in-memory sqlite3 database, but you can also configure the helm chart to install a PostgreSQL or a MySQL database along the Fabric CA server.

PostgreSQL

To install a postgresql running in Kubernetes you have to enable and configure the postgresql section in values.yaml or pass the following parameter:

 helm install stable/hlf-ca --name org1-ca --set postgresql.enabled=true

MySQL

To install a mysql running in Kubernetes you have to enable and configure the mysql section in values.yaml or pass the following parameter:

 helm install stable/hlf-ca --name org1-ca --set mysql.enabled=true

External Database

In case you already setup a database (postgres or mysql), you can enable and configure the externalDatabase section in values.yaml or pass the following parameters:`

 helm install stable/hlf-ca --name org1-ca \
   --set externalDatabase.type=mysql \
   --set externalDatabase.host=myhost \
   --set externalDatabase.username=myuser \
   --set externalDatabase.password=mypassword \
   --set externalDatabase.database=mydatabase

Please consult the documentation for mode details.

Persistence

The volume stores the Fabric_CA data and configurations at the /var/hyperledger 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 :-)