DLT Blockchain Network deployment using Docker¶
Important
Hyperledger Bevel is targeted for Production systems, but for quick developer deployments, you can use the containerized Ansible controller to deploy the dev DLT/Blockchain network.
Pre-requisites¶
Follow instructions to install and configure common pre-requisites. In summary, you should have details of the following:
- A machine (aka host machine) on which you can run docker commands i.e. which has docker command line installed and is connected to a docker daemon.
- At least one Kubernetes cluster (with connectivity to the host machine).
- At least one Hashicorp Vault server (with connectivity to the host machine).
- Read-write access to the Git repo (either ssh private key or https access token).
Prepare build folder¶
Clone the git repository on host machine, call this the project folder.
Create a folder calledbuild
inside bevel
.
Copy the following files into the build
folder:
- The Kubernetes config file for your cluster (config).
- The private key file (gitops, if using SSH for git).
Edit the configuration file¶
Depending on your chosen DLT platform, select a sample network.yaml
(e.g. For Fabric, choose from this sample) and copy to build
folder.
# eg for Fabric
cp platforms/hyperledger-fabric/configuration/samples/network-fabricv2.yaml build/network.yaml
Open and update the network.yaml
according to the following Platform specific guides.
- R3 Corda Configuration File
- Hyperledger Fabric Configuration File
- Hyperledger Indy Configuration File
- Quorum Configuration File
- Hyperledger Besu Configuration File
- Substrate Configuration File
In summary, you will need to update the following:
docker
url, username and password.external_url_suffix
depending on your Domain Name(s).- All DNS addresses depending on your Domain Name(s).
cloud_provider
k8s
section depending on your Kubernetes zone/cluster name/config filepath.vault
gitops
section depending on your git username, tokens and private key filepath.
Now, the build
folder should have the following files:
- K8s config file as config.
- Network specific configuration file as network.yaml.
- If using SSH for Gitops, private key file which has write-access to the git repo.
Screen shot of the folder structure is below:
Execute provisioning script¶
Run the following command to run the provisioning scripts, the command needs to be run from the bevel
folder. The command also binds and mounts a volume, in this case it binds the repository
cd bevel
docker run -it -v $(pwd):/home/bevel/ --network="host" ghcr.io/hyperledger/bevel-build:latest
# For Corda use jdk8 version
docker run -it -v $(pwd):/home/bevel/ --network="host" ghcr.io/hyperledger/bevel-build:jdk8-latest
In case you have failures and need to debug, login to the bash shell
docker run -it -v $(pwd):/home/bevel/ --network="host" ghcr.io/hyperledger/bevel-build:latest bash
# go to bevel directory
cd bevel
# Run the provisioning scripts
ansible-playbook platforms/shared/configuration/site.yaml -e "@./build/network.yaml"
Verify successful configuration¶
For instructions on how to verify or troubleshoot network, read How to debug a Bevel deployment.
Deleting an existing network¶
The above mentioned playbook site.yaml (ReadMe) can be run to reset the network using the network configuration file having the specifications which was used to setup the network using the following command: