Skip to content

Commit

Permalink
Merge pull request #2598 from alvaropicazo/feat_2585
Browse files Browse the repository at this point in the history
feat(docs): Add helm charts installation guide for ops
  • Loading branch information
sownak authored Jul 9, 2024
2 parents d5efd51 + 2bb184c commit 83c4afe
Show file tree
Hide file tree
Showing 8 changed files with 265 additions and 169 deletions.
7 changes: 4 additions & 3 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,10 @@ nav:
- guides/besu/add-new-validator-org.md
- guides/besu/setup-cactus-connector.md
- guides/besu/setup-onchain-permissioning.md
- Other Operations:
- guides/indy-add-new-org.md
- guides/quorum-add-new-org.md
- Quorum Operations:
- guides/quorum/quorum-add-new-org.md
- Indy Operations:
- guides/indy/indy-add-new-org.md
- References:
- Commands: references/commands.md
- Troubleshooting: references/troubleshooting.md
Expand Down
105 changes: 68 additions & 37 deletions docs/source/guides/besu/add-new-member-org.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,62 +3,93 @@
[//]: # (SPDX-License-Identifier: Apache-2.0)
[//]: # (##############################################################################################)

<a name = "adding-new-member-org-to-existing-network-in-besu"></a>
# Adding a new member organization in Besu
# Add a new member to an existing organization

- [Prerequisites](#prerequisites)
- [Create Configuration File](#create-configuration-file)
- [Run playbook](#run-playbook)
This guide explains how to add a new validator node to an existing organization in a Hyperledger Besu network using two methods:

<a name = "prerequisites"></a>
## Prerequisites
To add a new organization in Besu, an existing besu network should be running, enode information of all existing nodes present in the network should be available, genesis file should be available in base64 encoding and the information of besu nodes should be available. The new node account should be unlocked prior adding the new node to the existing besu network.
1. Using the `site.yaml` playbook: This playbook involves running an Ansible playbook that automates the process of adding a new org to the network.

!!! important
1. Using `helm install`: This method involves using the `helm install` commands to directly add a new org to the network.

Addition of a new 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.
## Method 1: Using the `site.yaml` playbook

!!! note
1. **Prerequisites**

The guide is only for the addition of member organization in existing besu network.
To add a new organization in Besu, an existing besu network should be running, enode information of all existing nodes present in the network should be available, genesis file should be available in base64 encoding and the information of besu nodes should be available. The new node account should be unlocked prior adding the new node to the existing besu network.

---
!!! important

<a name = "create_config_file"></a>
## Create Configuration File
Addition of a new 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.

Refer [this guide](../networkyaml-besu.md) for details on editing the configuration file.
!!! note

The `network.yaml` file should contain the specific `network.organization` details along with the enode information, genesis file in base64 encoding and tessera transaction manager details
The guide is only for the addition of member organization in existing besu network.

!!! note
1. **Update network.yaml file**

Make sure that the genesis flie is provided in base64 encoding. Also, if you are adding node to the same cluster as of another node, make sure that you add the ambassador ports of the existing node present in the cluster to the network.yaml
Refer [this guide](../networkyaml-besu.md) for details on editing the configuration file.

For reference, sample `network-besu-new-memberorg.yaml` file [here](https://github.com/hyperledger/bevel/blob/main/platforms/hyperledger-besu/configuration/samples/network-besu-new-memberorg.yaml)
The `network.yaml` file should contain the specific `network.organization` details along with the enode information, genesis file in base64 encoding and tessera transaction manager details

```yaml
--8<-- "platforms/hyperledger-besu/configuration/samples/network-besu-new-memberorg.yaml:1:152"
```
!!! note

Three new sections are added to the network.yaml
Make sure that the genesis flie is provided in base64 encoding. Also, if you are adding node to the same cluster as of another node, make sure that you add the ambassador ports of the existing node present in the cluster to the network.yaml

| Field | Description |
|-------------|----------------------------------------------------------|
| tm_nodes | Existing network's transaction manager nodes' public addresses with nodeport.|
| besu_nodes | Existing network's besu nodes' public addresses with rpc port.|
| genesis | Path to existing network's genesis.json in base64.|
For reference, sample `network-besu-new-memberorg.yaml` file [here](https://github.com/hyperledger/bevel/blob/main/platforms/hyperledger-besu/configuration/samples/network-besu-new-memberorg.yaml)

```yaml
--8<-- "platforms/hyperledger-besu/configuration/samples/network-besu-new-memberorg.yaml:1:152"
```

<a name = "run_network"></a>
## Run playbook
Three new sections are added to the network.yaml

The [site.yaml](https://github.com/hyperledger/bevel/tree/main/platforms/shared/configuration/site.yaml) playbook is used to add a new organization to the existing network. This can be done using the following command
| Field | Description |
|-------------|----------------------------------------------------------|
| tm_nodes | Existing network's transaction manager nodes' public addresses with nodeport.|
| besu_nodes | Existing network's besu nodes' public addresses with rpc port.|
| genesis | Path to existing network's genesis.json in base64.|

```
ansible-playbook platforms/shared/configuration/add-new-organization.yaml --extra-vars "@path-to-network.yaml"
```

## Verify network deployment
For instructions on how to troubleshoot network, read [our troubleshooting guide](../../references/troubleshooting.md)
1. **Run playbook**

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

```
ansible-playbook platforms/shared/configuration/add-new-organization.yaml --extra-vars "@path-to-network.yaml"
```

1. **Verify network deployment**

For instructions on how to troubleshoot network, read [our troubleshooting guide](../../references/troubleshooting.md)


## Method 2: Using `helm install`

For instructions on how to troubleshoot network, read [our troubleshooting guide](../../../../platforms/hyperledger-besu/charts/README.md)

1. **Update the txnode-sec.yaml file**

Following changes are must in the `txnode-sec.yaml` file for a new member to be added to the network:

- `global.proxy.externalUrlSuffix`
- `tessera.tessera.peerNodes`

1. **Get the genesis and static nodes from existing member and place in besu-genesis/files**

```bash
kubectl --namespace supplychain-bes get configmap besu-peers -o jsonpath='{.data.static-nodes\.json}' > static-nodes.json
kubectl --namespace supplychain-bes get configmap besu-genesis -o jsonpath='{.data.genesis\.json}' > genesis.json
kubectl --namespace supplychain-bes get configmap besu-bootnodes -o jsonpath='{.data.bootnodes-json}' > bootnodes.json
```

1. **Install the besu genesis chart**

```bash
helm install genesis ./besu-genesis --namespace carrier-bes --values ./values/proxy-and-vault/genesis-sec.yaml
```

1. **Install the besu-node chart**

```bash
helm install carrier ./besu-node --namespace carrier-bes --values ./values/proxy-and-vault/txnode-sec.yaml --set global.proxy.p2p=15016 --set node.besu.identity="O=Carrier,OU=Carrier,L=51.50/-0.13/London,C=GB"
```
79 changes: 45 additions & 34 deletions docs/source/guides/besu/add-new-validator-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,65 @@
[//]: # (SPDX-License-Identifier: Apache-2.0)
[//]: # (##############################################################################################)

<a name = "adding-new-validator-node-to-existing-org-in-besu"></a>
# Adding a new validator node in Besu
# Add a new validator node to an existing organization

- [Prerequisites](#prerequisites)
- [Create Configuration File](#create-configuration-file)
- [Run playbook](#run-playbook)
This guide explains how to add a new validator node to an existing organization in a Hyperledger Besu network using two methods:

<a name = "prerequisites"></a>
## Prerequisites
To add a new node in Besu, an existing besu network should be running, enode information of all existing nodes present in the network should be available, genesis file should be available in base64 encoding and the information of transaction manager nodes and existing validator nodes should be available. The new node account should be unlocked prior adding the new node to the existing besu network.
1. Using the `add-validator.yaml` playbook: This method involves running an Ansible playbook that automates the process of adding a new node to the network.

---
**NOTE**: Addition of a new validator node 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.
1. Using `helm install`: This method involves using the `helm install` commands to directly add a new node to the network.

---
## Method 1: Using the `add-validator.yaml` playbook

<a name = "create_config_file"></a>
## Create Configuration File
1. **Prerequisites**

Refer [this guide](../networkyaml-besu.md) for details on editing the configuration file.
To add a new node in Besu, an existing besu network should be running, enode information of all existing nodes present in the network should be available, genesis file should be available in base64 encoding and the information of transaction manager nodes and existing validator nodes should be available. The new node account should be unlocked prior adding the new node to the existing besu network.

The `network.yaml` file should contain the specific `network.organization` details along with the tessera transaction manager node details and existing validator and member node details.
---
**NOTE**: Addition of a new validator node 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.

---
**NOTE**: Make sure that the genesis flie is provided in base64 encoding. Also, if you are adding node to the same cluster as of another node, make sure that you add the ambassador ports of the existing node present in the cluster to the network.yaml

---
For reference, sample `network-besu-new-validatornode.yaml` file [here](https://github.com/hyperledger/bevel/blob/main/platforms/hyperledger-besu/configuration/samples/network-besu-new-validatornode.yaml)
1. **Update configuration file**

```yaml
--8<-- "platforms/hyperledger-besu/configuration/samples/network-besu-new-validatornode.yaml:1:201"
```
Refer [this guide](../networkyaml-besu.md) for details on editing the configuration file.

Three new sections are added to the network.yaml
The `network.yaml` file should contain the specific `network.organization` details along with the tessera transaction manager node details and existing validator and member node details.

| Field | Description |
|-------------|----------------------------------------------------------|
| tm_nodes | Existing network's transaction manager nodes' public addresses with nodeport.|
| besu_nodes | Existing network's besu nodes' public addresses with rpc port.|
| genesis | Path to existing network's genesis.json in base64.|
---
**NOTE**: Make sure that the genesis flie is provided in base64 encoding. Also, if you are adding node to the same cluster as of another node, make sure that you add the ambassador ports of the existing node present in the cluster to the network.yaml

---
For reference, sample `network-besu-new-validatornode.yaml` file [here](https://github.com/hyperledger/bevel/blob/main/platforms/hyperledger-besu/configuration/samples/network-besu-new-validatornode.yaml)

<a name = "run_network"></a>
## Run playbook
```yaml
--8<-- "platforms/hyperledger-besu/configuration/samples/network-besu-new-validatornode.yaml:1:201"
```

The [add-validator.yaml](https://github.com/hyperledger/bevel/tree/main/platforms/hyperledger-besu/configuration/add-validator.yaml) playbook is used to add a new validator node to an existing organization in a running network. This can be done using the following command
Three new sections are added to the network.yaml

```
ansible-playbook platforms/hyperledger-besu/configuration/add-validator.yaml --extra-vars "@path-to-network.yaml"
```
| Field | Description |
|-------------|----------------------------------------------------------|
| tm_nodes | Existing network's transaction manager nodes' public addresses with nodeport.|
| besu_nodes | Existing network's besu nodes' public addresses with rpc port.|
| genesis | Path to existing network's genesis.json in base64.|


1. **Run playbook**

The [add-validator.yaml](https://github.com/hyperledger/bevel/tree/main/platforms/hyperledger-besu/configuration/add-validator.yaml) playbook is used to add a new validator node to an existing organization in a running network. This can be done using the following command

```
ansible-playbook platforms/hyperledger-besu/configuration/add-validator.yaml --extra-vars "@path-to-network.yaml"
```

## Method 2: Using `helm install`

1. **Update the besu-node values.yaml and besu-propose-validator values.yaml file**

Refer to the [besu-propose-validator chart documentation](https://github.com/hyperledger/bevel/tree/main/platforms/hyperledger-besu/charts/besu-propose-validator) for a complete list of available configuration options.

1. **Install the besu-propose-validator chart**

```bash
helm install validator-5 ./besu-propose-validator --namespace supplychain-bes --values besu-propose-validator/values.yaml
```
83 changes: 55 additions & 28 deletions docs/source/guides/corda/add-new-org.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,71 @@
[//]: # (SPDX-License-Identifier: Apache-2.0)
[//]: # (##############################################################################################)

<a name = "adding-new-org-to-existing-network-in-corda"></a>
# Adding a new organization in R3 Corda
# Add a new member to an existing organization

- [Prerequisites](#prerequisites)
- [Create configuration file](#create-configuration-file)
- [Run playbook](#run-playbook)
This guide explains how to add a new validator node to an existing organization in a a R3 Corda network using two methods:

<a name = "prerequisites"></a>
## Prerequisites
To add a new organization, Corda Doorman/Idman and Networkmap services should already be running. The public certificates from Doorman/Idman and Networkmap should be available and specified in the configuration file.
1. Using the `add-new-organization.yaml` playbook: This playbook involves running an Ansible playbook that automates the process of adding a new org to the network.

!!! note
Addition of a new 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.
1. Using `helm install`: This method involves using the `helm install` commands to directly add a new org to the network.

<a name = "create_config_file"></a>
## Create Configuration File
## Method 1: Using the `add-new-organization.yaml` playbook

Refer [this guide](../networkyaml-corda.md) for details on editing the configuration file.
1. **Prerequisites**
To add a new organization, Corda Doorman/Idman and Networkmap services should already be running. The public certificates from Doorman/Idman and Networkmap should be available and specified in the configuration file.

The `network.yaml` file should contain the specific `network.organization` details along with the network service information about the networkmap and doorman service.
!!! note
Addition of a new 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.

!!! note
Make sure the doorman and networkmap service certificates are in plain text and not encoded in base64 or any other encoding scheme, along with correct paths to them mentioned in network.yaml.
1. **Create Configuration File**

For reference, sample `network.yaml` file [here] (https://github.com/hyperledger/bevel/blob/main/platforms/r3-corda/configuration/samples/network-cordav2.yaml) but always check the latest `network.yaml` file.
Refer [this guide](../networkyaml-corda.md) for details on editing the configuration file.

```yaml
--8<-- "platforms/r3-corda/configuration/samples/network-cordav2.yaml:1:223"
```
The `network.yaml` file should contain the specific `network.organization` details along with the network service information about the networkmap and doorman service.

<a name = "run_network"></a>
## Run playbook
!!! note
Make sure the doorman and networkmap service certificates are in plain text and not encoded in base64 or any other encoding scheme, along with correct paths to them mentioned in network.yaml.

The [add-new-organization.yaml](https://github.com/hyperledger/bevel/blob/main/platforms/shared/configuration/add-new-organization.yaml) playbook is used to add a new organization to the existing network. This can be done using the following command
For reference, sample `network.yaml` file [here](https://github.com/hyperledger/bevel/blob/main/platforms/r3-corda/configuration/samples/network-cordav2.yaml) but always check the latest `network.yaml` file.

```
ansible-playbook platforms/shared/configuration/add-new-organization.yaml --extra-vars "@path-to-network.yaml"
```
```yaml
--8<-- "platforms/r3-corda/configuration/samples/network-cordav2.yaml:1:223"
```

!!! note
If you have CorDapps and applications, please deploy them as well.
1. **Run playbook**

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

```
ansible-playbook platforms/shared/configuration/add-new-organization.yaml --extra-vars "@path-to-network.yaml"
```

!!! note
If you have CorDapps and applications, please deploy them as well.

## Method 2: Using `helm install`

Refer [this guide](../../../../platforms/r3-corda/charts/README.md) for details on editing the configuration file.

1. **Update the node.yaml file**

Following changes are must in the `node.yaml` file for a new member to be added to the network:

- `global.proxy.externalUrlSuffix`
- `nodeConf.legalName`

1. **Get the init and static nodes from existing member and place in corda-init/files**

```bash
cd ./corda-init/files/
kubectl --namespace supplychain-ns get secret nms-tls-certs -o jsonpath='{.data.tls\.crt}' > nms.crt
kubectl --namespace supplychain-ns get secret doorman-tls-certs -o jsonpath='{.data.tls\.crt}' > doorman.crt
```

1. **Install the init-sec chart**

```bash
helm install init ./corda-init --namespace manufacturer-ns --values ./values/proxy-and-vault/init-sec.yaml
helm install manufacturer ./corda-node --namespace manufacturer-ns --values ./values/proxy-and-vault/node.yaml --set nodeConf.legalName="O=Manufacturer\,OU=Manufacturer\,L=47.38/8.54/Zurich\,C=CH"
```
Loading

0 comments on commit 83c4afe

Please sign in to comment.