Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade infrastructure deployment with disk configurations #1850

Merged
merged 9 commits into from
Jul 26, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,23 @@ inputs:
google_compute_instance_boot_disk_size:
description: Google Cloud attached boot disk size in GB.
required: true
google_compute_instance_boot_disk_type:
description: Google Cloud type of attached boot disk.
required: false
default: "pd-standard"
google_compute_instance_boot_disk_snapshot:
description: Google Cloud snapshot used to restore the boot disk.
required: false
google_compute_instance_data_disk_size:
description: Google Cloud attached data disk size in GB.
required: true
google_compute_instance_data_disk_type:
description: Google Cloud type of attached data disk.
required: false
default: "pd-standard"
google_compute_instance_data_disk_snapshot:
description: Google Cloud snapshot used to restore the data disk.
required: false
google_application_credentials:
description: Google Cloud application credentials (service account).
required: true
Expand Down Expand Up @@ -174,7 +188,11 @@ runs:
google_zone = "${{ inputs.google_zone }}"
google_machine_type = "${{ inputs.google_machine_type }}"
google_compute_instance_boot_disk_size = "${{ inputs.google_compute_instance_boot_disk_size }}"
google_compute_instance_boot_disk_type = "${{ inputs.google_compute_instance_boot_disk_type }}"
google_compute_instance_boot_disk_snapshot = "${{ inputs.google_compute_instance_boot_disk_snapshot }}"
google_compute_instance_data_disk_size = "${{ inputs.google_compute_instance_data_disk_size }}"
google_compute_instance_data_disk_type = "${{ inputs.google_compute_instance_data_disk_type }}"
google_compute_instance_data_disk_snapshot = "${{ inputs.google_compute_instance_data_disk_snapshot }}"
google_service_credentials_json_file = "./google-application-credentials.json"
mithril_use_p2p_network = "${{ inputs.mithril_use_p2p_network }}"
mithril_api_domain = "${{ inputs.mithril_api_domain }}"
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ jobs:
google_zone: europe-west1-b
google_machine_type: e2-highmem-2
google_compute_instance_boot_disk_size: 200
google_compute_instance_boot_disk_type: pd-standard
google_compute_instance_data_disk_size: 250
google_compute_instance_data_disk_type: pd-standard
environment: ${{ matrix.environment }}
runs-on: ubuntu-22.04
needs:
Expand Down Expand Up @@ -210,7 +212,10 @@ jobs:
google_zone: ${{ matrix.google_zone }}
google_machine_type: ${{ matrix.google_machine_type }}
google_compute_instance_boot_disk_size: ${{ matrix.google_compute_instance_boot_disk_size }}
google_compute_instance_boot_disk_type: ${{ matrix.google_compute_instance_boot_disk_type }}
google_compute_instance_data_disk_size: ${{ matrix.google_compute_instance_data_disk_size }}
google_compute_instance_data_disk_type: ${{ matrix.google_compute_instance_data_disk_type }}
google_compute_instance_data_disk_snapshot: ${{ vars.GOOGLE_COMPUTE_INSTANCE_DATA_DISK_SNAPSHOT }}
google_application_credentials: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
mithril_api_domain: ${{ matrix.mithril_api_domain }}
mithril_image_id: ${{ env.DOCKER_IMAGE_ID }}
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ jobs:
google_zone: europe-west1-b
google_machine_type: e2-highmem-2
google_compute_instance_boot_disk_size: 200
google_compute_instance_boot_disk_type: pd-standard
google_compute_instance_data_disk_size: 250
google_compute_instance_data_disk_type: pd-standard
- environment: release-mainnet
environment_prefix: release
cardano_network: mainnet
Expand All @@ -110,7 +112,9 @@ jobs:
google_zone: europe-west1-b
google_machine_type: e2-highmem-8
google_compute_instance_boot_disk_size: 250
google_compute_instance_boot_disk_type: pd-standard
google_compute_instance_data_disk_size: 1000
google_compute_instance_data_disk_type: pd-standard

