hl-composer

by joaquinito2051

Helm chartv1.0.11App 0.20.0

Hyperledger Composer REST Server chart

About this chart

Hyperledger Composer

Hyperledger Composer is a set of tools to aid in the development of Blockchain solutions using the Hyperledger Fabric permissioned blockchain framework.

TL;DR;

$ helm install <helm-repo>/hl-composer

$ helm install stable/hl-composer

Introduction

The deployments included in this chart include a Command-Line Interface (CLI), Playground and REST server.

Prerequisites

  • Kubernetes 1.9+
  • PV provisioner support in the underlying infrastructure.
  • Four K8S secrets containing:
    • the Composer Blockchain Network Archive to deploy and use
    • the Composer Connection JSON file, specifying the locations of the
    • the certificate of the Peer Organisation Admin
    • the private key of the Peer Organisation Admin (needed to join the channel)
  • A running Hyperledger Fabric network, either on the cluster (e.g. using the hlf-ca, hlf-ord, hlf-peer and optionally hlf-couchdb charts) or elsewhere.

Installing the Chart

To install the chart with the release name hlc:

$ helm install <helm-repo>/hl-composer --name hlc

$ helm install stable/hl-composer --name hlc The command deploys the Hyperledger Composer chart 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>/hl-composer --name hlc --set persistence.enabled=true,presistence.storageClass=azurefile

$ helm install stable/hl-composer --name hlc --set persistence.enabled=true,presistence.storageClass=azurefile The above command specifies that we wish to use a persistent volume and use the azurefile Storage Class to enable the volume to be shared.

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>/hl-composer --name hlc -f my-values.yaml

$ helm install stable/hl-composer --name hlc -f my-values.yaml

Updating the chart

When updating the chart, make sure you provide the rest.config.apiKey, otherwise helm update will generate a new random API key.

$ export COMPOSER_APIKEY=$(kubectl get secret --namespace {{ .Release.Namespace }} hlc-hl-composer-rest -o jsonpath="{.data.COMPOSER_APIKEY}" | base64 --decode; echo)
$ helm upgrade hlc stable/hlf-ca --set rest.config.apiKey=$COMPOSER_APIKEY

Uninstalling the Chart

To uninstall/delete the hlc deployment:

$ helm delete hlc

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

ParameterDescriptionDefault
persistence.enabledIs persistence enabled for this chart?false
persistence.accessModeRead and Write permissions to the volumeReadWriteMany
persistence.annotationsPersistent Volume annotations{}
persistence.sizeSize of data volume (adjust for production!)1Gi
persistence.storageClassStorage class of backing PVC``
cli.image.repositoryhl-composer CLI image repositoryhyperledger/composer-cli
cli.image.taghl-composer CLI image tag0.20.0
cli.image.pullPolicyImage pull policyIfNotPresent
cli.secrets.blockchainNetworkSecret containing Blockchain Network Archive``
cli.secrets.adminCertSecret containing Peer Org admin certificate``
cli.secrets.adminKeySecret containing Peer Org admin private key``
cli.secrets.hlcConnectionSecret containing Composer Connection JSON``
cli.resourcesCPU/Memory resource requests/limits{}
cli.nodeSelectorNode labels for pod assignment{}
cli.tolerationsToleration labels for pod assignment[]
cli.affinityAffinity settings for pod assignment{}
rest.image.repositoryhl-composer REST image repositoryhyperledger/composer-rest-server
rest.image.taghl-composer REST image tag0.20.0
rest.image.pullPolicyImage pull policyIfNotPresent
rest.service.portTCP port3000
rest.service.typeK8S service type exposing ports, e.g. ClusterIPClusterIP
rest.ingress.enabledIf true, Ingress will be createdfalse
rest.ingress.annotationsIngress annotations{}
rest.ingress.pathIngress path/
rest.ingress.hostsIngress hostnames[]
rest.ingress.tlsIngress TLS configuration[]
rest.config.apiKeyAPI key for the REST server``
rest.config.composerRestServerCardCard to use to initialise the REST server``
rest.resourcesCPU/Memory resource requests/limits{}
rest.nodeSelectorNode labels for pod assignment{}
rest.tolerationsToleration labels for pod assignment[]
rest.affinityAffinity settings for pod assignment{}
pg.image.repositoryhl-composer Playground image repositoryhyperledger/composer-playground
pg.image.taghl-composer Playground image tag0.20.0
pg.image.pullPolicyImage pull policyIfNotPresent
pg.service.portTCP port8080
pg.service.typeK8S service type exposing ports, e.g. ClusterIPClusterIP
pg.ingress.enabledIf true, Ingress will be createdfalse
pg.ingress.annotationsIngress annotations{}
pg.ingress.pathIngress path/
pg.ingress.hostsIngress hostnames[]
pg.ingress.tlsIngress TLS configuration[]
pg.resourcesCPU/Memory resource requests/limits{}
pg.nodeSelectorNode labels for pod assignment{}
pg.tolerationsToleration labels for pod assignment[]
pg.affinityAffinity settings for pod assignment{}

Persistence

The volume stores the Hyperledger Composer data and configurations at the /home/composer/.composer path of the containers.

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 hl-composer with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has hl-composer 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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the charthl-composer is pinned at v1.0.11 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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