Skip to content

Commit

Permalink
chore: replace prism-agent to cloud-agent in the docker-compose f…
Browse files Browse the repository at this point in the history
…iles and scripts

Signed-off-by: Yurii Shynbuiev <yurii.shynbuiev@iohk.io>
  • Loading branch information
yshyn-iohk committed May 7, 2024
1 parent 253f951 commit 82bef01
Show file tree
Hide file tree
Showing 13 changed files with 65 additions and 189 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ agent {
port = 8085
port =${?AGENT_HTTP_PORT}
}
publicEndpointUrl = "https://host.docker.internal:8080/prism-agent"
publicEndpointUrl = "https://host.docker.internal:8080/cloud-agent"
publicEndpointUrl = ${?REST_SERVICE_URL}
}
didCommEndpoint {
Expand Down
154 changes: 0 additions & 154 deletions infrastructure/ci/docker-compose-multiple-actors.yml

This file was deleted.

2 changes: 1 addition & 1 deletion infrastructure/local/.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
AGENT_VERSION=1.32.1
AGENT_VERSION=1.32.0-SNAPSHOT
PRISM_NODE_VERSION=2.2.1
VAULT_DEV_ROOT_TOKEN_ID=root
14 changes: 7 additions & 7 deletions infrastructure/local/run-e2e-tests-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,31 @@ export AGENT_AUTH_REQUIRED=true
export AGENT_AUTH_HEADER=apikey

export ACME_AUTH_KEY=acme
export ACME_AGENT_URL=http://localhost:8080/prism-agent
export ACME_AGENT_URL=http://localhost:8080/cloud-agent

export BOB_AUTH_KEY=bob
export BOB_AGENT_URL=http://localhost:8080/prism-agent
export BOB_AGENT_URL=http://localhost:8080/cloud-agent

export FABER_AUTH_KEY=faber
export FABER_AGENT_URL=http://localhost:8080/prism-agent
export FABER_AGENT_URL=http://localhost:8080/cloud-agent

curl --location 'http://localhost:8080/prism-agent/events/webhooks' \
curl --location 'http://localhost:8080/cloud-agent/events/webhooks' \
--header "apikey: $ACME_AUTH_KEY" \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"url": "http://host.docker.internal:9955"
}'

curl --location 'http://localhost:8080/prism-agent/events/webhooks' \
curl --location 'http://localhost:8080/cloud-agent/events/webhooks' \
--header "apikey: $BOB_AUTH_KEY" \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"url": "http://host.docker.internal:9956"
}'

curl --location 'http://localhost:8080/prism-agent/events/webhooks' \
curl --location 'http://localhost:8080/cloud-agent/events/webhooks' \
--header "apikey: $FABER_AUTH_KEY" \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
Expand All @@ -47,6 +47,6 @@ curl --location 'http://localhost:8080/prism-agent/events/webhooks' \
}'

(
cd ${SCRIPT_DIR}/../../tests/e2e-tests/
cd ${SCRIPT_DIR}/../../tests/integration-tests/
./gradlew test reports
)
2 changes: 1 addition & 1 deletion infrastructure/multi/run-e2e-tests-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ echo "Run e2e tests"
echo "--------------------------------------"

