diff --git a/playbook/main/main.tf b/playbook/doom-dev/main.tf similarity index 100% rename from playbook/main/main.tf rename to playbook/doom-dev/main.tf diff --git a/playbook/main/protocol-parameters.json b/playbook/doom-dev/protocol-parameters.json similarity index 100% rename from playbook/main/protocol-parameters.json rename to playbook/doom-dev/protocol-parameters.json diff --git a/playbook/infra-dev/main.tf b/playbook/infra-dev/main.tf new file mode 100644 index 0000000..3bdb666 --- /dev/null +++ b/playbook/infra-dev/main.tf @@ -0,0 +1,118 @@ +locals { + namespace = "hydra-doom-dev" +} + +terraform { + backend "s3" { + bucket = "hydra-doom-tf" + key = "clusters/hydra-doom-dev-cluster/tfstate.dev" + region = "us-east-1" + } + required_providers { + kubernetes = { + source = "hashicorp/kubernetes" + version = "2.22.0" + } + } +} + +resource "kubernetes_namespace" "namespace" { + metadata { + name = local.namespace + } +} + +variable "blockfrost_key" { + type = string +} + +variable "dmtr_project_id" { + type = string +} + +variable "dmtr_api_key" { + type = string +} + +variable "dmtr_port_name" { + type = string +} + +variable "external_domain" { + type = string + description = "The domain prefix that will be used to access the hydra node." +} + +variable "operator_image" { + type = string + description = "The image to use for the operator component." +} + +variable "hydra_node_image" { + type = string + description = "The Docker image to use for the Hydra node component." +} + +variable "sidecar_image" { + type = string + description = "The Docker image to use for the sidecar component of the Hydra node." +} + +variable "open_head_image" { + type = string + description = "The Docker image to use for the open head component of the Hydra node." +} + +variable "control_plane_image" { + type = string + description = "The Docker image to use for the control plane component of the Hydra node." +} + +variable "hydra_scripts_tx_id" { + type = string + description = "The transaction ID of the Hydra scripts." +} + +variable "admin_addr" { + type = string + description = "The address of the admin key." +} + +variable "eks_cluster_arn" { + type = string + description = "The ARN of the EKS cluster." +} + +provider "kubernetes" { + config_path = "~/.kube/config" + config_context = var.eks_cluster_arn +} + +provider "helm" { + kubernetes { + config_path = "~/.kube/config" + config_context = var.eks_cluster_arn + } +} + +module "stage2" { + source = "../../bootstrap/stage2" + + admin_key = file("${path.module}/admin.sk") + protocol_parameters = file("${path.module}/protocol-parameters.json") + external_port = 80 + + namespace = local.namespace + external_domain = var.external_domain + operator_image = var.operator_image + hydra_node_image = var.hydra_node_image + sidecar_image = var.sidecar_image + open_head_image = var.open_head_image + control_plane_image = var.control_plane_image + blockfrost_key = var.blockfrost_key + admin_addr = var.admin_addr + dmtr_project_id = var.dmtr_project_id + dmtr_api_key = var.dmtr_api_key + dmtr_port_name = var.dmtr_port_name + hydra_scripts_tx_id = var.hydra_scripts_tx_id +} diff --git a/playbook/infra-dev/protocol-parameters.json b/playbook/infra-dev/protocol-parameters.json new file mode 100644 index 0000000..565eb2a --- /dev/null +++ b/playbook/infra-dev/protocol-parameters.json @@ -0,0 +1,672 @@ +{ + "collateralPercentage": 150, + "committeeMaxTermLength": 146, + "committeeMinSize": 7, + "costModels": { + "PlutusV1": [ + 205665, + 812, + 1, + 1, + 1000, + 571, + 0, + 1, + 1000, + 24177, + 4, + 1, + 1000, + 32, + 117366, + 10475, + 4, + 23000, + 100, + 23000, + 100, + 23000, + 100, + 23000, + 100, + 23000, + 100, + 23000, + 100, + 100, + 100, + 23000, + 100, + 19537, + 32, + 175354, + 32, + 46417, + 4, + 221973, + 511, + 0, + 1, + 89141, + 32, + 497525, + 14068, + 4, + 2, + 196500, + 453240, + 220, + 0, + 1, + 1, + 1000, + 28662, + 4, + 2, + 245000, + 216773, + 62, + 1, + 1060367, + 12586, + 1, + 208512, + 421, + 1, + 187000, + 1000, + 52998, + 1, + 80436, + 32, + 43249, + 32, + 1000, + 32, + 80556, + 1, + 57667, + 4, + 1000, + 10, + 197145, + 156, + 1, + 197145, + 156, + 1, + 204924, + 473, + 1, + 208896, + 511, + 1, + 52467, + 32, + 64832, + 32, + 65493, + 32, + 22558, + 32, + 16563, + 32, + 76511, + 32, + 196500, + 453240, + 220, + 0, + 1, + 1, + 69522, + 11687, + 0, + 1, + 60091, + 32, + 196500, + 453240, + 220, + 0, + 1, + 1, + 196500, + 453240, + 220, + 0, + 1, + 1, + 806990, + 30482, + 4, + 1927926, + 82523, + 4, + 265318, + 0, + 4, + 0, + 85931, + 32, + 205665, + 812, + 1, + 1, + 41182, + 32, + 212342, + 32, + 31220, + 32, + 32696, + 32, + 43357, + 32, + 32247, + 32, + 38314, + 32, + 57996947, + 18975, + 10 + ], + "PlutusV2": [ + 205665, + 812, + 1, + 1, + 1000, + 571, + 0, + 1, + 1000, + 24177, + 4, + 1, + 1000, + 32, + 117366, + 10475, + 4, + 23000, + 100, + 23000, + 100, + 23000, + 100, + 23000, + 100, + 23000, + 100, + 23000, + 100, + 100, + 100, + 23000, + 100, + 19537, + 32, + 175354, + 32, + 46417, + 4, + 221973, + 511, + 0, + 1, + 89141, + 32, + 497525, + 14068, + 4, + 2, + 196500, + 453240, + 220, + 0, + 1, + 1, + 1000, + 28662, + 4, + 2, + 245000, + 216773, + 62, + 1, + 1060367, + 12586, + 1, + 208512, + 421, + 1, + 187000, + 1000, + 52998, + 1, + 80436, + 32, + 43249, + 32, + 1000, + 32, + 80556, + 1, + 57667, + 4, + 1000, + 10, + 197145, + 156, + 1, + 197145, + 156, + 1, + 204924, + 473, + 1, + 208896, + 511, + 1, + 52467, + 32, + 64832, + 32, + 65493, + 32, + 22558, + 32, + 16563, + 32, + 76511, + 32, + 196500, + 453240, + 220, + 0, + 1, + 1, + 69522, + 11687, + 0, + 1, + 60091, + 32, + 196500, + 453240, + 220, + 0, + 1, + 1, + 196500, + 453240, + 220, + 0, + 1, + 1, + 1159724, + 392670, + 0, + 2, + 806990, + 30482, + 4, + 1927926, + 82523, + 4, + 265318, + 0, + 4, + 0, + 85931, + 32, + 205665, + 812, + 1, + 1, + 41182, + 32, + 212342, + 32, + 31220, + 32, + 32696, + 32, + 43357, + 32, + 32247, + 32, + 38314, + 32, + 35892428, + 10, + 57996947, + 18975, + 10, + 38887044, + 32947, + 10, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0 + ], + "PlutusV3": [ + 100788, + 420, + 1, + 1, + 1000, + 173, + 0, + 1, + 1000, + 59957, + 4, + 1, + 11183, + 32, + 201305, + 8356, + 4, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 100, + 100, + 16000, + 100, + 94375, + 32, + 132994, + 32, + 61462, + 4, + 72010, + 178, + 0, + 1, + 22151, + 32, + 91189, + 769, + 4, + 2, + 85848, + 123203, + 7305, + -900, + 1716, + 549, + 57, + 85848, + 0, + 1, + 1, + 1000, + 42921, + 4, + 2, + 24548, + 29498, + 38, + 1, + 898148, + 27279, + 1, + 51775, + 558, + 1, + 39184, + 1000, + 60594, + 1, + 141895, + 32, + 83150, + 32, + 15299, + 32, + 76049, + 1, + 13169, + 4, + 22100, + 10, + 28999, + 74, + 1, + 28999, + 74, + 1, + 43285, + 552, + 1, + 44749, + 541, + 1, + 33852, + 32, + 68246, + 32, + 72362, + 32, + 7243, + 32, + 7391, + 32, + 11546, + 32, + 85848, + 123203, + 7305, + -900, + 1716, + 549, + 57, + 85848, + 0, + 1, + 90434, + 519, + 0, + 1, + 74433, + 32, + 85848, + 123203, + 7305, + -900, + 1716, + 549, + 57, + 85848, + 0, + 1, + 1, + 85848, + 123203, + 7305, + -900, + 1716, + 549, + 57, + 85848, + 0, + 1, + 955506, + 213312, + 0, + 2, + 270652, + 22588, + 4, + 1457325, + 64566, + 4, + 20467, + 1, + 4, + 0, + 141992, + 32, + 100788, + 420, + 1, + 1, + 81663, + 32, + 59498, + 32, + 20142, + 32, + 24588, + 32, + 20744, + 32, + 25933, + 32, + 24623, + 32, + 43053543, + 10, + 53384111, + 14333, + 10, + 43574283, + 26308, + 10, + 16000, + 100, + 16000, + 100, + 962335, + 18, + 2780678, + 6, + 442008, + 1, + 52538055, + 3756, + 18, + 267929, + 18, + 76433006, + 8868, + 18, + 52948122, + 18, + 1995836, + 36, + 3227919, + 12, + 901022, + 1, + 166917843, + 4307, + 36, + 284546, + 36, + 158221314, + 26549, + 36, + 74698472, + 36, + 333849714, + 1, + 254006273, + 72, + 2174038, + 72, + 2261318, + 64571, + 4, + 207616, + 8310, + 4, + 1293828, + 28716, + 63, + 0, + 1, + 1006041, + 43623, + 251, + 0, + 1 + ] + }, + "dRepActivity": 20, + "dRepDeposit": 500000000, + "dRepVotingThresholds": { + "committeeNoConfidence": 0.6, + "committeeNormal": 0.67, + "hardForkInitiation": 0.6, + "motionNoConfidence": 0.67, + "ppEconomicGroup": 0.67, + "ppGovGroup": 0.75, + "ppNetworkGroup": 0.67, + "ppTechnicalGroup": 0.67, + "treasuryWithdrawal": 0.67, + "updateToConstitution": 0.75 + }, + "executionUnitPrices": { + "priceMemory": 0, + "priceSteps": 0 + }, + "govActionDeposit": 100000000000, + "govActionLifetime": 6, + "maxBlockBodySize": 65536, + "maxBlockExecutionUnits": { + "memory": 62000000, + "steps": 40000000000 + }, + "maxBlockHeaderSize": 1100, + "maxCollateralInputs": 3, + "maxTxExecutionUnits": { + "memory": 14000000, + "steps": 10000000000 + }, + "maxTxSize": 16384, + "maxValueSize": 5000, + "minFeeRefScriptCostPerByte": 15, + "minPoolCost": 0, + "monetaryExpansion": 0.1, + "poolPledgeInfluence": 0, + "poolRetireMaxEpoch": 18, + "poolVotingThresholds": { + "committeeNoConfidence": 0.51, + "committeeNormal": 0.51, + "hardForkInitiation": 0.51, + "motionNoConfidence": 0.51, + "ppSecurityGroup": 0.51 + }, + "protocolVersion": { + "major": 9, + "minor": 0 + }, + "stakeAddressDeposit": 0, + "stakePoolDeposit": 0, + "stakePoolTargetNum": 100, + "treasuryCut": 0.1, + "txFeeFixed": 0, + "txFeePerByte": 0, + "utxoCostPerByte": 0 +} + diff --git a/playbook/main/.terraform.lock.hcl b/playbook/main/.terraform.lock.hcl deleted file mode 100644 index 03f41f8..0000000 --- a/playbook/main/.terraform.lock.hcl +++ /dev/null @@ -1,41 +0,0 @@ -# This file is maintained automatically by "terraform init". -# Manual edits may be lost in future updates. - -provider "registry.terraform.io/hashicorp/helm" { - version = "2.16.1" - hashes = [ - "h1:3VdXbh+m09VEAdSguT7Ea2MMnOVPZBYx4sUqvo6NPxo=", - "zh:0003f6719a32aee9afaeeb001687fc0cfc8c2d5f54861298cf1dc5711f3b4e65", - "zh:16cd5bfee09e7bb081b8b4470f31a9af508e52220fd97fd81c6dda725d9422fe", - "zh:51817de8fdc2c2e36785f23fbf4ec022111bd1cf7679498c16ad0ad7471c16db", - "zh:51b95829b2873be40a65809294bffe349e40cfccc3ff6fee0f471d01770e0ebd", - "zh:56b158dde897c47e1460181fc472c3e920aa23db40579fdc2aad333c1456d2dd", - "zh:916641d26c386959eb982e680028aa677b787687ef7c1283241e45620bc8df50", - "zh:aec15ca8605babba77b283f2ca35daca53e006d567e1c3a3daf50497035b820b", - "zh:c2cecf710b87c8f3a4d186da2ea12cf08041f97ae0c6db82649720d6ed929d65", - "zh:dbdd96f17aea25c7db2d516ab8172a5e683c6686c72a1a44173d2fe96319be39", - "zh:de11e180368434a796b1ab6f20fde7554dc74f7800e063b8e4c8ec3a86d0be63", - "zh:f569b65999264a9416862bca5cd2a6177d94ccb0424f3a4ef424428912b9cb3c", - "zh:f827a9c1540d210c56053a2d5d5a6abda924896ffa8eeedc94054cf6d44c5f60", - ] -} - -provider "registry.terraform.io/hashicorp/kubernetes" { - version = "2.22.0" - constraints = "2.22.0" - hashes = [ - "h1:DJr88+52tPK4Ft9xltF6YL+sRz8HWLP2ZOfFiKSB5Dc=", - "zh:1eac662b1f238042b2068401e510f0624efaf51fd6a4dd9c49d710a49d383b61", - "zh:4c35651603493437b0b13e070148a330c034ac62c8967c2de9da6620b26adca4", - "zh:50c0e8654efb46e3a3666c638ca2e0c8aec07f985fbc80f9205bed960386dc9b", - "zh:5f65194ddd6ea7e89b378297d882083a4b84962edb35dd35752f0c7e9d6282a0", - "zh:6fc0c2d65864324edde4db84f528268065df58229fc3ee321626687b0e603637", - "zh:73c58d007aba7f67c0aa9029794e10c2517bec565b7cb57d0f5948ea3f30e407", - "zh:7d6fc9d3c1843baccd2e1fc56317925a2f9df372427d30fcb5052d123adc887a", - "zh:a0ad9eb863b51586ea306c5f2beef74476c96684aed41a3ee99eb4b6d8898d01", - "zh:e218fcfbf4994ff741408a023a9d9eb6c697ce9f63ce5540d3b35226d86c963e", - "zh:f569b65999264a9416862bca5cd2a6177d94ccb0424f3a4ef424428912b9cb3c", - "zh:f95625f317795f0e38cc6293dd31c85863f4e225209d07d1e233c50d9295083c", - "zh:f96e0923a632bc430267fe915794972be873887f5e761ed11451d67202e256c8", - ] -}