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

Update devcontainer documentation #2729

Merged
merged 2 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@
},

"mounts": [],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [
9060,
9061
],
"postCreateCommand": "bash ./.devcontainer/post-install.sh"

}
22 changes: 11 additions & 11 deletions .vscode-sample/multitenant.yml → .vscode-sample/alice.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
# Alice agent configuration

auto-provision: true
label: vscode
label: alice

inbound-transport:
- [http, 0.0.0.0, 9060]
- [http, 0.0.0.0, 9010]

outbound-transport: http

emit-new-didcomm-prefix: true
wallet-type: askar
wallet-storage-type: default
wallet-name: alice-wallet
wallet-key: alice-wallet-key

admin-insecure-mode: true

admin: [0.0.0.0, 9061]
admin: [0.0.0.0, 9011]

endpoint: http://host.docker.internal:9060
endpoint: http://localhost:9010

genesis-url: http://test.bcovrin.vonx.io/genesis
genesis-url: http://localhost:9000/genesis

# Connections
debug-connections: true
auto-accept-invites: true
auto-accept-requests: true
auto-ping-connection: true

# multitenant
multitenant: true
multitenant-admin: true
jwt-secret: changeme

log-level: info

tails-server-base-url: http://localhost:6543
42 changes: 42 additions & 0 deletions .vscode-sample/author.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Author agent configuration

auto-provision: true
label: author

inbound-transport:
- [http, 0.0.0.0, 9020]

outbound-transport: http

wallet-type: askar
wallet-storage-type: default
wallet-name: author-wallet
wallet-key: author-wallet-key

admin-insecure-mode: true

admin: [0.0.0.0, 9021]

endpoint: http://localhost:9020

genesis-url: http://localhost:9000/genesis

# Connections
debug-connections: true
auto-accept-invites: true
auto-accept-requests: true
auto-ping-connection: true

log-level: info

tails-server-base-url: https://localhost:6543

# endorser info configuration
endorser-alias: endorser
endorser-protocol-role: author
auto-request-endorsement: true
auto-write-transactions: true
# endorser-public-did: FsTs4Xb4PHwb6BxyFPFfYd
auto-promote-author-did: true
auto-create-revocation-transactions: true
# endorser-invitation: http://localhost:9060?oob=eyJAdHlwZSI6ICJodHRwczovL2RpZGNvbW0ub3JnL291dC1vZi1iYW5kLzEuMS9pbnZpdGF0aW9uIiwgIkBpZCI6ICIwOWU3MDRmOC04YzUxLTQzNTktOTg2YS0xZmI5YTIzYmQxODciLCAibGFiZWwiOiAiZW5kb3JzZXIiLCAiaGFuZHNoYWtlX3Byb3RvY29scyI6IFsiaHR0cHM6Ly9kaWRjb21tLm9yZy9kaWRleGNoYW5nZS8xLjAiXSwgInNlcnZpY2VzIjogW3siaWQiOiAiI2lubGluZSIsICJ0eXBlIjogImRpZC1jb21tdW5pY2F0aW9uIiwgInJlY2lwaWVudEtleXMiOiBbImRpZDprZXk6ejZNa3ZNUFlNYUdGTVFTRFhQc2o4OUNobTY0aVIyYmE0U1hZY3ZON2JCeUNkNWJoI3o2TWt2TVBZTWFHRk1RU0RYUHNqODlDaG02NGlSMmJhNFNYWWN2TjdiQnlDZDViaCJdLCAic2VydmljZUVuZHBvaW50IjogImh0dHA6Ly9sb2NhbGhvc3Q6OTA2MCJ9XX0=
36 changes: 36 additions & 0 deletions .vscode-sample/endorser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Endorser agent configuration

auto-provision: true
label: endorser

inbound-transport:
- [http, 0.0.0.0, 9030]

outbound-transport: http

wallet-type: askar
wallet-storage-type: default
wallet-name: endorser-wallet
wallet-key: endorser-wallet-key

admin-insecure-mode: true

admin: [0.0.0.0, 9031]

endpoint: http://localhost:9030

genesis-url: http://localhost:9000/genesis

# Connections
debug-connections: true
auto-accept-invites: true
auto-accept-requests: true
auto-ping-connection: true

log-level: info

tails-server-base-url: http://localhost:6543

# endorser
endorser-protocol-role: endorser
auto-endorse-transactions: true
32 changes: 32 additions & 0 deletions .vscode-sample/faber.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Faber agent configuration

auto-provision: true
label: faber

inbound-transport:
- [http, 0.0.0.0, 9040]

outbound-transport: http

wallet-type: askar
wallet-storage-type: default
wallet-name: faber-wallet
wallet-key: faber-wallet-key

admin-insecure-mode: true

admin: [0.0.0.0, 9041]

endpoint: http://localhost:9040

genesis-url: http://localhost:9000/genesis

# Connections
debug-connections: true
auto-accept-invites: true
auto-accept-requests: true
auto-ping-connection: true

log-level: info

