@@ -58,23 +58,23 @@ inputs:
58
58
mithril_signers :
59
59
description : Mithril signers settings.
60
60
required : true
61
- mithril_genesis_secret_key :
61
+ mithril_genesis_secret_key :
62
62
description : Mithril genesis secret key (only for test networks).
63
63
required : false
64
- mithril_genesis_verification_key_url :
64
+ mithril_genesis_verification_key_url :
65
65
description : Mithril genesis verification key location.
66
66
required : true
67
67
mithril_era_reader_adapter_type :
68
68
description : Mithril era reader adapter type.
69
69
required : false
70
70
default : " cardano-chain"
71
- mithril_era_reader_address_url :
71
+ mithril_era_reader_address_url :
72
72
description : Mithril era reader address location.
73
73
required : true
74
- mithril_era_reader_verification_key_url :
74
+ mithril_era_reader_verification_key_url :
75
75
description : Mithril era reader verification key url.
76
76
required : true
77
- mithril_era_reader_secret_key :
77
+ mithril_era_reader_secret_key :
78
78
description : Mithril era reader secret key (onlye for test networks).
79
79
required : false
80
80
mithril_aggregator_signed_entity_types :
@@ -88,143 +88,143 @@ inputs:
88
88
description : Mithril aggregator CNAME field used for the snapshot CDN.
89
89
required : false
90
90
default : " false"
91
- mithril_aggregator_snapshot_compression_algorithm :
91
+ mithril_aggregator_snapshot_compression_algorithm :
92
92
description : Mithril aggregator snapshot compression algorithm.
93
93
required : false
94
- mithril_aggregator_zstandard_parameters_level :
94
+ mithril_aggregator_zstandard_parameters_level :
95
95
description : Mithril aggregator snapshot zstandard compression level.
96
96
required : false
97
- mithril_aggregator_zstandard_parameters_workers :
97
+ mithril_aggregator_zstandard_parameters_workers :
98
98
description : Mithril aggregator snapshot zstandard number of workers.
99
99
required : false
100
100
mithril_aggregator_cexplorer_pools_url :
101
101
description : CExplorer url of the list of pools that is used by the mithril aggregator.
102
102
required : false
103
- prometheus_auth_username :
103
+ prometheus_auth_username :
104
104
description : Prometheus metrics endpoint username.
105
105
required : false
106
- prometheus_auth_password :
106
+ prometheus_auth_password :
107
107
description : Prometheus metrics endpoint password.
108
108
required : false
109
- prometheus_ingest_host :
109
+ prometheus_ingest_host :
110
110
description : Prometheus ingester endpoint location.
111
111
required : false
112
- prometheus_ingest_username :
112
+ prometheus_ingest_username :
113
113
description : Prometheus ingester endpoint username.
114
114
required : false
115
- prometheus_ingest_password :
115
+ prometheus_ingest_password :
116
116
description : Prometheus ingester endpoint password.
117
117
required : false
118
- loki_auth_username :
118
+ loki_auth_username :
119
119
description : Loki metrics endpoint username.
120
120
required : false
121
- loki_auth_password :
121
+ loki_auth_password :
122
122
description : Loki metrics endpoint password.
123
123
required : false
124
- loki_ingest_host :
124
+ loki_ingest_host :
125
125
description : Loki ingester endpoint location.
126
126
required : false
127
- loki_ingest_username :
127
+ loki_ingest_username :
128
128
description : Loki ingester endpoint username.
129
129
required : false
130
- loki_ingest_password :
130
+ loki_ingest_password :
131
131
description : Loki ingester endpoint password.
132
132
required : false
133
133
134
134
runs :
135
135
using : " composite"
136
136
steps :
137
- - name : Checkout sources
138
- uses : actions/checkout@v3
137
+ - name : Checkout sources
138
+ uses : actions/checkout@v4
139
139
140
- - name : Prepare service account credentials
141
- shell : bash
142
- working-directory : mithril-infra
143
- run : |
144
- echo '${{ inputs.google_application_credentials}}' > ./google-application-credentials.json
145
- chmod u+x ./assets/tools/utils/google-credentials-public-key.sh
146
- ./assets/tools/utils/google-credentials-public-key.sh ./google-application-credentials.json ./assets/ssh_keys curry
140
+ - name : Prepare service account credentials
141
+ shell : bash
142
+ working-directory : mithril-infra
143
+ run : |
144
+ echo '${{ inputs.google_application_credentials}}' > ./google-application-credentials.json
145
+ chmod u+x ./assets/tools/utils/google-credentials-public-key.sh
146
+ ./assets/tools/utils/google-credentials-public-key.sh ./google-application-credentials.json ./assets/ssh_keys curry
147
147
148
- - name : Prepare terraform variables
149
- shell : bash
150
- working-directory : mithril-infra
151
- run : |
152
- cat > ./env.variables.tfvars << EOF
153
- environment_prefix = "${{ inputs.environment_prefix }}"
154
- cardano_network = "${{ inputs.cardano_network }}"
155
- cardano_image_id = "${{ inputs.cardano_node_version }}"
156
- cardano_image_registry = "${{ inputs.cardano_node_docker_registry }}"
157
- google_region = "${{ inputs.google_region }}"
158
- google_zone = "${{ inputs.google_zone }}"
159
- google_machine_type = "${{ inputs.google_machine_type }}"
160
- google_compute_instance_boot_disk_size = "${{ inputs.google_compute_instance_boot_disk_size }}"
161
- google_compute_instance_data_disk_size = "${{ inputs.google_compute_instance_data_disk_size }}"
162
- google_service_credentials_json_file = "./google-application-credentials.json"
163
- mithril_use_p2p_network = "${{ inputs.mithril_use_p2p_network }}"
164
- mithril_api_domain = "${{ inputs.mithril_api_domain }}"
165
- mithril_image_id = "${{ inputs.mithril_image_id }}"
166
- mithril_genesis_verification_key_url = "${{ inputs.mithril_genesis_verification_key_url }}"
167
- mithril_genesis_secret_key = "${{ inputs.mithril_genesis_secret_key }}"
168
- mithril_protocol_parameters = ${{ fromJSON(inputs.mithril_protocol_parameters) }}
169
- mithril_signers = ${{ fromJSON(inputs.mithril_signers) }}
170
- mithril_era_reader_adapter_type = "${{ inputs.mithril_era_reader_adapter_type }}"
171
- mithril_era_reader_address_url = "${{ inputs.mithril_era_reader_address_url }}"
172
- mithril_era_reader_verification_key_url = "${{ inputs.mithril_era_reader_verification_key_url }}"
173
- mithril_era_reader_secret_key = "${{ inputs.mithril_era_reader_secret_key }}"
174
- mithril_aggregator_signed_entity_types = "${{ inputs.mithril_aggregator_signed_entity_types }}"
175
- mithril_aggregator_cdn_cname = "${{ inputs.mithril_aggregator_cdn_cname }}"
176
- mithril_aggregator_snapshot_use_cdn_domain = ${{ inputs.mithril_aggregator_snapshot_use_cdn_domain }}
177
- mithril_aggregator_snapshot_compression_algorithm = "${{ inputs.mithril_aggregator_snapshot_compression_algorithm }}"
178
- mithril_aggregator_zstandard_parameters_level = "${{ inputs.mithril_aggregator_zstandard_parameters_level }}"
179
- mithril_aggregator_zstandard_parameters_workers = "${{ inputs.mithril_aggregator_zstandard_parameters_workers }}"
180
- mithril_aggregator_cexplorer_pools_url = "${{ inputs.mithril_aggregator_cexplorer_pools_url }}"
181
- prometheus_auth_username = "${{ inputs.prometheus_auth_username }}"
182
- prometheus_auth_password = "${{ inputs.prometheus_auth_password }}"
183
- prometheus_ingest_host = "${{ inputs.prometheus_ingest_host }}"
184
- prometheus_ingest_username = "${{ inputs.prometheus_ingest_username }}"
185
- prometheus_ingest_password = "${{ inputs.prometheus_ingest_password }}"
186
- loki_auth_username = "${{ inputs.loki_auth_username }}"
187
- loki_auth_password = "${{ inputs.loki_auth_password }}"
188
- loki_ingest_host = "${{ inputs.loki_ingest_host }}"
189
- loki_ingest_username = "${{ inputs.loki_ingest_username }}"
190
- loki_ingest_password = "${{ inputs.loki_ingest_password }}"
191
- EOF
192
- terraform fmt ./env.variables.tfvars
193
- cat ./env.variables.tfvars
148
+ - name : Prepare terraform variables
149
+ shell : bash
150
+ working-directory : mithril-infra
151
+ run : |
152
+ cat > ./env.variables.tfvars << EOF
153
+ environment_prefix = "${{ inputs.environment_prefix }}"
154
+ cardano_network = "${{ inputs.cardano_network }}"
155
+ cardano_image_id = "${{ inputs.cardano_node_version }}"
156
+ cardano_image_registry = "${{ inputs.cardano_node_docker_registry }}"
157
+ google_region = "${{ inputs.google_region }}"
158
+ google_zone = "${{ inputs.google_zone }}"
159
+ google_machine_type = "${{ inputs.google_machine_type }}"
160
+ google_compute_instance_boot_disk_size = "${{ inputs.google_compute_instance_boot_disk_size }}"
161
+ google_compute_instance_data_disk_size = "${{ inputs.google_compute_instance_data_disk_size }}"
162
+ google_service_credentials_json_file = "./google-application-credentials.json"
163
+ mithril_use_p2p_network = "${{ inputs.mithril_use_p2p_network }}"
164
+ mithril_api_domain = "${{ inputs.mithril_api_domain }}"
165
+ mithril_image_id = "${{ inputs.mithril_image_id }}"
166
+ mithril_genesis_verification_key_url = "${{ inputs.mithril_genesis_verification_key_url }}"
167
+ mithril_genesis_secret_key = "${{ inputs.mithril_genesis_secret_key }}"
168
+ mithril_protocol_parameters = ${{ fromJSON(inputs.mithril_protocol_parameters) }}
169
+ mithril_signers = ${{ fromJSON(inputs.mithril_signers) }}
170
+ mithril_era_reader_adapter_type = "${{ inputs.mithril_era_reader_adapter_type }}"
171
+ mithril_era_reader_address_url = "${{ inputs.mithril_era_reader_address_url }}"
172
+ mithril_era_reader_verification_key_url = "${{ inputs.mithril_era_reader_verification_key_url }}"
173
+ mithril_era_reader_secret_key = "${{ inputs.mithril_era_reader_secret_key }}"
174
+ mithril_aggregator_signed_entity_types = "${{ inputs.mithril_aggregator_signed_entity_types }}"
175
+ mithril_aggregator_cdn_cname = "${{ inputs.mithril_aggregator_cdn_cname }}"
176
+ mithril_aggregator_snapshot_use_cdn_domain = ${{ inputs.mithril_aggregator_snapshot_use_cdn_domain }}
177
+ mithril_aggregator_snapshot_compression_algorithm = "${{ inputs.mithril_aggregator_snapshot_compression_algorithm }}"
178
+ mithril_aggregator_zstandard_parameters_level = "${{ inputs.mithril_aggregator_zstandard_parameters_level }}"
179
+ mithril_aggregator_zstandard_parameters_workers = "${{ inputs.mithril_aggregator_zstandard_parameters_workers }}"
180
+ mithril_aggregator_cexplorer_pools_url = "${{ inputs.mithril_aggregator_cexplorer_pools_url }}"
181
+ prometheus_auth_username = "${{ inputs.prometheus_auth_username }}"
182
+ prometheus_auth_password = "${{ inputs.prometheus_auth_password }}"
183
+ prometheus_ingest_host = "${{ inputs.prometheus_ingest_host }}"
184
+ prometheus_ingest_username = "${{ inputs.prometheus_ingest_username }}"
185
+ prometheus_ingest_password = "${{ inputs.prometheus_ingest_password }}"
186
+ loki_auth_username = "${{ inputs.loki_auth_username }}"
187
+ loki_auth_password = "${{ inputs.loki_auth_password }}"
188
+ loki_ingest_host = "${{ inputs.loki_ingest_host }}"
189
+ loki_ingest_username = "${{ inputs.loki_ingest_username }}"
190
+ loki_ingest_password = "${{ inputs.loki_ingest_password }}"
191
+ EOF
192
+ terraform fmt ./env.variables.tfvars
193
+ cat ./env.variables.tfvars
194
194
195
- - name : Setup Terraform
196
- uses : hashicorp/setup-terraform@v2
197
- with :
198
- terraform_wrapper : false
195
+ - name : Setup Terraform
196
+ uses : hashicorp/setup-terraform@v3
197
+ with :
198
+ terraform_wrapper : false
199
199
200
- - name : Init Terraform
201
- shell : bash
202
- working-directory : mithril-infra
203
- run : |
204
- GOOGLE_APPLICATION_CREDENTIALS=./google-application-credentials.json terraform init -backend-config="bucket=${{ inputs.terraform_backend_bucket }}" -backend-config="prefix=terraform/mithril-${{ inputs.environment }}" -upgrade
200
+ - name : Init Terraform
201
+ shell : bash
202
+ working-directory : mithril-infra
203
+ run : |
204
+ GOOGLE_APPLICATION_CREDENTIALS=./google-application-credentials.json terraform init -backend-config="bucket=${{ inputs.terraform_backend_bucket }}" -backend-config="prefix=terraform/mithril-${{ inputs.environment }}" -upgrade
205
205
206
- - name : Check Terraform
207
- shell : bash
208
- working-directory : mithril-infra
209
- run : terraform fmt -check
206
+ - name : Check Terraform
207
+ shell : bash
208
+ working-directory : mithril-infra
209
+ run : terraform fmt -check
210
210
211
- - name : Terraform Plan
212
- if : inputs.dry_run == 'true'
213
- shell : bash
214
- working-directory : mithril-infra
215
- run : |
216
- GOOGLE_APPLICATION_CREDENTIALS=./google-application-credentials.json terraform plan --var-file=./env.variables.tfvars
211
+ - name : Terraform Plan
212
+ if : inputs.dry_run == 'true'
213
+ shell : bash
214
+ working-directory : mithril-infra
215
+ run : |
216
+ GOOGLE_APPLICATION_CREDENTIALS=./google-application-credentials.json terraform plan --var-file=./env.variables.tfvars
217
217
218
- - name : Terraform Apply
219
- shell : bash
220
- working-directory : mithril-infra
221
- if : inputs.dry_run == 'false'
222
- run : |
223
- GOOGLE_APPLICATION_CREDENTIALS=./google-application-credentials.json terraform apply -auto-approve --var-file=./env.variables.tfvars
218
+ - name : Terraform Apply
219
+ shell : bash
220
+ working-directory : mithril-infra
221
+ if : inputs.dry_run == 'false'
222
+ run : |
223
+ GOOGLE_APPLICATION_CREDENTIALS=./google-application-credentials.json terraform apply -auto-approve --var-file=./env.variables.tfvars
224
224
225
- - name : Cleanup
226
- shell : bash
227
- working-directory : mithril-infra
228
- run : |
229
- rm -f ./env.variables.tfvars
230
- rm -f ./google-application-credentials.json
225
+ - name : Cleanup
226
+ shell : bash
227
+ working-directory : mithril-infra
228
+ run : |
229
+ rm -f ./env.variables.tfvars
230
+ rm -f ./google-application-credentials.json
0 commit comments