From 8ad443317c346192b6d8c711f1adc0eef4e42dd8 Mon Sep 17 00:00:00 2001 From: hfuss Date: Sun, 12 Dec 2021 01:21:42 -0500 Subject: [PATCH 1/8] [helm] Fabconnect Support Signed-off-by: hfuss --- deploy/charts/firefly/templates/_helpers.tpl | 17 +++++++++++++++++ deploy/charts/firefly/values.yaml | 11 +++++++++++ 2 files changed, 28 insertions(+) diff --git a/deploy/charts/firefly/templates/_helpers.tpl b/deploy/charts/firefly/templates/_helpers.tpl index ed8a948e48..ae5f87a4f1 100644 --- a/deploy/charts/firefly/templates/_helpers.tpl +++ b/deploy/charts/firefly/templates/_helpers.tpl @@ -131,6 +131,23 @@ blockchain: {{- if .Values.config.ethconnectPrefixLong }} prefixLong: {{ .Values.config.ethconnectPrefixLong }} {{- end }} +{{- else if .Values.config.fabconnectUrl }} +blockchain: + type: fabric + fabric: + fabconnect: + url: {{ tpl .Values.config.fabconnectUrl . }} + {{- if and .Values.config.fabconnectUsername .Values.config.fabconnectPassword }} + auth: + username: {{ .Values.config.fabconnectUsername | quote }} + password: {{ .Values.config.fabconnectPassword | quote }} + {{- end }} + retry: + enable: {{ .Values.config.fabconnectRetry }} + channel: {{ .Values.config.fabconnectChannel | quote }} + chaincode: {{ .Values.config.fireflyChaincode | quote }} + topic: "1" # TODO + signer: {{ .Values.config.fabconnectSigner | quote }} {{- end }} {{- if .Values.config.databaseOverride }} database: diff --git a/deploy/charts/firefly/values.yaml b/deploy/charts/firefly/values.yaml index 44089928ae..da9f6e58df 100644 --- a/deploy/charts/firefly/values.yaml +++ b/deploy/charts/firefly/values.yaml @@ -25,6 +25,9 @@ config: # The Ethereum address of the pre-deployed FireFly smart contract fireflyContractAddress: "/instances/contractAddress" + # The name of the Fabric chaincode deployment for the FireFly chaincode + fireflyChaincode: firefly-go + # The Postgres URL (including credentials and DB) for FireFly to for the database plugin postgresUrl: "" @@ -73,6 +76,14 @@ config: # The long prefix FireFly will prepend to certain headers it sends to Ethconnect i.e. FireFly or Kaleido ethconnectPrefixLong: "" + fabconnectChannel: default-channel + + fabconnectSigner: "" + fabconnectRetry: true + + fabconnectUsername: "" + fabconnectPassword: "" + # Whether to use a Job to perform auto-registration of the FireFly runtime. # Note registration will not be successful until the new node has caught up with the head of the chain. registrationJob: false From 3325326c233823e170e01d2f0d76932f748ba713 Mon Sep 17 00:00:00 2001 From: hfuss Date: Sun, 12 Dec 2021 17:25:21 -0500 Subject: [PATCH 2/8] value comments; reuusing org key for fabconnect signer Signed-off-by: hfuss --- .../ci/{it-values.yaml => it-eth.yaml} | 0 deploy/charts/firefly/ci/it-fab.yaml | 25 +++++++++++++++++++ deploy/charts/firefly/templates/_helpers.tpl | 2 +- deploy/charts/firefly/values.yaml | 8 ++++-- 4 files changed, 32 insertions(+), 3 deletions(-) rename deploy/charts/firefly/ci/{it-values.yaml => it-eth.yaml} (100%) create mode 100644 deploy/charts/firefly/ci/it-fab.yaml diff --git a/deploy/charts/firefly/ci/it-values.yaml b/deploy/charts/firefly/ci/it-eth.yaml similarity index 100% rename from deploy/charts/firefly/ci/it-values.yaml rename to deploy/charts/firefly/ci/it-eth.yaml diff --git a/deploy/charts/firefly/ci/it-fab.yaml b/deploy/charts/firefly/ci/it-fab.yaml new file mode 100644 index 0000000000..7f48973c57 --- /dev/null +++ b/deploy/charts/firefly/ci/it-fab.yaml @@ -0,0 +1,25 @@ +config: + debugEnabled: true + adminEnabled: true + preInit: true + + organizationName: "firefly-os" + organizationKey: "firefly-os" + + fabconnectUrl: "http://fabconnect.firefly-os" + + postgresUrl: "postgres://postgres:firef1y@postgresql.default.svc:5432?sslmode=disable" + postgresAutomigrate: true + + ipfsApiUrl: "http://ipfs.firefly-os:5001" + ipfsGatewayUrl: "http://ipfs.firefly-os:8080" + +dataexchange: + certificate: + enabled: true + issuerRef: + kind: ClusterIssuer + name: selfsigned-ca + + tlsSecret: + enabled: false diff --git a/deploy/charts/firefly/templates/_helpers.tpl b/deploy/charts/firefly/templates/_helpers.tpl index ae5f87a4f1..9bc3e53f63 100644 --- a/deploy/charts/firefly/templates/_helpers.tpl +++ b/deploy/charts/firefly/templates/_helpers.tpl @@ -147,7 +147,7 @@ blockchain: channel: {{ .Values.config.fabconnectChannel | quote }} chaincode: {{ .Values.config.fireflyChaincode | quote }} topic: "1" # TODO - signer: {{ .Values.config.fabconnectSigner | quote }} + signer: {{ .Values.config.organizationKey | quote }} {{- end }} {{- if .Values.config.databaseOverride }} database: diff --git a/deploy/charts/firefly/values.yaml b/deploy/charts/firefly/values.yaml index da9f6e58df..9ec64264f5 100644 --- a/deploy/charts/firefly/values.yaml +++ b/deploy/charts/firefly/values.yaml @@ -19,7 +19,7 @@ config: # The name of the organization the FireFly node belongs to organizationName: "" - # The blockchain signing key of the organization e.g. the Ethereum account address + # The blockchain signing key of the organization e.g. the Ethereum account address or the Fabric membership organizationKey: "" # The Ethereum address of the pre-deployed FireFly smart contract @@ -76,12 +76,16 @@ config: # The long prefix FireFly will prepend to certain headers it sends to Ethconnect i.e. FireFly or Kaleido ethconnectPrefixLong: "" + # The Fabric channel to use when communicating with peers and running chaincodes fabconnectChannel: default-channel - fabconnectSigner: "" + # Enables retries when communicating with Fabconnect fabconnectRetry: true + # The basic auth username to use for authenticating to Fabconnect fabconnectUsername: "" + + # The basic auth password to use for authenticating to Fabconnect fabconnectPassword: "" # Whether to use a Job to perform auto-registration of the FireFly runtime. From 519e43b48b3666c92077e3819268f6c92cc23c8c Mon Sep 17 00:00:00 2001 From: hfuss Date: Sun, 12 Dec 2021 17:28:11 -0500 Subject: [PATCH 3/8] dx not released yet Signed-off-by: hfuss --- deploy/charts/firefly/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/charts/firefly/values.yaml b/deploy/charts/firefly/values.yaml index 9ec64264f5..b996a5dcc6 100644 --- a/deploy/charts/firefly/values.yaml +++ b/deploy/charts/firefly/values.yaml @@ -216,7 +216,7 @@ dataexchange: image: repository: ghcr.io/hyperledger/firefly-dataexchange-https pullPolicy: Always - tag: v0.9.3 + tag: v0.9.2 imagePullSecrets: [] nameOverride: "" From 26fa88b72bb38d66155cf8b4dbcd27af2a02e32e Mon Sep 17 00:00:00 2001 From: hfuss Date: Sun, 12 Dec 2021 17:50:10 -0500 Subject: [PATCH 4/8] ct relies on values convention Signed-off-by: hfuss --- deploy/charts/firefly/ci/{it-eth.yaml => eth-values.yaml} | 0 deploy/charts/firefly/ci/{it-fab.yaml => fab-values.yaml} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename deploy/charts/firefly/ci/{it-eth.yaml => eth-values.yaml} (100%) rename deploy/charts/firefly/ci/{it-fab.yaml => fab-values.yaml} (100%) diff --git a/deploy/charts/firefly/ci/it-eth.yaml b/deploy/charts/firefly/ci/eth-values.yaml similarity index 100% rename from deploy/charts/firefly/ci/it-eth.yaml rename to deploy/charts/firefly/ci/eth-values.yaml diff --git a/deploy/charts/firefly/ci/it-fab.yaml b/deploy/charts/firefly/ci/fab-values.yaml similarity index 100% rename from deploy/charts/firefly/ci/it-fab.yaml rename to deploy/charts/firefly/ci/fab-values.yaml From 17af07be8ad81ec32ccf24eceee6e82b663103a4 Mon Sep 17 00:00:00 2001 From: hfuss Date: Mon, 13 Dec 2021 20:53:17 -0500 Subject: [PATCH 5/8] fixing newline chopping for registrationJob Signed-off-by: hfuss --- deploy/charts/firefly/templates/core/secret.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/charts/firefly/templates/core/secret.yaml b/deploy/charts/firefly/templates/core/secret.yaml index 83436eb3ea..b3b88843c0 100644 --- a/deploy/charts/firefly/templates/core/secret.yaml +++ b/deploy/charts/firefly/templates/core/secret.yaml @@ -5,7 +5,7 @@ metadata: labels: {{- include "firefly.coreLabels" . | nindent 4 }} stringData: - {{- if and .Values.config.postgresUrl .Values.config.postgresMigrationJob -}} + {{- if and .Values.config.postgresUrl .Values.config.postgresMigrationJob }} psql_url: {{ tpl .Values.config.postgresUrl . }} {{- end }} firefly.core: | From 4d7b17d27de849dc5a00f7f7352ebd8c4739b0ce Mon Sep 17 00:00:00 2001 From: hfuss Date: Tue, 14 Dec 2021 14:18:12 -0500 Subject: [PATCH 6/8] using latest ff image Signed-off-by: hfuss --- deploy/charts/firefly/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/charts/firefly/Chart.yaml b/deploy/charts/firefly/Chart.yaml index ee94699da3..825fb24099 100644 --- a/deploy/charts/firefly/Chart.yaml +++ b/deploy/charts/firefly/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: firefly description: A Helm chart for deploying FireFly and FireFly HTTPS Dataexchange onto Kubernetes. type: application -appVersion: "0.11.1" +appVersion: "0.11.2" version: "0.1.0" maintainers: From 90b5a0f34089a8d753230d8b6a12d71e82640839 Mon Sep 17 00:00:00 2001 From: hfuss Date: Mon, 20 Dec 2021 08:55:17 -0500 Subject: [PATCH 7/8] configurable signer and topic Signed-off-by: hfuss --- deploy/charts/firefly/templates/_helpers.tpl | 6 +++--- deploy/charts/firefly/values.yaml | 14 +++++++++++++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/deploy/charts/firefly/templates/_helpers.tpl b/deploy/charts/firefly/templates/_helpers.tpl index 9bc3e53f63..aafcf1211c 100644 --- a/deploy/charts/firefly/templates/_helpers.tpl +++ b/deploy/charts/firefly/templates/_helpers.tpl @@ -119,7 +119,7 @@ blockchain: ethconnect: url: {{ tpl .Values.config.ethconnectUrl . }} instance: {{ .Values.config.fireflyContractAddress }} - topic: "0" # TODO should likely be configurable + topic: {{ .Values.config.ethconnectTopic | quote }} {{- if and .Values.config.ethconnectUsername .Values.config.ethconnectPassword }} auth: username: {{ .Values.config.ethconnectUsername | quote }} @@ -146,8 +146,8 @@ blockchain: enable: {{ .Values.config.fabconnectRetry }} channel: {{ .Values.config.fabconnectChannel | quote }} chaincode: {{ .Values.config.fireflyChaincode | quote }} - topic: "1" # TODO - signer: {{ .Values.config.organizationKey | quote }} + topic: {{ .Values.config.fabconnectTopic | quote }} + signer: {{ .Values.config.fabconnectSigner | quote }} {{- end }} {{- if .Values.config.databaseOverride }} database: diff --git a/deploy/charts/firefly/values.yaml b/deploy/charts/firefly/values.yaml index b996a5dcc6..51daec4f86 100644 --- a/deploy/charts/firefly/values.yaml +++ b/deploy/charts/firefly/values.yaml @@ -26,7 +26,7 @@ config: fireflyContractAddress: "/instances/contractAddress" # The name of the Fabric chaincode deployment for the FireFly chaincode - fireflyChaincode: firefly-go + fireflyChaincode: firefly_go # The Postgres URL (including credentials and DB) for FireFly to for the database plugin postgresUrl: "" @@ -70,12 +70,18 @@ config: # The basic auth password to use for authenticating to Ethconnect ethconnectPassword: "" + # The Ethconnect topic to use for blockchain event subscriptions + ethconnectTopic: 0 + # The short prefix FireFly will prepend to certain headers it sends to Ethconnect i.e. ff or kld ethconnectPrefixShort: "" # The long prefix FireFly will prepend to certain headers it sends to Ethconnect i.e. FireFly or Kaleido ethconnectPrefixLong: "" + # The URL of the Fabconnect API and WS server to use for the blockchain plugin of type `fabric` + fabconnectUrl: "" + # The Fabric channel to use when communicating with peers and running chaincodes fabconnectChannel: default-channel @@ -88,6 +94,12 @@ config: # The basic auth password to use for authenticating to Fabconnect fabconnectPassword: "" + # The Fabconnect topic to use for blockchain event subscriptions + fabconnectTopic: 0 + + # The Fabric to use for signing transactions, must be pre-registered and enrolled + fabconnectSigner: "" + # Whether to use a Job to perform auto-registration of the FireFly runtime. # Note registration will not be successful until the new node has caught up with the head of the chain. registrationJob: false From 3735920acc5eb966437ee00948573d8fa7595efb Mon Sep 17 00:00:00 2001 From: hfuss Date: Mon, 20 Dec 2021 17:46:19 -0500 Subject: [PATCH 8/8] ethconnect retry; latest dx image Signed-off-by: hfuss --- deploy/charts/firefly/templates/_helpers.tpl | 2 ++ deploy/charts/firefly/values.yaml | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/deploy/charts/firefly/templates/_helpers.tpl b/deploy/charts/firefly/templates/_helpers.tpl index aafcf1211c..47f61c851b 100644 --- a/deploy/charts/firefly/templates/_helpers.tpl +++ b/deploy/charts/firefly/templates/_helpers.tpl @@ -120,6 +120,8 @@ blockchain: url: {{ tpl .Values.config.ethconnectUrl . }} instance: {{ .Values.config.fireflyContractAddress }} topic: {{ .Values.config.ethconnectTopic | quote }} + retry: + enable: {{ .Values.config.ethconnectRetry }} {{- if and .Values.config.ethconnectUsername .Values.config.ethconnectPassword }} auth: username: {{ .Values.config.ethconnectUsername | quote }} diff --git a/deploy/charts/firefly/values.yaml b/deploy/charts/firefly/values.yaml index 51daec4f86..68f5951a65 100644 --- a/deploy/charts/firefly/values.yaml +++ b/deploy/charts/firefly/values.yaml @@ -70,6 +70,9 @@ config: # The basic auth password to use for authenticating to Ethconnect ethconnectPassword: "" + # Enables retries when communicating with Ethconnect + ethconnectRetry: true + # The Ethconnect topic to use for blockchain event subscriptions ethconnectTopic: 0 @@ -228,7 +231,7 @@ dataexchange: image: repository: ghcr.io/hyperledger/firefly-dataexchange-https pullPolicy: Always - tag: v0.9.2 + tag: v0.9.3 imagePullSecrets: [] nameOverride: ""