ibm-blockchain-platform-dev

by Helm

Helm chartv1.0.2App v1Apache-2.0

IBM Blockchain Platform Community Edition

About this chart

IBM Blockchain Platform

IBM® Blockchain Platform Community Edition delivers the fundamental components that you need to run a blockchain network on your own infrastructure through IBM Cloud Private. The components include Hyperledger Fabric runtime Certificate Authorities (CAs), orderers, and peers.

IBM Blockchain Platform Community Edition is a free offering to explore, develop, and test multi-cloud blockchain networks. Do not use the Community Edition for production.

Introduction

This chart enables users to deploy or upgrade peers, CAs, and orderers or to build blockchain networks by using their existing infrastructure and to connect to their systems of record. The hybrid deployment environment is based on Kubernetes, which allows users to easily deploy the components on many types of platforms, including LinuxONE, IBM Z and x86. The IBM Blockchain Platform chart is based on Hyperledger Fabric v1.4.0.

You can choose to run only distributed peers or to build a blockchain network that includes certificate authorities, SOLO ordering service, and peers on your own infrastructure. If you choose to run only peers in your cluster, you can connect the peers to IBM Blockchain Platform Starter and Enterprise Plan networks on IBM Cloud.

The information that this README contains is intended to be used as a quick set of steps for getting started and deploying this Helm chart. For a more comprehensive set of instructions including the deployment flow, see the instructions in the IBM Blockchain Platform documentation.

Chart Details

This chart contains the three fundamental components of a blockchain network: Certificate Authority (CA), orderer, and peer. When you load the Helm chart, you can select and install only one component at a time.
Important: If you are upgrading a component, you must check Reuse values and not change any parameters.

  • This chart can deploy CAs, orderers, and peers, which are based on Fabric v1.4.0.
  • The Helm chart allows you to deploy these components into new or existing Persistent Volume Claims (PVCs).

For considerations and more information about the sequence to install these components, see the documentation for Getting started.

Limitations

IBM Blockchain Platform for IBM Cloud Private supports the following operating systems:

  • Red Hat Enterprise Linux (RHEL) 7.3, 7.4, 7.5
  • Ubuntu 18.04 LTS and 16.04 LTS
  • SUSE Linux Enterprise Server (SLES) 12 SP3

This Helm Chart has been validated to run on IBM Cloud Private v3.1.2 clusters that run on Ubuntu Linux by using the following worker nodes and backing storage:

  • LinuxONE and IBM Z: z/VM and KVM, which are using NFS.
  • x86: Linux 64-bit that uses GlusterFS.

Before you begin, ensure that you understand the following considerations and limitations:

  • You are responsible for the health monitoring, security, logging, and resource usage of your components.
  • Components that run in IBM Cloud Private are not visible in the Network Monitor of the networks on IBM Cloud.
  • Components that run in IBM Cloud Private cannot be addressed by using the Swagger UI in the Network Monitor UI of networks on IBM Cloud.
  • This Helm chart deploys a single instance of CA, orderer, or peer. You can deploy only one component at a time.
  • You can deploy multiple components to a single namespace in IBM Cloud Private with different release names.
  • Mutual TLS is not supported.
  • While you can use this Helm chart to upgrade an existing v1.0.1 helm release to v1.0.2, rollback from v1.0.2 to v1.0.1 is not supported.

CA Considerations

  • The CA is compatible with any component at v1.2.1 of Hyperledger Fabric.
  • This Helm chart deploys a single instance of the CA. As it is considered best practice to have a separate CA for each organization, it might be necessary to deploy several CAs. For example, if you plan to deploy one orderer and three peers, you need at least two CAs: one for the orderer organization and another for the peer organization.
  • Though you might choose to run a separate MySQL database, this option is not supported with the Helm chart. The Helm chart will, however, deploy a MySQLite database inside the CA to handle the database necessities of the CA, which include tracking the number of enrollments per user and any revoked certificates.

Orderer Considerations

  • The orderer is compatible with any component at v1.2.1 of Hyperledger Fabric.
  • This Helm chart deploys a single instance of the SOLO ordering service, that is, an orderer. Note that it is not possible to deploy more than one SOLO orderer on a channel to make the ordering service highly available. This is one reason why SOLO ordering services are considered to be for development, rather than production environments. You can, however, deploy multiple instances of the SOLO ordering service to different networks (that is, with a separate consortium).

Peer Considerations

  • The peer can be connected to an IBM Blockchain Platform Starter or Enterprise Plan network, or to a network created with this Helm chart.
  • You can connect your peer only to blockchain networks that are at Fabric level v1.1 or higher.
  • The database type of the peer must match the database type of your blockchain network, either LevelDB or CouchDB.
  • The CouchDB Fauxton interface is not available on the peer.
  • Gossip for peers is not currently supported. This implies that Fabric features that depend on gossip, such as private data and service discovery, are also not supported.

Prerequisites

PodSecurityPolicy Requirements

