Back to Charts

⚠️ Repo Archive Notice

stable/hlf-peer/README.md

latest12.5 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 Peer

Hyperledger Fabric Peer is the node type responsible for endorsing transactions and recording them on the Blockchain for the Hyperledger Fabric permissioned blockchain framework.

DEPRECATION NOTICE

This chart is deprecated and no longer supported.

TL;DR;

bash
$ helm install stable/hlf-peer

Introduction

The Hyperledger Fabric Peer can either use a goleveldb or a CouchDB database for holding the ledger data.

This Peer can receive transaction requests, which it checks and signs, endorsing them. These endorsements can then be sent to the Ordering Service (one or more Orderer nodes), which will package them and return blocks that the Peer can then commit to their own Ledger.

Prerequisites

  • Kubernetes 1.9+
  • PV provisioner support in the underlying infrastructure.
  • K8S secrets containing:
    • the crypto-materials (e.g. signcert, key, cacert, and optionally intermediatecert, CA credentials)
    • the channel transaction for the Peer
    • the certificate of the Peer Organisation Admin
    • the private key of the Peer Organisation Admin (needed to join the channel)
  • A running HLF-CouchDB Chart if you are using the CouchDB database.

Installing the Chart

To install the chart with the release name peer1:

bash
$ helm install stable/hlf-peer --name peer1

The command deploys the Hyperledger Fabric Peer 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-peer --name peer1 --set peer.mspID=MyMSP

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-peer --name peer1 -f my-values.yaml

Updating the chart

To update the chart:

bash
$ helm upgrade peer1 stable/hlf-peer -f my-values.yaml

Uninstalling the Chart

To uninstall/delete the peer1 deployment:

bash
$ helm delete peer1

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

ParameterDescriptionDefault
image.repositoryhlf-peer image repositoryhyperledger/fabric-peer
image.taghlf-peer image tag1.4.3
image.pullPolicyImage pull policyIfNotPresent
service.portRequestTCP port for requests to Peer7051
service.portEventTCP port for event service on Peer7053
service.portMetricsTCP port for the metrics service on Peer9443
service.typeK8S service type exposing ports, e.g. ClusterIPClusterIP
persistence.accessModeUse volume as ReadOnly or ReadWriteReadWriteOnce
persistence.annotationsPersistent Volume annotations{}
persistence.sizeSize of data volume (adjust for production!)1Gi
persistence.storageClassStorage class of backing PVCdefault
logging.levelDefault logging levelinfo
logging.peerPeer logging levelinfo
logging.cauthdslCauthdsl logging levelwarning
logging.gossipGossip logging levelinfo
logging.grpcgRPC logging levelerror
logging.ledgerLedger logging levelinfo
logging.mspMSP logging levelwarning
logging.policiesPolicies logging levelwarning
ingress.enabledIf true, Ingress will be createdfalse
ingress.annotationsIngress annotations{}
ingress.pathIngress path/
ingress.hostsIngress hostnames[]
ingress.tlsIngress TLS configuration[]
dockerSocketPathDocker Socket path/var/run/docker.sock
dockerConfigDocker Config file base 64 encodednull
dockerConfigMountPathDocker Config file mount path/root/.docker
peer.databaseTypeDatabase type to use (goleveldb or CouchDB)goleveldb
peer.couchdbInstanceCouchDB chart name to use cdb-peer1cdb-peer1
peer.mspIDID of MSP the Peer belongs toOrg1MSP
peer.gossip.bootstrapGossip bootstrap address``
peer.gossip.endpointGossip endpoint``
peer.gossip.externalEndpointGossip external endpoint``
peer.gossip.orgLeaderGossip organisation leader ("true"/"false")"false"
peer.gossip.useLeaderElectionGossip use leader election"true"
peer.tls.server.enabledDo we enable server-side TLS?false
peer.tls.client.enabledDo we enable client-side TLS?false
peer.chaincode.builderImage of the chaincode builder``
peer.chaincode.runtime.golangImage of the chaincode runtime for Go``
peer.chaincode.runtime.javaImage of the chaincode runtime for Java``
peer.chaincode.runtime.nodeImage of the chaincode runtime for Node.js``
peer.metrics.providerMetrics provider, can be statsd, prometheus, or disableddisabled
peer.metrics.statsd.networkNetwork type, can be tcp or udpudp
peer.metrics.statsd.addressAddress of the StatsD server127.0.0.1:8125
peer.metrics.statsd.writeIntervalIntervall at whitch counters and gauges are pushed10s
peer.metrics.statsd.prefixPrefix prepended to all the exported metrics``
secrets.peer.credCredentials: 'CA_USERNAME' and 'CA_PASSWORD'``
secrets.peer.certCertificate: as 'cert.pem'``
secrets.peer.keyPrivate key: as 'key.pem'``
secrets.peer.caCertCA Cert: as 'cacert.pem'``
secrets.peer.intCaCertInt. CA Cert: as 'intermediatecacert.pem'``
secrets.peer.tlsTLS secret: as 'tls.crt' and 'tls.key'``
secrets.peer.tlsRootCertTLS root CA certificate: as 'cert.pem'``
secrets.peer.tlsClientTLS client secret: as 'tls.crt' and 'tls.key'``
secrets.peer.tlsClientRootCertsTLS Client root CA certificate files (any name)``
secrets.channelsArray of secrets containing channel creation file``
secrets.adminCertSecret containing Peer Org admin certificate``
secrets.adminCertSecret containing Peer Org admin private key``
secrets.ordTlsRootCertSecret containing Orderer TLS root CA certificate``
resourcesCPU/Memory resource requests/limits{}
nodeSelectorNode labels for pod assignment{}
tolerationsToleration labels for pod assignment[]
affinityAffinity settings for pod assignment{}

Persistence

The volume stores the Fabric Peer 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.

Upgrading from version 1.1.x

Previous versions of this chart performed enrollment with the Fabric CA directly from the pod. This prevented the possibility of using development cryptographic material (certificates and keys) from Cryptogen or the usage of other CA mechanisms.

Instead, crypto-material and CA credentials are stored separately as secrets.

If you used the former type of chart, you will need to obtain the relevant credentials and cryptographic material from the running pod, and save it externally to a set of secrets, whose names you will need to feed into the chart, under the secrets.ord section.

An example upgrade procedure is described in UPGRADE_1-1-x.md

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 :-)