Skip to content

Commit

Permalink
Support custom Cardano Docker image registry in infra
Browse files Browse the repository at this point in the history
  • Loading branch information
jpraynaud committed Dec 4, 2023
1 parent bdf0720 commit 65ba690
Show file tree
Hide file tree
Showing 14 changed files with 20 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mithril-infra/assets/docker/Dockerfile.cardano
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ARG CARDANO_IMAGE_ID
FROM inputoutput/cardano-node:$CARDANO_IMAGE_ID
ARG CARDANO_IMAGE_REPOSITORY
FROM $CARDANO_IMAGE_REPOSITORY:$CARDANO_IMAGE_ID

# Fix env file rights
# In order to be able to interact with the Cardano node trough its 'node.socket'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ services:
dockerfile: Dockerfile.cardano
args:
CARDANO_IMAGE_ID: ${CARDANO_IMAGE_ID}
CARDANO_IMAGE_REPOSITORY: ${CARDANO_IMAGE_REPOSITORY}
user: ${CURRENT_UID}
profiles:
- cardano
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ services:
dockerfile: Dockerfile.cardano
args:
CARDANO_IMAGE_ID: ${CARDANO_IMAGE_ID}
CARDANO_IMAGE_REPOSITORY: ${CARDANO_IMAGE_REPOSITORY}
user: ${CURRENT_UID}
profiles:
- cardano
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ services:
dockerfile: Dockerfile.cardano
args:
CARDANO_IMAGE_ID: ${CARDANO_IMAGE_ID}
CARDANO_IMAGE_REPOSITORY: ${CARDANO_IMAGE_REPOSITORY}
user: ${CURRENT_UID}
profiles:
- cardano
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ services:
dockerfile: Dockerfile.cardano
args:
CARDANO_IMAGE_ID: ${CARDANO_IMAGE_ID}
CARDANO_IMAGE_REPOSITORY: ${CARDANO_IMAGE_REPOSITORY}
user: ${CURRENT_UID}
profiles:
- cardano
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ services:
dockerfile: Dockerfile.cardano
args:
CARDANO_IMAGE_ID: ${CARDANO_IMAGE_ID}
CARDANO_IMAGE_REPOSITORY: ${CARDANO_IMAGE_REPOSITORY}
user: ${CURRENT_UID}
profiles:
- cardano
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ services:
dockerfile: Dockerfile.cardano
args:
CARDANO_IMAGE_ID: ${CARDANO_IMAGE_ID}
CARDANO_IMAGE_REPOSITORY: ${CARDANO_IMAGE_REPOSITORY}
user: ${CURRENT_UID}
profiles:
- cardano
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ services:
dockerfile: Dockerfile.cardano
args:
CARDANO_IMAGE_ID: ${CARDANO_IMAGE_ID}
CARDANO_IMAGE_REPOSITORY: ${CARDANO_IMAGE_REPOSITORY}
user: ${CURRENT_UID}
profiles:
- cardano
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ services:
dockerfile: Dockerfile.cardano
args:
CARDANO_IMAGE_ID: ${CARDANO_IMAGE_ID}
CARDANO_IMAGE_REPOSITORY: ${CARDANO_IMAGE_REPOSITORY}
user: ${CURRENT_UID}
profiles:
- cardano
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ services:
dockerfile: Dockerfile.cardano
args:
CARDANO_IMAGE_ID: ${CARDANO_IMAGE_ID}
CARDANO_IMAGE_REPOSITORY: ${CARDANO_IMAGE_REPOSITORY}
user: ${CURRENT_UID}
profiles:
- cardano
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ services:
dockerfile: Dockerfile.cardano
args:
CARDANO_IMAGE_ID: ${CARDANO_IMAGE_ID}
CARDANO_IMAGE_REPOSITORY: ${CARDANO_IMAGE_REPOSITORY}
user: ${CURRENT_UID}
profiles:
- cardano
Expand Down
1 change: 1 addition & 0 deletions mithril-infra/mithril.aggregator.tf
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ EOT
inline = [
"export NETWORK=${var.cardano_network}",
"export CARDANO_IMAGE_ID=${var.cardano_image_id}",
"export CARDANO_IMAGE_REPOSITORY: ${var.cardano_image_repository}",
"export MITHRIL_IMAGE_ID=${var.mithril_image_id}",
"export AGGREGATOR_HOST=${local.mithril_aggregator_host}",
"export GOOGLE_APPLICATION_CREDENTIALS_JSON='${local.google_cloud_storage_credentials_json}'",
Expand Down
1 change: 1 addition & 0 deletions mithril-infra/mithril.signer.tf
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ EOT
"export PARTY_ID=${each.value.pool_id}",
"export NETWORK=${var.cardano_network}",
"export CARDANO_IMAGE_ID=${var.cardano_image_id}",
"export CARDANO_IMAGE_REPOSITORY: ${var.cardano_image_repository}",
"export MITHRIL_IMAGE_ID=${var.mithril_image_id}",
"export AGGREGATOR_CREDENTIALS=${local.mithril_aggregator_credentials}",
"export SIGNER_HOST=${local.mithril_signers_host[each.key]}",
Expand Down
6 changes: 6 additions & 0 deletions mithril-infra/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ variable "cardano_image_id" {
default = "8.1.2"
}

variable "cardano_image_repository" {
type = string
description = "The Cardano image repository of service to deploy"
default = "inputoutput/cardano-node"
}

variable "cardano_configurations_repository_commit" {
type = string
description = "The Cardano configurations commit to use"
Expand Down

0 comments on commit 65ba690

Please sign in to comment.