This chart requires a PodSecurityPolicy to be bound to the target namespace prior to installation. Choose either a predefined PodSecurityPolicy or have your cluster administrator create a custom PodSecurityPolicy for you:

  • Predefined PodSecurityPolicy name: ibm-privileged-psp
  • Custom PodSecurityPolicy definition:
    apiVersion: extensions/v1beta1
    kind: PodSecurityPolicy
    metadata:
      name: ibm-blockchain-platform-psp
    spec:
      hostIPC: false
      hostNetwork: false
      hostPID: false
      privileged: true
      allowPrivilegeEscalation: true
      readOnlyRootFilesystem: false
      seLinux:
        rule: RunAsAny
      supplementalGroups:
        rule: RunAsAny
      runAsUser:
        rule: RunAsAny
      fsGroup:
        rule: RunAsAny
      requiredDropCapabilities:
      - ALL
      allowedCapabilities:
      - NET_BIND_SERVICE
      - CHOWN
      - DAC_OVERRIDE
      - SETGID
      - SETUID
      volumes:
      - '*'
    
  • Custom ClusterRole for the custom PodSecurityPolicy:
    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRole
    metadata:
      annotations:
      name: ibm-blockchain-platform-clusterrole
    rules:
    - apiGroups:
      - extensions
      resourceNames:
      - ibm-blockchain-platform-psp
      resources:
      - podsecuritypolicies
      verbs:
      - use
    - apiGroups:
      - ""
      resources:
      - secrets
      verbs:
      - create
      - delete
      - get
      - list
      - patch
      - update
      - watch
    
  • Custom ClusterRoleBinding for the custom ClusterRole:
    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRoleBinding
    metadata:
     name: ibm-blockchain-platform-clusterrolebinding
    roleRef:
     apiGroup: rbac.authorization.k8s.io
     kind: ClusterRole
     name: ibm-blockchain-platform-clusterrole
    subjects:
    - kind: ServiceAccount
      name: default
      namespace: default
    

Prereq configuration scripts can be used to create and delete required resources

Find the following scripts in pak_extensions/prereqs directory of the downloaded archive.

  • createSecurityClusterPrereqs.sh to create the PodSecurityPolicy and ClusterRole for all releases of this chart.
  • createSecurityNamespacePrereqs.sh to create the RoleBinding for the namespace. This script takes one argument; the name of a pre-existing namespace where the chart will be installed.
    Example usage: ./createSecurityNamespacePrereqs.sh myNamespace
  • deleteSecurityClusterPrereqs.sh to delete the PodSecurityPolicy and ClusterRole for all releases of this chart.
  • deleteSecurityNamespacePrereqs.sh to delete the RoleBinding for the namespace. This script takes one argument; the name of the namespace where the chart was installed.
    Example usage: ./deleteSecurityNamespacePrereqs.sh myNamespace

Resources Required

Ensure that your IBM Cloud Private system meets the minimum hardware resource requirements for each Fabric runtime component:

ComponentvCPURAMDisk for data storage
CA1192 MB1 GB
Orderer2512 MB100 GB with the ability to expand when the data grows.
Peer22 GB50 GB with the ability to expand when the data grows.
CouchDB for Peer22 GBIf you use CouchDB, 50 GB with the ability to expand when the data grows.

Notes:

  • A vCPU is a virtual core that is assigned to a virtual machine or a physical processor core if the server is not partitioned for virtual machines. You need to consider vCPU requirements when you decide the virtual processor core (VPC) for your deployment in IBM Cloud Private. VPC is a unit of measurement to determine the licensing cost of IBM products. For more information about scenarios to decide VPC, see Virtual processor core (VPC).
  • These minimum resource levels are sufficient for testing and experimentation. For an environment with a large volume of transactions, it is important to allocate a sufficiently large amount of storage. For example, 250 GB for your peer and 500 GB for your orderer. The amount of storage to use will depend on the number of transactions and the number of signatures that are required from your network. If you are about to exhaust the storage on your peer or orderer, you must deploy a new peer or orderer with a larger file system and let it sync via your other components on the same channels.

Installing the Chart

  1. Log in to the IBM Cloud Private cluster and click the Catalog link in the upper right corner.
  2. Click Blockchain in the left navigation panel and click the ibm-blockchain-platform-dev tile on the right. View the Readme file that includes information about installing and configuring the Helm chart.
  3. Click Configuration tab at the top of the panel or click the Configure button in the lower right corner.
  4. Complete the configuration for the network component that you want to install. For more information about the configuration parameters, see the Configuration section below.
    Although the Helm chart UI says "To install this chart, no configuration is needed", you DO NEED to configure certain parameters to deploy a component.
  5. Click Install.

Note: You can install only one component at a time. If you plan to build a blockchain network with all these components, you need to install a CA before you install an orderer and a peer. For more information about deploying these components, see Getting started with IBM Blockchain Platform for IBM Cloud Private.

Configuration

Select the check box of the component to install and complete the parameter fields. The following tables list the configuration parameters for each component and the default values.

General and global configuration parameters

You need to complete the following parameter configuration for either component to install.

ParameterDescriptionDefaultRequired
Helm release nameThe name o

Deploy ibm-blockchain-platform-dev with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has ibm-blockchain-platform-dev 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 chartibm-blockchain-platform-dev is pinned at v1.0.2 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