Skip to content

Commit bdacaf2

Browse files
author
Tittu Varghese
committed
Merge branch 'fix/readme' into 'main'
Updated hlf-builder image, readme corrections. See merge request opensource/falcon!2
2 parents 6d31457 + 06be2ea commit bdacaf2

File tree

6 files changed

+37
-35
lines changed

6 files changed

+37
-35
lines changed

Dockerfile

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
FROM hyperledger/fabric-tools:2.4
2-
RUN apk add openssl curl curl-dev
3-
RUN wget https://github.com/hyperledger/fabric-ca/releases/download/v1.5.6/hyperledger-fabric-ca-linux-arm64-1.5.6.tar.gz
4-
RUN tar -xvzf hyperledger-fabric-ca-linux-arm64-1.5.6.tar.gz
5-
RUN mv bin/fabric-ca-client /usr/local/bin/fabric-ca-client
2+
RUN apk add openssl curl curl-dev gcompat libc6-compat
3+
RUN wget https://github.com/hyperledger/fabric-ca/releases/download/v1.5.1/hyperledger-fabric-ca-linux-amd64-1.5.1.tar.gz
64
RUN wget https://storage.googleapis.com/kubernetes-release/release/v1.23.10/bin/linux/amd64/kubectl \
5+
&& tar -xvzf hyperledger-fabric-ca-linux-amd64-1.5.1.tar.gz \
6+
&& mv bin/fabric-ca-client /usr/local/bin/fabric-ca-client \
77
&& mv kubectl /usr/local/bin/ \
88
&& chmod 755 /usr/local/bin/fabric-ca-client \
9-
&& chmod 755 /usr/local/bin/kubectl
10-
9+
&& chmod 755 /usr/local/bin/kubectl \
10+
&& ln -s /lib/libc.so.6 /usr/lib/libresolv.so.2

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Whether you're a blockchain enthusiast, developer, or enterprise seeking to harn
3434
- [ ] Key Management using HSM / Vault
3535

3636
### Releases
37-
- v1.0.0
37+
- [v1.0.0](/releases/latest)
3838

3939
### Samples
4040
Please refer our [examples](examples/README.md) for running a complete blockchain network using the deployment helper.

examples/README.md

+25-23
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## HLF Deployment Helper
1+
## Falcon : HLF Deployment Helper
22

