All Projects → vanitas92 → fabric-external-chaincodes

vanitas92 / fabric-external-chaincodes

Licence: Apache-2.0 License
Hyperledger Fabric network in K8s with External Chaincodes as pods

Programming Languages

go
31211 projects - #10 most used programming language
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to fabric-external-chaincodes

fablo
Fablo is a simple tool to generate the Hyperledger Fabric blockchain network and run it on Docker. It supports RAFT and solo consensus protocols, multiple organizations and channels, chaincode installation and upgrade.
Stars: ✭ 121 (+75.36%)
Mutual labels:  hyperledger-fabric, chaincodes
hyperledger
区块链3.0 -> 超级账本hyperledger fabirc v1.1
Stars: ✭ 58 (-15.94%)
Mutual labels:  hyperledger-fabric
readme
The Blockchain Bible,a collections for blockchain tech,bitcoin,ethereum,crypto currencies,cryptography,decentralized solutions,business scenarios,hyperledger tech,meetups,区块链,数字货币,加密货币,比特币,以太坊,密码学,去中心化,超级账本
Stars: ✭ 46 (-33.33%)
Mutual labels:  hyperledger-fabric
fabex
Block explorer for Hyperledger Fabric
Stars: ✭ 26 (-62.32%)
Mutual labels:  hyperledger-fabric
docker-hyperledger-fabric-peer
Docker image for Hyperledger Fabric Peer
Stars: ✭ 25 (-63.77%)
Mutual labels:  hyperledger-fabric
hlf1.4-supply-chain
Supply chain proof of concept in Hyperledger Fabric. Network with four companies and a specific chaincode exposed as rest API
Stars: ✭ 30 (-56.52%)
Mutual labels:  hyperledger-fabric
hlfabric-k8scc
Chaincode builder and launcher for Hyperledger Fabric on Kubernetes
Stars: ✭ 21 (-69.57%)
Mutual labels:  hyperledger-fabric
mastering-blockchain
blockchain basis,logic,usage
Stars: ✭ 29 (-57.97%)
Mutual labels:  hyperledger-fabric
fabric-network-boilerplate
Boilerplate for starting your hyperledger fabric network
Stars: ✭ 63 (-8.7%)
Mutual labels:  hyperledger-fabric
Create-BlockchainNetwork-IBPV20
Creating a basic Blockchain network using the IBM Blockchain Platform
Stars: ✭ 74 (+7.25%)
Mutual labels:  hyperledger-fabric
hurley
The development environment toolset for blockchain projects
Stars: ✭ 79 (+14.49%)
Mutual labels:  hyperledger-fabric
brooklyn-hyperledger-kubernetes
Cloudsoft AMP blueprints for deploying Hyperledger Fabric onto Kubernetes
Stars: ✭ 14 (-79.71%)
Mutual labels:  hyperledger-fabric
hlf-sdk-go
Hyperledger Fabric Golang SDK
Stars: ✭ 37 (-46.38%)
Mutual labels:  hyperledger-fabric
HealthLedger
Application for tracking Organs donations in hospitals and minimizing the scope of Organ trafficking using Blockchain (Hyperledger) technology.
Stars: ✭ 29 (-57.97%)
Mutual labels:  hyperledger-fabric
bdk
Streamlined blockchain deployment kit for Hyperledger Fabric.
Stars: ✭ 43 (-37.68%)
Mutual labels:  hyperledger-fabric
fabric-operation
Scripts to configure and deploy Hyperledger Fabric applications locally or in cloud by using Kubernetes or docker-compose
Stars: ✭ 15 (-78.26%)
Mutual labels:  hyperledger-fabric
fabric-smart-client
The Fabric Smart Client is a new Fabric Client that lets you focus on the business processes and simplifies the development of Fabric-based distributed application.
Stars: ✭ 40 (-42.03%)
Mutual labels:  hyperledger-fabric
hlf-operator
Hyperledger Fabric Kubernetes operator - Hyperledger Fabric operator for Kubernetes (v2.2+)
Stars: ✭ 112 (+62.32%)
Mutual labels:  hyperledger-fabric
fabric-java-block
集成springboot和fabric sdk 提供rest api的接口
Stars: ✭ 37 (-46.38%)
Mutual labels:  hyperledger-fabric
monitoring ui
WARNING: This repository is no longer maintained ⚠️ This repository will not be updated. The repository will be kept available in read-only mode. Use React.js, Watson IoT Platform, and the Hyperledger Fabric Node SDK to interact with an IBM Blockchain service
Stars: ✭ 29 (-57.97%)
Mutual labels:  hyperledger-fabric

Hyperledger Fabric network in K8s with External Chaincodes as pods

Refer the tutorial and instructions in this article: https://medium.com/@pau.aragones/how-to-implement-hyperledger-fabric-external-chaincodes-within-a-kubernetes-cluster-fd01d7544523

Install the binaries

wget https://github.com/hyperledger/fabric/releases/download/v2.3.1/hyperledger-fabric-linux-amd64-2.3.1.tar.gz

tar -xzf hyperledger-fabric-linux-amd64-2.3.1.tar.gz

