Skip to content

Commit 1929911

Browse files
authored
Merge pull request #1850 from input-output-hk/jpraynaud/1849-upgrade-vm-disk-infra
Upgrade infrastructure deployment with disk configurations
2 parents cd624da + b7c0427 commit 1929911

File tree

7 files changed

+70
-3
lines changed

7 files changed

+70
-3
lines changed

.github/workflows/actions/deploy-terraform-infrastructure/action.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,23 @@ inputs:
3636
google_compute_instance_boot_disk_size:
3737
description: Google Cloud attached boot disk size in GB.
3838
required: true
39+
google_compute_instance_boot_disk_type:
40+
description: Google Cloud type of attached boot disk.
41+
required: false
42+
default: "pd-standard"
43+
google_compute_instance_boot_disk_snapshot:
44+
description: Google Cloud snapshot used to restore the boot disk.
45+
required: false
3946
google_compute_instance_data_disk_size:
4047
description: Google Cloud attached data disk size in GB.
4148
required: true
49+
google_compute_instance_data_disk_type:
50+
description: Google Cloud type of attached data disk.
51+
required: false
52+
default: "pd-standard"
53+
google_compute_instance_data_disk_snapshot:
54+
description: Google Cloud snapshot used to restore the data disk.
55+
required: false
4256
google_application_credentials:
4357
description: Google Cloud application credentials (service account).
4458
required: true
@@ -174,7 +188,11 @@ runs:
174188
google_zone = "${{ inputs.google_zone }}"
175189
google_machine_type = "${{ inputs.google_machine_type }}"
176190
google_compute_instance_boot_disk_size = "${{ inputs.google_compute_instance_boot_disk_size }}"
191+
google_compute_instance_boot_disk_type = "${{ inputs.google_compute_instance_boot_disk_type }}"
192+
google_compute_instance_boot_disk_snapshot = "${{ inputs.google_compute_instance_boot_disk_snapshot }}"
177193
google_compute_instance_data_disk_size = "${{ inputs.google_compute_instance_data_disk_size }}"
194+
google_compute_instance_data_disk_type = "${{ inputs.google_compute_instance_data_disk_type }}"
195+
google_compute_instance_data_disk_snapshot = "${{ inputs.google_compute_instance_data_disk_snapshot }}"
178196
google_service_credentials_json_file = "./google-application-credentials.json"
179197
mithril_use_p2p_network = "${{ inputs.mithril_use_p2p_network }}"
180198
mithril_api_domain = "${{ inputs.mithril_api_domain }}"

.github/workflows/pre-release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,9 @@ jobs:
181181
google_zone: europe-west1-b
182182
google_machine_type: e2-highmem-2
183183
google_compute_instance_boot_disk_size: 200
184+
google_compute_instance_boot_disk_type: pd-standard
184185
google_compute_instance_data_disk_size: 250
186+
google_compute_instance_data_disk_type: pd-standard
185187
environment: ${{ matrix.environment }}
186188
runs-on: ubuntu-22.04
187189
needs:
@@ -210,7 +212,10 @@ jobs:
210212
google_zone: ${{ matrix.google_zone }}
211213
google_machine_type: ${{ matrix.google_machine_type }}
212214
google_compute_instance_boot_disk_size: ${{ matrix.google_compute_instance_boot_disk_size }}
215+
google_compute_instance_boot_disk_type: ${{ matrix.google_compute_instance_boot_disk_type }}
213216
google_compute_instance_data_disk_size: ${{ matrix.google_compute_instance_data_disk_size }}
217+
google_compute_instance_data_disk_type: ${{ matrix.google_compute_instance_data_disk_type }}
218+
google_compute_instance_data_disk_snapshot: ${{ vars.GOOGLE_COMPUTE_INSTANCE_DATA_DISK_SNAPSHOT }}
214219
google_application_credentials: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
215220
mithril_api_domain: ${{ matrix.mithril_api_domain }}
216221
mithril_image_id: ${{ env.DOCKER_IMAGE_ID }}

.github/workflows/release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ jobs:
9292
google_zone: europe-west1-b
9393
google_machine_type: e2-highmem-2
9494
google_compute_instance_boot_disk_size: 200
95+
google_compute_instance_boot_disk_type: pd-standard
9596
google_compute_instance_data_disk_size: 250
97+
google_compute_instance_data_disk_type: pd-standard
9698
- environment: release-mainnet
9799
environment_prefix: release
98100
cardano_network: mainnet
@@ -110,7 +112,9 @@ jobs:
110112
google_zone: europe-west1-b
111113
google_machine_type: e2-highmem-8
112114
google_compute_instance_boot_disk_size: 250
115+
google_compute_instance_boot_disk_type: pd-standard
113116
google_compute_instance_data_disk_size: 1000
117+
google_compute_instance_data_disk_type: pd-standard
114118