(
cd ${SCRIPT_DIR}/../../tests/e2e-tests/
cd ${SCRIPT_DIR}/../../tests/integration-tests/
./gradlew test reports
)
12 changes: 12 additions & 0 deletions infrastructure/shared/apisix/conf/apisix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,23 @@ routes:
allow_origins: "*"
proxy-rewrite:
regex_uri: ["^/prism-agent/(.*)", "/$1"]
- uri: /cloud-agent/*
upstream_id: 4
plugins:
cors:
allow_origins: "*"
proxy-rewrite:
regex_uri: ["^/cloud-agent/(.*)", "/$1"]
- uri: /docs/prism-agent/api/*
upstream_id: 4
plugins:
proxy-rewrite:
regex_uri: ["^/docs/prism-agent/api/(.*)", "/docs/$1"]
- uri: /docs/cloud-agent/api/*
upstream_id: 4
plugins:
proxy-rewrite:
regex_uri: ["^/docs/cloud-agent/api/(.*)", "/docs/$1"]
- uri: /didcomm*
upstream_id: 3
plugins:
Expand Down
10 changes: 5 additions & 5 deletions infrastructure/shared/docker-compose-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ services:
db:
condition: service_healthy

prism-agent:
cloud-agent:
image: ghcr.io/hyperledger/identus-cloud-agent:${AGENT_VERSION}
environment:
DIDCOMM_SERVICE_URL: http://${DOCKERHOST}:${PORT}/didcomm
REST_SERVICE_URL: http://${DOCKERHOST}:${PORT}/prism-agent
REST_SERVICE_URL: http://${DOCKERHOST}:${PORT}/cloud-agent
PRISM_NODE_HOST: prism-node
PRISM_NODE_PORT: 50053
SECRET_STORAGE_BACKEND: postgres
Expand All @@ -54,7 +54,7 @@ services:
prism-node:
condition: service_started
healthcheck:
test: ["CMD", "curl", "-f", "http://prism-agent:8085/_system/health"]
test: ["CMD", "curl", "-f", "http://cloud-agent:8085/_system/health"]
interval: 30s
timeout: 10s
retries: 5
Expand All @@ -65,7 +65,7 @@ services:
image: swaggerapi/swagger-ui:v5.4.2
environment:
- 'URLS=[
{ name: "Prism Agent", url: "/docs/prism-agent/api/docs.yaml" }
{ name: "Cloud Agent", url: "/docs/cloud-agent/api/docs.yaml" }
]'

apisix:
Expand All @@ -76,7 +76,7 @@ services:
ports:
- "${PORT}:9080/tcp"
depends_on:
- prism-agent
- cloud-agent
- swagger-ui

volumes:
Expand Down
10 changes: 5 additions & 5 deletions infrastructure/shared/docker-compose-mt-keycloak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ services:
timeout: 5s
retries: 5

prism-agent:
cloud-agent:
image: ghcr.io/hyperledger/identus-cloud-agent:${AGENT_VERSION}
environment:
POLLUX_DB_HOST: db
Expand Down Expand Up @@ -110,7 +110,7 @@ services:
KEYCLOAK_ENABLED: true
KEYCLOAK_URL: http://keycloak:8080
KEYCLOAK_REALM: atala-demo
KEYCLOAK_CLIENT_ID: prism-agent
KEYCLOAK_CLIENT_ID: prism-agent # TODO: Fix this later
KEYCLOAK_CLIENT_SECRET: prism-agent-demo-secret
KEYCLOAK_UMA_AUTO_UPGRADE_RPT: true
depends_on:
Expand All @@ -121,7 +121,7 @@ services:
vault-server:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://prism-agent:8085/_system/health"]
test: ["CMD", "curl", "-f", "http://cloud-agent:8085/_system/health"]
interval: 30s
timeout: 10s
retries: 5
Expand All @@ -132,7 +132,7 @@ services:
image: swaggerapi/swagger-ui:v5.1.0
environment:
- 'URLS=[
{ name: "Prism Agent", url: "/docs/prism-agent/api/docs.yaml" }
{ name: "Cloud Agent", url: "/docs/cloud-agent/api/docs.yaml" }
]'

apisix:
Expand All @@ -143,7 +143,7 @@ services:
ports:
- "${PORT}:9080/tcp"
depends_on:
- prism-agent
- cloud-agent
- swagger-ui

keycloak:
Expand Down
12 changes: 6 additions & 6 deletions infrastructure/shared/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ services:
timeout: 5s
retries: 5

prism-agent:
cloud-agent:
image: ghcr.io/hyperledger/identus-cloud-agent:${AGENT_VERSION}
environment:
POLLUX_DB_HOST: db
Expand All @@ -88,9 +88,9 @@ services:
AGENT_DB_NAME: agent
AGENT_DB_USER: postgres
AGENT_DB_PASSWORD: postgres
POLLUX_STATUS_LIST_REGISTRY_PUBLIC_URL: http://${DOCKERHOST}:${PORT}/prism-agent
POLLUX_STATUS_LIST_REGISTRY_PUBLIC_URL: http://${DOCKERHOST}:${PORT}/cloud-agent
DIDCOMM_SERVICE_URL: http://${DOCKERHOST}:${PORT}/didcomm
REST_SERVICE_URL: http://${DOCKERHOST}:${PORT}/prism-agent
REST_SERVICE_URL: http://${DOCKERHOST}:${PORT}/cloud-agent
PRISM_NODE_HOST: prism-node
PRISM_NODE_PORT: 50053
VAULT_ADDR: ${VAULT_ADDR:-http://vault-server:8200}
Expand Down Expand Up @@ -118,7 +118,7 @@ services:
vault-server:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://prism-agent:8085/_system/health"]
test: ["CMD", "curl", "-f", "http://cloud-agent:8085/_system/health"]
interval: 30s
timeout: 10s
retries: 5
Expand All @@ -129,7 +129,7 @@ services:
image: swaggerapi/swagger-ui:v5.1.0
environment:
- 'URLS=[
{ name: "Prism Agent", url: "/docs/prism-agent/api/docs.yaml" }
{ name: "Cloud Agent", url: "/docs/cloud-agent/api/docs.yaml" }
]'

apisix:
Expand All @@ -140,7 +140,7 @@ services:
ports:
- "${PORT}:9080/tcp"
depends_on:
- prism-agent
- cloud-agent
- swagger-ui

volumes:
Expand Down

0 comments on commit 82bef01

Please sign in to comment.