fabric-samples/test-network-k8s
Josh Kneubuhl 551250636d Run the Kube Test Network on Rancher / k3s
Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>
2022-05-09 13:43:13 -04:00
..
config test-network-k8s: Some minor improvements (#718) 2022-04-19 07:29:52 -04:00
docs Provide clear guidance for debugging Java chaincode as a service #684 (#724) 2022-04-26 15:33:14 +01:00
kube Run the Kube Test Network on Rancher / k3s 2022-05-09 13:43:13 -04:00
scripts Run the Kube Test Network on Rancher / k3s 2022-05-09 13:43:13 -04:00
.gitignore test-network-k8s : Connect to Fabric services via Nginx Ingress - READY FOR MERGE (#692) 2022-03-31 17:12:51 +01:00
network Run the Kube Test Network on Rancher / k3s 2022-05-09 13:43:13 -04:00
README.md Run the Kube Test Network on Rancher / k3s 2022-05-09 13:43:13 -04:00

Kubernetes Test Network

This project re-establishes the Hyperledger test-network as a cloud native application.

Objectives:

  • Provide a simple, one click activity for running the Fabric test network.
  • Provide a reference guide for deploying production-style networks on Kubernetes.
  • Provide a cloud ready platform for developing chaincode, Gateway, and blockchain apps.
  • Provide a Kube supplement to the Fabric CA Operations and Deployment guides.
  • Support a transition to Chaincode as a Service.
  • Support a transition from the Internal, Docker daemon to External Chaincode builders.
  • Run on any Kube.

Fabric, Ahoy!

Prerequisites

Quickstart

Create a local Kubernetes cluster:

./network kind

For environments with Rancher / k3s + mobyd:

export TEST_NETWORK_CLUSTER_RUNTIME=k3s

./network cluster-init 

Launch the network, create a channel, and deploy the basic-asset-transfer smart contract:

./network up
./network channel create

./network chaincode deploy asset-transfer-basic basic_1.0 $PWD/../asset-transfer-basic/chaincode-java

Invoke and query chaincode:

./network chaincode invoke asset-transfer-basic '{"Args":["CreateAsset","1","blue","35","tom","1000"]}' 
./network chaincode query  asset-transfer-basic '{"Args":["ReadAsset","1"]}'

Access the blockchain with a REST API:

./network rest-easy

Tear down the test network:

./network down 

Tear down the cluster:

./network unkind

Detailed Guides

Areas for Improvement / TODOs

  • Test the recipe with OCP, AWS, gcp, Azure, etc. (These should ONLY differ w.r.t. pvc and ingress)
  • Address any of the 20+ todo: notes in network.sh
  • Implement mutual TLS across peers, orderers, and clients.
  • Caliper?