115119
environment: ${{ matrix.environment }}
116120
runs-on: ubuntu-22.04
@@ -140,7 +144,10 @@ jobs:
140144
google_zone: ${{ matrix.google_zone }}
141145
google_machine_type: ${{ matrix.google_machine_type }}
142146
google_compute_instance_boot_disk_size: ${{ matrix.google_compute_instance_boot_disk_size }}
147+
google_compute_instance_boot_disk_type: ${{ matrix.google_compute_instance_boot_disk_type }}
143148
google_compute_instance_data_disk_size: ${{ matrix.google_compute_instance_data_disk_size }}
149+
google_compute_instance_data_disk_type: ${{ matrix.google_compute_instance_data_disk_type }}
150+
google_compute_instance_data_disk_snapshot: ${{ vars.GOOGLE_COMPUTE_INSTANCE_DATA_DISK_SNAPSHOT }}
144151
google_application_credentials: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
145152
mithril_api_domain: ${{ matrix.mithril_api_domain }}
146153
mithril_image_id: ${{ env.DOCKER_IMAGE_ID }}

.github/workflows/test-deploy-network.yml

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ on:
1515
type: choice
1616
options:
1717
- dev-preview
18+
- dev-mainnet
1819
- testing-mainnet
1920
dry_run:
2021
description: Dry run will not deploy the distribution to the Mithril network
@@ -27,7 +28,7 @@ jobs:
2728
strategy:
2829
fail-fast: false
2930
matrix:
30-
environment: [dev-preview, testing-mainnet]
31+
environment: [dev-preview, dev-mainnet, testing-mainnet]
3132
include:
3233
- environment: dev-preview
3334
environment_prefix: dev
@@ -61,7 +62,36 @@ jobs:
6162
google_zone: europe-west1-b
6263
google_machine_type: e2-highmem-4
6364
google_compute_instance_boot_disk_size: 200
65+
google_compute_instance_boot_disk_type: pd-standard
6466
google_compute_instance_data_disk_size: 250
67+
google_compute_instance_data_disk_type: pd-standard
68+
- environment: dev-mainnet
69+
environment_prefix: dev
70+
cardano_network: mainnet
71+
mithril_use_p2p_network: false
72+
mithril_api_domain: api.mithril.network
73+
mithril_era_reader_adapter_type: bootstrap
74+
mithril_protocol_parameters: |
75+
{
76+
k = 2422
77+
m = 20973
78+
phi_f = 0.20
79+
}
80+
mithril_signers: |
81+
{
82+
"1" = {
83+
type = "unverified-alone",
84+
pool_id = "pool1re8cmjt895tpx8dx2veg0cew5yqtxnt82sll03e433a4ugnh9w7",
85+
}
86+
}
87+
terraform_backend_bucket: hydra-terraform-admin
88+
google_region: europe-west1
89+
google_zone: europe-west1-b
90+
google_machine_type: e2-highmem-8
91+
google_compute_instance_boot_disk_size: 250
92+
google_compute_instance_boot_disk_type: pd-standard
93+
google_compute_instance_data_disk_size: 1000
94+
google_compute_instance_data_disk_type: pd-balanced
6595
- environment: testing-mainnet
6696
environment_prefix: testing
6797
cardano_network: mainnet
@@ -86,7 +116,9 @@ jobs:
86116
google_zone: europe-west1-b
87117
google_machine_type: e2-highmem-8
88118
google_compute_instance_boot_disk_size: 250
119+
google_compute_instance_boot_disk_type: pd-standard
89120
google_compute_instance_data_disk_size: 1000
121+
google_compute_instance_data_disk_type: pd-balanced
90122

91123
environment: ${{ matrix.environment }}
92124
runs-on: ubuntu-22.04
@@ -113,7 +145,10 @@ jobs:
113145
google_zone: ${{ matrix.google_zone }}
114146
google_machine_type: ${{ matrix.google_machine_type }}
115147
google_compute_instance_boot_disk_size: ${{ matrix.google_compute_instance_boot_disk_size }}
148+
google_compute_instance_boot_disk_type: ${{ matrix.google_compute_instance_boot_disk_type }}
116149
google_compute_instance_data_disk_size: ${{ matrix.google_compute_instance_data_disk_size }}
150+
google_compute_instance_data_disk_type: ${{ matrix.google_compute_instance_data_disk_type }}
151+
google_compute_instance_data_disk_snapshot: ${{ vars.GOOGLE_COMPUTE_INSTANCE_DATA_DISK_SNAPSHOT }}
117152
google_application_credentials: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
118153
mithril_use_p2p_network: ${{ matrix.mithril_use_p2p_network }}
119154
mithril_api_domain: ${{ matrix.mithril_api_domain }}

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ As a minor extension, we have adopted a slightly different versioning convention
1515

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

18+
- Support better disk configuration in terraform deployments with the CI/CD workflows.
19+
1820
- **UNSTABLE** Cardano transactions certification:
1921

2022
- Make Cardano transaction signing settings configurable via the CD.

mithril-infra/assets/infra.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.2.26
1+
0.2.27

mithril-infra/main.data-disk.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ resource "null_resource" "mithril_mount_data_disk" {
7070
<<-EOT
7171
set -e
7272
# Format data disk if necessary
73-
if sudo blkid /dev/sdb; then
73+
if sudo blkid /dev/disk/by-id/google-mithril-data-disk; then
7474
echo "Data disk already formatted"
7575
else
7676
# Format data disk

0 commit comments

Comments
 (0)