Skip to content

Commit

Permalink
Merge pull request #2560 from mgCepeda/feature-2549v3
Browse files Browse the repository at this point in the history
[fabric] Create channel using just helm
  • Loading branch information
sownak authored May 22, 2024
2 parents 2a7c9ac + 45b9003 commit 8488213
Show file tree
Hide file tree
Showing 61 changed files with 1,597 additions and 1,182 deletions.
69 changes: 63 additions & 6 deletions platforms/hyperledger-fabric/charts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Configure `settings.generateCertificates` field with value `true` for the genera

```bash
# Install the Orderers
helm install orderer1 ./fabric-orderernode --namespace supplychain-net --values ./values/noproxy-and-novault/ordererOrganization/orderer.yaml
helm install orderer1 ./fabric-orderernode --namespace supplychain-net --values ./values/noproxy-and-novault/ordererOrganization/orderer.yaml --set settings.generateCertificates=true
helm install orderer2 ./fabric-orderernode --namespace supplychain-net --values ./values/noproxy-and-novault/ordererOrganization/orderer.yaml
helm install orderer3 ./fabric-orderernode --namespace supplychain-net --values ./values/noproxy-and-novault/ordererOrganization/orderer.yaml
```
Expand Down Expand Up @@ -83,7 +83,7 @@ cd ../..
helm dependency update fabric-peernode
# Install the Peers
helm install peer0-carrier ./fabric-peernode --namespace carrier-net --values ./values/noproxy-and-novault/peerOrganization/peer.yaml
helm install peer0-carrier ./fabric-peernode --namespace carrier-net --values ./values/noproxy-and-novault/peerOrganization/peer.yaml --set settings.generateCertificates=true
```

### Generate genesis file
Expand All @@ -98,6 +98,33 @@ cd ../..
helm install genesis ./fabric-genesis --namespace supplychain-net --values ./values/noproxy-and-novault/ordererOrganization/genesis.yaml
```

### Create channel for Hyperledger Fabric 2.5.4
```bash
# Install create channel
helm install allchannel ./fabric-osnadmin-channel-create --namespace supplychain-net --values ./values/noproxy-and-novault/ordererOrganization/osn-create-channel.yaml
# Install join channel and anchorpeer
helm install peer0-carrier-allchannel ./fabric-channel-join --namespace carrier-net --values ./values/noproxy-and-novault/peerOrganization/join-channel.yaml
```
**Note** Anchorpeer job is only executed if `peer.type` is set to `anchor`

### Create channel for Hyperledger Fabric 2.2.2
```bash
# Obtain the file channel.tx and place it in fabric-channel-create/files
kubectl --namespace supplychain-net get configmap channel-artifacts-allchannel -o json > channel.tx.json
# Install create channel
helm install allchannel ./fabric-channel-create --namespace carrier-net --values ./values/noproxy-and-novault/peerOrganization/create-channel.yaml
# Get the file anchors.tx and place it in fabric-channel-join/files
kubectl --namespace supplychain-net get configmap anchorpeer-artifacts-allchannel -o json > anchors.tx.json
# Install join channel and anchorpeer
helm install peer0-carrier-allchannel ./fabric-channel-join --namespace carrier-net --values ./values/noproxy-and-novault/peerOrganization/join-channel.yaml
```
**Note** Anchorpeer job is only executed if `peer.type` is set to `anchor`

### _With Haproxy proxy and Vault_

### To setup Orderer organization
Expand All @@ -116,7 +143,7 @@ Configure `settings.generateCertificates` field with value `true` for the genera

