Skip to content

Commit

Permalink
update use case documentation (#40)
Browse files Browse the repository at this point in the history
* update use case documentation

* update chart version

* quote field values

* update field values

* removed github token example at it seems it is considered a secret
  • Loading branch information
bmastahac authored Apr 18, 2022
1 parent 2f23d06 commit c7fb058
Show file tree
Hide file tree
Showing 9 changed files with 293 additions and 46 deletions.
4 changes: 2 additions & 2 deletions charts/quorum-node/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: quorum-node
description: A Helm chart for the deployment of the quorum node on Kubernetes suporting new-network, join-network and update-partners-info use cases.
description: A Helm chart for the deployment of the quorum node on Kubernetes supporting new-network, join-network and update-partners-info use cases.

# A chart can be either an 'application' or a 'library' chart.
#
Expand All @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.5
version: 0.2.6

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
86 changes: 82 additions & 4 deletions charts/quorum-node/readme.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,85 @@
# quorum-node

![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 21.7.1](https://img.shields.io/badge/AppVersion-21.7.1-informational?style=flat-square)

A Helm chart for the deployment of the quorum node on Kubernetes suporting new-network, join-network and update-partners-info use cases.
![Version: 0.2.6](https://img.shields.io/badge/Version-0.2.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 21.7.1](https://img.shields.io/badge/AppVersion-21.7.1-informational?style=flat-square)

A Helm chart for the deployment of the quorum node on Kubernetes supporting new-network, join-network and update-partners-info use cases.

## Requirements

- [helm 3](https://helm.sh/docs/intro/install/)

- Deployment use case matrix

| Use case | Configuration |
|----------|--------|
| **new-network** | `use_case.newNetwork.enabled:` **true**<br/>`use_case.joinNetwork.enabled:` **false**<br/>`use_case.updatePartnersInfo.enabled:` **false**|
| **join-network** | `use_case.newNetwork.enabled:` **false**<br/>`use_case.joinNetwork.enabled:` **true**<br/>`use_case.updatePartnersInfo.enabled:` **false**<br/> `use_case.joinNetwork.genesis_file_location:` **Required**|
| **new-network**<br/> continued by<br/> **update-partners-info** | `use_case.newNetwork.enabled:` **true**<br/>`use_case.joinNetwork.enabled:` **false**<br/>`use_case.updatePartnersInfo.enabled:` **true**<br/>`use_case.updatePartnersInfo.shared_data_location:` **Required**<br/>`use_case.updatePartnersInfo.peers:` **Required**|
| **join-network**<br/> continued by<br/> **update-partners-info** | `use_case.newNetwork.enabled:` **false**<br/>`use_case.joinNetwork.enabled:` **true**<br/>`use_case.updatePartnersInfo.enabled:` **true**<br/>`use_case.updatePartnersInfo.shared_data_location:` **Required**<br/>`use_case.updatePartnersInfo.peers:` **Required**|

Configuration example for the field `use_case.updatePartnersInfo.peers:`
```yaml
use_case:
updatePartnersInfo:
peers: [
company1,
company2,
company3
]
```


## Usage

- [Here](./README.md#values) is a full list of all configuration values.
- The [values.yaml file](./values.yaml) shows the raw view of all configuration values.

## Installing the Chart

**Note:** It is recommended to put non-sensitive configuration values in an configuration file and pass sensitive/secret values via commandline.<br/>
The chart requires the execution of the plugin located [here](https://github.com/PharmaLedger-IMI/helm-pl-plugin.git). The details about operating the plugin can be found in the specific use case documentation.<br/>


| Use case | Installation type | Example of command |
|----------|--------------------|-------------------|
| **new-network** | Install/Upgrade |`helm upgrade --install qn-0 pharmaledger-imi/quorum-node -f ./my-values.yaml --set-file use_case.newNetwork.plugin_data_common=./new-network.plugin.json,use_case.newNetwork.plugin_data_secrets=./new-network.plugin.secrets.json`|
| **join-network** | Install/Upgrade |`helm upgrade --install qn-0 pharmaledger-imi/quorum-node -f ./my-values.yaml --set-file use_case.joinNetwork.plugin_data_common=./join-network.plugin.json,use_case.joinNetwork.plugin_data_secrets=./join-network.plugin.secrets.json`|
| **new-network**<br/> continued by<br/> **update-partners-info** | Install/Upgrade |`helm upgrade --install qn-0 pharmaledger-imi/quorum-node -f ./my-values.yaml --set-file use_case.newNetwork.plugin_data_common=./new-network.plugin.json,use_case.newNetwork.plugin_data_secrets=./new-network.plugin.secrets.json,use_case.updatePartnersInfo.plugin_data_common=./update-partners-info.plugin.json`|
| **join-network**<br/> continued by<br/> **update-partners-info** | Install/Upgrade |`helm upgrade --install qn-0 pharmaledger-imi/quorum-node -f ./my-values.yaml --set-file use_case.joinNetwork.plugin_data_common=./join-network.plugin.json,use_case.joinNetwork.plugin_data_secrets=./join-network.plugin.secrets.json,use_case.updatePartnersInfo.plugin_data_common=./update-partners-info.plugin.json`|

### Expose Service via Load Balancer

**Note:**
By default, for AWS, the quorum node will be exposed by a service of type Classic Load Balancer. You can use [AWS Load Balancer Controller](https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.3/) instead to expose it as Network Load Balancer.

Note: You need the [AWS Load Balancer Controller](https://kubernetes-sigs.github.io/aws-load-balancer-controller/) installed and configured properly.<br/>
Example of configuration for Network Load Balancer in the **my-values.yaml** file:

```yaml
annotations:
service.beta.kubernetes.io/aws-load-balancer-type: "external"
service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing
service.beta.kubernetes.io/aws-load-balancer-name: echo-server-yaml
service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: instance
service.beta.kubernetes.io/aws-load-balancer-ip-address-type: ipv4
service.beta.kubernetes.io/aws-load-balancer-target-group-attributes: preserve_client_ip.enabled=true,deregistration_delay.timeout_seconds=120,deregistration_delay.connection_termination.enabled=true,stickiness.enabled=true,stickiness.type=source_ip
service.beta.kubernetes.io/aws-load-balancer-healthcheck-healthy-threshold: "2"
service.beta.kubernetes.io/aws-load-balancer-healthcheck-unhealthy-threshold: "2"
service.beta.kubernetes.io/aws-load-balancer-eip-allocations: eipalloc-0aa2e63a9a1551278
service.beta.kubernetes.io/aws-load-balancer-subnets: eks-ireland-1-vpc-public-eu-west-1b
service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: "false"
spec:
loadBalancerSourceRanges:
- 8.8.8.8/32
- 8.8.4.4/32
```
## Values
Expand All @@ -29,7 +106,7 @@ A Helm chart for the deployment of the quorum node on Kubernetes suporting new-n
| git_upload.git_commit_description | string | `"added genesis and node information"` | The description associated with the commit into the use case shared repository of the shareable data |
| git_upload.git_repo_clone_directory | string | `"helm-charts"` | The folder name where the repository will be cloned when the upload procedure is initiated in the post-install step |
| git_upload.git_repo_storage_path | string | `"networks"` | The repository base folder name where the shareable data to will be uploaded |
| git_upload.git_repo_with_access_token | string | `"https://GITHUB-TOKEN:[email protected]/PharmaLedger-IMI/helm-charts.git"` | The repository url eg. https://GITHUB-TOKEN:[email protected]/PharmaLedger-IMI/helm-charts.git |
| git_upload.git_repo_with_access_token | string | `""` | The repository url using access token |
| git_upload.nat_file_name | string | `"nat"` | The name of the file that contains the NAT address |
| git_upload.user | string | `""` | The user used by the git in order to upload the data |
| git_upload.validator_file_name | string | `"validator.address"` | The name of the file that contains the validator address |
Expand All @@ -56,11 +133,12 @@ A Helm chart for the deployment of the quorum node on Kubernetes suporting new-n
| use_case.joinNetwork.plugin_data_secrets | string | `"\"{\n \"nodeKey\":\"3b\"\n}\""` | |
| use_case.newNetwork.enabled | bool | `true` | Enable the new-network use case. Can only be used in collaboration with updatePartnerInfo use case |
| use_case.newNetwork.plugin_data_common | string | `"\"{\n \"extradata\":\"0x0\",\n \"enode\":\"\",\n \"nodeAddress\":\"\",\n \"genesisAccount\":\"0x89\"\n}\""` | |
| use_case.newNetwork.plugin_data_secrets | string | `"\"{\n \"genesisKeyStoreAccount\": \"eyJhZGRyZX\",\n \"nodeKey\": \"47\"\n}\""` | |
| use_case.newNetwork.plugin_data_secrets | string | `"{ \"genesisKeyStoreAccount\": \"eyJhZGRyZX\", \"nodeKey\": \"47\" }"` | |
| use_case.updatePartnersInfo.enabled | bool | `false` | Enable the update-partners-info use case. Can only be used in collaboration with new-network pr join-network use case |
| use_case.updatePartnersInfo.peers | list | `[]` | List of company names who act as peers |
| use_case.updatePartnersInfo.plugin_data_common | string | `"{}"` | |
| use_case.updatePartnersInfo.shared_data_location | string | `"https://raw.githubusercontent.com/<shared-repository>/<path>"` | base URL for shared repository where the companies are located |


----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.8.1](https://github.com/norwoodj/helm-docs/releases/v1.8.1)
85 changes: 85 additions & 0 deletions charts/quorum-node/readme.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{{ template "chart.header" . }}

{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }}

{{ template "chart.description" . }}

## Requirements

- [helm 3](https://helm.sh/docs/intro/install/)

- Deployment use case matrix

| Use case | Configuration |
|----------|--------|
| **new-network** | `use_case.newNetwork.enabled:` **true**<br/>`use_case.joinNetwork.enabled:` **false**<br/>`use_case.updatePartnersInfo.enabled:` **false**|
| **join-network** | `use_case.newNetwork.enabled:` **false**<br/>`use_case.joinNetwork.enabled:` **true**<br/>`use_case.updatePartnersInfo.enabled:` **false**<br/> `use_case.joinNetwork.genesis_file_location:` **Required**|
| **new-network**<br/> continued by<br/> **update-partners-info** | `use_case.newNetwork.enabled:` **true**<br/>`use_case.joinNetwork.enabled:` **false**<br/>`use_case.updatePartnersInfo.enabled:` **true**<br/>`use_case.updatePartnersInfo.shared_data_location:` **Required**<br/>`use_case.updatePartnersInfo.peers:` **Required**|
| **join-network**<br/> continued by<br/> **update-partners-info** | `use_case.newNetwork.enabled:` **false**<br/>`use_case.joinNetwork.enabled:` **true**<br/>`use_case.updatePartnersInfo.enabled:` **true**<br/>`use_case.updatePartnersInfo.shared_data_location:` **Required**<br/>`use_case.updatePartnersInfo.peers:` **Required**|

Configuration example for the field `use_case.updatePartnersInfo.peers:`
```yaml
use_case:
updatePartnersInfo:
peers: [
company1,
company2,
company3
]
```


## Usage

- [Here](./README.md#values) is a full list of all configuration values.
- The [values.yaml file](./values.yaml) shows the raw view of all configuration values.

## Installing the Chart

**Note:** It is recommended to put non-sensitive configuration values in an configuration file and pass sensitive/secret values via commandline.<br/>
The chart requires the execution of the plugin located [here](https://github.com/PharmaLedger-IMI/helm-pl-plugin.git). The details about operating the plugin can be found in the specific use case documentation.<br/>


| Use case | Installation type | Example of command |
|----------|--------------------|-------------------|
| **new-network** | Install/Upgrade |`helm upgrade --install qn-0 pharmaledger-imi/quorum-node -f ./my-values.yaml --set-file use_case.newNetwork.plugin_data_common=./new-network.plugin.json,use_case.newNetwork.plugin_data_secrets=./new-network.plugin.secrets.json`|
| **join-network** | Install/Upgrade |`helm upgrade --install qn-0 pharmaledger-imi/quorum-node -f ./my-values.yaml --set-file use_case.joinNetwork.plugin_data_common=./join-network.plugin.json,use_case.joinNetwork.plugin_data_secrets=./join-network.plugin.secrets.json`|
| **new-network**<br/> continued by<br/> **update-partners-info** | Install/Upgrade |`helm upgrade --install qn-0 pharmaledger-imi/quorum-node -f ./my-values.yaml --set-file use_case.newNetwork.plugin_data_common=./new-network.plugin.json,use_case.newNetwork.plugin_data_secrets=./new-network.plugin.secrets.json,use_case.updatePartnersInfo.plugin_data_common=./update-partners-info.plugin.json`|
| **join-network**<br/> continued by<br/> **update-partners-info** | Install/Upgrade |`helm upgrade --install qn-0 pharmaledger-imi/quorum-node -f ./my-values.yaml --set-file use_case.joinNetwork.plugin_data_common=./join-network.plugin.json,use_case.joinNetwork.plugin_data_secrets=./join-network.plugin.secrets.json,use_case.updatePartnersInfo.plugin_data_common=./update-partners-info.plugin.json`|

### Expose Service via Load Balancer

**Note:**
By default, for AWS, the quorum node will be exposed by a service of type Classic Load Balancer. You can use [AWS Load Balancer Controller](https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.3/) instead to expose it as Network Load Balancer.

Note: You need the [AWS Load Balancer Controller](https://kubernetes-sigs.github.io/aws-load-balancer-controller/) installed and configured properly.<br/>
Example of configuration for Network Load Balancer in the **my-values.yaml** file:

```yaml
annotations:
service.beta.kubernetes.io/aws-load-balancer-type: "external"
service.beta.kubernetes.io/aws-load-balancer-scheme: internet-facing
service.beta.kubernetes.io/aws-load-balancer-name: echo-server-yaml
service.beta.kubernetes.io/aws-load-balancer-nlb-target-type: instance
service.beta.kubernetes.io/aws-load-balancer-ip-address-type: ipv4
service.beta.kubernetes.io/aws-load-balancer-target-group-attributes: preserve_client_ip.enabled=true,deregistration_delay.timeout_seconds=120,deregistration_delay.connection_termination.enabled=true,stickiness.enabled=true,stickiness.type=source_ip
service.beta.kubernetes.io/aws-load-balancer-healthcheck-healthy-threshold: "2"
service.beta.kubernetes.io/aws-load-balancer-healthcheck-unhealthy-threshold: "2"
service.beta.kubernetes.io/aws-load-balancer-eip-allocations: eipalloc-0aa2e63a9a1551278
service.beta.kubernetes.io/aws-load-balancer-subnets: eks-ireland-1-vpc-public-eu-west-1b
service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: "false"
spec:
loadBalancerSourceRanges:
- 8.8.8.8/32
- 8.8.4.4/32
```



{{ template "chart.maintainersSection" . }}

{{ template "chart.requirementsSection" . }}

{{ template "chart.valuesSection" . }}

{{ template "helm-docs.versionFooter" . }}
4 changes: 2 additions & 2 deletions charts/quorum-node/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ git_upload:
email: ""
# -- The user used by the git in order to upload the data
user: ""
# -- The repository url eg. https://GITHUB-TOKEN:[email protected]/PharmaLedger-IMI/helm-charts.git
git_repo_with_access_token: "https://GITHUB-TOKEN:[email protected]/PharmaLedger-IMI/helm-charts.git"
# -- The repository url using access token
git_repo_with_access_token: ""
# -- The folder name where the repository will be cloned when the upload procedure is initiated in the post-install step
git_repo_clone_directory: "helm-charts"
# -- The repository base folder name where the shareable data to will be uploaded
Expand Down
File renamed without changes.
41 changes: 41 additions & 0 deletions usecases/new-network/example-my-values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

deployment:
# The name of the company that makes the deployment
company: "company"
# The name of the use case that is being deployed
network_name: "epi"
# The Quorum node dns/public ip address
enode_address: ""
## @param deployment.enode_ip_port The Port of the Quorum node public address
enode_address_port: "30303"
nat: "1.2.3.4"

git_upload:
# Enable the automatic upload to the use case shared repository of the shareable data
enabled: true
# The email used by the git in order to upload the data
email: "[email protected]"
# The user used by the git in order to upload the data
user: "xyz"
# The repository url eg. https://GITHUB-TOKEN:[email protected]/PharmaLedger-IMI/helm-charts.git
git_repo_with_access_token: ""

use_case:
newNetwork:
# -- Enable the new-network use case. Can only be used in collaboration with updatePartnerInfo use case
enabled: true

joinNetwork:
# -- Enable the join-network use case. Can only be used in collaboration with updatePartnerInfo use case
enabled: false

updatePartnersInfo:
# -- Enable the update-partners-info use case. Can only be used in collaboration with new-network or join-network use case
enabled: false

fullnameOverride: "quorum-epi"

blockchain:
quorum_data_dir: "/quorumnode/qdata/dd"
quorum_home: "/quorumnode/qdata"
quorum_genesis_location: "/quorumnode/genesis"
Binary file added usecases/new-network/new-network - install.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added usecases/new-network/new-network - upgrade.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit c7fb058

Please sign in to comment.