Remember to clone this repository!
git clone https://github.com/hyperledgendary/full-stack-asset-transfer-guide.git workshop
cd workshop
export WORKSHOP_PATH=$(pwd)
to check the tools you already have
./check.sh
Do you want to configure your local environment with the workshop dependencies?
-
To develop an application and/or contract (first two parts of workshop) follow the DEV setup below
-
To deploy a chaincode to kubernetes in a production manner (third part of workshop) follow the PROD setup below
If you do not want to install dependencies on your local environment, you can use a Multipass Ubuntu image instead.
-
Launch the virtual machine and automatically install the workshop dependencies:
multipass launch \
--name fabric-dev \
--disk 80G \
--cpus 8 \
--mem 8G \
--cloud-init infrastructure/multipass-cloud-config.yaml
- Mount the local workshop to your multipass vm:
multipass mount $PWD fabric-dev:/home/ubuntu/full-stack-asset-transfer-guide
- Open a shell on the virtual machine:
multipass shell fabric-dev
- You are now inside the virtual machine. cd to the workshop directory:
cd full-stack-asset-transfer-guide
- Install Fabric peer CLI and set environment variables
curl -sSLO https://raw.githubusercontent.com/hyperledger/fabric/main/scripts/install-fabric.sh && chmod +x install-fabric.sh
./install-fabric.sh binary
export WORKSHOP_PATH=$(pwd)
export PATH=${WORKSHOP_PATH}/bin:$PATH
export FABRIC_CFG_PATH=${WORKSHOP_PATH}/config
Experimental: but there is a dockerfile
in the _bootstrap
directory; docker and just are required
(or if you don't have just, copy the docker run command from the justfile)
docker build -t fabgo .
# run this in several cli windows
just devshell
You will need a set of tools to assist with chaincode and application development. We'll assume you are developing in Node for this workshop, but you could also develop in Java or Go by installing the respective compilers.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
- node v16 and npm to run node chaincode and applications
nvm install 16
- typescript to compile typescript chaincode and applications to node
npm install -g typescript
- weft Hyperledger-Labs cli to work with identities and chaincode packages
npm install -g @hyperledger-labs/weft
- Fabric peer CLI
curl -sSLO https://raw.githubusercontent.com/hyperledger/fabric/main/scripts/install-fabric.sh && chmod +x install-fabric.sh
./install-fabric.sh binary
export WORKSHOP_PATH=$(pwd)
export PATH=${WORKSHOP_PATH}/bin:$PATH
export FABRIC_CFG_PATH=${WORKSHOP_PATH}/config
- kubectl
- jq
- just to run all the comamnds here directly
- kind if you want to create a cluster locally, see below for other options
- k9s (recommended, but not essential)
The v2.0.0-beta Ansible Collection for Hyperledger Fabric is required for Kubernetes deployment. This isn't yet being published.
git clone https://github.com/IBM-Blockchain/ansible-collection.git
cd ansible-collection
docker build -t ofs-ansible .
Note to extract a PR
git fetch origin pull/615/head:latest
git checkout latest