environment: ${{ matrix.environment }}
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -140,7 +144,10 @@ jobs:
google_zone: ${{ matrix.google_zone }}
google_machine_type: ${{ matrix.google_machine_type }}
google_compute_instance_boot_disk_size: ${{ matrix.google_compute_instance_boot_disk_size }}
google_compute_instance_boot_disk_type: ${{ matrix.google_compute_instance_boot_disk_type }}
google_compute_instance_data_disk_size: ${{ matrix.google_compute_instance_data_disk_size }}
google_compute_instance_data_disk_type: ${{ matrix.google_compute_instance_data_disk_type }}
google_compute_instance_data_disk_snapshot: ${{ vars.GOOGLE_COMPUTE_INSTANCE_DATA_DISK_SNAPSHOT }}
google_application_credentials: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
mithril_api_domain: ${{ matrix.mithril_api_domain }}
mithril_image_id: ${{ env.DOCKER_IMAGE_ID }}
Expand Down
37 changes: 36 additions & 1 deletion .github/workflows/test-deploy-network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:
type: choice
options:
- dev-preview
- dev-mainnet
- testing-mainnet
dry_run:
description: Dry run will not deploy the distribution to the Mithril network
Expand All @@ -27,7 +28,7 @@ jobs:
strategy:
fail-fast: false
matrix:
environment: [dev-preview, testing-mainnet]
environment: [dev-preview, dev-mainnet, testing-mainnet]
include:
- environment: dev-preview
environment_prefix: dev
Expand Down Expand Up @@ -61,7 +62,36 @@ jobs:
google_zone: europe-west1-b
google_machine_type: e2-highmem-4
google_compute_instance_boot_disk_size: 200
google_compute_instance_boot_disk_type: pd-standard
google_compute_instance_data_disk_size: 250
google_compute_instance_data_disk_type: pd-standard
- environment: dev-mainnet
environment_prefix: dev
cardano_network: mainnet
mithril_use_p2p_network: false
mithril_api_domain: api.mithril.network
mithril_era_reader_adapter_type: bootstrap
mithril_protocol_parameters: |
{
k = 2422
m = 20973
phi_f = 0.20
}
mithril_signers: |
{
"1" = {
type = "unverified-alone",
pool_id = "pool1re8cmjt895tpx8dx2veg0cew5yqtxnt82sll03e433a4ugnh9w7",
}
}
terraform_backend_bucket: hydra-terraform-admin
google_region: europe-west1
google_zone: europe-west1-b
google_machine_type: e2-highmem-8
google_compute_instance_boot_disk_size: 250
google_compute_instance_boot_disk_type: pd-standard
google_compute_instance_data_disk_size: 1000
google_compute_instance_data_disk_type: pd-balanced
- environment: testing-mainnet
environment_prefix: testing
cardano_network: mainnet
Expand All @@ -86,7 +116,9 @@ jobs:
google_zone: europe-west1-b
google_machine_type: e2-highmem-8
google_compute_instance_boot_disk_size: 250
google_compute_instance_boot_disk_type: pd-standard
google_compute_instance_data_disk_size: 1000
google_compute_instance_data_disk_type: pd-balanced

environment: ${{ matrix.environment }}
runs-on: ubuntu-22.04
Expand All @@ -113,7 +145,10 @@ jobs:
google_zone: ${{ matrix.google_zone }}
google_machine_type: ${{ matrix.google_machine_type }}
google_compute_instance_boot_disk_size: ${{ matrix.google_compute_instance_boot_disk_size }}
google_compute_instance_boot_disk_type: ${{ matrix.google_compute_instance_boot_disk_type }}
google_compute_instance_data_disk_size: ${{ matrix.google_compute_instance_data_disk_size }}
google_compute_instance_data_disk_type: ${{ matrix.google_compute_instance_data_disk_type }}
google_compute_instance_data_disk_snapshot: ${{ vars.GOOGLE_COMPUTE_INSTANCE_DATA_DISK_SNAPSHOT }}
google_application_credentials: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
mithril_use_p2p_network: ${{ matrix.mithril_use_p2p_network }}
mithril_api_domain: ${{ matrix.mithril_api_domain }}
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ As a minor extension, we have adopted a slightly different versioning convention

- Support for `Cardano node` `9.1.0` in the signer and the aggregator.

- Support better disk configuration in terraform deployments with the CI/CD workflows.

- **UNSTABLE** Cardano transactions certification:

- Make Cardano transaction signing settings configurable via the CD.
Expand Down
2 changes: 1 addition & 1 deletion mithril-infra/assets/infra.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.26
0.2.27
2 changes: 1 addition & 1 deletion mithril-infra/main.data-disk.tf
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ resource "null_resource" "mithril_mount_data_disk" {
<<-EOT
set -e
# Format data disk if necessary
if sudo blkid /dev/sdb; then
if sudo blkid /dev/disk/by-id/google-mithril-data-disk; then
echo "Data disk already formatted"
else
# Format data disk
Expand Down
Loading