This repository is a work in progress.
DEON core-service
The Core Service of the DEON platform. This repository enables the administrative configuration and management of the DEON Hyperledger Fabric network. The service deploys the DEON platform REST API that exposes the configuration functions and the DEON suite of applications. The API is deployed locally on http://localhost:8001
. See documentation of the API at https://app.swaggerhub.com/apis/haniavis/deon-core/0.1.0.
Setup
Prerequisites
- Docker Desktop (2.2.0.0)
To be added...
Demo
For running a demo of the full DEON stack follow the instructions below.
DEON Fabric network
- Clone the DEON repository for the Fabric network
off-grid-block/off-grid-net
:
git clone https://github.com/off-grid-block/off-grid-net.git
- Launch the Fabric network:
cd off-grid-ne/t && ./cyfn.sh up -c off-channel -s couchdb
VON Network (Indy ledger)
The DEON services rely on VON Network, an implementation of a development level Indy Node network, developed by BCGov. For more information on the project and for additional instructions, see their github repository.
- Clone the repository:
git clone https://github.com/bcgov/von-network.git
- In the von-network repository:
cd von-network/
- Generate the Docker images:
./manage build
- Start up the network:
./manage start
Aries Agents
The DEON services rely on the Aries Cloud Agent-Python (aca-py), developed by BCGov. For more information on the project and for additional instructions, see the official github repository. You need to clone the modified aca-py agents provided by DEON to enable Decentralized Identity Management.
- clone the repository:
git clone https://github.com/off-grid-block/aca-py-controllers.git
Launch using Docker
After launching the Fabric and VON networks, start up the DEON service API.
- Clone this repository:
git clone https://github.com/off-grid-block/core-service.git
cd core-service
- ```export DOCKERHOST=`docker run --rm --net=host eclipse/che-ip````
docker-compose up
- access the API at
localhost:8000/api/v1/
To stop the networks and DEON service:
./manage down
inside von-network
directory./cyfn.sh down
inside off-grid-net
directorydocker volume prune
docker-compose down
docker-compose rm -f
Register the DEON service on Indy
To test the demo, the first step is establishing a connection between the client and CI/MSP Aries Cloud Agents and creating a verifiable credential.
- Access the client agent hosted at http://localhost:4201
- Click the button labeled "Get invitation from Issuer agent"
- Navigate to the CI/MSP agent at http://localhost:4200
- On the sidebar, select "Schema and Credential definition" and create a schema with attributes "app_name, app_id" (name the schema whatever you like)
- On the credential tab, issue a credential to the client agent.
Next, we will register the DEON vote application with the identity management agents. Send a POST request to http://localhost:8000/api/v1/register with the following body: { "Name": "Voting", "Secret": "kerapwd", "Type": "user" }
Launch DEON apps (example: Vote Service)
- clone the repository at
github.com/off-grid-block/vote
into deon
docker-compose up
- See instructions on the full demo in the
off-grid-block/vote
repository