Getting Started
3 minute read
The VGM solution is running on VPF cloud environment. However, in case it is desired to install the solution on the user machine, the following instructions should be followed. The solution in based on Hyperledger Fabric technology, therefore knowledge of Fabric concepts, technological stack and some experience with configuration and deployment of a Fabric network is required.
Contents
Prerequisites
Since the VGM solution is built using Hyperledger Fabric technology, and is built on top of a Fabric blockchain network, we recommend checking out Fabric prerequisites documentation to download and install all required packages and tools.
- Docker - v1.12 -> v1.19
- Docker Compose - v1.8 or higher
Download recommended docker version Docker Desktop Community 2.1.0.1 from - https://docs.docker.com/docker-for-mac/release-notes/ . (New docker version might throw errors during deployment as being incompatable with the provided Fabric containers).
- Git client - needed for clone commands
- Node.js v8.9.4 or 8.17.0 - can be downloaded from here https://nodejs.org/es/blog/release/v8.17.0/
- Xcode (in case of Mac environment)
Installation
Hyperledger Fabric network components can be run as docker containers and configured and deployed using docker-compose. The documentation for installation of fabric docker components can be found here
Download all of the requisite Hyperledger Fabric binaries and docker images as demonstrated below with curl command, and tag the images with the ‘latest’ tag. Optionally, specify a version for fabric, fabric-ca and thirdparty images. If versions are not specified, the latest available versions will be downloaded.
VGM BC chaincodes and applicational client are developed using Fabric version 1.4.8 therefore please specify this version when downloading
The download script will also clone fabric-samples repository, including the configuration of a network the VGM solution is based on, using the version tag that is aligned with the Fabric version.
curl -sSL http://bit.ly/2ysbOFE | bash -s -- 1.4.8
Blockchain network configuration and instantiation
The VGM solution source code repository contains scripts for configuration and bringup of blockchain network running on dockers and executing VGM chaincode.
- The configuration folder can be found here.
- The chaincode for deploying on the network can be found here
- The blockchain client application connecting to the fabric network and invoking the chaincode can be found here
The \config folder contains network configuration artifacts allowing to bring up the first-network from fabric-samples tutorials (downloaded with Fabric dockers in previous step) with 3 organizations.
To work with 3 organizations setup, locate the “first-network” folder under “fabric-samples“and place all the content of \config directory under the \first-network
The startUp.sh file will bring up the 3 orgs network, and the client application example connects into the CA and gateway of the third organization (using connection-org3.json)
-
After Downloading fabric samples repository, and cloning this repository.
-
Make Folder under fabric-samples/vgm , and copy ./vgm-client to this folder
-
Make Folder under fabric-samples/chaincode/vgm , and copy ./vgm-chaincode to this folder
-
Empty the content of the original ‘first-network’ folder, and copy all the files and directories recursively from /config directory to the ‘first-network’ directory
-
Run startFabric.sh in fabric-samples/vgm.
-
Test the blockchain application by running main-test.ts in fabric-samples/vgm/app/src.
Frontend
The frontend uses AngularJS . Additionally, it uses the following libraries and components:
- Typescript -programming language
- MongoDB - caching backing DB
- SengGrid - mailing platform
Web-UI
- Angular -Javascript Framework for SPA
- Bootstrap - HTML, CSS, and JS framework
- FontAwesome -Vector font and icon repository
- NgxAdmin - template for dashboards
Credits
Frontend and blockchain client development:
- Pablo Giménez Salazar - pgimenez@fundacion.valenciaport.com
- Vicente Perales Devesa - vperales@fundacion.valenciaport.com
- Miguel Llop Chabrera - MLlop@fundacion.valenciaport.com
Project Management:
- Miguel Llop Chabrera - MLlop@fundacion.valenciaport.com
- Fabiana Fournier - fabiana@il.ibm.com
Chaincode development:
- Inna Skarbovsky - inna@il.ibm.com