This project re-establishes the Hyperledger test-network as a cloud native application.
Fabric, Ahoy!
envsubst (brew install gettext
on OSX)
K8s - either:
Create a KIND cluster:
./network kind
./network cluster init
or for Rancher / k3s:
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 ../asset-transfer-basic/chaincode-java
Invoke and query chaincode:
./network chaincode invoke asset-transfer-basic '{"Args":["InitLedger"]}'
./network chaincode query asset-transfer-basic '{"Args":["ReadAsset","asset1"]}'
Access the blockchain with a REST API:
./network rest-easy
Shut down the test network:
./network down
Tear down the cluster (KIND):
./network unkind
For Rancher: Preferences -> Kubernetes Settings -> Reset Kubernetes OR ...
./network cluster clean
Fabric's OSX binaries have been statically linked with the golang go
DNS resolver. In some environments, this
causes a brief but noticeable delay when issuing peer commands
against the test network.
Workarounds to improve DNS resolution time on OSX:
127.0.0.1 org0-ca.localho.st
127.0.0.1 org1-ca.localho.st
127.0.0.1 org2-ca.localho.st
127.0.0.1 org0-orderer1.localho.st
127.0.0.1 org0-orderer2.localho.st
127.0.0.1 org0-orderer3.localho.st
127.0.0.1 org1-peer1.localho.st
127.0.0.1 org1-peer2.localho.st
127.0.0.1 org2-peer1.localho.st
127.0.0.1 org2-peer2.localho.st
options: timeout 2
build/bin/*
outputs to
test-network-k8s/bin
. Mac native builds are linked against the netdns=cgo
DNS resolver, and are not
subject to the timeouts associated with the Golang DNS resolver.此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。