GithubHelp home page GithubHelp logo

funcode50 / aries-guardianship-agency Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kiva/aries-guardianship-agency

0.0 0.0 0.0 1.02 MB

Manages Hyperledger Aries agents within a guardianship framework

License: Apache License 2.0

Shell 2.13% TypeScript 96.13% Dockerfile 1.74%

aries-guardianship-agency's Introduction

Aries Guardianship Agency

Setup

You will need to setup the .env file. The easiest way to start is by copying dummy.env to .env. Other than NODE_ENV, the values are not literal and you may need to adjust those for your environment.

If you have access to other protocol repos, you can get the values from those repos.

Note the very first time you run this you need to ensure you have the latest aca py image in your docker cache.

 docker pull bcgovimages/aries-cloudagent:py36-1.16-1_0.7.1

Additional environment settings.

Check src/config/env.json. While it is not common, there are additional environment variable settings in this file and may need to be adjusted for your environment.

Running tests

The main docker-compose will spin up the agency, a local indy ledger, and a postgres wallets db to connect to:

npm install
docker-compose up

To run tests:

npm run test

Additional info

To spin up an agent use a REST client like insomnia and do some like:

POST http://localhost:3010/v1/manager
{
	"walletId": "walletId001",
	"walletKey": "walletKey001",
	"adminApiKey": "adminApiKey"
	"walletId": "walletId",
	"walletKey": "walletkey",
	"adminApiKey": "someAdminKey",
	"ttl": -1,
	"seed": "000000000000000000000000ABCDEFG1",
	"agentId": "testAgent2"
}

To spin down the agent, use the returned agentId from above and do:

DELETE http://localhost:3010/v1/manager
{
	"agentId": "AGENT_ID_RETURNED_ABOVE"
}

Note: If you want to connect to the kiva-network from the protocol-repo you need to update the following env params: WALLET_DB_HOST=protocol-identity-wallets-db NETWORK_NAME=kiva-network You can then run

npm install
docker-compose -f docker-compose.kiva-network.yml

If you run into conflicts with docker images from another file clean things up with: docker rm -f $(docker ps -aq).

Notes about the Transaction API

The transaction APIs (eg v2/transaction namespace) require the TDC controller and agent. These are available in the protocol-aries repo.

Testing with local code base for aries-guardianship-agency

(If this doesn't make sense, ask Matt. He probably is no help though)

  1. Get protocol-aries code.
    git clone https://github.com/kiva/protocol-aries
  2. Get environment configured for code downloaded in #1 above.
  3. Build/Run docker-compose.yml in aries-guardianship-agency
  4. Configure the .env for ncra and tdc controller in protocol-aries/implementation to use wallets-db
  5. Run protocol-aries/implementation/docker-compose.local.yml
  6. Run what you need from scripts/setup.sh in protocol-aries

Deployment Notes

Postgres connections limitation

Postgres defaults to 100 active connections. ACAPY appears to use several connections per agent (needs to be confirmed). So we need to make sure our database connection limits are increased to allow for more traffic without errors.

Please review these slackexchange posts for more information:

  1. by config
  2. by sql commands

aries-guardianship-agency's People

Contributors

matt-raffel-kiva avatar jsaur avatar mac-arrap avatar dependabot[bot] avatar voutasaurus avatar natesulat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.