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

[CI] Test for terraform in CI #14150

Closed
wants to merge 36 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
e17492c
Add snark pool information to the status metrics query results
tizoc Dec 21, 2022
b646d91
200k ledger for ITN
psteckler Oct 2, 2023
bca873b
Remove unnecessary build of test executive since deb package of it is…
dkijania Oct 4, 2023
95f20b8
remove unnecessary dependency
dkijania Oct 5, 2023
6eed453
added the missing ~
Oct 5, 2023
57f0e41
added CI check for terraform
dkijania Oct 5, 2023
3aba303
finish up renaming
QuiteStochastic Oct 5, 2023
6466e22
dont use infra_id for keys
QuiteStochastic Oct 5, 2023
0d04119
reformat
QuiteStochastic Oct 5, 2023
e04064c
Merge pull request #14281 from MinaProtocol/more_renaming
QuiteStochastic Oct 5, 2023
685662c
Merge pull request #14275 from MinaProtocol/fix/alerts-filter
deepthiskumar Oct 6, 2023
16104c1
Merge branch 'berkeley' into feature/200k-berkeley-ledger
deepthiskumar Oct 6, 2023
0dc9e3a
rename ledger
psteckler Oct 6, 2023
8a3c9cd
Merge pull request #14242 from MinaProtocol/feature/200k-berkeley-ledger
psteckler Oct 6, 2023
1794451
Merge branch 'berkeley' into dkijania/do_not_build_te_again
dkijania Oct 6, 2023
8c5a144
hardcode number of oversized logs
Oct 6, 2023
d731e7a
Merge pull request #14267 from MinaProtocol/dkijania/do_not_build_te_…
dkijania Oct 6, 2023
5e3581e
Improvements to zkapp generator
georgeee Sep 25, 2023
46f3fd3
Change balance allocated per key
georgeee Sep 18, 2023
dec72b4
Refactor generator
georgeee Sep 20, 2023
f01cc1e
Add unit test for generator
georgeee Sep 21, 2023
319b6a2
Use maxAccountUpdates in generator/orchestrator
georgeee Sep 25, 2023
4fda9f2
Support separate payment/zkapp fee parameters in generator
georgeee Sep 26, 2023
2e870c1
Nits
georgeee Oct 4, 2023
9752e23
Merge pull request #14201 from MinaProtocol/georgeee/zkapp-gen-improv…
deepthiskumar Oct 8, 2023
761176b
Merge branch 'berkeley' into hardcode-num-of-oversized-logs
ghost-not-in-the-shell Oct 9, 2023
0f1918f
Merge pull request #14286 from MinaProtocol/hardcode-num-of-oversized…
georgeee Oct 9, 2023
b19d41f
Update account_subtree_height to 6
georgeee Oct 4, 2023
5217a1d
Merge pull request #14310 from MinaProtocol/georgeee/account-subtree-…
deepthiskumar Oct 10, 2023
6ce889c
Merge remote-tracking branch 'origin/berkeley' into georgeee/add-snar…
deepthiskumar Oct 10, 2023
84d74b5
Merge remote-tracking branch 'origin/berkeley' into georgeee/add-snar…
deepthiskumar Oct 10, 2023
19de438
Merge pull request #13572 from MinaProtocol/georgeee/add-snark-pool-s…
deepthiskumar Oct 10, 2023
5ad614e
Raise balances 10x in berkeley ledger
georgeee Oct 10, 2023
57f3e00
Merge pull request #14325 from MinaProtocol/georgeee/berkeley-ledger-10x
deepthiskumar Oct 10, 2023
9652823
added CI check for terraform
dkijania Oct 5, 2023
8e32d18
Merge branch 'dkijania/terraform_ci' of https://github.com/MinaProtoc…
dkijania Oct 19, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion automation/terraform/monitoring/o1-testnet-alerts.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module "o1testnet_alerts" {
alert_timeframe = "1h"
alert_duration = "10m"
pagerduty_alert_filter = "devnet2|mainnet"
berkeley_testnet = "testnet=\"(berkeley|testworld-2-0)\""
berkeley_testnet = "testnet=~\"(berkeley|testworld-2-0)\""
synced_status_filter = "syncStatus=\"SYNCED\""
}