tails-server-base-url: http://localhost:6543
66 changes: 55 additions & 11 deletions .vscode-sample/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,58 @@
"version": "0.2.0",
"configurations": [
{
"name": "Run/Debug ACA-Py",
"name": "Run/Debug Faber",
"type": "python",
"request": "launch",
"module": "aries_cloudagent",
"justMyCode": true,
"args": [
"start",
"--arg-file=${workspaceRoot}/.vscode/multitenant.yml"
"--arg-file=${workspaceRoot}/.vscode/faber.yml"
]
},
{
"name": "Run/Debug Alice",
"type": "python",
"request": "launch",
"module": "aries_cloudagent",
"justMyCode": true,
"args": [
"start",
"--arg-file=${workspaceRoot}/.vscode/alice.yml"
]
},
{
"name": "Run/Debug Endorser",
"type": "python",
"request": "launch",
"module": "aries_cloudagent",
"justMyCode": true,
"args": [
"start",
"--arg-file=${workspaceRoot}/.vscode/endorser.yml"
]
},
{
"name": "Run/Debug Author",
"type": "python",
"request": "launch",
"module": "aries_cloudagent",
"justMyCode": true,
"args": [
"start",
"--arg-file=${workspaceRoot}/.vscode/author.yml"
]
},
{
"name": "Run/Debug Multitenant Admin",
"type": "python",
"request": "launch",
"module": "aries_cloudagent",
"justMyCode": true,
"args": [
"start",
"--arg-file=${workspaceRoot}/.vscode/multitenant-admin.yml"
]
},
{
Expand All @@ -24,7 +68,7 @@
"sudo": true,
"justMyCode": true,
"cwd": "${workspaceFolder}/aries_cloudagent",
"args": ["check", "."],
"args": ["check", "."]
},
{
"name": "ruff fix - aries_cloudagent",
Expand All @@ -35,7 +79,7 @@
"sudo": true,
"justMyCode": true,
"cwd": "${workspaceFolder}/aries_cloudagent",
"args": ["check", ".", "--fix"],
"args": ["check", ".", "--fix"]
},
{
"name": "ruff - current file",
Expand All @@ -46,7 +90,7 @@
"sudo": true,
"justMyCode": true,
"cwd": "${workspaceFolder}/aries_cloudagent",
"args": ["check", ".", "${file}"],
"args": ["check", ".", "${file}"]
},
{
"name": "black (check) - aries_cloudagent",
Expand All @@ -59,7 +103,7 @@
"args": [
".",
"--check"
],
]
},
{
"name": "black (check) - current file",
Expand All @@ -71,7 +115,7 @@
"args": [
"${file}",
"--check"
],
]
},
{
"name": "black (format) - aries_cloudagent",
Expand All @@ -83,7 +127,7 @@
"cwd": "${workspaceFolder}/aries_cloudagent",
"args": [
"."
],
]
},
{
"name": "black (format) - current file",
Expand All @@ -93,8 +137,8 @@
"console": "integratedTerminal",
"justMyCode": true,
"args": [
"${file}",
],
},
"${file}"
]
}
]
}
37 changes: 37 additions & 0 deletions .vscode-sample/multitenant-admin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Multitenant admin agent configuration

auto-provision: true
label: multitenant-admin

inbound-transport:
- [http, 0.0.0.0, 9050]

outbound-transport: http

wallet-type: askar-anoncreds
wallet-storage-type: default
wallet-name: multitenant-admin-wallet
wallet-key: multitenant-admin-wallet-key

admin-insecure-mode: true

admin: [0.0.0.0, 9051]

endpoint: http://localhost:9050

genesis-url: https://localhost:9000/genesis

# Connections
debug-connections: true
auto-accept-invites: true
auto-accept-requests: true
auto-ping-connection: true

# Multi-tenancy
multitenant: true
jwt-secret: insecure-jwt-secret
multitenant-admin: true

log-level: info

tails-server-base-url: https://localhost:6543
2 changes: 1 addition & 1 deletion .vscode-sample/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"python.testing.pytestArgs": ["--no-cov"],
"python.testing.pytestArgs": ["--no-cov"]
}
8 changes: 7 additions & 1 deletion DevReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,15 @@ ACA-Py can issue W3C Verifiable Credentials using Linked Data Proofs. See the [d

[Docker](https://www.docker.com) must be installed to run software locally and to run the test suite.

### Running In A Dev Container

The dev container environment is a great way to deploy agents quickly with code changes and an interactive debug session. Detailed information can be found in the [Docs On Devcontainers](devcontainer.md). It is specific for vscode, so if you prefer another code editor or IDE you will need to figure it out on your own, but it is highly recommended to give this a try.

One thing to be aware of is, unlike the demo, none of the steps are automated. You will need to create public dids, connections and all the other steps yourself. Using the demo and studying the flow and then copying them with your dev container debug session is a great way to learn how everything works.

### Running Locally

For local development, we recommend using the provided Docker scripts to run the ACA-Py software.
Another way to develop locally is by using the provided Docker scripts to run the ACA-Py software.

```bash
./scripts/run_docker start <args>
Expand Down
Loading