Skip to content

Commit

Permalink
Merge branch 'develop' into feature-2416
Browse files Browse the repository at this point in the history
  • Loading branch information
suvajit-sarkar authored Feb 5, 2024
2 parents 2bc43de + c84898c commit e1bca75
Show file tree
Hide file tree
Showing 27 changed files with 275 additions and 759 deletions.
Binary file removed docs/source/_static/NetworkYamlFabric1.png
Binary file not shown.
41 changes: 14 additions & 27 deletions docs/source/guides/fabric/add-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@
# Adding cli to Hyperledger Fabric

- [Prerequisites](#prerequisites)
- [Modifying configuration file](#create_config_file)
- [Running playbook to deploy Hyperledger Fabric network](#run_network)

- [Modifying Configuration File](#modifying-configuration-file)
- [Run playbook](#run-playbook)

<a name = "prerequisites"></a>
## Prerequisites
Expand All @@ -27,33 +26,21 @@ Refer [this guide](../networkyaml-fabric.md) for details on editing the configur

While modifying the configuration file(`network.yaml`) for adding cli, all the existing organizations should have `org_status` tag as `existing` and the new organization should have `org_status` tag as `new` under `network.channels` e.g.

network:
channels:
- channel:
..
..
participants:
- organization:
..
..
org_status: new # new for new organization(s)
- organization:
..
..
org_status: existing # existing for old organization(s)

```yaml
--8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabric-add-organization.yaml:65:139"
```

and under `network.organizations` as

network:
organizations:
- organization:
..
..
org_status: new # new for new organization(s)
- organization:
..
..
org_status: existing # existing for old organization(s)
```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"
..
..
```

The `network.yaml` file should contain the specific `network.organization` details along with the orderer information.

Expand Down
36 changes: 7 additions & 29 deletions docs/source/guides/fabric/add-new-channel.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# Adding a new channel in Hyperledger Fabric

- [Prerequisites](#prerequisites)
- [Modifying configuration file](#create_config_file)
- [Running playbook to deploy Hyperledger Fabric network](#run_network)
- [Modifying Configuration File](#modifying-configuration-file)
- [Run playbook](#run-playbook)


<a name = "prerequisites"></a>
Expand All @@ -27,41 +27,19 @@ Refer [this guide](../networkyaml-fabric.md) for details on editing the configur

While modifying the configuration file(`network.yaml`) for adding new channel, all the existing channel should have `channel_status` tag as `existing` and the new channel should have `channel_status` tag as `new` under `network.channels` e.g.

network:
channels:
- channel:
channel_status: existing
..
..
participants:
- organization:
..
..
- organization:
..
..
- channel:
channel_status: new
..
..
participants:
- organization:
..
..
- organization:
..
..

```yaml
--8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabric-add-new-channel.yaml:66:193"
```

The `network.yaml` file should contain the specific `network.organization` details along with the orderer information.


For reference, see `network-fabric-add-channel.yaml` file [here](https://github.com/hyperledger/bevel/tree/main/platforms/hyperledger-fabric/configuration/samples).
For reference, see `network-fabric-add-channel.yaml` file [here](https://github.com/hyperledger/bevel/tree/main/platforms/hyperledger-fabric/configuration/samples/network-fabric-add-new-channel.yaml).

<a name = "run_network"></a>
## Run playbook

The [add-new-channel.yaml](https://github.com/hyperledger/bevel/tree/main/platforms/shared/configuration/add-new-channel.yaml) playbook is used to add a new channel to the existing network. This can be done using the following command
The [add-new-channel.yaml](https://github.com/hyperledger/bevel/blob/main/platforms/hyperledger-fabric/configuration/add-new-channel.yaml) playbook is used to add a new channel to the existing network. This can be done using the following command

```
ansible-playbook platforms/hyperledger-fabric/configuration/add-new-channel.yaml --extra-vars "@path-to-network.yaml"
Expand Down
45 changes: 16 additions & 29 deletions docs/source/guides/fabric/add-new-orderer-org.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,16 @@
# Adding a new Orderer organization in Hyperledger Fabric

- [Prerequisites](#prerequisites)
- [Modifying configuration file](#create_config_file)
- [Running playbook to deploy Hyperledger Fabric network](#run_network)

- [Modifying Configuration File](#modifying-configuration-file)
- [Run playbook](#run-playbook)

<a name = "prerequisites"></a>
## Prerequisites
To add a new Orderer organization, a fully configured Fabric network must be present already setup, i.e. a Fabric network which has Orderers, Peers, Channels (with all Peers already in the channels). The corresponding crypto materials should also be present in their respective Hashicorp Vault.

---
**NOTE**: Addition of a new Orderer organization has been tested on an existing network which is created by Bevel. Networks created using other methods may be suitable but this has not been tested by Bevel team.
Addition of new Orderer organization only works with Fabric 2.2.2 and RAFT Service.
Addition of new Orderer organization only works with Fabric 2.2.2, 2.5.4 and RAFT Service.

---

Expand All @@ -28,38 +27,26 @@ Refer [this guide](../networkyaml-fabric.md) for details on editing the configur

While modifying the configuration file(`network.yaml`) for adding new orderer organization, all the existing organizations should have `org_status` tag as `existing` and the new organization should have `org_status` tag as `new` under `network.channels` e.g.

network:
channels:
- channel:
..
..
participants:
- organization:
..
..
org_status: new # new for new organization(s)
- organization:
..
..
org_status: existing # existing for old organization(s)

```yaml
--8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabric-add-ordererorg.yaml:64:138"
```

and under `network.organizations` as

network:
organizations:
- organization:
..
..
org_status: new # new for new organization(s)
- organization:
..
..
org_status: existing # existing for old organization(s)
```yaml
--8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabric-add-ordererorg.yaml:145:154"
..
..
--8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabric-add-ordererorg.yaml:230:239"
..
..
```

The `network.yaml` file should contain the specific `network.organization` details along with the orderer information.


For reference, see `network-fabric-add-ordererorg.yaml` file [here](https://github.com/hyperledger/bevel/tree/main/platforms/hyperledger-fabric/configuration/add-orderer-organization.yaml).
For reference, see `network-fabric-add-ordererorg.yaml` file [here](https://github.com/hyperledger/bevel/tree/main/platforms/hyperledger-fabric/configuration/samples/network-fabric-add-ordererorg.yaml).

<a name = "run_network"></a>
## Run playbook
Expand Down
38 changes: 17 additions & 21 deletions docs/source/guides/fabric/add-new-orderer-peer.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
<a name = "adding-new-orderer-to-existing-organization-in-a-running-fabric-network"></a>
# Adding a new RAFT orderer to existing Orderer organization in Hyperledger Fabric

- [Prerequisites](#prerequisites)
- [Modifying Configuration File](#modifying-configuration-file)
- [Run playbook](#run-playbook)
- [Chaincode Installation](#chaincode-installation)
- [Prerequisites](#prerequisites)
- [Modifying Configuration File](#modifying-configuration-file)
- [Run playbook](#run-playbook)


<a name = "prerequisites"></a>
Expand All @@ -31,24 +30,21 @@ For generic instructions on the Fabric configuration file, refer [this guide](..

While modifying the configuration file(`network.yaml`) for adding new peer, all the existing orderers should have `status` tag as `existing` and the new orderers should have `status` tag as `new` under `network.organizations` as

network:
organizations:
- organization:
org_status: existing # org_status must be existing when adding peer
..
..
services:
orderers:
- orderer:
..
..
status: new # new for new peers(s)
- orderer:
..
..
status: existing # existing for existing peers(s)
```yaml

--8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabricv2-raft-add-orderer.yaml:126:135"
..
..
--8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabricv2-raft-add-orderer.yaml:174:174"
--8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabricv2-raft-add-orderer.yaml:185:220"

```
and under `network.orderers` the new orderer must be added.

```yaml
--8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabricv2-raft-add-orderer.yaml:42:66"
```
The `network.yaml` file should contain the specific `network.organization` details.

Ensure the following is considered when adding the new orderer on a different cluster:
Expand Down
42 changes: 15 additions & 27 deletions docs/source/guides/fabric/add-new-org.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# Adding a new organization in Hyperledger Fabric

- [Prerequisites](#prerequisites)
- [Modifying configuration file](#create_config_file)
- [Running playbook to deploy Hyperledger Fabric network](#run_network)
- [Modifying Configuration File](#modifying-configuration-file)
- [Run playbook](#run-playbook)


<a name = "prerequisites"></a>
Expand All @@ -27,38 +27,26 @@ Refer [this guide](../networkyaml-fabric.md) for details on editing the configur

While modifying the configuration file(`network.yaml`) for adding new organization, all the existing organizations should have `org_status` tag as `existing` and the new organization should have `org_status` tag as `new` under `network.channels` e.g.

network:
channels:
- channel:
..
..
participants:
- organization:
..
..
org_status: new # new for new organization(s)
- organization:
..
..
org_status: existing # existing for old organization(s)
```yaml
--8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabric-add-organization.yaml:65:139"
```

and under `network.organizations` as

network:
organizations:
- organization:
..
..
org_status: new # new for new organization(s)
- organization:
..
..
org_status: existing # existing for old organization(s)
```yaml
--8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabric-add-organization.yaml:144:155"
..
..
--8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabric-add-organization.yaml:406:414"
..
..

```

The `network.yaml` file should contain the specific `network.organization` details along with the orderer information.


For reference, see `network-fabric-add-organization.yaml` file [here](https://github.com/hyperledger/bevel/tree/main/platforms/hyperledger-fabric/configuration/samples).
For reference, see `network-fabric-add-organization.yaml` file [here](https://github.com/hyperledger/bevel/tree/main/platforms/hyperledger-fabric/configuration/samples/network-fabric-add-organization.yaml).

<a name = "run_network"></a>
## Run playbook
Expand Down
53 changes: 16 additions & 37 deletions docs/source/guides/fabric/add-new-peer.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,51 +24,30 @@ To add a new peer a fully configured Fabric network must be present already, i.e
<a name = "modifying-configuration-file"></a>
## Modifying Configuration File

A Sample configuration file for adding new peer is available [here](https://github.com/hyperledger/bevel/blob/main/platforms/hyperledger-fabric/configuration/samples/network-fabricv-add-peer.yaml). Please go through this file and all the comments there and edit accordingly.
A Sample configuration file for adding new peer is available [here](https://github.com/hyperledger/bevel/blob/main/platforms/hyperledger-fabric/configuration/samples/network-fabric-add-peer.yaml). Please go through this file and all the comments there and edit accordingly.

For generic instructions on the Fabric configuration file, refer [this guide](../networkyaml-fabric.md).

While modifying the configuration file(`network.yaml`) for adding new peer, all the existing peers should have `peerstatus` tag as `existing` and the new peers should have `peerstatus` tag as `new` under `network.channels` e.g.

network:
channels:
- channel:
..
..
participants:
- organization:
peers:
- peer:
..
..
peerstatus: new # new for new peers(s)
gossipAddress: peer0.xxxx.com # gossip Address must be one existing peer
- peer:
..
..
peerstatus: existing # existing for existing peers(s)
```yaml
--8<-- "platforms/hyperledger-fabric/configuration/samples/network-fabric-add-peer.yaml:60:87"
```

and under `network.organizations` as

network:
organizations:
- organization:
org_status: existing # org_status must be existing when adding peer
```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"
..
services:
peers:
- peer:
..
..
peerstatus: new # new for new peers(s)
gossipAddress: peer0.xxxx.com # gossip Address must be one existing peer
- peer:
..
..
peerstatus: existing # existing for existing peers(s)
..
```

The `network.yaml` file should contain the specific `network.organization` details. Orderer information is needed if you are going to install/upgrade the existing chaincodes, otherwise it is not needed. And the `org_status` must be `existing` when adding peer.

Expand Down Expand Up @@ -100,8 +79,8 @@ ansible-playbook platforms/hyperledger-fabric/configuration/add-peer.yaml --extr
Use the same network.yaml if you need to install chaincode on the new peers.

---
**NOTE:** With Fabric 2.2 chaincode lifecyle, re-installing chaincode on new peer is not needed as when the blocks are synced, the new peer will have access to already committed chaincode. If still needed, you can upgrade the version of the chaincode and install on all peers.
**NOTE:** With Fabric 2.2 and 2.5 chaincode lifecyle, re-installing chaincode on new peer is not needed as when the blocks are synced, the new peer will have access to already committed chaincode. If still needed, you can upgrade the version of the chaincode and install on all peers.

---

Refer [this guide](./chaincode-operations.md) for details on installing chaincode.
Refer [Install chaincode guide](./chaincode-operations.md) or [Install external chaincode guide](./external-chaincode-operations.md) for details on installing chaincode.
Loading

0 comments on commit e1bca75

Please sign in to comment.