```bash
# Install the Orderers
helm install orderer1 ./fabric-orderernode --namespace supplychain-net --values ./values/proxy-and-vault/ordererOrganization/orderer.yaml
helm install orderer1 ./fabric-orderernode --namespace supplychain-net --values ./values/proxy-and-vault/ordererOrganization/orderer.yaml --set settings.generateCertificates=true
helm install orderer2 ./fabric-orderernode --namespace supplychain-net --values ./values/proxy-and-vault/ordererOrganization/orderer.yaml
helm install orderer3 ./fabric-orderernode --namespace supplychain-net --values ./values/proxy-and-vault/ordererOrganization/orderer.yaml
```
Expand All @@ -130,7 +157,7 @@ kubectl create namespace carrier-net
kubectl -n carrier-net create secret generic roottoken --from-literal=token=<VAULT_ROOT_TOKEN>
helm install carrier-ca ./fabric-ca-server --namespace carrier-net --values ./values/proxy-and-vault/peerOrganization/ca-server.yaml
helm install carrier-ca ./fabric-ca-server --namespace carrier-net --values ./values/proxy-and-vault/peerOrganization/ca-server.yaml
```
Configure `settings.generateCertificates` field with value `true` for the generation of the cryptographic materials. This value should only be set to `true` in first peer to be installed and `false` in the others.
Expand All @@ -149,7 +176,7 @@ cd ../..
helm dependency update fabric-peernode
# Install the Peers
helm install peer0-carrier ./fabric-peernode --namespace carrier-net --values ./values/proxy-and-vault/peerOrganization/peer.yaml
helm install peer0-carrier ./fabric-peernode --namespace carrier-net --values ./values/proxy-and-vault/peerOrganization/peer.yaml --set settings.generateCertificates=true
```

### Generate genesis file
Expand All @@ -164,10 +191,40 @@ cd ../..
helm install genesis ./fabric-genesis --namespace supplychain-net --values ./values/proxy-and-vault/ordererOrganization/genesis.yaml
```

### Create channel for Hyperledger Fabric 2.5.4
```bash
# Install create channel
helm install allchannel ./fabric-osnadmin-channel-create --namespace supplychain-net --values ./values/proxy-and-vault/ordererOrganization/osn-create-channel.yaml
# Install join channel and anchorpeer
helm install peer0-carrier-allchannel ./fabric-channel-join --namespace carrier-net --values ./values/proxy-and-vault/peerOrganization/join-channel.yaml
```
**Note** Anchorpeer job is only executed if `peer.type` is set to `anchor`

### Create channel for Hyperledger Fabric 2.2.2
```bash
# Obtain the file channel.tx and place it in fabric-channel-create/files
kubectl --namespace supplychain-net get configmap channel-artifacts-allchannel -o json > channel.tx.json
# Install create channel
helm install allchannel ./fabric-channel-create --namespace carrier-net --values ./values/proxy-and-vault/peerOrganization/create-channel.yaml
# Get the file anchors.tx and place it in fabric-channel-join/files
kubectl --namespace supplychain-net get configmap anchorpeer-artifacts-allchannel -o json > anchors.tx.json
# Install join channel and anchorpeer
helm install peer0-carrier-allchannel ./fabric-channel-join --namespace carrier-net --values ./values/proxy-and-vault/peerOrganization/join-channel.yaml
```
**Note** Anchorpeer job is only executed if `peer.type` is set to `anchor`

### Clean-up

To clean up, just uninstall the helm releases.
To clean up, just uninstall the helm releases
```bash
helm uninstall --namespace carrier-net peer0-carrier-allchannel
helm uninstall --namespace supplychain-net allchannel
helm uninstall --namespace carrier-net allchannel
helm uninstall --namespace supplychain-net orderer1
helm uninstall --namespace supplychain-net orderer2
helm uninstall --namespace supplychain-net orderer3
Expand Down
11 changes: 0 additions & 11 deletions platforms/hyperledger-fabric/charts/fabric-anchorpeer/Chart.yaml

This file was deleted.

199 changes: 0 additions & 199 deletions platforms/hyperledger-fabric/charts/fabric-anchorpeer/README.md

This file was deleted.

This file was deleted.

Loading

0 comments on commit 8488213

Please sign in to comment.