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

[tf/gcp] add dns support for GCP testnet #8160

Merged
merged 1 commit into from
May 17, 2023
Merged

Conversation

rustielin
Copy link
Contributor

@rustielin rustielin commented May 11, 2023

Description

Add variable var.create_dns_records to control whether or not to create validator and fullnode specific DNS records directly on the first validator. These are only really useful in the case of deploying just a single validator/VFN, since there's 2 records that need to be created (one for validator and one for fullnode). It's simpler to create the record directly in TF rather than using an external dependency like external-dns.

Since we're hosting a bunch of validators and fullnodes for testnets, we'd want each one to have a DNS name. That's a use case for external-dns. So in testnets, set create_dns_records = false, and let external-dns handle the rest

Test Plan

Lint & apply, unblocking new devnet GCP deployment

@rustielin rustielin requested a review from a team as a code owner May 11, 2023 22:38
@rustielin rustielin force-pushed the rustielin/gcp-testnet-dns branch from b1673c1 to 2a17897 Compare May 11, 2023 23:42
@sionescu sionescu requested review from geekflyer and sherry-x May 17, 2023 21:29
@@ -56,9 +56,9 @@ resource "google_dns_record_set" "fullnode" {
}

output "validator_endpoint" {
value = var.zone_name != "" ? "/dns4/${trimsuffix(google_dns_record_set.validator[0].name, ".")}/tcp/${data.kubernetes_service.validator-lb[0].spec[0].port[0].port}" : null
value = var.zone_name != "" && var.create_records ? "/dns4/${trimsuffix(google_dns_record_set.validator[0].name, ".")}/tcp/${data.kubernetes_service.validator-lb[0].spec[0].port[0].port}" : null
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This access path seems error prone if the service isnt present?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea we're kinda making the assumption that the k8s services come up without issue. no way around this imo since we're still coupling infra and application release. At least it will fail with a good error

@@ -29,6 +29,9 @@ module "validator" {
zone_name = var.zone_name # keep empty if you don't want a DNS name
zone_project = var.zone_project
record_name = var.record_name
# do not create the main fullnode and validator DNS records
# instead, rely on external-dns from the testnet-addons
create_records = false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's call this create_dns_records for clarity

@rustielin rustielin force-pushed the rustielin/gcp-testnet-dns branch from 2a17897 to 472083e Compare May 17, 2023 22:11
@rustielin rustielin enabled auto-merge (squash) May 17, 2023 22:11
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

✅ Forge suite land_blocking success on 472083eec5ba6283d461ccbaeea3854581abc7a5

performance benchmark : 6223 TPS, 6374 ms latency, 25600 ms p99 latency,(!) expired 173 out of 2657580 txns
Test Ok

@github-actions
Copy link
Contributor

✅ Forge suite compat success on testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> 472083eec5ba6283d461ccbaeea3854581abc7a5

Compatibility test results for testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> 472083eec5ba6283d461ccbaeea3854581abc7a5 (PR)
1. Check liveness of validators at old version: testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b
compatibility::simple-validator-upgrade::liveness-check : 9760 TPS, 3853 ms latency, 6000 ms p99 latency,no expired txns
2. Upgrading first Validator to new version: 472083eec5ba6283d461ccbaeea3854581abc7a5
compatibility::simple-validator-upgrade::single-validator-upgrade : 5280 TPS, 7229 ms latency, 9400 ms p99 latency,no expired txns
3. Upgrading rest of first batch to new version: 472083eec5ba6283d461ccbaeea3854581abc7a5
compatibility::simple-validator-upgrade::half-validator-upgrade : 5166 TPS, 7618 ms latency, 9900 ms p99 latency,no expired txns
4. upgrading second batch to new version: 472083eec5ba6283d461ccbaeea3854581abc7a5
compatibility::simple-validator-upgrade::rest-validator-upgrade : 8200 TPS, 4667 ms latency, 8200 ms p99 latency,no expired txns
5. check swarm health
Compatibility test for testnet_2d8b1b57553d869190f61df1aaf7f31a8fc19a7b ==> 472083eec5ba6283d461ccbaeea3854581abc7a5 passed
Test Ok

@github-actions
Copy link
Contributor

✅ Forge suite framework_upgrade success on aptos-node-v1.3.0_3fc3d42b6cfe27460004f9a0326451bcda840a60 ==> 472083eec5ba6283d461ccbaeea3854581abc7a5

Compatibility test results for aptos-node-v1.3.0_3fc3d42b6cfe27460004f9a0326451bcda840a60 ==> 472083eec5ba6283d461ccbaeea3854581abc7a5 (PR)
Upgrade the nodes to version: 472083eec5ba6283d461ccbaeea3854581abc7a5
framework_upgrade::framework-upgrade::full-framework-upgrade : 6409 TPS, 6175 ms latency, 11800 ms p99 latency,no expired txns
5. check swarm health
Compatibility test for aptos-node-v1.3.0_3fc3d42b6cfe27460004f9a0326451bcda840a60 ==> 472083eec5ba6283d461ccbaeea3854581abc7a5 passed
Test Ok

@rustielin rustielin merged commit 640e360 into main May 17, 2023
@rustielin rustielin deleted the rustielin/gcp-testnet-dns branch May 17, 2023 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants