Skip to content
This repository was archived by the owner on Sep 22, 2023. It is now read-only.

Commit

Permalink
Merge branch 'main' into feat/added_receiveinvitationhandler.test
Browse files Browse the repository at this point in the history
  • Loading branch information
dbluhm authored Nov 5, 2021
2 parents b422ad9 + 534da74 commit ec86652
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 45 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ $ pip install -e .
```sh
$ pip install -e .[indy]
```
Note: If you are using the `indy` feature, you will need to have the indy-sdk
library installed. If it's not installed, please see
[Installing the SDK](https://github.com/hyperledger/indy-sdk/blob/master/README.md#installing-the-sdk)

### Plugin Installation

Expand All @@ -77,6 +80,15 @@ $ aca-py start \
--plugin acapy_plugin_toolbox
```

Alternatively, you may use the demo configs in `demo/configs` to startup ACA-Py
similarly to the demos. These demos automatically set many options, such as
ports, config options, plugins to load, etc. To do so, copy one of the config
files to the current directory and run the following command, substituting
`./{config}.yml` with the config file you have chosen:
```
aca-py start --arg-file ./{config}.yml
```

### Generating an invitation for use with the Toolbox
By default, ACA-Py has no preexisting connections. To have our agent interact
with other agents, we use the Aries Toolbox which is itself a simplified kind of
Expand Down
12 changes: 5 additions & 7 deletions demo/Dockerfile.demo
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ FROM bcgovimages/von-image:py36-1.16-0

RUN pip3 install --no-cache-dir poetry

ADD --chown=indy https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 ./jq
RUN chmod +x ./jq

COPY --chown=indy demo/agent-tunnel-wait.sh ./agent-tunnel-wait.sh
RUN chmod +x agent-tunnel-wait.sh
ADD --chown=indy https://raw.githubusercontent.com/Indicio-tech/agent-tunnel/02351dd87e105a7522a2d752ddd174a52a6755a1/wait-curl.sh ./wait.sh
RUN chmod +x ./wait.sh
COPY ./demo/acapy-endpoint.sh ./acapy-endpoint.sh

RUN mkdir acapy_plugin_toolbox && touch acapy_plugin_toolbox/__init__.py
COPY pyproject.toml .
Expand All @@ -25,5 +23,5 @@ COPY demo/configs ./configs/
COPY acapy_plugin_toolbox acapy_plugin_toolbox


ENTRYPOINT ["/bin/bash", "-c", "./agent-tunnel-wait.sh \"$@\"", "--"]
CMD ["poetry", "run", "aca-py", "start", "--plugin", "acapy_plugin_toolbox", "--arg-file", "configs/default.yml"]
ENTRYPOINT ["/bin/bash", "-c", "./acapy-endpoint.sh poetry run aca-py \"$@\"", "--"]
CMD ["start", "--arg-file", "configs/default.yml"]
4 changes: 4 additions & 0 deletions demo/acapy-endpoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
ACAPY_ENDPOINT="$(./wait.sh)"
export ACAPY_ENDPOINT="[$ACAPY_ENDPOINT, ${ACAPY_ENDPOINT/http/ws}]"
exec "$@"
17 changes: 0 additions & 17 deletions demo/agent-tunnel-wait.sh

This file was deleted.

18 changes: 8 additions & 10 deletions demo/docker-compose.alice-bob.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,36 @@
version: "3"
services:
tunnel-alice:
image: reflectivedevelopment/agent-tunnel
command: agent-alice:3000 -p 4040 --host ${AGENT_TUNNEL_HOST}
image: dbluhm/agent-tunnel
command: -s agent-alice:3000 -p 4040 -h ${AGENT_TUNNEL_HOST}
agent-alice:
image: acapy-toolbox-tunnel
build:
context: ../
dockerfile: ./demo/Dockerfile.demo
environment:
TUNNEL_HOST: tunnel-alice
TUNNEL_PORT: 4040
TUNNEL_ENDPOINT: http://tunnel-alice:4040
# Modify for more log output
ACAPY_TOOLBOX_LOG_LEVEL: WARNING
ports:
- "3001:3001"
command: poetry run aca-py start --arg-file ./configs/alice.yml
command: start --arg-file ./configs/alice.yml

tunnel-bob:
image: reflectivedevelopment/agent-tunnel
command: agent-bob:3002 -p 4040 --host ${AGENT_TUNNEL_HOST}
image: dbluhm/agent-tunnel
command: -s agent-bob:3002 -p 4040 -h ${AGENT_TUNNEL_HOST}
agent-bob:
image: acapy-toolbox-tunnel
build:
context: ../
dockerfile: ./demo/Dockerfile.demo
environment:
TUNNEL_HOST: tunnel-bob
TUNNEL_PORT: 4040
TUNNEL_ENDPOINT: http://tunnel-bob:4040
# Modify for more log output
ACAPY_TOOLBOX_LOG_LEVEL: WARNING
ports:
- "3003:3003"
command: poetry run aca-py start --arg-file ./configs/bob.yml
command: start --arg-file ./configs/bob.yml

tails-server:
image: dbluhm/indy-tails-server:latest
Expand Down
9 changes: 4 additions & 5 deletions demo/docker-compose.mediator.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
version: "3"
services:
tunnel-mediator:
image: reflectivedevelopment/agent-tunnel
command: agent-mediator:3004 -p 4040 --host ${AGENT_TUNNEL_HOST}
image: dbluhm/agent-tunnel
command: -s agent-mediator:3004 -p 4040 -h ${AGENT_TUNNEL_HOST}
agent-mediator:
image: acapy-toolbox-tunnel
build:
context: ../
dockerfile: ./demo/Dockerfile.demo
environment:
TUNNEL_HOST: tunnel-mediator
TUNNEL_PORT: 4040
TUNNEL_ENDPOINT: http://tunnel-mediator:4040
ports:
- "3005:3005"
command: poetry run aca-py start --arg-file ./configs/mediator.yml
command: start --arg-file ./configs/mediator.yml
9 changes: 3 additions & 6 deletions demo/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: "3"
services:
tunnel:
image: reflectivedevelopment/agent-tunnel
command: agent:3000 -p 4040 --host ${AGENT_TUNNEL_HOST}
image: dbluhm/agent-tunnel
command: -s agent:3000 -p 4040 -h ${AGENT_TUNNEL_HOST}
ports:
- 4040:4040
agent:
Expand All @@ -11,7 +11,4 @@ services:
context: ../
dockerfile: ./demo/Dockerfile.demo
environment:
TUNNEL_HOST: tunnel
TUNNEL_PORT: 4040
ports:
- "3001:3001"
TUNNEL_ENDPOINT: http://tunnel:4040

0 comments on commit ec86652

Please sign in to comment.