forked from input-output-hk/mithril
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request input-output-hk#1363 from input-output-hk/jpraynau…
…d/1361-deploy-relay-p2p-network Deploy P2P network infrastructure
- Loading branch information
Showing
21 changed files
with
609 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
123 changes: 123 additions & 0 deletions
123
mithril-infra/assets/docker/docker-compose-aggregator-auth-p2p.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
version: "3.9" | ||
|
||
services: | ||
cardano-node-aggregator: | ||
image: cardano-node/${CARDANO_IMAGE_ID}-modified | ||
container_name: cardano-node-aggregator | ||
restart: always | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.cardano | ||
args: | ||
CARDANO_IMAGE_ID: ${CARDANO_IMAGE_ID} | ||
user: ${CURRENT_UID} | ||
profiles: | ||
- cardano | ||
- all | ||
logging: | ||
driver: "${LOGGING_DRIVER}" | ||
options: | ||
tag: "{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}" | ||
volumes: | ||
- ../data/${NETWORK}/mithril-aggregator/cardano/config/${NETWORK}:/config | ||
- ../data/${NETWORK}/mithril-aggregator/cardano/db:/db | ||
- ../data/${NETWORK}/mithril-aggregator/cardano/ipc:/ipc | ||
environment: | ||
- CARDANO_SOCKET_PATH=/ipc/node.socket | ||
- CARDANO_NODE_SOCKET_PATH=/ipc/node.socket | ||
command: | ||
[ | ||
"run", | ||
"--config", | ||
"/config/cardano-node/config.json", | ||
"--topology", | ||
"/config/cardano-node/topology.json", | ||
"--database-path", | ||
"/db" | ||
] | ||
|
||
mithril-aggregator: | ||
image: ghcr.io/input-output-hk/mithril-aggregator:${MITHRIL_IMAGE_ID} | ||
container_name: mithril-aggregator | ||
restart: always | ||
user: ${CURRENT_UID} | ||
profiles: | ||
- mithril | ||
- all | ||
environment: | ||
- RUST_BACKTRACE=1 | ||
- GOOGLE_APPLICATION_CREDENTIALS_JSON=${GOOGLE_APPLICATION_CREDENTIALS_JSON} | ||
- NETWORK=${NETWORK} | ||
- PROTOCOL_PARAMETERS__K=${PROTOCOL_PARAMETERS__K} | ||
- PROTOCOL_PARAMETERS__M=${PROTOCOL_PARAMETERS__M} | ||
- PROTOCOL_PARAMETERS__PHI_F=${PROTOCOL_PARAMETERS__PHI_F} | ||
- RUN_INTERVAL=60000 | ||
- SNAPSHOT_STORE_TYPE=local | ||
- SNAPSHOT_UPLOADER_TYPE=gcp | ||
- SNAPSHOT_BUCKET_NAME=${SNAPSHOT_BUCKET_NAME} | ||
- SNAPSHOT_USE_CDN_DOMAIN=${SNAPSHOT_USE_CDN_DOMAIN} | ||
- SNAPSHOT_COMPRESSION_ALGORITHM=${SNAPSHOT_COMPRESSION_ALGORITHM} | ||
- ZSTANDARD_PARAMETERS__LEVEL=${ZSTANDARD_PARAMETERS__LEVEL} | ||
- ZSTANDARD_PARAMETERS__NUMBER_OF_WORKERS=${ZSTANDARD_PARAMETERS__NUMBER_OF_WORKERS} | ||
- DATA_STORES_DIRECTORY=/mithril-aggregator/mithril/stores | ||
- STORE_RETENTION_LIMIT=5 | ||
- CARDANO_NODE_SOCKET_PATH=/ipc/node.socket | ||
- CARDANO_NODE_VERSION=${CARDANO_IMAGE_ID} | ||
- CARDANO_CLI_PATH=/app/bin/cardano-cli | ||
- GENESIS_VERIFICATION_KEY=${GENESIS_VERIFICATION_KEY} | ||
- GENESIS_SECRET_KEY=${GENESIS_SECRET_KEY} | ||
- DB_DIRECTORY=/db | ||
- SNAPSHOT_DIRECTORY=/mithril-aggregator/mithril/snapshots | ||
- SERVER_PORT=8080 | ||
- ERA_READER_ADAPTER_TYPE=${ERA_READER_ADAPTER_TYPE} | ||
- ERA_READER_ADAPTER_PARAMS=${ERA_READER_ADAPTER_PARAMS} | ||
- CEXPLORER_POOLS_URL=${CEXPLORER_POOLS_URL} | ||
volumes: | ||
- ../data/${NETWORK}/mithril-aggregator/mithril:/mithril-aggregator/mithril | ||
- ../data/${NETWORK}/mithril-aggregator/cardano/db:/db | ||
- ../data/${NETWORK}/mithril-aggregator/cardano/ipc:/ipc | ||
ports: | ||
- "8080:8080" | ||
command: [ "-vvv", "serve" ] | ||
depends_on: | ||
cardano-node-aggregator: | ||
condition: service_started | ||
logging: | ||
driver: "${LOGGING_DRIVER}" | ||
options: | ||
tag: "{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}" | ||
labels: | ||
- 'traefik.enable=true' | ||
- 'traefik.http.routers.mithril-aggregator.rule=Host(`${AGGREGATOR_HOST}`)' | ||
- 'traefik.http.routers.mithril-aggregator.tls=true' | ||
- 'traefik.http.routers.mithril-aggregator.tls.certresolver=lets-encrypt' | ||
- "traefik.http.routers.mithril-aggregator.middlewares=test-auth" | ||
- "traefik.http.middlewares.test-auth.basicauth.users=${AUTH_USER_PASSWORD}" | ||
|
||
mithril-aggregator-relay: | ||
image: ghcr.io/input-output-hk/mithril-relay:${MITHRIL_IMAGE_ID} | ||
container_name: mithril-aggregator-relay | ||
restart: always | ||
user: ${CURRENT_UID} | ||
profiles: | ||
- mithril | ||
- all | ||
environment: | ||
- RUST_BACKTRACE=1 | ||
- LISTEN_PORT=${AGGREGATOR_RELAY_LISTEN_PORT} | ||
- AGGREGATOR_ENDPOINT=http://${AGGREGATOR_CREDENTIALS}mithril-aggregator:8080/aggregator | ||
ports: | ||
- "${AGGREGATOR_RELAY_LISTEN_PORT}:${AGGREGATOR_RELAY_LISTEN_PORT}" | ||
command: [ "-vvv", "aggregator" ] | ||
depends_on: | ||
mithril-aggregator: | ||
condition: service_started | ||
logging: | ||
driver: "${LOGGING_DRIVER}" | ||
options: | ||
tag: "{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}" | ||
|
||
networks: | ||
default: | ||
name: mithril_network | ||
external: true |
121 changes: 121 additions & 0 deletions
121
mithril-infra/assets/docker/docker-compose-aggregator-noauth-p2p.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
version: "3.9" | ||
|
||
services: | ||
cardano-node-aggregator: | ||
image: cardano-node/${CARDANO_IMAGE_ID}-modified | ||
container_name: cardano-node-aggregator | ||
restart: always | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.cardano | ||
args: | ||
CARDANO_IMAGE_ID: ${CARDANO_IMAGE_ID} | ||
user: ${CURRENT_UID} | ||
profiles: | ||
- cardano | ||
- all | ||
logging: | ||
driver: "${LOGGING_DRIVER}" | ||
options: | ||
tag: "{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}" | ||
volumes: | ||
- ../data/${NETWORK}/mithril-aggregator/cardano/config/${NETWORK}:/config | ||
- ../data/${NETWORK}/mithril-aggregator/cardano/db:/db | ||
- ../data/${NETWORK}/mithril-aggregator/cardano/ipc:/ipc | ||
environment: | ||
- CARDANO_SOCKET_PATH=/ipc/node.socket | ||
- CARDANO_NODE_SOCKET_PATH=/ipc/node.socket | ||
command: | ||
[ | ||
"run", | ||
"--config", | ||
"/config/cardano-node/config.json", | ||
"--topology", | ||
"/config/cardano-node/topology.json", | ||
"--database-path", | ||
"/db" | ||
] | ||
|
||
mithril-aggregator: | ||
image: ghcr.io/input-output-hk/mithril-aggregator:${MITHRIL_IMAGE_ID} | ||
container_name: mithril-aggregator | ||
restart: always | ||
user: ${CURRENT_UID} | ||
profiles: | ||
- mithril | ||
- all | ||
environment: | ||
- RUST_BACKTRACE=1 | ||
- GOOGLE_APPLICATION_CREDENTIALS_JSON=${GOOGLE_APPLICATION_CREDENTIALS_JSON} | ||
- NETWORK=${NETWORK} | ||
- PROTOCOL_PARAMETERS__K=${PROTOCOL_PARAMETERS__K} | ||
- PROTOCOL_PARAMETERS__M=${PROTOCOL_PARAMETERS__M} | ||
- PROTOCOL_PARAMETERS__PHI_F=${PROTOCOL_PARAMETERS__PHI_F} | ||
- RUN_INTERVAL=60000 | ||
- SNAPSHOT_STORE_TYPE=local | ||
- SNAPSHOT_UPLOADER_TYPE=gcp | ||
- SNAPSHOT_BUCKET_NAME=${SNAPSHOT_BUCKET_NAME} | ||
- SNAPSHOT_USE_CDN_DOMAIN=${SNAPSHOT_USE_CDN_DOMAIN} | ||
- SNAPSHOT_COMPRESSION_ALGORITHM=${SNAPSHOT_COMPRESSION_ALGORITHM} | ||
- ZSTANDARD_PARAMETERS__LEVEL=${ZSTANDARD_PARAMETERS__LEVEL} | ||
- ZSTANDARD_PARAMETERS__NUMBER_OF_WORKERS=${ZSTANDARD_PARAMETERS__NUMBER_OF_WORKERS} | ||
- DATA_STORES_DIRECTORY=/mithril-aggregator/mithril/stores | ||
- STORE_RETENTION_LIMIT=5 | ||
- CARDANO_NODE_SOCKET_PATH=/ipc/node.socket | ||
- CARDANO_NODE_VERSION=${CARDANO_IMAGE_ID} | ||
- CARDANO_CLI_PATH=/app/bin/cardano-cli | ||
- GENESIS_VERIFICATION_KEY=${GENESIS_VERIFICATION_KEY} | ||
- GENESIS_SECRET_KEY=${GENESIS_SECRET_KEY} | ||
- DB_DIRECTORY=/db | ||
- SNAPSHOT_DIRECTORY=/mithril-aggregator/mithril/snapshots | ||
- SERVER_PORT=8080 | ||
- ERA_READER_ADAPTER_TYPE=${ERA_READER_ADAPTER_TYPE} | ||
- ERA_READER_ADAPTER_PARAMS=${ERA_READER_ADAPTER_PARAMS} | ||
- CEXPLORER_POOLS_URL=${CEXPLORER_POOLS_URL} | ||
volumes: | ||
- ../data/${NETWORK}/mithril-aggregator/mithril:/mithril-aggregator/mithril | ||
- ../data/${NETWORK}/mithril-aggregator/cardano/db:/db | ||
- ../data/${NETWORK}/mithril-aggregator/cardano/ipc:/ipc | ||
ports: | ||
- "8080:8080" | ||
command: [ "-vvv", "serve" ] | ||
depends_on: | ||
cardano-node-aggregator: | ||
condition: service_started | ||
logging: | ||
driver: "${LOGGING_DRIVER}" | ||
options: | ||
tag: "{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}" | ||
labels: | ||
- 'traefik.enable=true' | ||
- 'traefik.http.routers.mithril-aggregator.rule=Host(`${AGGREGATOR_HOST}`)' | ||
- 'traefik.http.routers.mithril-aggregator.tls=true' | ||
- 'traefik.http.routers.mithril-aggregator.tls.certresolver=lets-encrypt' | ||
|
||
mithril-aggregator-relay: | ||
image: ghcr.io/input-output-hk/mithril-relay:${MITHRIL_IMAGE_ID} | ||
container_name: mithril-aggregator-relay | ||
restart: always | ||
user: ${CURRENT_UID} | ||
profiles: | ||
- mithril | ||
- all | ||
environment: | ||
- RUST_BACKTRACE=1 | ||
- LISTEN_PORT=${AGGREGATOR_RELAY_LISTEN_PORT} | ||
- AGGREGATOR_ENDPOINT=http://${AGGREGATOR_CREDENTIALS}mithril-aggregator:8080/aggregator | ||
ports: | ||
- "${AGGREGATOR_RELAY_LISTEN_PORT}:${AGGREGATOR_RELAY_LISTEN_PORT}" | ||
command: [ "-vvv", "aggregator" ] | ||
depends_on: | ||
mithril-aggregator: | ||
condition: service_started | ||
logging: | ||
driver: "${LOGGING_DRIVER}" | ||
options: | ||
tag: "{{.ImageName}}|{{.Name}}|{{.ImageFullID}}|{{.FullID}}" | ||
|
||
networks: | ||
default: | ||
name: mithril_network | ||
external: true |
Oops, something went wrong.