Skip to content

Commit

Permalink
Merge branch 'develop' into feature-2556v2
Browse files Browse the repository at this point in the history
  • Loading branch information
sownak authored Jun 14, 2024
2 parents 12ea75b + 1216493 commit 080a56e
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 42 deletions.
63 changes: 31 additions & 32 deletions docs/source/guides/fabric/deploy-fabric-operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,59 +3,58 @@
[//]: # (SPDX-License-Identifier: Apache-2.0)
[//]: # (##############################################################################################)

<a name = "deploy-fabric-network-using-operator"></a>
# Deploy Fabric Network using Operator

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

## Introduction
The [bevel-operator-fabric](https://github.com/hyperledger/bevel-operator-fabric) provides a different approach to deploying the Fabric Network. It uses
the kubernetes operator to deploy CAs, Orderers and Peers.
This release supports bevel-operator-fabric version 1.9.0 and all the Fabric platforms supported by it. Also, chaincode and user/certificate management is not yet supported, there will be separate issues to handle this. Current implementation supports till Channel creation and joining.

Due to open issues with bevel-operator-fabric, it is not recommended for Production workloads yet.
The [bevel-operator-fabric](https://github.com/hyperledger/bevel-operator-fabric) provides a streamlined way to deploy a Fabric network. It leverages the Kubernetes operator to manage the deployment of Certificate Authorities (CAs), Orderers, and Peers. This guide covers the deployment process using _bevel-operator-fabric_ version **1.9.0** and the Fabric platforms it supports.

!!! important

Chaincode and user/certificate management are not yet supported by this Bevel release. There will be separate issues to address these features. The current implementation supports channel creation and joining.

---
**NOTE**: The bevel-operator-fabric deployment has been tested only for Fabric 2.5.3

---
!!! note

## Modifying Configuration File
The bevel-operator-fabric automated deployment has been tested with Fabric 2.5.4.

A Sample configuration file for deploying using bevel-operator-fabric is available [here](https://github.com/hyperledger/bevel/blob/main/platforms/hyperledger-fabric/configuration/samples/network-operator-fabric.yaml). Following are the main changes in this file from previous versions:
## Understanding the Configuration File

1. `network.env.type` must be `operator`. This is how Ansible will understand that bevel-operator-fabric will be used.
2. `network.env.proxy` must be `istio` as no other proxy is supported by bevel-operator-fabric.
3. Only `443` is supported as external port because that is what bevel-operator-fabric supports.
4. `vault` and `gitops` sections are removed as they are not applicable.
A Sample configuration file for deploying using _bevel-operator-fabric_ is available [here](https://github.com/hyperledger/bevel/blob/main/platforms/hyperledger-fabric/configuration/samples/network-operator-fabric.yaml).

Here are the key changes from other versions:

1. **`network.env.type`:** Must be set to `operator`. This tells Ansible to use _bevel-operator-fabric_ for deployment.
1. **`network.env.proxy`:** Must be set to `istio` as _bevel-operator-fabric_ currently only supports Istio as a proxy.
1. **External Port:** Only port `443` is supported for external access.
1. **Removed Sections:** The `vault` and `gitops` sections are removed as they are not applicable to this deployment method.

```yaml
--8<-- "platforms/hyperledger-fabric/configuration/samples/network-operator-fabric.yaml:8:21"
..
..
```

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

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

<a name = "run-playbook"></a>
## Run playbook
After updating the `network.yaml` file with the necessary configurations, follow these steps to create your DLT network.

After all the configurations are updated in the `network.yaml`, execute the following to create the DLT network
```
# Run the provisioning scripts
ansible-playbook platforms/shared/configuration/site.yaml -e "@./build/network.yaml"
1. Run the provisioning scripts:
```
ansible-playbook platforms/shared/configuration/site.yaml -e "@./build/network.yaml"
```

```
The `site.yaml` playbook, in turn calls various playbooks depending on the configuration file and sets up your DLT/Blockchain network.
The `site.yaml` playbook will call various other playbooks based on your configuration file and set up your DLT/Blockchain network.

The [deploy-operator-network.yaml](https://github.com/hyperledger/bevel/tree/main/platforms/hyperledger-fabric/configuration/deploy-operator-network.yaml) playbook can be used as well if the pre-requisites like Istio and krew is already installed. This can be done using the following command
1. Alternative Deployment Method (Pre-requisites installed):

```
ansible-playbook platforms/hyperledger-fabric/configuration/deploy-operator-network.yaml -e "@/path/to/network.yaml"
```
If you have already installed and configured Istio and krew, you can use the [deploy-operator-network.yaml](https://github.com/hyperledger/bevel/tree/main/platforms/hyperledger-fabric/configuration/deploy-operator-network.yaml) playbook:

```
ansible-playbook platforms/hyperledger-fabric/configuration/deploy-operator-network.yaml -e "@/path/to/network.yaml"
```

Refer to [bevel-operator-fabric docs](https://hyperledger.github.io/bevel-operator-fabric/) for details the operator and latest releases.
## Manual Deployment
For detailed information about the operator and latest releases, and also for manual deployment instructions, refer to the [bevel-operator-fabric documentation](https://hyperledger.github.io/bevel-operator-fabric/).
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
state: absent
kubeconfig: "{{ kubernetes.config_file }}"
context: "{{ kubernetes.context }}"
ignore_errors: yes
ignore_errors: true

# Delete main channel
- name: Delete main channel
Expand All @@ -24,4 +24,4 @@
state: absent
kubeconfig: "{{ kubernetes.config_file }}"
context: "{{ kubernetes.context }}"
ignore_errors: yes
ignore_errors: true
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
until: this.status == 200
retries: "{{ network.env.retry_count }}"
delay: 20
ignore_errors: yes
ignore_errors: true

# Create main user for orderer org
- name: "Create main user for orderer org"
Expand All @@ -33,7 +33,7 @@
when:
- component_type == 'orderer'
- user_type == 'default'
ignore_errors: yes
ignore_errors: true

# Create main user for peer org
- name: "Create main user for peer org"
Expand Down Expand Up @@ -63,7 +63,7 @@
kubeconfig_path: "{{ item.k8s.config_file }}"
when:
- user_type == 'admin'
ignore_errors: yes
ignore_errors: true

# Create admin user identity for orderer
- name: "Create admin user identity for orderer"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
until: this.status == 200
retries: "{{ network.env.retry_count }}"
delay: 20
ignore_errors: yes
ignore_errors: true

# Create orderer node
- name: "Create orderer node"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
until: this.status == 200
retries: "{{ network.env.retry_count }}"
delay: 20
ignore_errors: yes
ignore_errors: true

# Create peer node
- name: "Create peer node"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
shell: |
KUBECONFIG={{ kubeconfig_path }} helm repo add istio https://istio-release.storage.googleapis.com/charts --force-update
KUBECONFIG={{ kubeconfig_path }} helm repo update
KUBECONFIG={{ kubeconfig_path }} helm install istio-base istio/base -n istio-system --create-namespace
KUBECONFIG={{ kubeconfig_path }} helm install istiod istio/istiod -n istio-system --wait
KUBECONFIG={{ kubeconfig_path }} helm install istio-ingressgateway istio/gateway -n istio-system
KUBECONFIG={{ kubeconfig_path }} helm install istio-base istio/base -n istio-system --version=1.20.7 --create-namespace
KUBECONFIG={{ kubeconfig_path }} helm install istiod istio/istiod -n istio-system --version=1.20.7 --wait
KUBECONFIG={{ kubeconfig_path }} helm install istio-ingressgateway istio/gateway -n istio-system --version=1.20.7
when: (not istio_installed)
tags:
- istio
Expand Down

0 comments on commit 080a56e

Please sign in to comment.