Skip to content

Commit 44cdb58

Browse files
committed
Add 'Test Network Deploy' workflow
1 parent 18f2b70 commit 44cdb58

File tree

1 file changed

+104
-0
lines changed

1 file changed

+104
-0
lines changed

.github/workflows/test-deploy.yml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: Test network deploy
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
mithril_image_id:
7+
description: |
8+
Mithril Docker image id of a distribution to deploy. (Must exist in the Docker images registry)
9+
required: true
10+
type: string
11+
environment:
12+
description: |
13+
Mithril network name to deploy the distribution to.
14+
required: true
15+
type: choice
16+
options:
17+
- dev-preview
18+
dry_run:
19+
description: Dry run will not deploy the distribution to the Mithril network
20+
required: true
21+
type: boolean
22+
default: true
23+
24+
jobs:
25+
deploy-testing:
26+
strategy:
27+
fail-fast: false
28+
matrix:
29+
environment: [ dev-preview ]
30+
include:
31+
- environment: dev-preview
32+
environment_prefix: dev
33+
cardano_network: preview
34+
mithril_api_domain: api.mithril.network
35+
mithril_protocol_parameters: |
36+
{
37+
k = 100
38+
m = 60
39+
phi_f = 0.95
40+
}
41+
mithril_signers: |
42+
{
43+
"1" = {
44+
type = "unverified",
45+
pool_id = "pool1vapqexnsx6hvc588yyysxpjecf3k43hcr5mvhmstutuvy085xpa",
46+
},
47+
}
48+
terraform_backend_bucket: hydra-terraform-admin
49+
google_region: europe-west1
50+
google_zone: europe-west1-b
51+
google_machine_type: e2-highmem-2
52+
google_compute_instance_boot_disk_size: 200
53+
google_compute_instance_data_disk_size: 250
54+
55+
environment: ${{ matrix.environment }}
56+
runs-on: ubuntu-22.04
57+
defaults:
58+
run:
59+
working-directory: mithril-infra
60+
steps:
61+
- name: Checkout sources
62+
if: inputs.environment == matrix.environment
63+
uses: actions/checkout@v3
64+
65+
- name: ${{ inputs.dry_run == 'true' && 'Plan' || 'Apply' }} terraform infrastructure
66+
if: inputs.environment == matrix.environment
67+
uses: ./.github/workflows/actions/deploy-terraform-infrastructure
68+
with:
69+
dry_run: ${{ inputs.dry_run }}
70+
terraform_backend_bucket: ${{ matrix.terraform_backend_bucket }}
71+
environment_prefix: ${{ matrix.environment_prefix }}
72+
environment: ${{ matrix.environment }}
73+
cardano_network: ${{ matrix.cardano_network }}
74+
google_region: ${{ matrix.google_region }}
75+
google_zone: ${{ matrix.google_zone }}
76+
google_machine_type: ${{ matrix.google_machine_type }}
77+
google_compute_instance_boot_disk_size: ${{ matrix.google_compute_instance_boot_disk_size }}
78+
google_compute_instance_data_disk_size: ${{ matrix.google_compute_instance_data_disk_size }}
79+
google_application_credentials: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
80+
mithril_api_domain: ${{ matrix.mithril_api_domain }}
81+
mithril_image_id: ${{ inputs.mithril_image_id }}
82+
mithril_protocol_parameters: ${{ toJSON(matrix.mithril_protocol_parameters) }}
83+
mithril_signers: ${{ toJSON(matrix.mithril_signers) }}
84+
mithril_genesis_secret_key: ${{ secrets.GENESIS_SECRET_KEY }}
85+
mithril_genesis_verification_key_url: ${{ vars.GENESIS_VERIFICATION_KEY_URL }}
86+
mithril_era_reader_address_url: ${{ vars.ERA_READER_ADDRESS_URL }}
87+
mithril_era_reader_verification_key_url: ${{ vars.ERA_READER_VERIFICATION_KEY_URL }}
88+
mithril_era_reader_secret_key: ${{ secrets.ERA_READER_SECRET_KEY }}
89+
mithril_aggregator_cdn_cname: ${{ vars.AGGREGATOR_CDN_CNAME }}
90+
mithril_aggregator_snapshot_use_cdn_domain: ${{ vars.AGGREGATOR_USE_CDN_DOMAIN }}
91+
mithril_aggregator_snapshot_compression_algorithm: ${{ vars.AGGREGATOR_SNAPSHOT_COMPRESSION_ALGORITHM }}
92+
mithril_aggregator_zstandard_parameters_level: ${{ vars.AGGREGATOR_SNAPSHOT_ZSTANDARD_LEVEL }}
93+
mithril_aggregator_zstandard_parameters_workers: ${{ vars.AGGREGATOR_SNAPSHOT_ZSTANDARD_WORKERS }}
94+
mithril_aggregator_cexplorer_pools_url: ${{ vars.AGGREGATOR_CEXPLORER_POOLS_URL }}
95+
prometheus_auth_username: ${{ secrets.PROMETHEUS_AUTH_USERNAME }}
96+
prometheus_auth_password: ${{ secrets.PROMETHEUS_AUTH_PASSWORD }}
97+
prometheus_ingest_host: ${{ vars.PROMETHEUS_INGEST_HOST }}
98+
prometheus_ingest_username: ${{ secrets.PROMETHEUS_INGEST_USERNAME }}
99+
prometheus_ingest_password: ${{ secrets.PROMETHEUS_INGEST_PASSWORD }}
100+
loki_auth_username: ${{ secrets.LOKI_AUTH_USERNAME }}
101+
loki_auth_password: ${{ secrets.LOKI_AUTH_PASSWORD }}
102+
loki_ingest_host: ${{ vars.LOKI_INGEST_HOST }}
103+
loki_ingest_username: ${{ secrets.LOKI_INGEST_USERNAME }}
104+
loki_ingest_password: ${{ secrets.LOKI_INGEST_PASSWORD }}

0 commit comments

Comments
 (0)