Skip to content

Commit f81ee80

Browse files
committed
Add Cardano node custom version
1 parent a555e0b commit f81ee80

8 files changed

+28
-11
lines changed

mithril-infra/assets/docker/Dockerfile.cardano

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
FROM inputoutput/cardano-node:1.35.5
1+
ARG CARDANO_IMAGE_ID
2+
FROM inputoutput/cardano-node:$CARDANO_IMAGE_ID
23

34
# Fix env file rights
45
# In order to be able to interact with the Cardano node trough its 'node.socket'

mithril-infra/assets/docker/docker-compose-aggregator.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ version: "3.9"
22

33
services:
44
cardano-node-aggregator:
5-
image: cardano-node/1.35.5-modified
5+
image: cardano-node/${CARDANO_IMAGE_ID}-modified
66
container_name: cardano-node-aggregator
77
restart: always
88
build:
99
context: .
1010
dockerfile: Dockerfile.cardano
11+
args:
12+
CARDANO_IMAGE_ID: ${CARDANO_IMAGE_ID}
1113
user: ${CURRENT_UID}
1214
profiles:
1315
- cardano
@@ -36,7 +38,7 @@ services:
3638
]
3739

3840
mithril-aggregator:
39-
image: ghcr.io/input-output-hk/mithril-aggregator:${IMAGE_ID}
41+
image: ghcr.io/input-output-hk/mithril-aggregator:${MITHRIL_IMAGE_ID}
4042
container_name: mithril-aggregator
4143
restart: always
4244
user: ${CURRENT_UID}

mithril-infra/assets/docker/docker-compose-signer-unverified-alone.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version: "3.9"
44

55
services:
66
mithril-signer:
7-
image: ghcr.io/input-output-hk/mithril-signer:${IMAGE_ID}
7+
image: ghcr.io/input-output-hk/mithril-signer:${MITHRIL_IMAGE_ID}
88
container_name: mithril-signer-${SIGNER_ID}
99
restart: always
1010
user: ${CURRENT_UID}

mithril-infra/assets/docker/docker-compose-signer-unverified.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ version: "3.9"
44

55
services:
66
cardano-node-signer:
7-
image: cardano-node/1.35.5-modified
7+
image: cardano-node/${CARDANO_IMAGE_ID}-modified
88
container_name: cardano-node-signer-${SIGNER_ID}
99
restart: always
1010
build:
1111
context: .
1212
dockerfile: Dockerfile.cardano
13+
args:
14+
CARDANO_IMAGE_ID: ${CARDANO_IMAGE_ID}
1315
user: ${CURRENT_UID}
1416
profiles:
1517
- cardano
@@ -38,7 +40,7 @@ services:
3840
]
3941

4042
mithril-signer:
41-
image: ghcr.io/input-output-hk/mithril-signer:${IMAGE_ID}
43+
image: ghcr.io/input-output-hk/mithril-signer:${MITHRIL_IMAGE_ID}
4244
container_name: mithril-signer-${SIGNER_ID}
4345
restart: always
4446
user: ${CURRENT_UID}

mithril-infra/assets/docker/docker-compose-signer-verified.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ version: "3.9"
44

55
services:
66
cardano-node-signer-relay:
7-
image: cardano-node/1.35.5-modified
7+
image: cardano-node/${CARDANO_IMAGE_ID}-modified
88
container_name: cardano-node-relay-signer-${SIGNER_ID}
99
restart: always
1010
build:
1111
context: .
1212
dockerfile: Dockerfile.cardano
13+
args:
14+
CARDANO_IMAGE_ID: ${CARDANO_IMAGE_ID}
1315
user: ${CURRENT_UID}
1416
profiles:
1517
- cardano
@@ -44,12 +46,14 @@ services:
4446
]
4547

4648
cardano-node-signer-block-producer:
47-
image: cardano-node/1.35.5-modified
49+
image: cardano-node/${CARDANO_IMAGE_ID}-modified
4850
container_name: cardano-node-block-producer-signer-${SIGNER_ID}
4951
restart: always
5052
build:
5153
context: .
5254
dockerfile: Dockerfile.cardano
55+
args:
56+
CARDANO_IMAGE_ID: ${CARDANO_IMAGE_ID}
5357
user: ${CURRENT_UID}
5458
profiles:
5559
- cardano
@@ -90,7 +94,7 @@ services:
9094
]
9195

9296
mithril-signer:
93-
image: ghcr.io/input-output-hk/mithril-signer:${IMAGE_ID}
97+
image: ghcr.io/input-output-hk/mithril-signer:${MITHRIL_IMAGE_ID}
9498
container_name: mithril-signer-${SIGNER_ID}
9599
restart: always
96100
user: ${CURRENT_UID}

mithril-infra/mithril.aggregator.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ resource "null_resource" "mithril_aggregator" {
2828
provisioner "remote-exec" {
2929
inline = [
3030
"export NETWORK=${var.cardano_network}",
31-
"export IMAGE_ID=${var.mithril_image_id}",
31+
"export CARDANO_IMAGE_ID=${var.cardano_image_id}",
32+
"export MITHRIL_IMAGE_ID=${var.mithril_image_id}",
3233
"export AGGREGATOR_HOST=${local.mithril_aggregator_host}",
3334
"export GOOGLE_APPLICATION_CREDENTIALS_JSON='${local.google_cloud_storage_credentials_json}'",
3435
"export SNAPSHOT_BUCKET_NAME='${google_storage_bucket.cloud_storage.name}'",

mithril-infra/mithril.signer.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ EOT
5757
"export SIGNER_ID=${each.key}",
5858
"export PARTY_ID=${each.value.pool_id}",
5959
"export NETWORK=${var.cardano_network}",
60-
"export IMAGE_ID=${var.mithril_image_id}",
60+
"export CARDANO_IMAGE_ID=${var.cardano_image_id}",
61+
"export MITHRIL_IMAGE_ID=${var.mithril_image_id}",
6162
"export SIGNER_HOST=${local.mithril_signers_host[each.key]}",
6263
"export SIGNER_WWW_PORT=${local.mithril_signers_www_port[each.key]}",
6364
"export SIGNER_CARDANO_RELAY_ADDR=0.0.0.0",

mithril-infra/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ locals {
8484
google_project_id = local.google_service_credentials_json_file_decoded.project_id
8585
}
8686

87+
variable "cardano_image_id" {
88+
type = string
89+
description = "The Cardano image tag of service to deploy"
90+
default = "1.35.5"
91+
}
92+
8793
variable "mithril_api_domain" {
8894
type = string
8995
description = "The Mithril api (sub)domain name of service to deploy"

0 commit comments

Comments
 (0)