-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
preserving initial nuki before upgrade
- Loading branch information
Showing
13 changed files
with
216 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,28 @@ | ||
locals { | ||
###################### | ||
# Deployment Variables | ||
###################### | ||
namespace = "polkadot" | ||
stack = "api" | ||
provider = "aws" | ||
network_name = "kusama" | ||
environment = "dev" | ||
region = "eu-north-1" | ||
|
||
deployment_map = { | ||
namespace = local.namespace | ||
stack = local.stack | ||
provider = local.provider | ||
network_name = local.network_name | ||
environment = local.environment | ||
region = local.region | ||
} | ||
|
||
remote_state_region = "us-east-1" | ||
|
||
################### | ||
# Environment Logic | ||
################### | ||
env_vars = { | ||
dev = {} | ||
test = {} | ||
stage = {} | ||
prod = {} | ||
}[local.environment] | ||
|
||
deployment_id_label_order = ["namespace", "stack", "network_name", "environment","provider", "region"] | ||
deployment_id = join(".", [ for i in local.deployment_id_label_order : lookup(local.label_map, i)]) | ||
deployment_vars = yamldecode(file("${find_in_parent_folders("deployments")}/${local.deployment_id}.yaml")) | ||
run = yamldecode(file(find_in_parent_folders("run.yaml"))) | ||
settings = yamldecode(file(find_in_parent_folders("settings.yaml"))) | ||
|
||
# Imports | ||
versions = yamldecode(file("${get_parent_terragrunt_dir()}/versions.yaml"))[local.environment] | ||
versions = yamldecode(file("versions.yaml"))[local.run.environment] | ||
secrets = yamldecode(file(find_in_parent_folders("secrets.yaml"))) | ||
deployment_id_order = local.settings.deployment_id_order | ||
deployment_id = join(".", [ for i in local.deployment_id_order : lookup(local.run, i)]) | ||
deployment_vars = yamldecode(file("${find_in_parent_folders("deployments")}/${local.deployment_id}.yaml")) | ||
|
||
################### | ||
# Label Boilerplate | ||
################### | ||
label_map = { | ||
namespace = local.namespace | ||
stack = local.stack | ||
provider = local.provider | ||
network_name = local.network_name | ||
environment = local.environment | ||
region = local.region | ||
global = "global" | ||
} | ||
|
||
remote_state_path_label_order = ["namespace", "stack", "provider", "network_name", "environment", "region"] | ||
remote_state_path = join("/", [ for i in local.remote_state_path_label_order : lookup(local.label_map, i)]) | ||
|
||
global_remote_state_path_label_order = ["namespace", "stack", "provider", "network_name", "environment", "global"] | ||
global_remote_state_path = join("/", [ for i in local.global_remote_state_path_label_order : lookup(local.label_map, i)]) | ||
|
||
id_label_order = ["namespace", "stack", "network_name", "environment"] | ||
id = join("-", [ for i in local.id_label_order : lookup(local.label_map, i)]) | ||
|
||
name_label_order = ["stack", "network_name"] | ||
name = join("", [ for i in local.name_label_order : title(lookup(local.label_map, i))]) | ||
|
||
tags = { for t in local.remote_state_path_label_order : t => lookup(local.label_map, t) } | ||
# Labels | ||
id_label_order = local.settings.id_label_order | ||
id = join("-", [ for i in local.id_label_order : lookup(local.run, i)]) | ||
name_label_order = local.settings.name_label_order | ||
name = join("", [ for i in local.name_label_order : title(lookup(local.run, i))]) | ||
tags = { for t in local.remote_state_path_order : t => lookup(local.run, t) } | ||
|
||
# Remote State | ||
remote_state_path_order = local.settings.remote_state_path_order | ||
remote_state_path = join("/", [ for i in local.remote_state_path_order : lookup(local.run, i)]) | ||
|
||
// versions = { | ||
// dev = { | ||
// asg = "master" | ||
// } | ||
// } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Stack | ||
stack: | ||
type: select | ||
message: What type of stack do you want to run? | ||
choices: | ||
- validator-simple: Super simple validator | ||
- validator: Advanced validator | ||
- api-simple: Super simple private API endpoint | ||
- api: Advanced API clusters | ||
- monitor: Network monitoring tools | ||
|
||
# Namespace | ||
namespace: | ||
type: input | ||
message: What do you want to call your namespace? | ||
default: harmony | ||
|
||
# Network Name | ||
network_name: | ||
type: select | ||
message: What network do you want to run on? | ||
choices: | ||
- testnet: Testnet | ||
- mainnet: Mainnet | ||
|
||
# Environment | ||
environment: | ||
type: select | ||
message: What type of environment do you want to create? | ||
choices: | ||
- dev | ||
- test | ||
- stage | ||
- prod | ||
|
||
# Deployment ID | ||
deployment_id: | ||
type: input | ||
message: What deployment id do you want to make? | ||
default: 1 | ||
|
||
stack_call_: | ||
type: nukikata | ||
chdir: "{{ nuki.stack }}" | ||
existing_context: "{{ nuki }}" | ||
|
||
# SSH Profiles | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace: "polkadot" | ||
network_name: "kusama" | ||
environment: "dev" | ||
provider: "aws" | ||
region: "eu-north-1" | ||
stack: "api" | ||
deployment_id: 1 |
Oops, something went wrong.