Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stand up multiple agents (single and multi) for local development and testing #2230

Merged
merged 6 commits into from
May 17, 2023

Conversation

usingtechnology
Copy link
Contributor

@usingtechnology usingtechnology commented May 11, 2023

While working on load testing for Aries Mediator Service I needed to spin up multiple agents and needed help to see a simple way to do so; at least not vanilla instances that I could run ad-hoc test scripts against.

I required multiple single-tenant mode and a multi-tenant mode to test our mediation between multiple agents. This was a simple way to achieve it. I decided I would stand up the standard faber, alice, acme single-tenant agents and one multi-tenant agent.

I did opt to include a Postgresql server shared across all the agents and included ngrok (easily turned off per agent) for URLs accessible outside the local network.

This was extremely helpful to diagnose and fix #2231

… testing

Signed-off-by: Jason Sherman <tools@usingtechnolo.gy>
Signed-off-by: Jason Sherman <tools@usingtechnolo.gy>
@usingtechnology usingtechnology marked this pull request as ready for review May 12, 2023 18:04
@@ -0,0 +1,124 @@
# Aca-Py Playground
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be “ACA-Py” throughout.


This directory contains scripts to run several Aca-Py agents in various configurations for demonstration, development and testing scenarios. The agents are using Postgres (15) database storage (`askar`, `DatabasePerWallet`) and are running without security (`--admin-insecure-mode`).

The inspiration for this playground was testing mediation and the differences between single-tenant and multi-tenant modes. These scripts allowed the developer to stand up 3 single-tenant agents and 1 multi-tenant agent and run various scenarios (in other scripts - not included). Running in `--admin-insecure-mode` simplifies creating tenants in multi-tenant mode and eliminates the need for adding headers for calls in single-tenant mode.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to include one script as an example so it’s easier for others to be built?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will do. i'll keep it self contained (ie. no mediator).

Copy link
Member

@swcurran swcurran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of tweaks - at least fix the CaPiTaLiZaTiOn of ACA-Py :-) .

I think it lacks a bit of “why do this?” motivation for how this can be used, so I think I would add how you are using it as an example, and include the stteps to run what you are running. Not required if you don’t think it is worth it.

lint on README...
add some example scripts using the agents.

Signed-off-by: Jason Sherman <tools@usingtechnolo.gy>
Signed-off-by: Jason Sherman <tools@usingtechnolo.gy>
Signed-off-by: Jason Sherman <tools@usingtechnolo.gy>
@usingtechnology
Copy link
Contributor Author

A couple of tweaks - at least fix the CaPiTaLiZaTiOn of ACA-Py :-) .

I think it lacks a bit of “why do this?” motivation for how this can be used, so I think I would add how you are using it as an example, and include the stteps to run what you are running. Not required if you don’t think it is worth it.

Added simple scripts, didn't want to include load testing and additional infrastructure etc as that gets out of date quickly.

@sonarcloud
Copy link

sonarcloud bot commented May 15, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@swcurran swcurran merged commit a848bcb into hyperledger:main May 17, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Mediation, Multitenant Aca-Py - sub-wallet initiates mediation
2 participants