Skip to content

Commit 807af12

Browse files
committed
fix(fabric): deploy console sidecar for backend apis
Signed-off-by: Somesh Mal <malsomesh9@gmail.com>
1 parent bd7a023 commit 807af12

File tree

5 files changed

+24
-2
lines changed

5 files changed

+24
-2
lines changed

docs/source/guides/fabric/deploy-operations-console.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
## Prerequisites
1515
The [Fabric Operations Console](https://github.com/hyperledger-labs/fabric-operations-console) can be deployed along with the Fabric Network.
1616
You can then manually add peers, orderers, CA to the console by importing appropriate JSON files.
17+
Bevel deploys the console together with the required `fabric-deployer` sidecar so channel and ordering-service workflows can use the backend deployer APIs out of the box.
1718

1819
The Helm Chart for Fabric Operations Console is available [here](https://github.com/hyperledger/bevel/blob/main/platforms/hyperledger-fabric/charts/fabric-operations-console).
1920

platforms/hyperledger-fabric/charts/fabric-operations-console/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ operation_console/
5757
- `templates/`: Contains the Kubernetes manifest templates that define the resources to be deployed.
5858
- `helpers.tpl`: Contains custom label definitions used in other templates.
5959
- `configmap.yaml`: Store configuration for the fabric-console
60-
- `deployment.yaml`: Defines a StatefulSet with one replica that manages three containers: couchdb, fabric-console, and configtxlator. The couchdb container will be used to store the data for the Fabric network and it will be exposed on port 5984. The fabric-console container will be used to interact with the Fabric network and it will be exposed on port 3000. The configtxlator container will be used to generate and manage configuration transactions for the Fabric network and it will be exposed on port 7059.
60+
- `deployment.yaml`: Defines a StatefulSet with one replica that manages four containers: couchdb, fabric-console, fabric-deployer, and configtxlator. The couchdb container will be used to store the data for the Fabric network and it will be exposed on port 5984. The fabric-console container will be used to interact with the Fabric network and it will be exposed on port 3000. The fabric-deployer sidecar provides the backend APIs the console uses for orderer and channel workflows and listens on port 8080 inside the pod. The configtxlator container will be used to generate and manage configuration transactions for the Fabric network and it will be exposed on port 7059.
6161
- `pvc.yaml`: Defines a persistent volume claim that will be used to store the data for the CouchDB database.
62-
- `service.yaml`: configures a Kubernetes Service and an Ingress. The service has three ports: console (port 3000) is exposed for the fabric-console, couchdb (port 5984) is exposed for the couchdb database, and configtxlator (port 7059) is exposed for the configtxlator container. The service can be exposed in two ways: ClusterIP and NodePort. Optionally, if haproxy is selected, ingress will route traffic to the Service using the host and path.
62+
- `service.yaml`: configures a Kubernetes Service and an Ingress. The service has three externally exposed ports: console (port 3000) is exposed for the fabric-console, couchdb (port 5984) is exposed for the couchdb database, and configtxlator (port 7059) is exposed for the configtxlator container. The fabric-deployer sidecar is only used from inside the pod by the console. The service can be exposed in two ways: ClusterIP and NodePort. Optionally, if haproxy is selected, ingress will route traffic to the Service using the host and path.
6363
- `Chart.yaml`: Contains the metadata for the Helm chart, such as the name, version, and description.
6464
- `README.md`: Provides information and instructions about the Helm chart.
6565
- `values.yaml`: Contains the default configuration values for the Helm chart.
@@ -77,6 +77,7 @@ The [values.yaml](https://github.com/hyperledger/bevel/blob/develop/platforms/hy
7777
| namespace | Provide the namespace for organization's peer | org1-net |
7878
| images.couchdb | Valid image name and version for fabric couchdb | couchdb:3.1.1 |
7979
| images.console | Valid image name and version for fabric operations console | ghcr.io/hyperledger-labs/fabric-console:latest |
80+
| images.deployer | Valid image name and version for the fabric deployer sidecar | ghcr.io/ibm-blockchain/fabric-deployer:latest-amd64 |
8081
| images.configtxlator | Valid image name and version to read certificates from vault server | ghcr.io/hyperledger/bevel-fabric-tools:2.2.2 |
8182
| labels | Custom labels (other than predefined ones) | "" |
8283

@@ -102,6 +103,7 @@ The [values.yaml](https://github.com/hyperledger/bevel/blob/develop/platforms/hy
102103
| ports.console.clusteripport | Cluster IP port for grpc service | 3000 |
103104
| ports.couchdb.nodeport | NodePort for couchdb service (optional) | "" |
104105
| ports.couchdb.clusteripport | Cluster IP port for couchdb service | 5984 |
106+
| ports.deployer.clusteripport | Internal port for the fabric deployer sidecar | 8080 |
105107

106108

107109

platforms/hyperledger-fabric/charts/fabric-operations-console/templates/configmap.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@ data:
2626
max_req_per_min: 100
2727
default_consortium: {{ $.Values.service.default_consortium }}
2828
configtxlator_url_original: http://{{ $.Values.service.name }}.{{ $.Values.metadata.namespace }}:7059
29+
deployer_url: http://127.0.0.1:{{ $.Values.service.ports.deployer.clusteripport }}
2930
host_url: https://{{ $.Values.service.name }}.{{ $.Values.metadata.namespace }}.{{ $.Values.proxy.external_url_suffix }}
3031
default_user_password_initial: password

platforms/hyperledger-fabric/charts/fabric-operations-console/templates/deployment.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,17 @@ spec:
8282
volumeMounts:
8383
- name: {{ $.Values.service.name }}-config-volume
8484
mountPath: /home/athena/env
85+
- name: fabric-deployer
86+
image: {{ $.Values.metadata.images.deployer }}
87+
imagePullPolicy: IfNotPresent
88+
ports:
89+
- name: deployer
90+
containerPort: {{ $.Values.service.ports.deployer.clusteripport }}
91+
env:
92+
- name: LICENSE
93+
value: "accept"
94+
- name: DBCONNECTIONSTRING
95+
value: "http://admin:password@127.0.0.1:5984"
8596
- name: configtxlator
8697
image: {{ $.Values.metadata.images.configtxlator }}
8798
imagePullPolicy: IfNotPresent

platforms/hyperledger-fabric/charts/fabric-operations-console/values.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ metadata:
1515
#Provide the valid image name and version for fabric operations console
1616
#Eg. hyperledgerlabs/fabric-console:latest
1717
console: ghcr.io/hyperledger-labs/fabric-console:latest
18+
#Provide the valid image name and version for the fabric deployer sidecar
19+
#Eg. ghcr.io/ibm-blockchain/fabric-deployer:latest-amd64
20+
deployer: ghcr.io/ibm-blockchain/fabric-deployer:latest-amd64
1821
#Provide the valid image name and version to read certificates from vault server
1922
#Eg. alpineutils: ghcr.io/hyperledger/bevel-alpine:latest
2023
configtxlator: ghcr.io/hyperledger/bevel-fabric-tools:2.2.2
@@ -66,6 +69,10 @@ service:
6669
#Provide a cluster IP port for couchdb service to be exposed
6770
#Eg. clusteripport: 5984
6871
clusteripport: 5984
72+
deployer:
73+
#Provide the internal port for the deployer sidecar
74+
#Eg. clusteripport: 8080
75+
clusteripport: 8080
6976

7077
annotations:
7178
#Extra annotations

0 commit comments

Comments
 (0)