Expand Down
23 changes: 11 additions & 12 deletions automation/terraform/testnets/berkeley-qa/main.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_version = ">= 0.14.0"
backend "s3" {
key = "terraform-berkeley-qa.tfstate"
key = "terraform-berkeley-qa-v2.tfstate"
encrypt = true
region = "us-west-2"
bucket = "o1labs-terraform-state"
Expand All @@ -14,10 +14,10 @@ provider "aws" {
}

provider "google" {
alias = "google-us-east4"
alias = "google-northamerica-northeast1"
project = "o1labs-192920"
region = "us-east4"
zone = "us-east4-b"
region = "northamerica-northeast1"
zone = "northamerica-northeast1-b"
}

provider "google" {
Expand Down Expand Up @@ -60,10 +60,10 @@ variable "plain_node_count" {

locals {
testnet_name = "berkeley-qa"
mina_image = "minaprotocol/mina-daemon:1.3.2beta2-release-2.0.0-6f9d956-focal-berkeley"
mina_archive_image = "minaprotocol/mina-archive:1.3.2beta2-release-2.0.0-6f9d956-focal"
seed_region = "us-central1"
seed_zone = "us-central1-b"
mina_image = "gcr.io/o1labs-192920/mina-daemon:2.0.0rampup3-rampup-264bcac-focal-berkeley"
mina_archive_image = "gcr.io/o1labs-192920/mina-archive:2.0.0rampup3-rampup-264bcac-focal"
seed_region = "northamerica-northeast1"
seed_zone = "northamerica-northeast1-b"

# replace with `make_report_discord_webhook_url = ""` if not in use (will fail if file not present)
make_report_discord_webhook_url = ""
Expand All @@ -81,9 +81,9 @@ module "berkeley" {

artifact_path = abspath(path.module)

cluster_name = "coda-infra-central1"
cluster_region = "us-central1"
k8s_context = "gke_o1labs-192920_us-central1_coda-infra-central1"
cluster_name = "mina-infra-canada"
cluster_region = "northamerica-northeast1"
k8s_context = "gke_o1labs-192920_northamerica-northeast1_mina-infra-canada"
testnet_name = local.testnet_name

mina_image = local.mina_image
Expand Down Expand Up @@ -181,4 +181,3 @@ module "berkeley" {
seed_peers_url = "https://storage.googleapis.com/seed-lists/berkeley-qa_seeds.txt"

}

6 changes: 3 additions & 3 deletions automation/terraform/testnets/berkeley/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ variable "plain_node_count" {

locals {
testnet_name = "berkeley"
mina_image = "minaprotocol/mina-daemon:focal-berkeley-latest" #"minaprotocol/mina-daemon:1.3.2beta2-release-2.0.0-6f9d956-focal-berkeley"
mina_archive_image = "minaprotocol/mina-archive:focal-latest" #"minaprotocol/mina-archive:1.3.2beta2-release-2.0.0-6f9d956-focal"
mina_image = "gcr.io/o1labs-192920/mina-daemon:2.0.0rampup1-rampup-b1facec-focal-berkeley" #"minaprotocol/mina-daemon:1.3.2beta2-release-2.0.0-6f9d956-focal-berkeley"
mina_archive_image = "gcr.io/o1labs-192920/mina-archive:2.0.0rampup1-rampup-b1facec-focal" #"minaprotocol/mina-archive:1.3.2beta2-release-2.0.0-6f9d956-focal"
seed_region = "us-central1"
seed_zone = "us-central1-b"

Expand Down Expand Up @@ -96,7 +96,7 @@ module "berkeley" {

archive_node_count = 3
mina_archive_schema = "create_schema.sql"
mina_archive_schema_aux_files = ["https://raw.githubusercontent.com/MinaProtocol/mina/8468f29424fa5e70cfedf69ee281f4fa24037dfe/src/app/archive/create_schema.sql", "https://raw.githubusercontent.com/MinaProtocol/mina/8468f29424fa5e70cfedf69ee281f4fa24037dfe/src/app/archive/zkapp_tables.sql"]
mina_archive_schema_aux_files = ["https://raw.githubusercontent.com/MinaProtocol/mina/b1facecde934ce3969771c34962b878d75321ca7/src/app/archive/create_schema.sql", "https://raw.githubusercontent.com/MinaProtocol/mina/b1facecde934ce3969771c34962b878d75321ca7/src/app/archive/zkapp_tables.sql"]

archive_configs = [
{
Expand Down
140 changes: 79 additions & 61 deletions automation/terraform/testnets/ci-net/main.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
terraform {
required_version = ">= 0.14.0"
backend "s3" {
key = "ci-net.tfstate"
key = "terraform-nightly.tfstate"
encrypt = true
region = "us-west-2"
bucket = "o1labs-terraform-state"
Expand All @@ -13,76 +13,72 @@ provider "aws" {
region = "us-west-2"
}

variable "mina_image" {
type = string

description = "Mina daemon image to use in provisioning a ci-net"
default = "gcr.io/o1labs-192920/coda-daemon:0.2.11-develop"
}

variable "mina_archive_image" {
type = string

description = "Mina archive node image to use in provisioning a ci-net"
default = "gcr.io/o1labs-192920/coda-archive:0.2.11-develop"
provider "google" {
alias = "google-us-east4"
project = "o1labs-192920"
region = "us-east4"
zone = "us-east4-b"
}

variable "whale_count" {
type = number
default = 1
}
type = number

variable "fish_count" {
type = number
default = 1
description = "Number of online whales for the network to run"
default = 1
}

variable "archive_count" {
type = number
default = 1
}
variable "fish_count" {
type = number

variable "snark_worker_count" {
type = number
default = 1
description = "Number of online fish for the network to run"
default = 1
}

variable "ci_cluster_region" {
type = string
default = "us-west1"
variable "seed_count" {
default = 3
}

variable "ci_k8s_ctx" {
type = string
default = "gke_o1labs-192920_us-west1_mina-integration-west1"
variable "plain_node_count" {
default = 1
}

variable "ci_artifact_path" {
type = string
default = "/tmp"
}

locals {
seed_region = "us-west1"
seed_zone = "us-west1-b"
testnet_name = "ci-net"
seed_region = "us-east4"
seed_zone = "us-east4-b"
seed_discovery_keypairs = [
"CAESQBEHe2zCcQDHcSaeIydGggamzmTapdCS8SP0hb5FWvYhe9XEygmlUGV4zNu2P8zAIba4X84Gm4usQFLamjRywA8=,CAESIHvVxMoJpVBleMzbtj/MwCG2uF/OBpuLrEBS2po0csAP,12D3KooWJ9mNdbUXUpUNeMnejRumKzmQF15YeWwAPAhTAWB6dhiv",
"CAESQO+8qvMqTaQEX9uh4NnNoyOy4Xwv3U80jAsWweQ1J37AVgx7kgs4pPVSBzlP7NDANP1qvSvEPOTh2atbMMUO8EQ=,CAESIFYMe5ILOKT1Ugc5T+zQwDT9ar0rxDzk4dmrWzDFDvBE,12D3KooWFcGGeUmbmCNq51NBdGvCWjiyefdNZbDXADMK5CDwNRm5"]

mina_image = "gcr.io/o1labs-192920/mina-daemon:2.0.0rampup3-rampup-264bcac-focal-berkeley"
mina_archive_image = "gcr.io/o1labs-192920/mina-archive:2.0.0rampup3-rampup-264bcac-focal"

# replace with `make_report_discord_webhook_url = ""` if not in use (will fail if file not present)
make_report_discord_webhook_url = ""

# replace with `make_report_accounts = ""` if not in use (will fail if file not present)
# make_report_accounts = <<EOT
# ${file("../../../${local.testnet_name}-accounts.csv")}
# EOT
make_report_accounts = ""
}


module "ci_testnet" {
providers = { google.gke = google.google-us-east4 }
source = "../../modules/o1-testnet"

artifact_path = var.ci_artifact_path
artifact_path = abspath(path.module)

# TODO: remove obsolete cluster_name var + cluster region
cluster_name = "mina-integration-west1"
cluster_region = var.ci_cluster_region
k8s_context = var.ci_k8s_ctx
testnet_name = "ci-net-${substr(sha256(terraform.workspace), 0, 7)}"
cluster_name = "coda-infra-east4"
cluster_region = "us-east4"
k8s_context = "gke_o1labs-192920_us-east4_coda-infra-east4"
testnet_name = local.testnet_name

mina_image = var.mina_image
mina_archive_image = var.mina_archive_image
mina_agent_image = "codaprotocol/coda-user-agent:0.1.8"
mina_bots_image = "codaprotocol/bots:1.0.0"
mina_image = local.mina_image
mina_archive_image = local.mina_archive_image
mina_agent_image = "codaprotocol/coda-user-agent:0.1.5"
mina_bots_image = "codaprotocol/coda-bots:0.0.13-beta-1"
mina_points_image = "codaprotocol/coda-points-hack:32b.4"

mina_faucet_amount = "10000000000"
Expand All @@ -94,8 +90,18 @@ module "ci_testnet" {
agent_max_tx = "0.0015"
agent_send_every_mins = "1"

archive_node_count = var.archive_count
mina_archive_schema = "https://raw.githubusercontent.com/MinaProtocol/mina/develop/src/app/archive/create_schema.sql"
archive_node_count = 1
mina_archive_schema = "create_schema.sql"
mina_archive_schema_aux_files = ["https://raw.githubusercontent.com/MinaProtocol/mina/berkeley/src/app/archive/create_schema.sql", "https://raw.githubusercontent.com/MinaProtocol/mina/berkeley/src/app/archive/zkapp_tables.sql"]

archive_configs = [
{
name = "archive-1"
enableLocalDaemon = true
enablePostgresDB = true
postgresHost = "archive-1-postgresql"
},
]

seed_zone = local.seed_zone
seed_region = local.seed_region
Expand All @@ -106,27 +112,39 @@ module "ci_testnet" {
block_producer_key_pass = "naughty blue worm"
block_producer_starting_host_port = 10501

worker_cpu_request = 4
cpu_request = 12
worker_mem_request = "6Gi"
mem_request = "16Gi"

snark_coordinators = [
{
snark_worker_replicas = var.snark_worker_count
snark_worker_fee = "0.025"
snark_worker_public_key = "B62qk4nuKn2U5kb4dnZiUwXeRNtP1LncekdAKddnd1Ze8cWZnjWpmMU"
snark_coordinators_host_port = 10401
snark_worker_replicas = 1
snark_worker_fee = "0.025"
snark_worker_public_key = "B62qk4nuKn2U5kb4dnZiUwXeRNtP1LncekdAKddnd1Ze8cWZnjWpmMU"
snark_coordinators_host_port = 10401
}
]

whales= [
for i in range(var.whale_count):{
whales = [
for i in range(var.whale_count) : {
duplicates = 1
}
]
fishes= [
for i in range(var.fish_count):{

fishes = [
for i in range(var.fish_count) : {
duplicates = 1
}
]

plain_node_count = 0

upload_blocks_to_gcloud = true
restart_nodes = false
restart_nodes_every_mins = "60"
make_reports = true
make_report_every_mins = "5"
make_report_discord_webhook_url = local.make_report_discord_webhook_url
make_report_accounts = local.make_report_accounts

}
2 changes: 1 addition & 1 deletion automation/terraform/testnets/devnet2/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ module "testnet_east" {
mina_agent_image = "codaprotocol/coda-user-agent:0.1.8"
mina_bots_image = "codaprotocol/coda-bots:0.0.13-beta-1"
mina_points_image = "codaprotocol/coda-points-hack:32b.4"
watchdog_image = "gcr.io/o1labs-192920/watchdog:0.4.3"
watchdog_image = "gcr.io/o1labs-192920/watchdog:0.4.13"

archive_node_count = 3
mina_archive_schema = "https://raw.githubusercontent.com/MinaProtocol/mina/fd3980820fb82c7355af49462ffefe6718800b77/src/app/archive/create_schema.sql"
Expand Down
Loading