From 7544bceee7557b94be46038fff01569b500f52d1 Mon Sep 17 00:00:00 2001 From: mgCepeda Date: Wed, 10 Jul 2024 06:14:12 +0000 Subject: [PATCH 1/2] [fabric] Update ansible playbooks add-peer and add-cli **Primary Changes** 1 .Updated playbook platforms/hyperledger-fabric/configuration/add-cli.yaml 2. Updated playbook platforms/hyperledger-fabric/configuration/add-peer.yaml 3. Added the component_dir field to the gitops section. This directory stores the values.yaml files created with the role platforms/shared/configuration/roles/create/job_component because storing them in the same directory as the flux manifests causes incompatibility. fixes #2584 Signed-off-by: mgCepeda --- docs/source/guides/fabric/add-cli.md | 23 +- docs/source/guides/fabric/add-new-peer.md | 28 +- docs/source/guides/networkyaml-fabric.md | 14 +- .../templates/anchorpeer.yaml | 2 +- .../configuration/add-cli.yaml | 2 +- .../configuration/add-peer.yaml | 107 +----- .../create/channels/tasks/valuefile.yaml | 2 +- .../tasks/nested_channel_join.yaml | 9 +- .../roles/create/genesis/tasks/valuefile.yaml | 2 +- .../roles/create/new_cli/tasks/main.yaml | 60 +-- .../roles/create/new_cli/tasks/valuefile.yaml | 68 ++++ .../new_peer/update_block/tasks/main.yaml | 6 + .../update_block/tasks/nested_create_cli.yaml | 9 +- .../tasks/nested_update_channel.yaml | 10 +- .../create/osnchannels/tasks/valuefile.yaml | 4 +- .../roles/create/peers/tasks/nested_main.yaml | 1 + .../roles/helm_component/templates/cli.tpl | 66 ++-- .../helm_component/templates/value_peer.tpl | 2 +- .../roles/helm_component/vars/main.yaml | 5 - .../templates/existing_peer_cli.tpl | 83 ++-- .../roles/k8_component/vars/main.yaml | 7 +- .../samples/network-fabric-add-cli.yaml | 358 ++++++++++++++++++ .../network-fabric-add-new-channel.yaml | 14 +- .../network-fabric-add-ordererorg.yaml | 18 +- .../samples/network-fabric-add-peer.yaml | 76 +++- .../network-fabric-remove-organization.yaml | 15 +- .../network-fabricv2-external-chaincode.yaml | 15 +- .../samples/network-fabricv2-kafka.yaml | 15 +- .../network-fabricv2-raft-add-orderer.yaml | 3 +- .../samples/network-fabricv2.yaml | 15 +- .../samples/network-proxy-none.yaml | 3 + .../samples/network-user-certificate.yaml | 3 +- .../workflow/network-fabric-workflow.yaml | 15 +- platforms/network-schema.json | 5 + .../shared/configuration/delete-network.yaml | 1 + .../templates/join_channel_job.tpl | 1 + .../roles/delete/gitops/tasks/main.yaml | 8 + 37 files changed, 763 insertions(+), 312 deletions(-) create mode 100644 platforms/hyperledger-fabric/configuration/roles/create/new_cli/tasks/valuefile.yaml create mode 100644 platforms/hyperledger-fabric/configuration/samples/network-fabric-add-cli.yaml diff --git a/docs/source/guides/fabric/add-cli.md b/docs/source/guides/fabric/add-cli.md index 9845b60d2f01..9d6a674c6436 100644 --- a/docs/source/guides/fabric/add-cli.md +++ b/docs/source/guides/fabric/add-cli.md @@ -22,29 +22,36 @@ This guide explains how to add a CLI to an existing Hyperledger Fabric network u 1. **Update Configuration File** - Edit the `network.yaml` file to include the new organization with the following details: + - `peerstatus: new` + - `cli: enabled` - `org_status: new` - Organization details (name, MSP ID, etc.) - Orderer information - Existing organizations should have `org_status: existing` + - Existing peer(s) with cli deployed should have `peerstatus: existing` - Refer to the [networkyaml-fabric.md](../networkyaml-fabric.md) guide for details on editing the configuration file. Snippet from `network.channels` section below: ```yaml - --8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabric-add-organization.yaml:65:139" + --8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabric-add-cli.yaml:57:105" ``` and from `network.organizations` section below: ```yaml - --8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabric-add-organization.yaml:143:155" - .. - .. - --8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabric-add-organization.yaml:406:414" - .. - .. + --8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabric-add-cli.yaml:107:122" + .. + .. + --8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabric-add-cli.yaml:161:161" + --8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabric-add-cli.yaml:171:177" + .. + .. + --8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabric-add-cli.yaml:203:209" + .. + .. ``` -1. **Run Playbook** +2. **Run Playbook** Execute the following command to run the `add-cli.yaml` playbook: diff --git a/docs/source/guides/fabric/add-new-peer.md b/docs/source/guides/fabric/add-new-peer.md index 577202525cf9..ba450704f43c 100644 --- a/docs/source/guides/fabric/add-new-peer.md +++ b/docs/source/guides/fabric/add-new-peer.md @@ -27,9 +27,9 @@ This guide explains how to add a new **general** (non-anchor) peer to an existin - There is a single Hashicorp Vault and both clusters (as well as ansible controller) can access it. - Admin User certs have been already generated and stored in Vault (this is taken care of by deploy-network.yaml playbook if you are using Bevel to setup the network). - The `network.env.type` is different for different clusters. - - The GitOps release directory `gitops.release_dir` is different for different clusters. + - The GitOps release directory `gitops.release_dir` and `gitops.component_dir` are different for different clusters. -1. **Update Configuration File** +2. **Update Configuration File** - Edit the `network.yaml` file to include the new peer with the following details: - `peerstatus: new` @@ -41,25 +41,25 @@ This guide explains how to add a new **general** (non-anchor) peer to an existin Snippet from `network.channels` section below: ```yaml - --8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabric-add-peer.yaml:60:87" + --8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabric-add-peer.yaml:57:105" ``` and from `network.organizations` section below: ```yaml - --8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabric-add-peer.yaml:94:103" - .. - .. - --8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabric-add-peer.yaml:144:144" - --8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabric-add-peer.yaml:153:159" - .. - .. - --8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabric-add-peer.yaml:187:192" - .. - .. + --8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabric-add-peer.yaml:107:122" + .. + .. + --8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabric-add-peer.yaml:161:161" + --8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabric-add-peer.yaml:171:177" + .. + .. + --8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabric-add-peer.yaml:203:209" + .. + .. ``` -1. **Run Playbook** +3. **Run Playbook** Execute the following command to run the `add-peer.yaml` playbook: diff --git a/docs/source/guides/networkyaml-fabric.md b/docs/source/guides/networkyaml-fabric.md index 7587ce4d6a02..7aecbeecf540 100644 --- a/docs/source/guides/networkyaml-fabric.md +++ b/docs/source/guides/networkyaml-fabric.md @@ -165,6 +165,7 @@ Each `organization` field under `participants` field of the channel contains the | org_status | `new` (for inital setup) or `existing` (for add new org) | | ordererAddress | URL of the orderer this peer connects to, including port | | peer.name | Name of the peer | +| peer.type | Type can be `anchor` and `nonanchor` for Peer | | peer.gossipAddress | Gossip address of the peer, including port | | peer.peerAddress | External address of the peer, including port | @@ -242,7 +243,7 @@ The `vault` field under each organization contains For gitops fields the snapshot from the sample configuration file with the example values is below ```yaml ---8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabricv2.yaml:203:215" +--8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabricv2.yaml:203:216" ``` The gitops field under each organization contains @@ -253,6 +254,7 @@ The gitops field under each organization contains | git_url | SSH or HTTPs url of the repository where flux should be synced | | branch | Branch of the repository where the Helm Charts and value files are stored | | release_dir | Relative path where flux should sync files | +| component_dir | Relative path where values files are stored.files | | chart_source | Relative path where the helm charts are stored | | git_repo | Gitops git repo URL https URL for git push like "github.com/hyperledger/bevel.git" | | username | Username which has access rights to read/write on repository | @@ -263,7 +265,7 @@ The gitops field under each organization contains For Hyperledger Fabric, you can also generate different user certificates and pass the names and attributes in the specific section for `users`. This is only applicable if using Fabric CA. An example is below: ```yaml ---8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabricv2.yaml:338:344" +--8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabricv2.yaml:340:346" ``` The fields under `user` are @@ -279,7 +281,7 @@ The services field for each organization under `organizations` section of Fabric Each organization will have a CA service under the service field. The snapshot of CA service with example values is below ```yaml ---8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabricv2.yaml:217:225" +--8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabricv2.yaml:218:226" ``` The fields under `ca` service are @@ -295,7 +297,7 @@ The fields under `ca` service are Example of peer service. Below is a snapshot of the peer service with example values. ```yaml ---8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabricv2.yaml:354:387" +--8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabricv2.yaml:356:389" ``` The fields under `peer` service are @@ -342,7 +344,7 @@ The chaincodes section contains the list of chaincode for the peer, the fields u The organization with orderer type will have concensus service. The snapshot of consensus service with example values is below ```yaml ---8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabricv2.yaml:227:228" +--8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabricv2.yaml:228:229" ``` The fields under `consensus` service are @@ -357,7 +359,7 @@ The fields under `consensus` service are Example of ordering service. The snapshot of orderers service with example values is below ```yaml ---8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabricv2.yaml:229:253" +--8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabricv2.yaml:230:254" ``` The fields under `orderer` service are diff --git a/platforms/hyperledger-fabric/charts/fabric-channel-join/templates/anchorpeer.yaml b/platforms/hyperledger-fabric/charts/fabric-channel-join/templates/anchorpeer.yaml index 8be70ed1a79d..24e83f439e11 100644 --- a/platforms/hyperledger-fabric/charts/fabric-channel-join/templates/anchorpeer.yaml +++ b/platforms/hyperledger-fabric/charts/fabric-channel-join/templates/anchorpeer.yaml @@ -3,7 +3,7 @@ # # SPDX-License-Identifier: Apache-2.0 ############################################################################################## -{{- if eq .Values.peer.type "anchor" }} +{{- if and (eq .Values.peer.type "anchor") (not .Values.peer.addPeerValue) }} apiVersion: batch/v1 kind: Job metadata: diff --git a/platforms/hyperledger-fabric/configuration/add-cli.yaml b/platforms/hyperledger-fabric/configuration/add-cli.yaml index 6eafa3ee1e24..c23916481354 100644 --- a/platforms/hyperledger-fabric/configuration/add-cli.yaml +++ b/platforms/hyperledger-fabric/configuration/add-cli.yaml @@ -28,7 +28,7 @@ loop: "{{ network.organizations }}" loop_control: loop_var: org - when: org.type == "peer" and org.org_status == "new" + when: org.services.peers is defined and org.services.peers | length > 0 and org.org_status == "new" vars: #These variables can be overriden from the command line privilege_escalate: false #Default to NOT escalate to root privledges diff --git a/platforms/hyperledger-fabric/configuration/add-peer.yaml b/platforms/hyperledger-fabric/configuration/add-peer.yaml index 4a4677a87853..6b6e4b74d351 100644 --- a/platforms/hyperledger-fabric/configuration/add-peer.yaml +++ b/platforms/hyperledger-fabric/configuration/add-peer.yaml @@ -25,76 +25,7 @@ file: path: "./build" state: absent - # Create Namespaces and Vault-rbac kubernetes-value files for new organization - - include_role: - name: "create/namespace" - vars: - component_name: "{{ item.name | lower }}-net" - component_type_name: "{{ item.type | lower }}" - kubernetes: "{{ item.k8s }}" - release_dir: "{{playbook_dir}}/../../../{{item.gitops.release_dir}}/{{ item.name | lower }}" - loop: "{{ network['organizations'] }}" - - # Setup script for Vault and OS Package Manager - - name: "Setup script for Vault and OS Package Manager" - include_role: - name: "{{ playbook_dir }}/../../shared/configuration/roles/setup/scripts" - vars: - namespace: "{{ org.name | lower }}-net" - kubernetes: "{{ org.k8s }}" - loop: "{{ network['organizations'] }}" - loop_control: - loop_var: org - when: org.org_status == 'new' - # Setup Vault-Kubernetes accesses and Regcred for docker registry for new organization - - include_role: - name: "{{ playbook_dir }}/../../shared/configuration/roles/setup/vault_kubernetes" - vars: - name: "{{ org.name | lower }}" - component_name: "{{ org.name | lower }}-vaultk8s-job" - component_type: "{{ org.type | lower }}" - component_ns: "{{ org.name | lower }}-net" - component_auth: "{{ network.env.type }}{{ name }}" - kubernetes: "{{ org.k8s }}" - vault: "{{ org.vault }}" - gitops: "{{ org.gitops }}" - reset_path: "platforms/hyperledger-fabric/configuration" - loop: "{{ network['organizations'] }}" - loop_control: - loop_var: org - when: org.org_status == 'new' - - # Create Storageclass for new organization - - include_role: - name: "{{ playbook_dir }}/../../../platforms/shared/configuration/roles/setup/storageclass" - vars: - org_name: "{{ org.name | lower }}" - sc_name: "{{ org_name }}-bevel-storageclass" - region: "{{ org.k8s.region | default('eu-west-1') }}" - loop: "{{ network['organizations'] }}" - loop_control: - loop_var: org - - # Create Organization crypto materials for new organization - - include_role: - name: "create/ca_tools/peer" - vars: - component_name: "{{ item.name | lower}}-net" - component: "{{ item.name | lower}}" - component_type: "{{ item.type | lower}}" - component_services: "{{ item.services }}" - orderer_org: "{{ item.orderer_org | lower }}" - sc_name: "{{ component }}-bevel-storageclass" - kubernetes: "{{ item.k8s }}" - vault: "{{ item.vault }}" - ca: "{{ item.services.ca }}" - docker_url: "{{ network.docker.url }}" - gitops: "{{ item.gitops }}" - values_dir: "{{playbook_dir}}/../../../{{item.gitops.release_dir}}/{{ item.name | lower }}" - loop: "{{ network['organizations'] }}" - when: item.type == 'peer' - # This role fetches block 0 and joins peers of new organizaion to the channel - include_role: name: "create/new_peer/update_block" @@ -106,22 +37,26 @@ # This role creates the value file for peers of organisations and write couch db credentials # to the vault. - - include_role: + - name: Create all peers + include_role: name: "create/peers" vars: build_path: "./build" - namespace: "{{ item.name | lower}}-net" - component_type: "{{ item.type | lower}}" - component_services: "{{ item.services }}" - vault: "{{ item.vault }}" - git_protocol: "{{ item.gitops.git_protocol }}" - git_url: "{{ item.gitops.git_url }}" - git_branch: "{{ item.gitops.branch }}" + namespace: "{{ org.name | lower}}-net" + component_type: "{{ org.type | lower}}" + component_services: "{{ org.services }}" + kubernetes: "{{ org.k8s }}" + vault: "{{ org.vault }}" + git_protocol: "{{ org.gitops.git_protocol }}" + git_url: "{{ org.gitops.git_url }}" + git_branch: "{{ org.gitops.branch }}" docker_url: "{{ network.docker.url }}" - charts_dir: "{{ item.gitops.chart_source }}" - values_dir: "{{playbook_dir}}/../../../{{item.gitops.release_dir}}/{{ item.name | lower }}" + charts_dir: "{{ org.gitops.chart_source }}" + values_dir: "{{playbook_dir}}/../../../{{org.gitops.release_dir}}/{{ org.name | lower }}" loop: "{{ network['organizations'] }}" - when: item.type == 'peer' + loop_control: + loop_var: org + when: org.services.peers is defined and org.services.peers | length > 0 # This role fetches block 0 and joins peers of new organizaion to the channel - include_role: @@ -132,18 +67,6 @@ docker_url: "{{ network.docker.url }}" loop: "{{ network['channels'] }}" - # Create CLI pod for peers with cli option enabled - - name: Create CLI pod for each peer when enabled - include_role: - name: "create/cli_pod" - vars: - peers: "{{ org.services.peers }}" - docker_url: "{{ network.docker.url }}" - loop: "{{ network.organizations }}" - loop_control: - loop_var: org - when: org.type == "peer" - vars: #These variables can be overriden from the command line privilege_escalate: false #Default to NOT escalate to root privledges install_os: "linux" #Default to linux OS diff --git a/platforms/hyperledger-fabric/configuration/roles/create/channels/tasks/valuefile.yaml b/platforms/hyperledger-fabric/configuration/roles/create/channels/tasks/valuefile.yaml index a51483a20b86..c9c94aa6bce9 100644 --- a/platforms/hyperledger-fabric/configuration/roles/create/channels/tasks/valuefile.yaml +++ b/platforms/hyperledger-fabric/configuration/roles/create/channels/tasks/valuefile.yaml @@ -79,7 +79,7 @@ git_url: "{{ org.gitops.git_url }}" git_branch: "{{ org.gitops.branch }}" charts_dir: "{{ org.gitops.chart_source }}" - values_dir: "{{playbook_dir}}/../../../{{org.gitops.release_dir}}/{{ org.name | lower }}" + values_dir: "{{playbook_dir}}/../../../{{org.gitops.component_dir}}/{{ org.name | lower }}" provider: "{{ org.cloud_provider }}" vault: "{{ org.vault }}" kubernetes: "{{ org.k8s }}" diff --git a/platforms/hyperledger-fabric/configuration/roles/create/channels_join/tasks/nested_channel_join.yaml b/platforms/hyperledger-fabric/configuration/roles/create/channels_join/tasks/nested_channel_join.yaml index e318dffba2c9..c3cbb66906e2 100644 --- a/platforms/hyperledger-fabric/configuration/roles/create/channels_join/tasks/nested_channel_join.yaml +++ b/platforms/hyperledger-fabric/configuration/roles/create/channels_join/tasks/nested_channel_join.yaml @@ -20,6 +20,12 @@ - participant.type == 'creator' and ('2.2.' in network.version or '1.4.' in network.version) - participant.org_status is not defined or participant.org_status == 'new' +# Set Variable charts_dir +- name: "Set Variable charts_dir" + set_fact: + charts_dir: "{{ org.gitops.chart_source }}" + when: charts_dir is undefined + # Get anchortx file from configmap obtener los datos del ordener en un task a aprte y despeus ahcer esto - name: Get anchortx file from config map kubernetes.core.k8s_info: @@ -72,7 +78,8 @@ charts_dir: "{{ org.gitops.chart_source }}" vault: "{{ org.vault }}" k8s: "{{ org.k8s }}" - values_dir: "{{playbook_dir}}/../../../{{org.gitops.release_dir}}/{{ org.name | lower }}" + add_peer_value: "{{ add_peer | default('false') }}" + values_dir: "{{playbook_dir}}/../../../{{org.gitops.component_dir}}/{{ org.name | lower }}" loop: "{{ participant.peers }}" loop_control: loop_var: peer diff --git a/platforms/hyperledger-fabric/configuration/roles/create/genesis/tasks/valuefile.yaml b/platforms/hyperledger-fabric/configuration/roles/create/genesis/tasks/valuefile.yaml index 5c0cf4c93809..479d92336dce 100644 --- a/platforms/hyperledger-fabric/configuration/roles/create/genesis/tasks/valuefile.yaml +++ b/platforms/hyperledger-fabric/configuration/roles/create/genesis/tasks/valuefile.yaml @@ -11,7 +11,7 @@ kubernetes: "{{ org.k8s }}" vault: "{{ org.vault }}" charts_dir: "{{ org.gitops.chart_source }}" - values_dir: "{{playbook_dir}}/../../../{{org.gitops.release_dir}}/{{ org.name | lower }}" + values_dir: "{{playbook_dir}}/../../../{{org.gitops.component_dir}}/{{ org.name | lower }}" generateGenisisBLock: "{{ generateGenisis }}" # Git Push: Push the above generated files to git directory diff --git a/platforms/hyperledger-fabric/configuration/roles/create/new_cli/tasks/main.yaml b/platforms/hyperledger-fabric/configuration/roles/create/new_cli/tasks/main.yaml index 45f89a8b1778..0ffe2e640be0 100644 --- a/platforms/hyperledger-fabric/configuration/roles/create/new_cli/tasks/main.yaml +++ b/platforms/hyperledger-fabric/configuration/roles/create/new_cli/tasks/main.yaml @@ -12,63 +12,13 @@ # ############################################################################################ -# Check if pods are present or not -- name: 'checking for job {{ component_name }} in {{ namespace }}' - k8s_info: - kind: "Pod" - namespace: "{{ component_ns }}" - kubeconfig: "{{ kubernetes.config_file }}" - context: "{{ kubernetes.context }}" - label_selectors: - - app = cli - vars: - name: "cli" - kubernetes: "{{ org.k8s }}" - component_name: "{{ peer.name | lower}}-{{ org.name | lower }}-cli" - component_ns: "{{ org.name | lower}}-net" - loop: "{{ peers }}" - loop_control: - loop_var: peer - register: existing_cli - -# Create the value file -- name: "Create Value file for CLI Pod" - include_role: - name: helm_component - vars: - name: "cli" - component_name: "{{ peer.name | lower}}-{{ org.name | lower }}-cli" - orderer: "{{ network.orderers | first }}" - component_ns: "{{ org.name | lower}}-net" - git_protocol: "{{ org.gitops.git_protocol }}" - git_url: "{{ org.gitops.git_url }}" - git_branch: "{{ org.gitops.branch }}" - charts_dir: "{{ org.gitops.chart_source }}" - vault: "{{ org.vault }}" - sc_name: "{{ org.name | lower }}-bevel-storageclass" - values_dir: "{{playbook_dir}}/../../../{{org.gitops.release_dir}}/{{ org.name | lower }}" - type: "cli" - external_url_suffix: "{{ org.external_url_suffix }}" - loop: "{{ peers }}" - loop_control: - loop_var: peer - when: - - peer.peerstatus is not defined or peer.peerstatus == 'new' - - peer.cli is defined - - peer.cli == "enabled" - - existing_cli.resources|length == 0 - -# Git Push : Push the above generated files to git directory -- name: Git Push - include_role: - name: "{{ playbook_dir }}/../../shared/configuration/roles/git_push" - vars: - GIT_DIR: "{{ playbook_dir }}/../../../" - gitops: "{{ org.gitops }}" - msg: "[ci skip] Pushing CLI value files" +# Create values file for cli +- name: Create values file for cli + include_tasks: valuefile.yaml loop: "{{ peers }}" loop_control: loop_var: peer - when: + when: + - peer.peerstatus is not defined or peer.peerstatus == 'new' - peer.cli is defined - peer.cli == "enabled" diff --git a/platforms/hyperledger-fabric/configuration/roles/create/new_cli/tasks/valuefile.yaml b/platforms/hyperledger-fabric/configuration/roles/create/new_cli/tasks/valuefile.yaml new file mode 100644 index 000000000000..b587b95fcf16 --- /dev/null +++ b/platforms/hyperledger-fabric/configuration/roles/create/new_cli/tasks/valuefile.yaml @@ -0,0 +1,68 @@ +# Set Variable existing_cli and existing_cli_dependency to empty +- name: "Set Variables existing_cli and existing_cli_dependency to empty" + set_fact: + existing_cli: "" + existing_cli_dependency: "" + +# Check if pods are present or not +- name: 'checking for job {{ component_name }} in {{ component_ns }}' + k8s_info: + kind: "Pod" + namespace: "{{ component_ns }}" + kubeconfig: "{{ kubernetes.config_file }}" + context: "{{ kubernetes.context }}" + label_selectors: + - app = cli + - app.kubernetes.io/name={{ peer.name | lower}} + vars: + name: "cli" + kubernetes: "{{ org.k8s }}" + component_name: "{{ peer.name | lower}}-{{ org.name | lower }}" + component_ns: "{{ org.name | lower}}-net" + register: existing_cli_dependency + +# Check if pods are present or not +- name: 'checking for job {{ component_name }} in {{ component_ns }}' + k8s_info: + kind: "Pod" + namespace: "{{ component_ns }}" + kubeconfig: "{{ kubernetes.config_file }}" + context: "{{ kubernetes.context }}" + label_selectors: + - app = cli + - app.kubernetes.io/name={{ component_name }} + vars: + name: "cli" + kubernetes: "{{ org.k8s }}" + component_name: "{{ peer.name | lower}}-{{ org.name | lower }}" + component_ns: "{{ org.name | lower}}-net" + register: existing_cli + +# Create the value file +- name: "Create Value file for CLI Pod" + include_role: + name: helm_component + vars: + name: "cli" + component: "{{ org.name | lower}}" + component_name: "{{ peer.name | lower}}-{{ org.name | lower}}" + orderer: "{{ network.orderers | first }}" + component_ns: "{{ org.name | lower}}-net" + git_protocol: "{{ org.gitops.git_protocol }}" + git_url: "{{ org.gitops.git_url }}" + git_branch: "{{ org.gitops.branch }}" + vault: "{{ org.vault }}" + charts_dir: "{{ org.gitops.chart_source }}" + values_dir: "{{playbook_dir}}/../../../{{org.gitops.release_dir}}/{{ org.name | lower }}" + type: "cli" + when: + - existing_cli.resources | length == 0 and existing_cli_dependency.resources | length == 0 + +# Git Push : Push the above generated files to git directory +- name: Git Push + include_role: + name: "{{ playbook_dir }}/../../shared/configuration/roles/git_push" + vars: + GIT_DIR: "{{ playbook_dir }}/../../../" + gitops: "{{ org.gitops }}" + msg: "[ci skip] Pushing CLI value files" diff --git a/platforms/hyperledger-fabric/configuration/roles/create/new_peer/update_block/tasks/main.yaml b/platforms/hyperledger-fabric/configuration/roles/create/new_peer/update_block/tasks/main.yaml index f0493aeca808..3e08b8914456 100644 --- a/platforms/hyperledger-fabric/configuration/roles/create/new_peer/update_block/tasks/main.yaml +++ b/platforms/hyperledger-fabric/configuration/roles/create/new_peer/update_block/tasks/main.yaml @@ -8,6 +8,12 @@ # This task calls nested_sign_and_update and nested_update_channel tasks ############################################################################################## +# create build directory +- name: Check build directory exists + file: + path: "./build" + state: directory + # Create the add_peer.sh file for new peer - name: "Create create-block-{{ item.channel_name | lower }}.sh script file for new peer" template: diff --git a/platforms/hyperledger-fabric/configuration/roles/create/new_peer/update_block/tasks/nested_create_cli.yaml b/platforms/hyperledger-fabric/configuration/roles/create/new_peer/update_block/tasks/nested_create_cli.yaml index f14e0e3a887f..6c228c616402 100644 --- a/platforms/hyperledger-fabric/configuration/roles/create/new_peer/update_block/tasks/nested_create_cli.yaml +++ b/platforms/hyperledger-fabric/configuration/roles/create/new_peer/update_block/tasks/nested_create_cli.yaml @@ -13,14 +13,13 @@ include_role: name: k8_component vars: - component_type_name: "{{ participant.name | lower }}" + component: "{{ participant.name | lower }}" component_type: "existing_peer_cli_job" - component_name: "cli-{{ channel_name }}-{{ participant.name }}-{{ peer.name }}" - peer_name: "{{ peer.name }}" + component_name: "{{ peer.name | lower}}-cli" + orderer: "{{ network.orderers | first }}" component_ns: "{{ participant.name | lower}}-net" git_url: "{{ org.gitops.git_url }}" git_branch: "{{ org.gitops.branch }}" charts_dir: "{{ org.gitops.chart_source }}" vault: "{{ org.vault }}" - storage_class: "{{ participant.name | lower }}-bevel-storageclass" - release_dir: "./build" + release_dir: "./build/{{ participant.name }}" diff --git a/platforms/hyperledger-fabric/configuration/roles/create/new_peer/update_block/tasks/nested_update_channel.yaml b/platforms/hyperledger-fabric/configuration/roles/create/new_peer/update_block/tasks/nested_update_channel.yaml index 3633364c5bca..79cfefb48a22 100644 --- a/platforms/hyperledger-fabric/configuration/roles/create/new_peer/update_block/tasks/nested_update_channel.yaml +++ b/platforms/hyperledger-fabric/configuration/roles/create/new_peer/update_block/tasks/nested_update_channel.yaml @@ -22,7 +22,7 @@ # Create the value file for creater org first peer - name: "start cli for {{ peer.name }}-{{ org.name }} for updating the channel" shell: | - KUBECONFIG={{ org.k8s.config_file }} helm upgrade --install -f ./build/{{ participant.name }}/existing_peer_cli_job.yaml {{ peer.name }}-{{ participant.name }}-cli {{playbook_dir}}/../../../{{org.gitops.chart_source}}/fabric-cli + KUBECONFIG={{ org.k8s.config_file }} helm upgrade --install -f ./build/{{ participant.name }}/existing_peer_cli_job.yaml {{ peer.name }}-{{ participant.name }} {{playbook_dir}}/../../../{{org.gitops.chart_source}}/fabric-cli --namespace {{ participant.name | lower}}-net when: existing_cli.resources|length == 0 # Wait for fabric cli @@ -73,7 +73,7 @@ loop: "{{ org.services.peers }}" loop_control: loop_var: peerx - when: peerx.type == 'anchor' + when: peerx.type == 'anchor' # update the blockchain after signature from the first peer of the creator - name: updating the channel with the new configuration block @@ -86,13 +86,13 @@ KUBECONFIG={{ kubernetes.config_file }} kubectl exec -n {{ org.name }}-net ${PEER_CLI} -- sh ./add_peer.sh KUBECONFIG={{ kubernetes.config_file }} kubectl exec -n {{ org.name | lower }}-net ${PEER_CLI} -- peer channel update -f {{ channel_name }}_update_in_envelope.pb -c {{ channel_name | lower}} -o {{ participant.ordererAddress }} --tls --cafile ${ORDERER_CA} environment: - ORDERER_CA: "/opt/gopath/src/github.com/hyperledger/fabric/crypto/orderer/tls/ca.crt" + ORDERER_CA: "/opt/gopath/src/github.com/hyperledger/fabric/orderer/tls/orderer.crt" vars: kubernetes: "{{ org.k8s }}" register: update_channel # Delete the cli -- name: "delete cli {{ peer.name }}-{{ participant.name }}-cli" +- name: "delete cli {{ peer.name }}-{{ participant.name }}" shell: | - KUBECONFIG={{ org.k8s.config_file }} helm uninstall {{ peer.name }}-{{ participant.name }}-cli + KUBECONFIG={{ org.k8s.config_file }} helm uninstall {{ peer.name }}-{{ participant.name }} --namespace {{ participant.name | lower}}-net when: existing_cli.resources|length == 0 diff --git a/platforms/hyperledger-fabric/configuration/roles/create/osnchannels/tasks/valuefile.yaml b/platforms/hyperledger-fabric/configuration/roles/create/osnchannels/tasks/valuefile.yaml index 3f51ae92dc38..656ad740f145 100644 --- a/platforms/hyperledger-fabric/configuration/roles/create/osnchannels/tasks/valuefile.yaml +++ b/platforms/hyperledger-fabric/configuration/roles/create/osnchannels/tasks/valuefile.yaml @@ -23,7 +23,7 @@ name: create/refresh_certs/reset_pod vars: pod_name: "osn-createchannel-{{ channel_name }}" - file_path: "{{playbook_dir}}/../../../{{org.gitops.release_dir}}/{{ org.name | lower }}/{{ org.name | lower }}/{{ channel_name }}.yaml" + file_path: "{{playbook_dir}}/../../../{{org.gitops.component_dir}}/{{ org.name | lower }}/{{ org.name | lower }}/{{ channel_name }}.yaml" gitops_value: "{{ org.gitops }}" component_ns: "{{ org.name | lower }}-net" kubernetes: "{{ org.k8s }}" @@ -46,7 +46,7 @@ vault: "{{ org.vault }}" k8s: "{{ org.k8s }}" orderers_list: "{{ org.services.orderers }}" - values_dir: "{{playbook_dir}}/../../../{{org.gitops.release_dir}}/{{ org.name | lower }}" + values_dir: "{{playbook_dir}}/../../../{{org.gitops.component_dir}}/{{ org.name | lower }}" add_orderer_value: "{{ add_orderer | default('false') }}" when: add_orderer is not defined or add_orderer == false diff --git a/platforms/hyperledger-fabric/configuration/roles/create/peers/tasks/nested_main.yaml b/platforms/hyperledger-fabric/configuration/roles/create/peers/tasks/nested_main.yaml index daa8d3198dcd..907332b19335 100644 --- a/platforms/hyperledger-fabric/configuration/roles/create/peers/tasks/nested_main.yaml +++ b/platforms/hyperledger-fabric/configuration/roles/create/peers/tasks/nested_main.yaml @@ -76,6 +76,7 @@ provider: "{{ org.cloud_provider }}" orderer: "{{ network.orderers | first }}" user_list: "{{ org.users | default('') }}" + add_peer_value: "{{ add_peer | default('false') }}" enabled_cli: "{{ true if peer.cli == 'enabled' else false }}" sc_enabled: "{{ false if storage_classes_info.resources | selectattr('metadata.name', 'equalto', sc_name) | list else true }}" create_configmaps: "{{ true if (first_peer == peer.name) and (crypto_scripts_data.resources | length == 0) else false }}" diff --git a/platforms/hyperledger-fabric/configuration/roles/helm_component/templates/cli.tpl b/platforms/hyperledger-fabric/configuration/roles/helm_component/templates/cli.tpl index fe18c2837127..fd026cdc2786 100644 --- a/platforms/hyperledger-fabric/configuration/roles/helm_component/templates/cli.tpl +++ b/platforms/hyperledger-fabric/configuration/roles/helm_component/templates/cli.tpl @@ -1,13 +1,13 @@ apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease metadata: - name: {{ component_name }} + name: {{ component_name | replace('_','-') }} namespace: {{ component_ns }} annotations: fluxcd.io/automated: "false" spec: interval: 1m - releaseName: {{ component_name }} + releaseName: {{ component_name | replace('_','-') }} chart: spec: interval: 1m @@ -17,39 +17,41 @@ spec: namespace: flux-{{ network.env.type }} chart: {{ charts_dir }}/fabric-cli values: - metadata: - namespace: {{ component_ns }} - images: - fabrictools: {{ docker_url }}/{{ fabric_tools_image[network.version] }} - alpineutils: {{ docker_url }}/{{ alpine_image }} - storage: - class: {{ sc_name }} - size: 256Mi - vault: - role: vault-role - address: {{ vault.url }} - authpath: {{ org.k8s.cluster_id | default('')}}{{ network.env.type }}{{ org.name | lower }} - adminsecretprefix: {{ vault.secret_path | default('secretsv2') }}/data/{{ org.name | lower }}/peerOrganizations/{{ component_ns }}/users/admin - orderersecretprefix: {{ vault.secret_path | default('secretsv2') }}/data/{{ org.name | lower }}/peerOrganizations/{{ component_ns }}/orderer - serviceaccountname: vault-auth - type: {{ vault.type | default("hashicorp") }} + global: + version: {{ network.version }} + serviceAccountName: vault-auth + cluster: + provider: {{ org.cloud_provider }} + cloudNativeServices: false + vault: + type: hashicorp + network: fabric + address: {{ vault.url }} + authPath: {{ network.env.type }}{{ component }} + secretEngine: {{ vault.secret_path | default("secretsv2") }} + secretPrefix: "data/{{ network.env.type }}{{ component }}" + role: vault-role + tls: false + + image: + fabricTools: {{ docker_url }}/{{ fabric_tools_image }} + alpineUtils: {{ docker_url }}/bevel-alpine:{{ bevel_alpine_version }} {% if network.docker.username is defined and network.docker.password is defined %} - imagesecretname: regcred + pullSecret: regcred {% else %} - imagesecretname: "" + pullSecret: "" {% endif %} - tls: false - peer: - name: {{ peer.name }} - localmspid: {{ org.name | lower}}MSP - tlsstatus: true -{% if network.env.proxy == 'none' %} - address: {{ peer.name }}.{{ component_ns }}:7051 -{% else %} - address: {{ peer.peerAddress }} -{% endif %} - orderer: - address: {{ orderer.uri }} + + peerName: {{ peer.name }} + storageClass: storage-{{ peer.name }} + storageSize: 256Mi + localMspId: {{ org.name | lower}}MSP + tlsStatus: true + ports: + grpc: + clusterIpPort: {{ peer.grpc.port }} + ordererAddress: {{ orderer.uri }} + {% if network.env.labels is defined %} labels: {% if network.env.labels.service is defined %} diff --git a/platforms/hyperledger-fabric/configuration/roles/helm_component/templates/value_peer.tpl b/platforms/hyperledger-fabric/configuration/roles/helm_component/templates/value_peer.tpl index 7aaab41423be..dcb470f37269 100755 --- a/platforms/hyperledger-fabric/configuration/roles/helm_component/templates/value_peer.tpl +++ b/platforms/hyperledger-fabric/configuration/roles/helm_component/templates/value_peer.tpl @@ -70,7 +70,7 @@ spec: settings: createConfigMaps: {{ create_configmaps }} refreshCertValue: false - addPeerValue: false + addPeerValue: {{ add_peer_value }} removeCertsOnDelete: true removeOrdererTlsOnDelete: true diff --git a/platforms/hyperledger-fabric/configuration/roles/helm_component/vars/main.yaml b/platforms/hyperledger-fabric/configuration/roles/helm_component/vars/main.yaml index f33e0cf7ab9e..2ea556ba827b 100644 --- a/platforms/hyperledger-fabric/configuration/roles/helm_component/vars/main.yaml +++ b/platforms/hyperledger-fabric/configuration/roles/helm_component/vars/main.yaml @@ -42,8 +42,3 @@ ca_image: 1.4.8: bevel-fabric-ca:1.4.8 2.2.2: bevel-fabric-ca:1.4.8 2.5.4: bevel-fabric-ca:latest - -fabric_tools_image: - 1.4.8: bevel-fabric-tools:1.4.8 - 2.2.2: bevel-fabric-tools:2.2.2 - 2.5.4: bevel-fabric-tools:2.5.4 diff --git a/platforms/hyperledger-fabric/configuration/roles/k8_component/templates/existing_peer_cli.tpl b/platforms/hyperledger-fabric/configuration/roles/k8_component/templates/existing_peer_cli.tpl index a48907a2931d..b8f0d60bffe2 100644 --- a/platforms/hyperledger-fabric/configuration/roles/k8_component/templates/existing_peer_cli.tpl +++ b/platforms/hyperledger-fabric/configuration/roles/k8_component/templates/existing_peer_cli.tpl @@ -1,39 +1,56 @@ -metadata: - namespace: {{ component_ns }} - images: - fabrictools: {{ docker_url }}/{{ fabric_tools_image[network.version] }} - alpineutils: {{ docker_url }}/{{ alpine_image }} +global: + version: {{ network.version }} + serviceAccountName: vault-auth + cluster: + provider: {{ org.cloud_provider }} + cloudNativeServices: false + vault: + type: hashicorp + network: fabric + address: {{ vault.url }} + authPath: {{ network.env.type }}{{ component }} + secretEngine: {{ vault.secret_path | default("secretsv2") }} + secretPrefix: "data/{{ network.env.type }}{{ component }}" + role: vault-role + tls: false -storage: - class: {{ storage_class }} - size: 256Mi -vault: - role: vault-role - address: {{ vault.url }} - authpath: {{ org.k8s.cluster_id | default('')}}{{ network.env.type }}{{ org.name | lower }} - adminsecretprefix: {{ vault.secret_path | default('secretsv2') }}/data/{{ org.name | lower }}/peerOrganizations/{{ component_ns }}/users/admin - orderersecretprefix: {{ vault.secret_path | default('secretsv2') }}/data/{{ org.name | lower }}/peerOrganizations/{{ component_ns }}/orderer - serviceaccountname: vault-auth - type: {{ vault.type | default("hashicorp") }} +image: + fabricTools: {{ docker_url }}/{{ fabric_tools_image }} + alpineUtils: {{ docker_url }}/bevel-alpine:{{ bevel_alpine_version }} {% if network.docker.username is defined and network.docker.password is defined %} - imagesecretname: regcred + pullSecret: regcred {% else %} - imagesecretname: "" + pullSecret: "" {% endif %} - tls: false -peer: - name: {{ peer_name }} - localmspid: {{ org.name | lower}}MSP - tlsstatus: true -{% if network.env.proxy == 'none' %} - address: {{ peer.name }}.{{ component_ns }}:7051 -{% else %} - address: {{ peer.peerAddress }} + +peerName: {{ peer.name }} +storageClass: storage-{{ peer.name }} +storageSize: 256Mi +localMspId: {{ org.name | lower}}MSP +tlsStatus: true +ports: + grpc: + clusterIpPort: {{ peer.grpc.port }} +ordererAddress: {{ orderer.uri }} + +{% if network.env.labels is defined %} +labels: +{% if network.env.labels.service is defined %} + service: +{% for key in network.env.labels.service.keys() %} + - {{ key }}: {{ network.env.labels.service[key] | quote }} +{% endfor %} +{% endif %} +{% if network.env.labels.pvc is defined %} + pvc: +{% for key in network.env.labels.pvc.keys() %} + - {{ key }}: {{ network.env.labels.pvc[key] | quote }} +{% endfor %} +{% endif %} +{% if network.env.labels.deployment is defined %} + deployment: +{% for key in network.env.labels.deployment.keys() %} + - {{ key }}: {{ network.env.labels.deployment[key] | quote }} +{% endfor %} {% endif %} -orderer: -{% if participant is defined %} - address: {{ participant.ordererAddress }} -{% else %} - address: {{ orderer.uri }} {% endif %} - diff --git a/platforms/hyperledger-fabric/configuration/roles/k8_component/vars/main.yaml b/platforms/hyperledger-fabric/configuration/roles/k8_component/vars/main.yaml index 73d0fc859317..a4a6c1262d02 100644 --- a/platforms/hyperledger-fabric/configuration/roles/k8_component/vars/main.yaml +++ b/platforms/hyperledger-fabric/configuration/roles/k8_component/vars/main.yaml @@ -11,8 +11,5 @@ k8_templates: operator_mainchannel: operator_mainchannel.tpl operator_followerchannel: operator_followerchannel.tpl -alpine_image: bevel-alpine:latest -fabric_tools_image: - 1.4.8: bevel-fabric-tools:1.4.8 - 2.2.2: bevel-fabric-tools:2.2.2 - 2.5.4: bevel-fabric-tools:2.5.4 +bevel_alpine_version: latest # Change to tag version when using tag specific images +fabric_tools_image: bevel-fabric-tools diff --git a/platforms/hyperledger-fabric/configuration/samples/network-fabric-add-cli.yaml b/platforms/hyperledger-fabric/configuration/samples/network-fabric-add-cli.yaml new file mode 100644 index 000000000000..ecc1d974ae04 --- /dev/null +++ b/platforms/hyperledger-fabric/configuration/samples/network-fabric-add-cli.yaml @@ -0,0 +1,358 @@ +############################################################################################## +# Copyright Accenture. All Rights Reserved. +# +# SPDX-License-Identifier: Apache-2.0 +############################################################################################## + +--- +# yaml-language-server: $schema=../../../../platforms/network-schema.json +# This is a sample configuration file to add new peer Cli to existing Organizations and channels. +network: + # Network level configuration specifies the attributes required for each organization + # to join an existing network. + type: fabric + version: 2.2.2 # currently tested 2.2.2 and 2.5.4 + frontend: enabled #Flag for frontend to enabled for nodes/peers + + #Environment section for Kubernetes setup + env: + type: "dev" # tag for the environment. Important to run multiple flux on single cluster + proxy: haproxy # values can be 'haproxy' or 'none' + retry_count: 20 # Retry count for the checks + external_dns: enabled # Should be enabled if using external-dns for automatic route configuration + annotations: # Additional annotations that can be used for some pods (ca, ca-tools, orderer and peer nodes) + service: + - example1: example2 + deployment: {} + pvc: {} + + # Docker registry details where images are stored. This will be used to create k8s secrets + # Please ensure all required images are built and stored in this registry. + # Do not check-in docker_password. + docker: + url: "ghcr.io/hyperledger" + username: "docker_username" + password: "docker_password" + + # Remote connection information for orderer (will be blank or removed for orderer hosting organization) + consensus: + name: raft + orderers: + - orderer: + type: orderer + name: orderer1 + org_name: supplychain #org_name should match one organization definition below in organizations: key + uri: orderer1.supplychain-net.org1proxy.blockchaincloudpoc.com:443 # Must include port, Can be external or internal URI for orderer which should be reachable by all peers + - orderer: + type: orderer + name: orderer2 + org_name: supplychain #org_name should match one organization definition below in organizations: key + uri: orderer2.supplychain-net.org1proxy.blockchaincloudpoc.com:443 # Must include port, Can be external or internal URI for orderer which should be reachable by all peers + - orderer: + type: orderer + name: orderer3 + org_name: supplychain #org_name should match one organization definition below in organizations: key + uri: orderer3.supplychain-net.org1proxy.blockchaincloudpoc.com:443 # Must include port, Can be external or internal URI for orderer which should be reachable by all peers + + # The channels defined for a network with participating peers in each channel + channels: + - channel: + consortium: SupplyChainConsortium + channel_name: AllChannel + channel_status: new + osn_creator_org: # Organization name, whose orderers will create the channel. This field is only used with version 2.5 + name: supplychain + chaincodes: + - "chaincode_name" + orderers: + - supplychain + participants: + - organization: + name: carrier + type: creator # creator organization will create the channel and instantiate chaincode, in addition to joining the channel and install chaincode + org_status: new # org_status must be existing when adding peer + peers: + - peer: + name: peer0 + type: anchor + peerstatus: existing # old peers should have status as existing + gossipAddress: peer1.carrier-net.org3proxy.blockchaincloudpoc.com:443 # Must include port, External or internal URI of the gossip peer + peerAddress: peer0.carrier-net.org3proxy.blockchaincloudpoc.com:443 # Must include port, External URI of the peer + - peer: + name: peer1 + type: nonanchor + peerstatus: new # new peers should have status as new + gossipAddress: peer0.carrier-net.org3proxy.blockchaincloudpoc.com:443 # Must include port, External or internal URI of the gossip peer + peerAddress: peer1.carrier-net.org3proxy.blockchaincloudpoc.com:443 # Must include port, External URI of the peer + ordererAddress: orderer1.supplychain-net.org1proxy.blockchaincloudpoc.com:443 # Must include port, External or internal URI of the orderer + - organization: + name: supplychain + type: joiner + org_status: existing + peers: + - peer: + name: peer0 + type: anchor + peerstatus: existing + gossipAddress: peer1.supplychain-net.org1proxy.hlf.blockchaincloudpoc-develop.com:443 + peerAddress: peer0.supplychain-net.org1proxy.hlf.blockchaincloudpoc-develop.com:443 + - peer: + name: peer1 + type: nonanchor + peerstatus: existing + gossipAddress: peer0.supplychain-net.org1proxy.hlf.blockchaincloudpoc-develop.com:443 + peerAddress: peer1.supplychain-net.org1proxy.hlf.blockchaincloudpoc-develop.com:443 + ordererAddress: orderer1.supplychain-net.org1proxy.hlf.blockchaincloudpoc-develop.com:443 + + # Allows specification of one or many organizations that will be connecting to a network. + # If an organization is also hosting the root of the network (e.g. doorman, membership service, etc), + # then these services should be listed in this section as well. + organizations: + # Specification for the Existing Peer organization. + - organization: + name: carrier + country: GB + state: London + location: London + subject: "O=Carrier,OU=Carrier,L=51.50/-0.13/London,C=GB" + external_url_suffix: org3proxy.blockchaincloudpoc.com + org_status: new # org_status must be existing when adding peer + orderer_org: supplychain # Name of the organization that provides the ordering service + ca_data: + certificate: /path/carrier/server.crt # CA Server public cert must be provided when adding peer on new cluster + + cloud_provider: aws # Options: aws, azure, gcp, digitalocean, minikube + aws: + access_key: "aws_access_key" # AWS Access key, only used when cloud_provider=aws + secret_key: "aws_secret_key" # AWS Secret key, only used when cloud_provider=aws + + # Kubernetes cluster deployment variables. The config file path and name has to be provided in case + # the cluster has already been created. + # This will be different from original org when adding peer on new cluster + k8s: + region: "cluster_region" + context: "cluster_context" + config_file: "cluster_config" + + # Hashicorp Vault server address and root-token. Vault should be unsealed. + # Both Kubernetes cluster and ansible controller should have access to same Vault when adding peer on new cluster + # Do not check-in root_token + vault: + url: "vault_addr" + root_token: "vault_root_token" + secret_path: "secretsv2" + + # Git Repo details which will be used by GitOps/Flux. + # Do not check-in git_access_token + gitops: + git_protocol: "https" # Option for git over https or ssh + git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files + branch: "develop" # Git branch where release is being made + # When adding peer on new cluster, if using same git branch, ensure release_dir is different + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. + chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo + git_repo: "github.com//bevel.git" # Gitops git repository URL for git push (without https://) + username: "git_username" # Git Service user who has rights to check-in in all branches + password: "git_access_token" # Git Server user password/token (Optional for ssh; Required for https) + email: "git@email.com" # Email to use in git config + private_key: "path_to_private_key" # Path to private key file which has write-access to the git repo (Optional for https; Required for ssh) + + services: + ca: + name: ca + subject: "/C=GB/ST=London/L=London/O=Carrier" + type: ca + grpc: + port: 7054 + + # Peers that already have a CLI deployed must have peerstatus = existing + peers: + - peer: + name: peer0 + type: anchor # This can be anchor/nonanchor. Atleast one peer should be anchor peer. + gossippeeraddress: peer1.carrier-net.org3proxy.blockchaincloudpoc.com:443 # No change from original configuration + peerAddress: peer0.carrier-net.org3proxy.blockchaincloudpoc.com:443 # Must include port, External URI of the peer + peerstatus: existing # Peers that already have a cli deployed must have status as existing + cli: enabled # Creates a peer cli pod depending upon the (enabled/disabled) tag. + grpc: + port: 7051 + events: + port: 7053 + couchdb: + port: 5984 + restserver: + targetPort: 20001 + port: 20001 + expressapi: + targetPort: 3000 + port: 3000 + chaincodes: + - name: "chaincode_name" #This has to be replaced with the name of the chaincode + version: "1" #This has to be replaced with the version of the chaincode + maindirectory: "chaincode_main" #The main directory where chaincode is needed to be placed + lang: "golang" # The language in which the chaincode is written ( golang/java/node ) + repository: + username: "git_username" # Git Service user who has rights to check-in in all branches + password: "git_access_token" + url: "github.com//bevel-samples.git" + branch: main + path: "chaincode_src" #The path to the chaincode + arguments: 'chaincode_args' #Arguments to be passed along with the chaincode parameters + endorsements: "" #Endorsements (if any) provided along with the chaincode + - peer: + name: peer1 + type: nonanchor # This can be anchor/nonanchor. Atleast one peer should be anchor peer. + gossippeeraddress: peer0.carrier-net.org3proxy.blockchaincloudpoc.com:443 # Must include port, External address of the existing anchor peer + peerAddress: peer1.carrier-net.org3proxy.blockchaincloudpoc.com:443 # Must include port, External URI of the peer + peerstatus: new # new peer cli should have status as new + cli: enabled # Creates a peer cli pod depending upon the (enabled/disabled) tag. + grpc: + port: 7051 + events: + port: 7053 + couchdb: + port: 5984 + restserver: + targetPort: 20001 + port: 20001 + expressapi: + targetPort: 3000 + port: 3000 + chaincodes: + - name: "chaincode_name" #This has to be replaced with the name of the chaincode + version: "1" #This has to be replaced with the version of the chaincode + maindirectory: "chaincode_main" #The main directory where chaincode is needed to be placed + lang: "golang" # The language in which the chaincode is written ( golang/java/node ) + repository: + username: "git_username" # Git Service user who has rights to check-in in all branches + password: "git_access_token" + url: "github.com//bevel-samples.git" + branch: main + path: "chaincode_src" #The path to the chaincode + arguments: 'chaincode_args' #Arguments to be passed along with the chaincode parameters + endorsements: "" #Endorsements (if any) provided along with the chaincode + + # Specification for the Existing Orderer organization. Not needed when just adding new peer. + - organization: + name: supplychain + country: UK + state: London + location: London + subject: "O=Orderer,OU=Orderer,L=51.50/-0.13/London,C=GB" + external_url_suffix: org1proxy.blockchaincloudpoc.com + org_status: existing # org_status must be existing when adding peer + ca_data: + certificate: /path/supplychain/server.crt # Path where ca public cert will be stored (if new) or read from (if existing ca) + + cloud_provider: aws # Options: aws, azure, gcp, digitalocean, minikube + aws: + access_key: "aws_access_key" # AWS Access key, only used when cloud_provider=aws + secret_key: "aws_secret_key" # AWS Secret key, only used when cloud_provider=aws + + # Kubernetes cluster deployment variables. The config file path and name has to be provided in case + # the cluster has already been created. + k8s: + region: "cluster_region" + context: "cluster_context" + config_file: "cluster_config" + + # Hashicorp Vault server address and root-token. Vault should be unsealed. + # Do not check-in root_token + vault: + url: "vault_addr" + root_token: "vault_root_token" + secret_path: "secretsv2" + # Git Repo details which will be used by GitOps/Flux. + # Do not check-in git_access_token + gitops: + git_protocol: "https" # Option for git over https or ssh + git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files + branch: "develop" # Git branch where release is being made + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored.y + chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo + git_repo: "github.com//bevel.git" # Gitops git repository URL for git push (without https://) + username: "git_username" # Git Service user who has rights to check-in in all branches + password: "git_access_token" # Git Server user password/token (Optional for ssh; Required for https) + email: "git@email.com" # Email to use in git config + private_key: "path_to_private_key" # Path to private key file which has write-access to the git repo (Optional for https; Required for ssh) + + # Services maps to the pods that will be deployed on the k8s cluster + # This sample is an orderer service and includes a zk-kafka consensus + services: + ca: + name: ca + subject: "/C=GB/ST=London/L=London/O=Orderer" + type: ca + grpc: + port: 7054 + + consensus: + name: raft + + orderers: + # This sample has multiple orderers as an example. + # You can use a single orderer for most production implementations. + # For RAFT consensus, have odd number (2n+1) of orderers for consensus agreement to have a majority. + - orderer: + name: orderer1 + type: orderer + consensus: raft + grpc: + port: 7050 + ordererAddress: orderer1.supplychain-net.org1proxy.blockchaincloudpoc.com:443 + - orderer: + name: orderer2 + type: orderer + consensus: raft + grpc: + port: 7050 + ordererAddress: orderer2.supplychain-net.org1proxy.blockchaincloudpoc.com:443 + - orderer: + name: orderer3 + type: orderer + consensus: raft + grpc: + port: 7050 + ordererAddress: orderer3.supplychain-net.org1proxy.blockchaincloudpoc.com:443 + + peers: + - peer: + name: peer0 + type: anchor # This can be anchor/nonanchor. Atleast one peer should be anchor peer. + gossippeeraddress: peer1.supplychain-net.org1proxy.hlf.blockchaincloudpoc-develop.com:443 # Internal Address of the other peer in same Org for gossip, same peer if there is only one peer + peerAddress: peer0.supplychain-net.org1proxy.hlf.blockchaincloudpoc-develop.com:443 # External URI of the peer + peerstatus: existing + cli: enabled # Creates a peer cli pod depending upon the (enabled/disabled) tag. + grpc: + port: 7051 + events: + port: 7053 + couchdb: + port: 5984 + restserver: + targetPort: 20001 + port: 20001 + expressapi: + targetPort: 3000 + port: 3000 + - peer: + name: peer1 + type: nonanchor # This can be anchor/nonanchor. Atleast one peer should be anchor peer. + gossippeeraddress: peer0.supplychain-net.org1proxy.hlf.blockchaincloudpoc-develop.com:443 # External address of the existing anchor peer + peerAddress: peer1.supplychain-net.org1proxy.hlf.blockchaincloudpoc-develop.com:443 # External URI of the peer + peerstatus: existing + cli: enabled # Creates a peer cli pod depending upon the (enabled/disabled) tag. + grpc: + port: 7051 + events: + port: 7053 + couchdb: + port: 5984 + restserver: + targetPort: 20001 + port: 20001 + expressapi: + targetPort: 3000 + port: 3000 diff --git a/platforms/hyperledger-fabric/configuration/samples/network-fabric-add-new-channel.yaml b/platforms/hyperledger-fabric/configuration/samples/network-fabric-add-new-channel.yaml index 589ab5ea1656..2d0e518c2aa9 100644 --- a/platforms/hyperledger-fabric/configuration/samples/network-fabric-add-new-channel.yaml +++ b/platforms/hyperledger-fabric/configuration/samples/network-fabric-add-new-channel.yaml @@ -11,7 +11,7 @@ network: # Network level configuration specifies the attributes required for each organization # to join an existing network. type: fabric - version: 2.2.2 # currently tested 1.4.8, 2.2.2 and 2.5.4 + version: 2.2.2 # currently tested 2.2.2 and 2.5.4 frontend: enabled #Flag for frontend to enabled for nodes/peers @@ -268,7 +268,8 @@ network: git_protocol: "https" # Option for git over https or ssh git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files branch: "develop" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops git repository URL for git push (without https://) username: "git_username" # Git Service user who has rights to check-in in all branches @@ -388,7 +389,8 @@ network: git_protocol: "https" # Option for git over https or ssh git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files branch: "develop" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops git repository URL for git push (without https://) username: "git_username" # Git Service user who has rights to check-in in all branches @@ -472,7 +474,8 @@ network: git_protocol: "https" # Option for git over https or ssh git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files branch: "develop" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops git repository URL for git push (without https://) username: "git_username" # Git Service user who has rights to check-in in all branches @@ -556,7 +559,8 @@ network: git_protocol: "https" # Option for git over https or ssh git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files branch: "develop" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops git repository URL for git push (without https://) username: "git_username" # Git Service user who has rights to check-in in all branches diff --git a/platforms/hyperledger-fabric/configuration/samples/network-fabric-add-ordererorg.yaml b/platforms/hyperledger-fabric/configuration/samples/network-fabric-add-ordererorg.yaml index 87509e0b6bca..46421fb2b900 100644 --- a/platforms/hyperledger-fabric/configuration/samples/network-fabric-add-ordererorg.yaml +++ b/platforms/hyperledger-fabric/configuration/samples/network-fabric-add-ordererorg.yaml @@ -174,7 +174,8 @@ network: git_protocol: "https" # Option for git over https or ssh git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files branch: "develop" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops git repository URL for git push username: "git_username" # Git Service user who has rights to check-in in all branches @@ -257,7 +258,8 @@ network: git_protocol: "https" # Option for git over https or ssh git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files branch: "develop" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops git repository URL for git push username: "git_username" # Git Service user who has rights to check-in in all branches @@ -333,7 +335,8 @@ network: git_protocol: "https" # Option for git over https or ssh git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files branch: "develop" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops git repository URL for git push username: "git_username" # Git Service user who has rights to check-in in all branches @@ -419,7 +422,8 @@ network: git_protocol: "https" # Option for git over https or ssh git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files branch: "develop" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops git repository URL for git push username: "git_username" # Git Service user who has rights to check-in in all branches @@ -503,7 +507,8 @@ network: git_protocol: "https" # Option for git over https or ssh git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files branch: "develop" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops git repository URL for git push username: "git_username" # Git Service user who has rights to check-in in all branches @@ -587,7 +592,8 @@ network: git_protocol: "https" # Option for git over https or ssh git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files branch: "develop" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops git repository URL for git push username: "git_username" # Git Service user who has rights to check-in in all branches diff --git a/platforms/hyperledger-fabric/configuration/samples/network-fabric-add-peer.yaml b/platforms/hyperledger-fabric/configuration/samples/network-fabric-add-peer.yaml index e847535da4f2..e685430c84eb 100644 --- a/platforms/hyperledger-fabric/configuration/samples/network-fabric-add-peer.yaml +++ b/platforms/hyperledger-fabric/configuration/samples/network-fabric-add-peer.yaml @@ -11,7 +11,7 @@ network: # Network level configuration specifies the attributes required for each organization # to join an existing network. type: fabric - version: 2.2.2 # currently tested 1.4.8, 2.2.2 and 2.5.4 + version: 2.2.2 # currently tested 2.2.2 and 2.5.4 frontend: enabled #Flag for frontend to enabled for nodes/peers #Environment section for Kubernetes setup @@ -60,6 +60,8 @@ network: consortium: SupplyChainConsortium channel_name: AllChannel channel_status: new + osn_creator_org: # Organization name, whose orderers will create the channel. This field is only used with version 2.5 + name: supplychain chaincodes: - "chaincode_name" orderers: @@ -72,15 +74,35 @@ network: peers: - peer: name: peer0 + type: anchor peerstatus: existing # old peers should have status as existing gossipAddress: peer1.carrier-net.org3proxy.blockchaincloudpoc.com:443 # Must include port, External or internal URI of the gossip peer peerAddress: peer0.carrier-net.org3proxy.blockchaincloudpoc.com:443 # Must include port, External URI of the peer - peer: name: peer1 + type: nonanchor peerstatus: new # new peers should have status as new gossipAddress: peer0.carrier-net.org3proxy.blockchaincloudpoc.com:443 # Must include port, External or internal URI of the gossip peer peerAddress: peer1.carrier-net.org3proxy.blockchaincloudpoc.com:443 # Must include port, External URI of the peer - ordererAddress: orderer1.supplychain-net.org1proxy.blockchaincloudpoc.com:443 # Must include port, External or internal URI of the orderer + ordererAddress: orderer1.supplychain-net.org1proxy.blockchaincloudpoc.com:443 # Must include port, External or internal URI of the orderer + - organization: + name: supplychain + type: joiner + org_status: existing + peers: + - peer: + name: peer0 + type: anchor + peerstatus: existing + gossipAddress: peer1.supplychain-net.org1proxy.hlf.blockchaincloudpoc-develop.com:443 + peerAddress: peer0.supplychain-net.org1proxy.hlf.blockchaincloudpoc-develop.com:443 + - peer: + name: peer1 + type: nonanchor + peerstatus: existing + gossipAddress: peer0.supplychain-net.org1proxy.hlf.blockchaincloudpoc-develop.com:443 + peerAddress: peer1.supplychain-net.org1proxy.hlf.blockchaincloudpoc-develop.com:443 + ordererAddress: orderer1.supplychain-net.org1proxy.hlf.blockchaincloudpoc-develop.com:443 # Allows specification of one or many organizations that will be connecting to a network. # If an organization is also hosting the root of the network (e.g. doorman, membership service, etc), @@ -127,7 +149,8 @@ network: git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files branch: "develop" # Git branch where release is being made # When adding peer on new cluster, if using same git branch, ensure release_dir is different - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops git repository URL for git push (without https://) username: "git_username" # Git Service user who has rights to check-in in all branches @@ -138,7 +161,7 @@ network: services: ca: name: ca - subject: "/C=GB/ST=London/L=London/O=Carrier/CN=ca.carrier-net.org3proxy.blockchaincloudpoc.com" + subject: "/C=GB/ST=London/L=London/O=Carrier" type: ca grpc: port: 7054 @@ -246,7 +269,8 @@ network: git_protocol: "https" # Option for git over https or ssh git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files branch: "develop" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored.y chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops git repository URL for git push (without https://) username: "git_username" # Git Service user who has rights to check-in in all branches @@ -259,7 +283,7 @@ network: services: ca: name: ca - subject: "/C=GB/ST=London/L=London/O=Orderer/CN=ca.supplychain-net.org1proxy.blockchaincloudpoc.com" + subject: "/C=GB/ST=London/L=London/O=Orderer" type: ca grpc: port: 7054 @@ -292,3 +316,43 @@ network: grpc: port: 7050 ordererAddress: orderer3.supplychain-net.org1proxy.blockchaincloudpoc.com:443 + + peers: + - peer: + name: peer0 + type: anchor # This can be anchor/nonanchor. Atleast one peer should be anchor peer. + gossippeeraddress: peer1.supplychain-net.org1proxy.hlf.blockchaincloudpoc-develop.com:443 # Internal Address of the other peer in same Org for gossip, same peer if there is only one peer + peerAddress: peer0.supplychain-net.org1proxy.hlf.blockchaincloudpoc-develop.com:443 # External URI of the peer + peerstatus: existing + cli: enabled # Creates a peer cli pod depending upon the (enabled/disabled) tag. + grpc: + port: 7051 + events: + port: 7053 + couchdb: + port: 5984 + restserver: + targetPort: 20001 + port: 20001 + expressapi: + targetPort: 3000 + port: 3000 + - peer: + name: peer1 + type: nonanchor # This can be anchor/nonanchor. Atleast one peer should be anchor peer. + gossippeeraddress: peer0.supplychain-net.org1proxy.hlf.blockchaincloudpoc-develop.com:443 # External address of the existing anchor peer + peerAddress: peer1.supplychain-net.org1proxy.hlf.blockchaincloudpoc-develop.com:443 # External URI of the peer + peerstatus: existing + cli: enabled # Creates a peer cli pod depending upon the (enabled/disabled) tag. + grpc: + port: 7051 + events: + port: 7053 + couchdb: + port: 5984 + restserver: + targetPort: 20001 + port: 20001 + expressapi: + targetPort: 3000 + port: 3000 diff --git a/platforms/hyperledger-fabric/configuration/samples/network-fabric-remove-organization.yaml b/platforms/hyperledger-fabric/configuration/samples/network-fabric-remove-organization.yaml index 1e1d8f22367f..10c59c50c7f2 100644 --- a/platforms/hyperledger-fabric/configuration/samples/network-fabric-remove-organization.yaml +++ b/platforms/hyperledger-fabric/configuration/samples/network-fabric-remove-organization.yaml @@ -148,7 +148,8 @@ network: git_protocol: "https" # Option for git over https or ssh git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files branch: "develop" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops git repository URL for git push username: "git_username" # Git Service user who has rights to check-in in all branches @@ -232,7 +233,8 @@ network: git_protocol: "https" # Option for git over https or ssh git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files branch: "develop" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops git repository URL for git push username: "git_username" # Git Service user who has rights to check-in in all branches @@ -318,7 +320,8 @@ network: git_protocol: "https" # Option for git over https or ssh git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files branch: "develop" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops git repository URL for git push username: "git_username" # Git Service user who has rights to check-in in all branches @@ -402,7 +405,8 @@ network: git_protocol: "https" # Option for git over https or ssh git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files branch: "develop" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops git repository URL for git push username: "git_username" # Git Service user who has rights to check-in in all branches @@ -486,7 +490,8 @@ network: git_protocol: "https" # Option for git over https or ssh git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files branch: "develop" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops git repository URL for git push username: "git_username" # Git Service user who has rights to check-in in all branches diff --git a/platforms/hyperledger-fabric/configuration/samples/network-fabricv2-external-chaincode.yaml b/platforms/hyperledger-fabric/configuration/samples/network-fabricv2-external-chaincode.yaml index a5c451ad8eef..32ab46dde135 100644 --- a/platforms/hyperledger-fabric/configuration/samples/network-fabricv2-external-chaincode.yaml +++ b/platforms/hyperledger-fabric/configuration/samples/network-fabricv2-external-chaincode.yaml @@ -176,7 +176,8 @@ network: git_protocol: "ssh" # Option for git over https or ssh git_url: "ssh://git@github.com//bevel.git" # Gitops ssh url for flux value files branch: "develop" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops https URL for git push (without https://) username: "git_username" # Git Service user who has rights to check-in in all branches @@ -255,7 +256,8 @@ network: git_protocol: "ssh" # Option for git over https or ssh git_url: "ssh://git@github.com//bevel.git" # Gitops ssh url for flux value files branch: "develop" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops https URL for git push (without https://) username: "git_username" # Git Service user who has rights to check-in in all branches @@ -348,7 +350,8 @@ network: git_protocol: "ssh" # Option for git over https or ssh git_url: "ssh://git@github.com//bevel.git" # Gitops ssh url for flux value files branch: "develop" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops https URL for git push (without https://) username: "git_username" # Git Service user who has rights to check-in in all branches @@ -439,7 +442,8 @@ network: git_protocol: "ssh" # Option for git over https or ssh git_url: "ssh://git@github.com//bevel.git" # Gitops ssh url for flux value files branch: "develop" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops https URL for git push (without https://) username: "git_username" # Git Service user who has rights to check-in in all branches @@ -529,7 +533,8 @@ network: git_protocol: "ssh" # Option for git over https or ssh git_url: "ssh://git@github.com//bevel.git" # Gitops ssh url for flux value files branch: "develop" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops https URL for git push (without https://) username: "git_username" # Git Service user who has rights to check-in in all branches diff --git a/platforms/hyperledger-fabric/configuration/samples/network-fabricv2-kafka.yaml b/platforms/hyperledger-fabric/configuration/samples/network-fabricv2-kafka.yaml index 91ff5f125f44..0e2f4fbd4f3b 100644 --- a/platforms/hyperledger-fabric/configuration/samples/network-fabricv2-kafka.yaml +++ b/platforms/hyperledger-fabric/configuration/samples/network-fabricv2-kafka.yaml @@ -152,7 +152,8 @@ network: git_protocol: "https" # Option for git over https or ssh git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files branch: "develop" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops git repository URL for git push (without https://) username: "git_username" # Git Service user who has rights to check-in in all branches @@ -234,7 +235,8 @@ network: git_protocol: "https" # Option for git over https or ssh git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files branch: "develop" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops git repository URL for git push (without https://) username: "git_username" # Git Service user who has rights to check-in in all branches @@ -321,7 +323,8 @@ network: git_protocol: "https" # Option for git over https or ssh git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files branch: "develop" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops git repository URL for git push (without https://) username: "git_username" # Git Service user who has rights to check-in in all branches @@ -405,7 +408,8 @@ network: git_protocol: "https" # Option for git over https or ssh git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files branch: "develop" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops git repository URL for git push (without https://) username: "git_username" # Git Service user who has rights to check-in in all branches @@ -490,7 +494,8 @@ network: git_protocol: "https" # Option for git over https or ssh git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files branch: "develop" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops git repository URL for git push (without https://) username: "git_username" # Git Service user who has rights to check-in in all branches diff --git a/platforms/hyperledger-fabric/configuration/samples/network-fabricv2-raft-add-orderer.yaml b/platforms/hyperledger-fabric/configuration/samples/network-fabricv2-raft-add-orderer.yaml index 37068d00dcce..ec89337fc592 100644 --- a/platforms/hyperledger-fabric/configuration/samples/network-fabricv2-raft-add-orderer.yaml +++ b/platforms/hyperledger-fabric/configuration/samples/network-fabricv2-raft-add-orderer.yaml @@ -154,7 +154,8 @@ network: git_protocol: "https" # Option for git over https or ssh git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files branch: "develop" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops git repository URL for git push (without https://) username: "git_username" # Git Service user who has rights to check-in in all branches diff --git a/platforms/hyperledger-fabric/configuration/samples/network-fabricv2.yaml b/platforms/hyperledger-fabric/configuration/samples/network-fabricv2.yaml index 6e54918ce128..688b987c19e8 100644 --- a/platforms/hyperledger-fabric/configuration/samples/network-fabricv2.yaml +++ b/platforms/hyperledger-fabric/configuration/samples/network-fabricv2.yaml @@ -11,7 +11,7 @@ network: # Network level configuration specifies the attributes required for each organization # to join an existing network. type: fabric - version: 2.2.2 # currently tested 1.4.8, 2.2.2 and 2.5.4 + version: 2.2.2 # currently tested 2.2.2 and 2.5.4 upgrade: false # true : To upgrading Hyperledger Fabric version from 1.4.x to 2.2.x frontend: enabled #Flag for frontend to enabled for nodes/peers @@ -207,6 +207,7 @@ network: git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files branch: "develop" # Git branch where release is being made release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops git repository URL for git push (without https://) username: "git_username" # Git Service user who has rights to check-in in all branches @@ -328,7 +329,8 @@ network: git_protocol: "https" # Option for git over https or ssh git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files branch: "develop" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops git repository URL for git push (without https://) username: "git_username" # Git Service user who has rights to check-in in all branches @@ -423,7 +425,8 @@ network: git_protocol: "https" # Option for git over https or ssh git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files branch: "develop" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops git repository URL for git push (without https://) username: "git_username" # Git Service user who has rights to check-in in all branches @@ -515,7 +518,8 @@ network: git_protocol: "https" # Option for git over https or ssh git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files branch: "develop" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops git repository URL for git push (without https://) username: "git_username" # Git Service user who has rights to check-in in all branches @@ -608,7 +612,8 @@ network: git_protocol: "https" # Option for git over https or ssh git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files branch: "develop" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops git repository URL for git push (without https://) username: "git_username" # Git Service user who has rights to check-in in all branches diff --git a/platforms/hyperledger-fabric/configuration/samples/network-proxy-none.yaml b/platforms/hyperledger-fabric/configuration/samples/network-proxy-none.yaml index ee8827859064..4b93ecd7ebee 100644 --- a/platforms/hyperledger-fabric/configuration/samples/network-proxy-none.yaml +++ b/platforms/hyperledger-fabric/configuration/samples/network-proxy-none.yaml @@ -136,6 +136,7 @@ network: git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files branch: "local" # Git branch where release is being made release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops git repository URL for git push (without https://) username: "github_username" # Git user who has rights to check-in in all branches @@ -207,6 +208,7 @@ network: git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files branch: "local" # Git branch where release is being made release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops git repository URL for git push (without https://) username: "github_username" # Git user who has rights to check-in in all branches @@ -304,6 +306,7 @@ network: git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files branch: "local" # Git branch where release is being made release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops git repository URL for git push (without https://) username: "github_username" # Git user who has rights to check-in in all branches diff --git a/platforms/hyperledger-fabric/configuration/samples/network-user-certificate.yaml b/platforms/hyperledger-fabric/configuration/samples/network-user-certificate.yaml index 00896f979784..6b972d8365e0 100644 --- a/platforms/hyperledger-fabric/configuration/samples/network-user-certificate.yaml +++ b/platforms/hyperledger-fabric/configuration/samples/network-user-certificate.yaml @@ -69,7 +69,8 @@ network: git_protocol: "https" # Option for git over https or ssh git_url: "https://github.com//bevel.git" # Gitops https or ssh url for flux value files branch: "develop" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com//bevel.git" # Gitops git repository URL for git push (without https://) username: "git_username" # Git Service user who has rights to check-in in all branches diff --git a/platforms/hyperledger-fabric/configuration/samples/workflow/network-fabric-workflow.yaml b/platforms/hyperledger-fabric/configuration/samples/workflow/network-fabric-workflow.yaml index a4818baaea0a..56e0f676fa8f 100644 --- a/platforms/hyperledger-fabric/configuration/samples/workflow/network-fabric-workflow.yaml +++ b/platforms/hyperledger-fabric/configuration/samples/workflow/network-fabric-workflow.yaml @@ -185,7 +185,8 @@ network: git_protocol: "https" # Option for git over https or ssh git_url: "https://github.com/GIT_USERNAME/bevel.git" # Gitops https or ssh url for flux value files branch: "GIT_BRANCH" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com/GIT_USERNAME/bevel.git" # Gitops git repository URL for git push (without https://) username: "GIT_USERNAME" # Git Service user who has rights to check-in in all branches @@ -269,7 +270,8 @@ network: git_protocol: "https" # Option for git over https or ssh git_url: "https://github.com/GIT_USERNAME/bevel.git" # Gitops https or ssh url for flux value files branch: "GIT_BRANCH" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com/GIT_USERNAME/bevel.git" # Gitops git repository URL for git push (without https://) username: "GIT_USERNAME" # Git Service user who has rights to check-in in all branches @@ -364,7 +366,8 @@ network: git_protocol: "https" # Option for git over https or ssh git_url: "https://github.com/GIT_USERNAME/bevel.git" # Gitops https or ssh url for flux value files branch: "GIT_BRANCH" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com/GIT_USERNAME/bevel.git" # Gitops git repository URL for git push (without https://) username: "GIT_USERNAME" # Git Service user who has rights to check-in in all branches @@ -456,7 +459,8 @@ network: git_protocol: "https" # Option for git over https or ssh git_url: "https://github.com/GIT_USERNAME/bevel.git" # Gitops https or ssh url for flux value files branch: "GIT_BRANCH" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com/GIT_USERNAME/bevel.git" # Gitops git repository URL for git push (without https://) username: "GIT_USERNAME" # Git Service user who has rights to check-in in all branches @@ -549,7 +553,8 @@ network: git_protocol: "https" # Option for git over https or ssh git_url: "https://github.com/GIT_USERNAME/bevel.git" # Gitops https or ssh url for flux value files branch: "GIT_BRANCH" # Git branch where release is being made - release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + release_dir: "platforms/hyperledger-fabric/releases/dev" # Relative Path in the Git repo for flux sync per environment. + component_dir: "platforms/hyperledger-fabric/releases/k8sComponent" # Relative path where values files are stored. chart_source: "platforms/hyperledger-fabric/charts" # Relative Path where the Helm charts are stored in Git repo git_repo: "github.com/GIT_USERNAME/bevel.git" # Gitops git repository URL for git push (without https://) username: "GIT_USERNAME" # Git Service user who has rights to check-in in all branches diff --git a/platforms/network-schema.json b/platforms/network-schema.json index 0ccf5575a1fb..2c84a485d344 100755 --- a/platforms/network-schema.json +++ b/platforms/network-schema.json @@ -625,6 +625,11 @@ "pattern": "(^[A-Za-z0-9]+)(/[A-Za-z0-9-]+)*([A-Za-z0-9])$", "description": "Relative path where flux should sync files." }, + "component_dir": { + "type": "string", + "pattern": "(^[A-Za-z0-9]+)(/[A-Za-z0-9-]+)*([A-Za-z0-9])$", + "description": "Relative path where values are stored." + }, "chart_source": { "type": "string", "pattern": "(^[A-Za-z0-9]+)(/[A-Za-z0-9-]+)*([A-Za-z0-9])$", diff --git a/platforms/shared/configuration/delete-network.yaml b/platforms/shared/configuration/delete-network.yaml index 5ecbd6ad4a2b..ace5fe262e02 100644 --- a/platforms/shared/configuration/delete-network.yaml +++ b/platforms/shared/configuration/delete-network.yaml @@ -31,6 +31,7 @@ organization: "{{ organizationItem.name | lower }}" organization_ns: "{{ organization }}-{{ namespace_suffix | map(attribute=network.type) | first }}" release_dir: "{{ playbook_dir }}/../../../{{ gitops.release_dir }}/{{ organization }}" + component_dir: "{{ playbook_dir }}/../../../{{ gitops.component_dir }}/{{ organization }}" release_ns_dir: "{{ playbook_dir }}/../../../{{ gitops.release_dir }}/{{ organization_ns }}" flux_mainfest_dir: "{{ playbook_dir }}/../../../{{ gitops.release_dir }}/flux-{{ network.env.type }}" loop: "{{ network['organizations'] }}" diff --git a/platforms/shared/configuration/roles/create/job_component/templates/join_channel_job.tpl b/platforms/shared/configuration/roles/create/job_component/templates/join_channel_job.tpl index 3a897b0b7815..767da46f971d 100644 --- a/platforms/shared/configuration/roles/create/job_component/templates/join_channel_job.tpl +++ b/platforms/shared/configuration/roles/create/job_component/templates/join_channel_job.tpl @@ -39,3 +39,4 @@ peer: tlsStatus: true channelName: {{ channel_name }} ordererAddress: {{ participant.ordererAddress }} + addPeerValue: {{ add_peer_value }} diff --git a/platforms/shared/configuration/roles/delete/gitops/tasks/main.yaml b/platforms/shared/configuration/roles/delete/gitops/tasks/main.yaml index 183534e82532..df1f33b6cfd5 100644 --- a/platforms/shared/configuration/roles/delete/gitops/tasks/main.yaml +++ b/platforms/shared/configuration/roles/delete/gitops/tasks/main.yaml @@ -15,6 +15,14 @@ path: "{{ release_dir }}" state: absent +# This task deletes all the files from the component directory with org name +- name: Delete release files + file: + path: "{{ component_dir }}" + state: absent + when: + - network.type == "fabric" + # This task deletes all the files from the release directory with org-namespace name - name: Delete release files file: From b8699f2cb01ae5ebb263c0f131d71c29836473eb Mon Sep 17 00:00:00 2001 From: alvaropicazo Date: Mon, 15 Jul 2024 10:19:16 +0000 Subject: [PATCH 2/2] feat(shared): Update charts version to 1.1.0 Signed-off-by: alvaropicazo --- .../hyperledger-besu/charts/besu-cacti-connector/Chart.yaml | 2 +- platforms/hyperledger-besu/charts/besu-genesis/Chart.yaml | 2 +- platforms/hyperledger-besu/charts/besu-node/Chart.yaml | 2 +- .../hyperledger-besu/charts/besu-propose-validator/Chart.yaml | 2 +- platforms/hyperledger-besu/charts/besu-tessera-node/Chart.yaml | 2 +- platforms/hyperledger-besu/charts/besu-tlscert-gen/Chart.yaml | 2 +- platforms/quorum/charts/quorum-cacti-connector/Chart.yaml | 2 +- platforms/quorum/charts/quorum-genesis/Chart.yaml | 2 +- platforms/quorum/charts/quorum-node/Chart.yaml | 2 +- platforms/quorum/charts/quorum-propose-validator/Chart.yaml | 2 +- platforms/quorum/charts/quorum-tessera-node/Chart.yaml | 2 +- platforms/quorum/charts/quorum-tlscert-gen/Chart.yaml | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/platforms/hyperledger-besu/charts/besu-cacti-connector/Chart.yaml b/platforms/hyperledger-besu/charts/besu-cacti-connector/Chart.yaml index 66e7e525c64c..6b6139dfc832 100644 --- a/platforms/hyperledger-besu/charts/besu-cacti-connector/Chart.yaml +++ b/platforms/hyperledger-besu/charts/besu-cacti-connector/Chart.yaml @@ -8,6 +8,6 @@ apiVersion: v1 name: besu-cacti-connector description: "Hyperledger Besu: Deploys Cactus Besu Connector" type: application -version: 1.0.0 +version: 1.1.0 # For Cactus release 1.1.3 appVersion: "1.1.3" diff --git a/platforms/hyperledger-besu/charts/besu-genesis/Chart.yaml b/platforms/hyperledger-besu/charts/besu-genesis/Chart.yaml index aa481e709733..fbd1b82ae54f 100644 --- a/platforms/hyperledger-besu/charts/besu-genesis/Chart.yaml +++ b/platforms/hyperledger-besu/charts/besu-genesis/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 name: besu-genesis description: "Hyperledger Besu: Genesis generator" -version: 1.0.0 +version: 1.1.0 appVersion: latest keywords: - bevel diff --git a/platforms/hyperledger-besu/charts/besu-node/Chart.yaml b/platforms/hyperledger-besu/charts/besu-node/Chart.yaml index ce8e77d3fc07..5eb66c62ae80 100644 --- a/platforms/hyperledger-besu/charts/besu-node/Chart.yaml +++ b/platforms/hyperledger-besu/charts/besu-node/Chart.yaml @@ -6,7 +6,7 @@ apiVersion: v1 name: besu-node description: Hyperledger Besu nodes for a POA network -version: 1.0.1 +version: 1.1.0 appVersion: latest keywords: - bevel diff --git a/platforms/hyperledger-besu/charts/besu-propose-validator/Chart.yaml b/platforms/hyperledger-besu/charts/besu-propose-validator/Chart.yaml index 6cb9b839259c..9f3722da44c8 100644 --- a/platforms/hyperledger-besu/charts/besu-propose-validator/Chart.yaml +++ b/platforms/hyperledger-besu/charts/besu-propose-validator/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 name: besu-propose-validator description: "besu: Proposes to add or remove a validator with the specified address." -version: 1.0.1 +version: 1.1.0 appVersion: latest keywords: - bevel diff --git a/platforms/hyperledger-besu/charts/besu-tessera-node/Chart.yaml b/platforms/hyperledger-besu/charts/besu-tessera-node/Chart.yaml index 1f8634036c32..8539323c3c2e 100644 --- a/platforms/hyperledger-besu/charts/besu-tessera-node/Chart.yaml +++ b/platforms/hyperledger-besu/charts/besu-tessera-node/Chart.yaml @@ -6,7 +6,7 @@ apiVersion: v1 name: besu-tessera-node description: "Hyperledger Besu: Deploys Tessera transaction manager nodes" -version: 1.0.1 +version: 1.1.0 # Tessera version appVersion: '21.7.3' keywords: diff --git a/platforms/hyperledger-besu/charts/besu-tlscert-gen/Chart.yaml b/platforms/hyperledger-besu/charts/besu-tlscert-gen/Chart.yaml index 4a5d6c2fa7a2..746f5cb8d7e8 100644 --- a/platforms/hyperledger-besu/charts/besu-tlscert-gen/Chart.yaml +++ b/platforms/hyperledger-besu/charts/besu-tlscert-gen/Chart.yaml @@ -7,7 +7,7 @@ apiVersion: v1 name: besu-tlscert-gen description: "Hyperledger Besu: Generates and stores TLS certificates for nodes and tessera" -version: 1.0.0 +version: 1.1.0 appVersion: latest keywords: - bevel diff --git a/platforms/quorum/charts/quorum-cacti-connector/Chart.yaml b/platforms/quorum/charts/quorum-cacti-connector/Chart.yaml index 5126d8969375..ff177dc2b61e 100644 --- a/platforms/quorum/charts/quorum-cacti-connector/Chart.yaml +++ b/platforms/quorum/charts/quorum-cacti-connector/Chart.yaml @@ -2,6 +2,6 @@ apiVersion: v2 name: quorum_connector description: "Quorum: This Helm chart deploys a Cactus GoQuorum Connector." type: application -version: 1.0.0 +version: 1.1.0 # For Cactus release 1.1.3 appVersion: "1.1.3" diff --git a/platforms/quorum/charts/quorum-genesis/Chart.yaml b/platforms/quorum/charts/quorum-genesis/Chart.yaml index 480cfac68f73..01e33afa2166 100644 --- a/platforms/quorum/charts/quorum-genesis/Chart.yaml +++ b/platforms/quorum/charts/quorum-genesis/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: quorum-genesis description: "Quorum: This Helm chart deploys genesis." type: application -version: 1.0.0 +version: 1.1.0 appVersion: latest keywords: - bevel diff --git a/platforms/quorum/charts/quorum-node/Chart.yaml b/platforms/quorum/charts/quorum-node/Chart.yaml index 45a72532a876..ddd8fb6b6f6b 100644 --- a/platforms/quorum/charts/quorum-node/Chart.yaml +++ b/platforms/quorum/charts/quorum-node/Chart.yaml @@ -6,7 +6,7 @@ apiVersion: v1 name: quorum-node description: "Quorum: Deploys a Quorum node for a POA network" -version: 1.0.1 +version: 1.1.0 appVersion: latest keywords: - bevel diff --git a/platforms/quorum/charts/quorum-propose-validator/Chart.yaml b/platforms/quorum/charts/quorum-propose-validator/Chart.yaml index 16ab5ea775c5..b2b075f3a11a 100644 --- a/platforms/quorum/charts/quorum-propose-validator/Chart.yaml +++ b/platforms/quorum/charts/quorum-propose-validator/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 name: quorum-propose-validator description: "Quorum: Proposes to add or remove a validator with the specified address." -version: 1.0.1 +version: 1.1.0 appVersion: latest keywords: - bevel diff --git a/platforms/quorum/charts/quorum-tessera-node/Chart.yaml b/platforms/quorum/charts/quorum-tessera-node/Chart.yaml index e5bf20fe3b4a..7d831f240da3 100644 --- a/platforms/quorum/charts/quorum-tessera-node/Chart.yaml +++ b/platforms/quorum/charts/quorum-tessera-node/Chart.yaml @@ -6,7 +6,7 @@ apiVersion: v1 name: quorum-tessera-node description: "Quorum: Deploys Tessera transaction manager nodes" -version: 1.0.1 +version: 1.1.0 # Tessera version appVersion: '21.7.3' keywords: diff --git a/platforms/quorum/charts/quorum-tlscert-gen/Chart.yaml b/platforms/quorum/charts/quorum-tlscert-gen/Chart.yaml index e4190f400aad..afdaae6a6285 100644 --- a/platforms/quorum/charts/quorum-tlscert-gen/Chart.yaml +++ b/platforms/quorum/charts/quorum-tlscert-gen/Chart.yaml @@ -7,7 +7,7 @@ apiVersion: v1 name: quorum-tls-gen description: "Quorum: Generates and stores TLS certificates for nodes and tessera" -version: 1.0.0 +version: 1.1.0 appVersion: latest keywords: - bevel