# Move to the bin path
mv bin/* /bin

# Check that you have successfully installed the tools by executing
configtxgen --version

# Should print the following output:
# configtxgen:
#  Version: 2.3.1
#  Commit SHA: 2f69b4222
#  Go version: go1.14.12
#  OS/Arch: linux/amd64

Launching the network

./fabricOps.sh start

Create the namespace and launch the workload:

kubectl create ns hyperledger
kubectl create -f orderer-service/
kubectl create -f org1/
kubectl create -f org2/

Configure the network

peer channel create -o orderer0:7050 -c mychannel -f ./scripts/channel-artifacts/channel.tx --tls true --cafile $ORDERER_CA
peer channel join -b mychannel.block
peer channel fetch 0 mychannel.block -c mychannel -o orderer0:7050 --tls --cafile $ORDERER_CA

Package the chaincode information for the peer and install it

cd chaincode/packaging
tar cfz code.tar.gz connection.json
tar cfz marbles-org1.tgz code.tar.gz metadata.json
peer lifecycle chaincode install marbles-org1.tgz

Build and deploy the chaincode

docker build -t chaincode/marbles:1.0 .
kubectl create -f chaincode/k8s

Approve the chaincode and commit it to the channel

peer lifecycle chaincode approveformyorg --channelID mychannel --name marbles --version 1.0 --init-required --package-id marbles:d8140fbc1a0903bd88611a96c5b0077a2fdeef00a95c05bfe52e207f5f9ab79d --sequence 1 -o orderer0:7050 --tls --cafile $ORDERER_CA

peer lifecycle chaincode approveformyorg --channelID mychannel --name marbles --version 1.0 --init-required --package-id marbles:af45e0faa9676dd884a56e34b6a9bc1f7f1df04d6356aa1b2b9f123bd1d9e9e6 --sequence 1 -o orderer0:7050 --tls --cafile $ORDERER_CA

peer lifecycle chaincode checkcommitreadiness --channelID mychannel --name marbles --version 1.0 --init-required --sequence 1 -o -orderer0:7050 --tls --cafile $ORDERER_CA

peer lifecycle chaincode commit -o orderer0:7050 --channelID mychannel --name marbles --version 1.0 --sequence 1 --init-required --tls true --cafile $ORDERER_CA --peerAddresses peer0-org1:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1/peers/peer0-org1/tls/ca.crt --peerAddresses peer0-org2:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2/peers/peer0-org2/tls/ca.crt

Invoke and query the chaincode

peer chaincode invoke -o orderer0:7050 --isInit --tls true --cafile $ORDERER_CA -C mychannel -n marbles --peerAddresses peer0-org1:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1/peers/peer0-org1/tls/ca.crt --peerAddresses peer0-org2:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2/peers/peer0-org2/tls/ca.crt -c '{"Args":["initMarble","marble1","blue","35","tom"]}' --waitForEvent

peer chaincode invoke -o orderer0:7050 --tls true --cafile $ORDERER_CA -C mychannel -n marbles --peerAddresses peer0-org1:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1/peers/peer0-org1/tls/ca.crt --peerAddresses peer0-org2:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2/peers/peer0-org2/tls/ca.crt -c '{"Args":["initMarble","marble1","blue","35","tom"]}' --waitForEvent

peer chaincode invoke -o orderer0:7050 --tls true --cafile $ORDERER_CA -C mychannel -n marbles --peerAddresses peer0-org1:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1/peers/peer0-org1/tls/ca.crt --peerAddresses peer0-org2:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2/peers/peer0-org2/tls/ca.crt -c '{"Args":["initMarble","marble2","red","50","tom"]}' --waitForEvent

peer chaincode query -C mychannel -n marbles -c '{"Args":["readMarble","marble1"]}'

Commands for ContractApi based External Chaincode

peer lifecycle chaincode approveformyorg --channelID mychannel --name fabcar --version 1.0 --package-id fabcar:005c35f4f172c056723eca09d41e8048e0beaa2712d920c19af837640df7e2aa --sequence 1 -o orderer0:7050 --tls --cafile $ORDERER_CA


peer lifecycle chaincode approveformyorg --channelID mychannel --name fabcar --version 1.0 --package-id fabcar:61ab817a6ad76098d340952e5d8e928d9c5ddff1a53341dc8d0c64b4345564b0 --sequence 1 -o orderer0:7050 --tls --cafile $ORDERER_CA


peer lifecycle chaincode checkcommitreadiness --channelID mychannel --name fabcar --version 1.0 --sequence 1 -o -orderer0:7050 --tls --cafile $ORDERER_CA

peer lifecycle chaincode commit -o orderer0:7050 --channelID mychannel --name fabcar --version 1.0 --sequence 1 --tls true --cafile $ORDERER_CA --peerAddresses peer0-org1:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1/peers/peer0-org1/tls/ca.crt --peerAddresses peer0-org2:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2/peers/peer0-org2/tls/ca.crt


peer chaincode invoke -o orderer0:7050 --tls true --cafile $ORDERER_CA -C mychannel -n fabcar --peerAddresses peer0-org1:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1/peers/peer0-org1/tls/ca.crt --peerAddresses peer0-org2:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2/peers/peer0-org2/tls/ca.crt -c '{"Args":["InitLedger"]}' --waitForEvent

peer chaincode query -C mychannel -n fabcar -c '{"Args":["QueryAllCars"]}' 
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].