33
### Reference Deployment Strategies
44
[![HLF DEPLOYMENT HELPER](../images/hlf-open-deployment.png)]()
@@ -11,20 +11,21 @@
1111
[![Helm Version](https://img.shields.io/badge/helm_version-v3.10.1+-blue)]()
1212
[![Nginx Version](https://img.shields.io/badge/nginx_ingress_version-v1.7.0+-blue)]()
1313

14-
* Nginx Ingress can be replaced with any other K8S ingress that supports ```SNI based routing```. The ingress service should be exposed by two ```Nodeports for Ports: 80/TCP, 443/TCP```. Eg; NodePort 30000 => 443/TCP (Ingress service).
14+
* Nginx Ingress OR any other K8S ingress that supports ```SNI based routing```. The ingress service should be exposed by two ```Nodeports for Ports: 80/TCP, 443/TCP```. Eg; NodePort 30000 => 443/TCP (Ingress service).
1515
* ```--enable-ssl-passthrough``` Should be enabled on the Nginx Ingress pod. All of the Hyperledger Fabric related TLS requests should be terminated on the Pod level as long as we're keeping the certs in the POD itself. If Nginx, then a similar ssl passthrough annotation ```"nginx.ingress.kubernetes.io/ssl-passthrough: "true"``` must be added to all the HLF Ingress resources we create. This annotation can be handled from the values file for every helm chart. In case if you're not using Nginx Ingress, kindly add the proper annotations accordingly.
16-
* ```Configurable DNS```. You should have the ability to add custom DNS zones that are resolvable from the pods. If you're using CoreDNS, follow this guide to add custom zones on your Kubernetes cluster https://coredns.io/2017/05/08/custom-dns-entries-for-kubernetes/. If deploying to GKE, you can make use of CloudDNS private zones.
17-
* Once added the zone, then you need to add A record(s) point to the server(s) where the Ingress is listening. It must be a wildcard DNS entry.
16+
* ```Configurable DNS```. You should have the ability to add custom DNS zones that are resolvable from the pods. If you're using CoreDNS, follow this guide to add custom zones on your Kubernetes cluster https://coredns.io/2017/05/08/custom-dns-entries-for-kubernetes/. If deploying to GKE on GCP, you can make use of CloudDNS private zones.
17+
* Once added the zone, then you need to add A record(s) that points to the server(s) where the Ingress is listening. It must be a wildcard DNS entry.
1818
Eg, If your domain name is ```my-hlf-domain.com``` and you have 3 worker nodes ```10.10.10.10``` ```10.10.10.11``` ```10.10.10.12```. Then you need to create a DNS entry ```*.my-hlf-domain.com``` to point to above IPs. This is a must have configuration and make sure that wildcard DNS queries are resolving properly. If this fails, the deployment will fail. Kindly make sure this DNS is resolving and the tcp connections are reaching the ingress. You can verify it by simple telnet command.
1919
```telnet anyname.my-hlf-domain.com 30000 ``` assuming that 30000 is the Nodeport on Nginx Ingress that maps to Ingress 443.
20+
If you're in any public cloud platform, then hard coding the worker node IP in the DNS is not a reliable approach since the worker node can be changed at any time. In that case, you can deploy an Internal Cloud LB.
2021
* ```StorageClass``` that supports dynamic volume provisioning.
2122
* We're using the docker hub upstream HyperLedger Fabric images for Fabric CA, Peers, Orderers and a custom builder tool which is hosted on NPCI docker hub registry. Make sure that your worker nodes can pull these images from docker hub. If not, upload them to your internal registry and the registry/repository can be managed over values.
2223

2324

2425

2526
##### Keep in mind the following things throughout this example deployment;
2627

27-
1. We'll be using the domain `my-hlf-domain.com`. If you have created a different domain as specified in the pre-req section, then update the `my-hlf-domain.com` to your domain name whereever there is a mention.
28+
1. We'll be using the domain `my-hlf-domain.com`. If you have created a different domain as specified in the pre-req section, then update the `my-hlf-domain.com` to your domain name wherever there is a mention.
2829
2. The Ingress classname is `nginx`. You need to change it to the appropriate value on your environment if you have a different one.
2930
3. Nginx ingress services are exposed on `30000` and `30001` for `https` and `http` nodeports respectively.
3031
4. StorageClass we use `standard-rwo`. Feel free to to change it to your storageclass.
@@ -58,16 +59,17 @@ Clone this repository and change your directory to the root directory. First you
5859

5960
2. **Deploy ROOT CA**
6061

61-
Create a kubernetes secret with ```user``` and ```password``` as keys for this ROOTCA server. We kept this secret out of the helm charts/values to get more security. All CA/ICA/TLSCA server username/password are handled in this way. Change the ```namespace``` & ```secret``` name if you need a different one and update the secret name at `ca_server.admin_secret`
62+
Create a kubernetes secret with ```user``` and ```password``` as keys for this `ROOTCA` server. We kept this secret out of the helm charts/values to get more security. All CA/ICA/TLSCA server username/password are handled in this way. Change the ```namespace``` & ```secret``` name if you need a different one and update the secret name at `ca_server.admin_secret`
6263
```
64+
# kubectl create ns orderer
6365
# kubectl -n orderer create secret generic rca-secret --from-literal=user=rca-admin --from-literal=password=rcaComplexPassword
6466
```
6567

6668
Apply the `fabric-ca` chart with our values file. If you change the ```tls_domain, docker images, secret & storageClass``` then update the [examples/fabric-ca/root-ca.yaml](./fabric-ca/root-ca.yaml) accordingly.
6769
```
6870
# helm install root-ca -n orderer helm-charts/fabric-ca -f examples/fabric-ca/root-ca.yaml
6971
```
70-
his will deploy the `root-ca` server for you and the server will be available at `https://root-ca.my-hlf-domain.com`. To verify the server, you can get into any running pod in the cluster and send a curl request as below;
72+
This will deploy the `root-ca` server for you and the server will be available at `https://root-ca.my-hlf-domain.com`. To verify the server, you can get into any running pod in the cluster and send a curl request as below;
7173
```
7274
curl https://root-ca.my-hlf-domain.com:30000/cainfo --insecure
7375
```
@@ -77,7 +79,7 @@ You will get the CA response like below.
7779

7880
3. **Deploy TLSCA**
7981

80-
Create an another kubernetes secret for your `TLSCA` server just like we did it for `ROOTCA` and update the secret name in the values file `examples/fabric-ca/tls-ca.yaml`. If you change the ```tls_domain, docker images, secret & storageClass``` then update the [examples/fabric-ca/root-ca.yaml](./fabric-ca/root-ca.yaml) accordingly.
82+
Create an another kubernetes secret for your `TLSCA` server just like we did it for `ROOTCA` and update the secret name in the values file `examples/fabric-ca/tls-ca.yaml`. If you change the ```tls_domain, docker images, secret & storageClass``` then update the [examples/fabric-ca/tls-ca.yaml](./fabric-ca/tls-ca.yaml) accordingly.
8183
```
8284
# helm install tls-ca -n orderer helm-charts/fabric-ca -f examples/fabric-ca/tls-ca.yaml
8385
```
@@ -94,29 +96,29 @@ You can verify it with the similar way we verified the root-ca end-point above.
9496
```
9597
6. **Deploy Orderer ICA**
9698

97-
You need to create an admin secret like we did for ROOTCA and update [examples/fabric-ca/ica-orderer.yaml](./fabric-ca/ica-orderer.yaml) with your secret. Or create the secret mentioned in this file if you do not want to change it. Once done, apply the following.
99+
Here, we're deplyoing the same Fabric-ca charts for this CA but this will be in ICA mode. This time you need to create the kubernetes secret with the username and password that you registered at ROOTCA identities job. If you have changed that identities then, create the secret with those values and update the secret name here [examples/fabric-ca/ica-orderer.yaml](./fabric-ca/ica-orderer.yaml) with your secret. If you have not touched anything, then simply apply the following.
98100
```
99101
# helm install ica-orderer -n orderer helm-charts/fabric-ca -f examples/fabric-ca/ica-orderer.yaml
100102
```
101103
7. **Deploy Initial peer org ICA**
102104

103-
You need to create an admin secret like we did for ROOTCA and update [examples/fabric-ca/ica-initialpeerorg.yaml](./fabric-ca/ica-initialpeerorg.yaml) with your secret. Or create the secret mentioned in this file if you do not want to change it. Once done, apply the following.
105+
Follow the same ICA Orderer deployment steps here and update [examples/fabric-ca/ica-initialpeerorg.yaml](./fabric-ca/ica-initialpeerorg.yaml) with your secret if you have created the secret with a different name. If you have not touched anything, then simply apply the following.
104106
```
105107
# helm install ica-initialpeerorg -n initialpeerorg helm-charts/fabric-ca -f examples/fabric-ca/ica-initialpeerorg.yaml
106108
```
107-
8. **Create Orderer identties with ica-orderer**
109+
8. **Create Orderer identities with ica-orderer**
108110
```
109111
# helm install orderer-ops -n orderer helm-charts/fabric-ops/ -f examples/fabric-ops/orderer/orderer-identities.yaml
110112
```
111-
9. **Create Initialpeerorg identties with ica-initialpeerorg**
113+
9. **Create Initialpeerorg identities with ica-initialpeerorg**
112114
```
113115
# helm install initialpeerorg-ops -n initialpeerorg helm-charts/fabric-ops/ -f examples/fabric-ops/initialpeerorg/identities.yaml
114116
```
115117
10. **Generate Genesisblock & Channel transaction file**
116118
```
117119
# helm install cryptogen -n orderer helm-charts/fabric-ops/ -f examples/fabric-ops/orderer/orderer-cryptogen.yaml
118120
```
119-
After successful completion of this `cryptogen Job`, you'll see the Genesisblock file and channel transaction file in your filestore under your project directory. If your project name is `yourproject`, then your project directory will be created as `/usr/share/nginx/html/yourproject`.
121+
After successful completion of this `cryptogen Job`, you'll see the `Genesisblock` file and `Channel transaction` file in your filestore under your project directory. If your project name is `yourproject`, then your project directory will be created as `/usr/share/nginx/html/yourproject`.
120122

121123
11. **Deploy Orderers**
122124
```
@@ -126,7 +128,7 @@ After successful completion of this `cryptogen Job`, you'll see the Genesisblock
126128
```
127129
# helm install peer -n initialpeerorg helm-charts/fabric-peer/ -f examples/fabric-peer/initialpeerorg/values.yaml
128130
```
129-
After successful deployment of the Peers, you will get 3 peers in initialpeerorg namespace. Each of these peers will have 1 Init container and 3 app containers `(Fabric Peer, Dind & CouchDB)`. If everything went fine, then you'll see similar logs in the `peer0-initialpeerorg-0`.
131+
After successful deployment of the Peers, you will get 3 peers in initialpeerorg namespace. Each of these peers will have 1 Init container and 3 app containers `(Fabric Peer, Dind & CouchDB)`. If everything went fine, then you'll see some successful connectivity logs in the `peer0-initialpeerorg-0`.
130132

131133
13. **Create channel**
132134
```
@@ -152,7 +154,7 @@ If you have your own chaincode, then package it and upload the same to filestore
152154

153155
1. **Deploy Org1 ICA**
154156

155-
You need to create an admin secret like we did for ROOTCA and update [examples/fabric-ca/ica-org1.yaml](./fabric-ca/ica-org1.yaml) with your secret. Or create the secret mentioned in this file if you do not want to change it. Once done, apply the following.
157+
You need to create a kubernetes secret with the one registered with rootca identities registration job and update [examples/fabric-ca/ica-org1.yaml](./fabric-ca/ica-org1.yaml) if you're creating a different secret name. Or create the secret mentioned in this file if you do not want to change it. Once done, apply the following.
156158
```
157159
# helm install ica-org1 -n org1 helm-charts/fabric-ca -f examples/fabric-ca/ica-org1.yaml
158160
```
@@ -162,7 +164,7 @@ Once the `Org1` ICA started successfully, you would need to add this `Org1` to t
162164
```
163165
# helm install configorgchannel -n initialpeerorg helm-charts/fabric-ops/ -f examples/fabric-ops/initialpeerorg/configure-org-channel.yaml
164166
```
165-
3. **Create Org1 identties with ica-org1**
167+
3. **Create Org1 identities with ica-org1**
166168
```
167169
# helm install org1-ca-ops -n org1 helm-charts/fabric-ops/ -f examples/fabric-ops/org1/identities.yaml
168170
```
@@ -183,17 +185,17 @@ Once the `Org1` ICA started successfully, you would need to add this `Org1` to t
183185

184186
1. **Deploy Org2 ICA**
185187

186-
You need to create an admin secret like we did for ROOTCA and update [examples/fabric-ca/ica-org2.yaml](./fabric-ca/ica-org2.yaml) with your secret. Or create the secret mentioned in this file if you do not want to change it. Once done, apply the following.
188+
You need to create a kubernetes secret with the one registered with rootca identities registration job and update [examples/fabric-ca/ica-org2.yaml](./fabric-ca/ica-org2.yaml) if you're creating a different secret name. Or create the secret mentioned in this file if you do not want to change it. Once done, apply the following.
187189
```
188190
# helm install ica-org2 -n org2 helm-charts/fabric-ca -f examples/fabric-ca/ica-org2.yaml
189191
```
190192
2. **Add Org2 to network**
191193

192194
Once the `Org2` ICA started successfully, you would need to add this `Org2` to the network. For that, you need to upgrade the following `configorgchannel` Job in `initialpeerorg`. This time, uncomment the `org2` section in the `Values.organizatons` array in the values file [examples/fabric-ops/initialpeerorg/configure-org-channel.yaml](./fabric-ops/initialpeerorg/configure-org-channel.yaml).
193195
```
194-
helm upgrade configorgchannel -n initialpeerorg helm-charts/fabric-ops/ -f examples/fabric-ops/initialpeerorg/configure-org-channel.yaml
196+
# helm upgrade configorgchannel -n initialpeerorg helm-charts/fabric-ops/ -f examples/fabric-ops/initialpeerorg/configure-org-channel.yaml
195197
```
196-
3. **Create Org1 identties with ica-org1.**
198+
3. **Create Org1 identities with ica-org1.**
197199
```
198200
# helm install org2-ca-ops -n org2 helm-charts/fabric-ops/ -f examples/fabric-ops/org2/identities.yaml
199201
```
@@ -218,7 +220,7 @@ helm upgrade configorgchannel -n initialpeerorg helm-charts/fabric-ops/ -f examp
218220

219221
1. **Approve ChainCode on Initialpeerorg**
220222

221-
Ensure that you have updated the Chaincode package ID in [examples/fabric-ops/initialpeerorg/approve-chaincode.yaml](./fabric-ops/initialpeerorg/approve-chaincode.yaml), below are the required fields for updating with your own chaincode details.
223+
Ensure that you have updated the Chaincode package ID in [examples/fabric-ops/initialpeerorg/approve-chaincode.yaml](./fabric-ops/initialpeerorg/approve-chaincode.yaml), below are the required fields for updating with your own chaincode details. (This Chaincode package ID update is only required if you use your own chaincode package. If not, simply apply the following helm approval jobs)
222224
- cc_name
223225
- cc_version
224226
- cc_package_id
@@ -228,7 +230,7 @@ helm upgrade configorgchannel -n initialpeerorg helm-charts/fabric-ops/ -f examp
228230
```
229231
2. **Approve ChainCode on Org1**
230232

231-
Ensure that you have updated the Chaincode package ID in [examples/fabric-ops/org1/approve-chaincode.yaml](./fabric-ops/org1/approve-chaincode.yaml), below are the required fields for updating with your own chaincode details.
233+
Ensure that you have updated the Chaincode package ID in [examples/fabric-ops/org1/approve-chaincode.yaml](./fabric-ops/org1/approve-chaincode.yaml), below are the required fields for updating with your own chaincode details. (This Chaincode package ID update is only required if you use your own chaincode package. If not, simply apply the following helm approval jobs)
232234
- cc_name
233235
- cc_version
234236
- cc_package_id
@@ -238,7 +240,7 @@ helm upgrade configorgchannel -n initialpeerorg helm-charts/fabric-ops/ -f examp
238240
```
239241
3. **Approve ChainCode on Org2**
240242

241-
Ensure that you have updated the Chaincode package ID in [examples/fabric-ops/org2/approve-chaincode.yaml](./fabric-ops/org2/approve-chaincode.yaml), below are the required fields for updating with your own chaincode details.
243+
Ensure that you have updated the Chaincode package ID in [examples/fabric-ops/org2/approve-chaincode.yaml](./fabric-ops/org2/approve-chaincode.yaml), below are the required fields for updating with your own chaincode details. (This Chaincode package ID update is only required if you use your own chaincode package. If not, simply apply the following helm approval jobs)
242244
- cc_name
243245
- cc_version
244246
- cc_package_id
@@ -248,7 +250,7 @@ helm upgrade configorgchannel -n initialpeerorg helm-charts/fabric-ops/ -f examp
248250
```
249251
4. **Commit ChainCode on Initialpeerorg**
250252

251-
Ensure that you have updated the Chaincode package ID in [examples/fabric-ops/initialpeerorg/approve-chaincode.yaml](./fabric-ops/initialpeerorg/approve-chaincode.yaml), below are the required fields for updating with your own chaincode details.
253+
Ensure that you have updated the Chaincode package ID in [examples/fabric-ops/initialpeerorg/approve-chaincode.yaml](./fabric-ops/initialpeerorg/approve-chaincode.yaml), below are the required fields for updating with your own chaincode details. (This Chaincode package ID update is only required if you use your own chaincode package. If not, simply apply the following helm commit job)
252254
- cc_name
253255
- cc_version
254256
- cc_package_id

helm-charts/fabric-ca/templates/NOTES.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ APP VERSION: {{ .Chart.AppVersion }}
77

88
{{- if .Values.ica.enabled }}
99
------------------------------------------------------
10-
| The Fabric CA chart has been deployed in ICA mode. |
10+
The Fabric CA chart has been deployed in ICA mode.
1111
------------------------------------------------------
12-
| ICA Endpoint : {{ include "fabric-ca.fullname" $ }}.{{ $.Values.tls_domain }}
13-
| The Parent CA : {{ .Values.ica.parent_ca_endpoint }}
12+
ICA Endpoint : {{ include "fabric-ca.fullname" $ }}.{{ $.Values.tls_domain }}
13+
The Parent CA : {{ .Values.ica.parent_ca_endpoint }}
1414
{{ else }}
1515
---------------------------------------------------------------------
16-
| The Fabric CA chart has been deployed as ParentCA/Standalone mode. |
16+
The Fabric CA chart has been deployed in ParentCA/Standalone mode.
1717
---------------------------------------------------------------------
18-
| CA Endpoint : {{ include "fabric-ca.fullname" $ }}.{{ $.Values.tls_domain }}
18+
CA Endpoint : {{ include "fabric-ca.fullname" $ }}.{{ $.Values.tls_domain }}
1919

2020
{{- end }}
2121

images/falcon-hlf-logo.png

790 Bytes
Loading

images/hlf-deployment-helper.png

-23.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)