@@ -60,7 +60,7 @@ This workshop provides an in-depth, hands-on discussion and demonstration of usi
6060
6161| | |
6262| -------------------------------------------------------------------------------| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
63- | ![ galagames logo] ( https://avatars.githubusercontent.com/u/135145372?s=200&v=4 ) | Gala Games is a blockchain gaming platform that empowers players to earn cryptocurrencies and NFTs through gameplay. Founded in 2018 by Eric Schiermeyer, co-founder of Zynga, it aims to create a new type of gaming experience. The platform offers limited edition NFTs and allows players to earn Gala tokens s |
63+ | ![ galagames logo] ( https://avatars.githubusercontent.com/u/135145372?s=200&v=4 ) | Gala Games is a blockchain gaming platform that empowers players to earn cryptocurrencies and NFTs through gameplay. Founded in 2018 by Eric Schiermeyer, co-founder of Zynga, it aims to create a new type of gaming experience. The platform offers limited edition NFTs and allows players to earn Gala tokens |
6464| ![ kfs logo
] ( https://avatars.githubusercontent.com/u/74511895?s=200&v=4 ) | If you want to design and deploy a secure Blockchain network based on the latest version of Hyperledger Fabric, feel free to contact
[email protected] or visit
[ https://kfs.es/blockchain ] ( https://kfs.es/blockchain ) | 6565
6666## Getting started
@@ -327,18 +327,57 @@ kubectl hlf peer create --statedb=leveldb --image=$PEER_IMAGE --version=$PEER_VE
327327 --hosts=peer0-org1.localho.st --istio-port=443
328328
329329
330- kubectl hlf peer create --statedb=leveldb --image=$PEER_IMAGE --version=$PEER_VERSION --storage-class=$SC_NAME --enroll-id=peer --mspid=Org1MSP \
331- --enroll-pw=peerpw --capacity=5Gi --name=org1-peer1 --ca-name=org1-ca.default \
332- --hosts=peer1-org1.localho.st --istio-port=443
333-
334330kubectl wait --timeout=180s --for=condition=Running fabricpeers.hlf.kungfusoftware.es --all
335331```
336332
337333Check that the peer is deployed and works:
338334
339335``` bash
340336openssl s_client -connect peer0-org1.localho.st:443
341- openssl s_client -connect peer1-org1.localho.st:443
337+ ```
338+
339+
340+ ## Deploy Org2
341+
342+ ### Deploy a certificate authority
343+
344+ ``` bash
345+ kubectl hlf ca create --image=$CA_IMAGE --version=$CA_VERSION --storage-class=$SC_NAME --capacity=1Gi --name=org2-ca \
346+ --enroll-id=enroll --enroll-pw=enrollpw --hosts=org2-ca.localho.st --istio-port=443
347+
348+ kubectl wait --timeout=180s --for=condition=Running fabriccas.hlf.kungfusoftware.es --all
349+ ```
350+
351+ Check that the certification authority is deployed and works:
352+
353+ ``` bash
354+ curl -k https://org2-ca.localho.st:443/cainfo
355+ ```
356+
357+ Register a user in the certification authority of the peer organization (Org2MSP)
358+
359+ ``` bash
360+ # register user in CA for peers
361+ kubectl hlf ca register --name=org2-ca --user=peer --secret=peerpw --type=peer \
362+ --enroll-id enroll --enroll-secret=enrollpw --mspid Org2MSP
363+
364+ ```
365+
366+ ### Deploy a peer
367+
368+ ``` bash
369+ kubectl hlf peer create --statedb=leveldb --image=$PEER_IMAGE --version=$PEER_VERSION --storage-class=$SC_NAME --enroll-id=peer --mspid=Org2MSP \
370+ --enroll-pw=peerpw --capacity=5Gi --name=org2-peer0 --ca-name=org2-ca.default \
371+ --hosts=peer0-org2.localho.st --istio-port=443
372+
373+
374+ kubectl wait --timeout=180s --for=condition=Running fabricpeers.hlf.kungfusoftware.es --all
375+ ```
376+
377+ Check that the peer is deployed and works:
378+
379+ ``` bash
380+ openssl s_client -connect peer0-org2.localho.st:443
342381```
343382
344383## Deploy an ` Orderer ` organization
@@ -376,6 +415,7 @@ kubectl hlf ca register --name=ord-ca --user=orderer --secret=ordererpw \
376415### Deploy orderer
377416
378417``` bash
418+
379419kubectl hlf ordnode create --image=$ORDERER_IMAGE --version=$ORDERER_VERSION \
380420 --storage-class=$SC_NAME --enroll-id=orderer --mspid=OrdererMSP \
381421 --enroll-pw=ordererpw --capacity=2Gi --name=ord-node1 --ca-name=ord-ca.default \
@@ -394,6 +434,12 @@ kubectl hlf ordnode create --image=$ORDERER_IMAGE --version=$ORDERER_VERSION \
394434 --hosts=orderer2-ord.localho.st --admin-hosts=admin-orderer2-ord.localho.st --istio-port=443
395435
396436
437+ kubectl hlf ordnode create --image=$ORDERER_IMAGE --version=$ORDERER_VERSION \
438+ --storage-class=$SC_NAME --enroll-id=orderer --mspid=OrdererMSP \
439+ --enroll-pw=ordererpw --capacity=2Gi --name=ord-node4 --ca-name=ord-ca.default \
440+ --hosts=orderer3-ord.localho.st --admin-hosts=admin-orderer3-ord.localho.st --istio-port=443
441+
442+
397443
398444kubectl wait --timeout=180s --for=condition=Running fabricorderernodes.hlf.kungfusoftware.es --all
399445```
@@ -406,6 +452,9 @@ kubectl get pods
406452
407453``` bash
408454openssl s_client -connect orderer0-ord.localho.st:443
455+ openssl s_client -connect orderer1-ord.localho.st:443
456+ openssl s_client -connect orderer2-ord.localho.st:443
457+ openssl s_client -connect orderer3-ord.localho.st:443
409458```
410459
411460
@@ -466,15 +515,36 @@ kubectl hlf identity create --name org1-admin --namespace default \
466515
467516```
468517
469- ### Create the secret
518+
519+ ### Register and enrolling Org2MSP identity
470520
471521``` bash
522+ # register
523+ kubectl hlf ca register --name=org2-ca --namespace=default --user=admin --secret=adminpw \
524+ --type=admin --enroll-id enroll --enroll-secret=enrollpw --mspid=Org2MSP
525+
526+ # enroll
527+ kubectl hlf ca enroll --name=org2-ca --namespace=default \
528+ --user=admin --secret=adminpw --mspid Org2MSP \
529+ --ca-name ca --output org2msp.yaml
530+
531+ # enroll
532+ kubectl hlf identity create --name org2-admin --namespace default \
533+ --ca-name org2-ca --ca-namespace default \
534+ --ca ca --mspid Org2MSP --enroll-id admin --enroll-secret adminpw
535+
536+
537+ ```
472538
539+ ### Create the secret
540+
541+ ``` bash
473542kubectl create secret generic wallet --namespace=default \
474543 --from-file=org1msp.yaml=$PWD /org1msp.yaml \
475544 --from-file=org2msp.yaml=$PWD /org2msp.yaml \
476545 --from-file=orderermsp.yaml=$PWD /orderermsp.yaml \
477546 --from-file=orderermspsign.yaml=$PWD /orderermspsign.yaml
547+
478548```
479549
480550### Create main channel
@@ -491,6 +561,7 @@ export ORDERER_TLS_CERT=$(kubectl get fabriccas ord-ca -o=jsonpath='{.status.tls
491561export ORDERER0_TLS_CERT=$( kubectl get fabricorderernodes ord-node1 -o=jsonpath=' {.status.tlsCert}' | sed -e " s/^/${IDENT_8} /" )
492562export ORDERER1_TLS_CERT=$( kubectl get fabricorderernodes ord-node2 -o=jsonpath=' {.status.tlsCert}' | sed -e " s/^/${IDENT_8} /" )
493563export ORDERER2_TLS_CERT=$( kubectl get fabricorderernodes ord-node3 -o=jsonpath=' {.status.tlsCert}' | sed -e " s/^/${IDENT_8} /" )
564+ export ORDERER3_TLS_CERT=$( kubectl get fabricorderernodes ord-node4 -o=jsonpath=' {.status.tlsCert}' | sed -e " s/^/${IDENT_8} /" )
494565
495566kubectl apply -f - << EOF
496567apiVersion: hlf.kungfusoftware.es/v1alpha1
@@ -508,6 +579,7 @@ spec:
508579 acls: null
509580 capabilities:
510581 - V2_0
582+ - V2_5
511583 policies: null
512584 capabilities:
513585 - V2_0
@@ -571,11 +643,14 @@ spec:
571643 port: 7053
572644 - host: ord-node3.default
573645 port: 7053
646+ - host: ord-node4.default
647+ port: 7053
574648 mspID: OrdererMSP
575649 ordererEndpoints:
576650 - orderer0-ord.localho.st:443
577651 - orderer1-ord.localho.st:443
578652 - orderer2-ord.localho.st:443
653+ - orderer3-ord.localho.st:443
579654 orderersToJoin: []
580655 orderers:
581656 - host: orderer0-ord.localho.st
@@ -590,6 +665,10 @@ ${ORDERER1_TLS_CERT}
590665 port: 443
591666 tlsCert: |-
592667${ORDERER2_TLS_CERT}
668+ - host: orderer3-ord.localho.st
669+ port: 443
670+ tlsCert: |-
671+ ${ORDERER3_TLS_CERT}
593672
594673EOF
595674
631710```
632711
633712
713+ ## Join peer to the channel
714+
715+ ``` bash
716+
717+ export IDENT_8=$( printf " %8s" " " )
718+ export ORDERER0_TLS_CERT=$( kubectl get fabricorderernodes ord-node1 -o=jsonpath=' {.status.tlsCert}' | sed -e " s/^/${IDENT_8} /" )
719+
720+ kubectl apply -f - << EOF
721+ apiVersion: hlf.kungfusoftware.es/v1alpha1
722+ kind: FabricFollowerChannel
723+ metadata:
724+ name: demo-org2msp
725+ spec:
726+ anchorPeers:
727+ - host: peer0-org2.localho.st
728+ port: 443
729+ hlfIdentity:
730+ secretKey: org2msp.yaml
731+ secretName: wallet
732+ secretNamespace: default
733+ mspId: Org2MSP
734+ name: demo
735+ externalPeersToJoin: []
736+ orderers:
737+ - certificate: |
738+ ${ORDERER0_TLS_CERT}
739+ url: grpcs://ord-node1.default:7050
740+ peersToJoin:
741+ - name: org2-peer0
742+ namespace: default
743+ EOF
744+
745+
746+ ```
747+
748+
634749
635750## Install a chaincode
636751
0 commit comments