From a8237c88b1ed996254b2366e391e4131b8881572 Mon Sep 17 00:00:00 2001 From: Eric Fritz Date: Mon, 27 Sep 2021 12:53:38 -0500 Subject: [PATCH 1/8] Squash commits. --- .buildkite/pipeline.yaml | 7 +++++++ .buildkite/shellcheck.sh | 9 +++++++++ .buildkite/shfmt.sh | 7 +++++++ .buildkite/terraform-validate.sh | 18 ++++++++++++++++++ .editorconfig | 26 ++++++++++++++++++++++++++ .vscode/extensions.json | 5 +++++ .vscode/settings.json | 5 +++-- 7 files changed, 75 insertions(+), 2 deletions(-) create mode 100644 .buildkite/pipeline.yaml create mode 100755 .buildkite/shellcheck.sh create mode 100755 .buildkite/shfmt.sh create mode 100755 .buildkite/terraform-validate.sh create mode 100644 .editorconfig create mode 100644 .vscode/extensions.json diff --git a/.buildkite/pipeline.yaml b/.buildkite/pipeline.yaml new file mode 100644 index 0000000..65f3960 --- /dev/null +++ b/.buildkite/pipeline.yaml @@ -0,0 +1,7 @@ +steps: + - label: ":lipstick:" + command: .buildkite/shfmt.sh + - label: ":lint-roller:" + command: .buildkite/shellcheck.sh + - label: ":terraform:" + command: .buildkite/terraform-validate.sh diff --git a/.buildkite/shellcheck.sh b/.buildkite/shellcheck.sh new file mode 100755 index 0000000..773c0b9 --- /dev/null +++ b/.buildkite/shellcheck.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -ex + +cd "$(dirname "${BASH_SOURCE[0]}")"/.. + +SHELL_SCRIPTS=() +while IFS='' read -r line; do SHELL_SCRIPTS+=("$line"); done < <(find . -type f -name '*.sh') +shellcheck --external-sources --source-path="SCRIPTDIR" --color=always "${SHELL_SCRIPTS[@]}" diff --git a/.buildkite/shfmt.sh b/.buildkite/shfmt.sh new file mode 100755 index 0000000..27c8b5e --- /dev/null +++ b/.buildkite/shfmt.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -ex + +cd "$(dirname "${BASH_SOURCE[0]}")"/.. + +shfmt -i 2 -ci -d . diff --git a/.buildkite/terraform-validate.sh b/.buildkite/terraform-validate.sh new file mode 100755 index 0000000..d84217c --- /dev/null +++ b/.buildkite/terraform-validate.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +set -ex + +cd "$(dirname "${BASH_SOURCE[0]}")"/.. + +MODULES=( + modules/docker-mirror + modules/executors + modules/networking +) + +for module in "${MODULES[@]}"; do + pushd "${module}" + terraform init + terraform validate . + popd +done diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..82fd49a --- /dev/null +++ b/.editorconfig @@ -0,0 +1,26 @@ +root = true + +[*] +insert_final_newline = true +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +indent_style = space +indent_size = 4 + +[*.go] +indent_style = tab + +[{*.json,*.yml,*.yaml,*.md}] +indent_size = 2 + +[*.md] +trim_trailing_whitespace = false + +[{*.sh,*.bash}] +indent_style = space +indent_size = 2 +switch_case_indent = true + +[**/node_modules/**] +ignore = true diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..ce8f382 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "EditorConfig.editorconfig" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 63ab609..dd4063d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,4 @@ { - "editor.formatOnSave": true, "files.exclude": { "**/.git": true, "**/.svn": true, @@ -8,5 +7,7 @@ "**/.DS_Store": true, "**/Thumbs.db": true, "plan": true - } + }, + "editor.formatOnSave": true, + "shellformat.flag": "-i 2 -ci", } From c54d92973a28d28d04e34233db604a89d6c702e1 Mon Sep 17 00:00:00 2001 From: Eric Fritz Date: Fri, 1 Oct 2021 12:33:41 -0500 Subject: [PATCH 2/8] add default region --- .buildkite/terraform-validate.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.buildkite/terraform-validate.sh b/.buildkite/terraform-validate.sh index d84217c..2806ced 100755 --- a/.buildkite/terraform-validate.sh +++ b/.buildkite/terraform-validate.sh @@ -5,11 +5,15 @@ set -ex cd "$(dirname "${BASH_SOURCE[0]}")"/.. MODULES=( - modules/docker-mirror - modules/executors - modules/networking + ./modules/networking + ./modules/docker-mirror + ./modules/executors ) +# Ensure terraform validate has a valid region +# https://github.com/hashicorp/terraform/issues/21408#issuecomment-495746582 +export AWS_DEFAULT_REGION=us-east-2 + for module in "${MODULES[@]}"; do pushd "${module}" terraform init From 1803f1f180992952f8bcf342cc42346f41d7f73f Mon Sep 17 00:00:00 2001 From: Eric Fritz Date: Fri, 1 Oct 2021 12:46:17 -0500 Subject: [PATCH 3/8] Setup modules. --- .buildkite/terraform-validate.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.buildkite/terraform-validate.sh b/.buildkite/terraform-validate.sh index 2806ced..f265848 100755 --- a/.buildkite/terraform-validate.sh +++ b/.buildkite/terraform-validate.sh @@ -8,6 +8,7 @@ MODULES=( ./modules/networking ./modules/docker-mirror ./modules/executors + . ) # Ensure terraform validate has a valid region From a360cb914777ae267e9b9e81e479f4ff79f955ff Mon Sep 17 00:00:00 2001 From: Eric Fritz Date: Fri, 1 Oct 2021 12:53:55 -0500 Subject: [PATCH 4/8] Fix module paths. --- main.tf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.tf b/main.tf index 2754e4a..209726c 100644 --- a/main.tf +++ b/main.tf @@ -19,12 +19,12 @@ data "aws_ami" "ubuntu" { } module "aws-networking" { - source = "./modules/networking/aws" + source = "./modules/networking" availability_zone = local.availability_zone } module "aws-docker-mirror" { - source = "./modules/docker-mirror/aws" + source = "./modules/docker-mirror" availability_zone = local.availability_zone vpc_id = module.aws-networking.vpc_id @@ -34,7 +34,7 @@ module "aws-docker-mirror" { } module "aws-executor" { - source = "./modules/executors/aws" + source = "./modules/executors" vpc_id = module.aws-networking.vpc_id subnet_id = module.aws-networking.subnet_id From f57709dbfd295322e09d32e17c7290293b69fc09 Mon Sep 17 00:00:00 2001 From: Eric Fritz Date: Fri, 1 Oct 2021 13:01:32 -0500 Subject: [PATCH 5/8] Yey. --- foo | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 foo diff --git a/foo b/foo new file mode 100644 index 0000000..e69de29 From 21684f2c919bf4112559323ae571283bc6076b21 Mon Sep 17 00:00:00 2001 From: Eric Fritz Date: Fri, 1 Oct 2021 13:01:42 -0500 Subject: [PATCH 6/8] eYy. --- foo | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 foo diff --git a/foo b/foo deleted file mode 100644 index e69de29..0000000 From 3cb5bc2d0b98df13ccf21457bb6a7596a5f06786 Mon Sep 17 00:00:00 2001 From: Eric Fritz Date: Fri, 1 Oct 2021 13:50:49 -0500 Subject: [PATCH 7/8] Clean up vars. --- .buildkite/pipeline.yaml | 2 + .buildkite/terraform-fmt.sh | 7 ++ main.tf | 51 +++++--- modules/docker-mirror/variables.tf | 4 +- modules/executors/main.tf | 24 ++-- modules/executors/variables.tf | 98 ++++++++-------- providers.tf | 2 +- variables.tf | 182 ++++++++++++++++++++++++++++- 8 files changed, 289 insertions(+), 81 deletions(-) create mode 100755 .buildkite/terraform-fmt.sh diff --git a/.buildkite/pipeline.yaml b/.buildkite/pipeline.yaml index 65f3960..ad278cd 100644 --- a/.buildkite/pipeline.yaml +++ b/.buildkite/pipeline.yaml @@ -1,6 +1,8 @@ steps: - label: ":lipstick:" command: .buildkite/shfmt.sh + - label: ":lipstick:" + command: .buildkite/terraform-fmt.sh - label: ":lint-roller:" command: .buildkite/shellcheck.sh - label: ":terraform:" diff --git a/.buildkite/terraform-fmt.sh b/.buildkite/terraform-fmt.sh new file mode 100755 index 0000000..8b62e2f --- /dev/null +++ b/.buildkite/terraform-fmt.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +set -ex + +cd "$(dirname "${BASH_SOURCE[0]}")"/.. + +terraform fmt -check -recursive . diff --git a/main.tf b/main.tf index 209726c..c20ae34 100644 --- a/main.tf +++ b/main.tf @@ -1,8 +1,3 @@ -locals { - availability_zone = "us-west-2a" - docker_mirror_static_ip = "10.0.1.4" -} - # Datasource to fetch the latest AMI of Ubuntu 20.04 for use in the docker mirror. data "aws_ami" "ubuntu" { most_recent = true @@ -19,23 +14,51 @@ data "aws_ami" "ubuntu" { } module "aws-networking" { - source = "./modules/networking" - availability_zone = local.availability_zone + source = "./modules/networking" + + availability_zone = var.availability_zone } module "aws-docker-mirror" { source = "./modules/docker-mirror" - availability_zone = local.availability_zone - vpc_id = module.aws-networking.vpc_id - subnet_id = module.aws-networking.subnet_id - machine_ami = data.aws_ami.ubuntu.id - static_ip = local.docker_mirror_static_ip + vpc_id = module.aws-networking.vpc_id + subnet_id = module.aws-networking.subnet_id + machine_ami = coalesce(var.docker_mirror_machine_ami, data.aws_ami.ubuntu.id) + machine_type = var.docker_mirror_machine_type + boot_disk_size = var.docker_mirror_boot_disk_size + static_ip = var.docker_mirror_static_ip + ssh_access_cidr_range = var.docker_mirror_ssh_access_cidr_range + http_access_cidr_range = var.docker_mirror_http_access_cidr_range } module "aws-executor" { source = "./modules/executors" - vpc_id = module.aws-networking.vpc_id - subnet_id = module.aws-networking.subnet_id + vpc_id = module.aws-networking.vpc_id + subnet_id = module.aws-networking.subnet_id + resource_prefix = var.executor_resource_prefix + machine_image = var.executor_machine_image + machine_type = var.executor_machine_type + boot_disk_size = var.executor_boot_disk_size + preemptible_machines = var.executor_preemptible_machines + instance_tag = var.executor_instance_tag + ssh_access_cidr_range = var.executor_ssh_access_cidr_range + http_access_cidr_range = var.executor_http_access_cidr_range + sourcegraph_external_url = var.executor_sourcegraph_external_url + sourcegraph_executor_proxy_username = var.executor_sourcegraph_executor_proxy_username + sourcegraph_executor_proxy_password = var.executor_sourcegraph_executor_proxy_password + queue_name = var.executor_queue_name + maximum_runtime_per_job = var.executor_maximum_runtime_per_job + maximum_num_jobs = var.executor_maximum_num_jobs + num_total_jobs = var.executor_num_total_jobs + max_active_time = var.executor_max_active_time + firecracker_num_cpus = var.executor_firecracker_num_cpus + firecracker_memory = var.executor_firecracker_memory + firecracker_disk_space = var.executor_firecracker_disk_space + min_replicas = var.executor_min_replicas + max_replicas = var.executor_max_replicas + jobs_per_instance_scaling = var.executor_jobs_per_instance_scaling + metrics_environment_label = var.executor_metrics_environment_label + docker_registry_mirror = var.executor_docker_registry_mirror } diff --git a/modules/docker-mirror/variables.tf b/modules/docker-mirror/variables.tf index c8a546d..a5ea278 100644 --- a/modules/docker-mirror/variables.tf +++ b/modules/docker-mirror/variables.tf @@ -33,11 +33,11 @@ variable "static_ip" { variable "ssh_access_cidr_range" { type = string default = "0.0.0.0/0" - description = "CIDR range from where SSH access to the EC2 instance is acceptable from." + description = "CIDR range from where SSH access to the EC2 instance is acceptable." } variable "http_access_cidr_range" { type = string default = "10.0.0.0/16" - description = "CIDR range from where HTTP access to the Docker registry is acceptable from." + description = "CIDR range from where HTTP access to the Docker registry is acceptable." } diff --git a/modules/executors/main.tf b/modules/executors/main.tf index 7fa1578..dce8293 100644 --- a/modules/executors/main.tf +++ b/modules/executors/main.tf @@ -125,18 +125,18 @@ resource "aws_launch_template" "executor" { # Render the startup script using all variables defined. user_data = base64encode(templatefile("${path.module}/startup-script.sh.tpl", { environment_variables = { - "EXECUTOR_DOCKER_REGISTRY_MIRROR" = var.executor_docker_registry_mirror + "EXECUTOR_DOCKER_REGISTRY_MIRROR" = var.docker_registry_mirror "SOURCEGRAPH_EXTERNAL_URL" = var.sourcegraph_external_url "SOURCEGRAPH_EXECUTOR_PROXY_USERNAME" = var.sourcegraph_executor_proxy_username "SOURCEGRAPH_EXECUTOR_PROXY_PASSWORD" = var.sourcegraph_executor_proxy_password - "EXECUTOR_MAXIMUM_NUM_JOBS" = var.executor_maximum_num_jobs - "EXECUTOR_FIRECRACKER_NUM_CPUS" = var.executor_firecracker_num_cpus - "EXECUTOR_FIRECRACKER_MEMORY" = var.executor_firecracker_memory - "EXECUTOR_FIRECRACKER_DISK_SPACE" = var.executor_firecracker_disk_space - "EXECUTOR_QUEUE_NAME" = var.executor_queue_name - "EXECUTOR_MAXIMUM_RUNTIME_PER_JOB" = var.executor_maximum_runtime_per_job - "EXECUTOR_NUM_TOTAL_JOBS" = var.executor_num_total_jobs - "EXECUTOR_MAX_ACTIVE_TIME" = var.executor_max_active_time + "EXECUTOR_MAXIMUM_NUM_JOBS" = var.maximum_num_jobs + "EXECUTOR_FIRECRACKER_NUM_CPUS" = var.firecracker_num_cpus + "EXECUTOR_FIRECRACKER_MEMORY" = var.firecracker_memory + "EXECUTOR_FIRECRACKER_DISK_SPACE" = var.firecracker_disk_space + "EXECUTOR_QUEUE_NAME" = var.queue_name + "EXECUTOR_MAXIMUM_RUNTIME_PER_JOB" = var.maximum_runtime_per_job + "EXECUTOR_NUM_TOTAL_JOBS" = var.num_total_jobs + "EXECUTOR_MAX_ACTIVE_TIME" = var.max_active_time } })) @@ -172,7 +172,7 @@ resource "aws_autoscaling_group" "autoscaler" { # Used for metrics scraping discovery. tag { key = "executor_tag" - value = var.executor_tag + value = var.instance_tag propagate_at_launch = true } @@ -206,7 +206,7 @@ resource "aws_cloudwatch_metric_alarm" "scale_out_alarm" { dimensions = { "environment" = var.metrics_environment_label - "queueName" = var.executor_queue_name + "queueName" = var.queue_name } } } @@ -269,7 +269,7 @@ resource "aws_cloudwatch_metric_alarm" "scale_in_alarm" { dimensions = { "environment" = var.metrics_environment_label - "queueName" = var.executor_queue_name + "queueName" = var.queue_name } } } diff --git a/modules/executors/variables.tf b/modules/executors/variables.tf index c7ef414..3d977e0 100644 --- a/modules/executors/variables.tf +++ b/modules/executors/variables.tf @@ -8,19 +8,50 @@ variable "subnet_id" { description = "The ID of the subnet within the given VPC to run the instance in." } -variable "executor_queue_name" { +variable "resource_prefix" { type = string - description = "The queue from which the executor should dequeue jobs." + default = "" + description = "An optional prefix to add to all resources created." +} + +variable "machine_image" { + type = string + description = "Executor node machine disk image to use for creating the boot volume." } -variable "executor_tag" { +variable "machine_type" { + type = string + default = "c5n.metal" // 4 vCPU, 15GB + description = "Executor node machine type." +} + +variable "boot_disk_size" { + type = number + default = 100 // 100GB + description = "Executor node disk size in GB" +} + +variable "preemptible_machines" { + type = bool + default = false + description = "Whether to use preemptible machines instead of standard machines; usually way cheaper but might be terminated at any time" +} + +variable "instance_tag" { type = string description = "A label tag to add to all the executors. Can be used for filtering out the right instances in stackdriver monitoring." } -variable "metrics_environment_label" { +variable "ssh_access_cidr_range" { type = string - description = "The value for environment by which to filter the custom metrics." + default = "0.0.0.0/0" + description = "CIDR range from where SSH access to the EC2 instances is acceptable." +} + +variable "http_access_cidr_range" { + type = string + default = "0.0.0.0/0" + description = "CIDR range from where HTTP access to the metrics endpoint is acceptable." } variable "sourcegraph_external_url" { @@ -38,77 +69,53 @@ variable "sourcegraph_executor_proxy_password" { description = "The shared password used to authenticate requests to the internal executor proxy." } -variable "executor_docker_registry_mirror" { +variable "queue_name" { type = string - default = "" - description = "A URL to a docker registry mirror to use (falling back to docker.io)." + description = "The queue from which the executor should dequeue jobs." } -variable "executor_maximum_runtime_per_job" { +variable "maximum_runtime_per_job" { type = string default = "30m" description = "The maximum wall time that can be spent on a single job" } -variable "executor_maximum_num_jobs" { +variable "maximum_num_jobs" { type = number default = 1 description = "The number of jobs to run concurrently per executor instance" } -variable "executor_num_total_jobs" { +variable "num_total_jobs" { type = string default = "" description = "The maximum number of jobs that will be dequeued by the worker" } -variable "executor_max_active_time" { +variable "max_active_time" { type = string default = "" description = "The maximum time that can be spent by the worker dequeueing records to be handled" } -variable "executor_firecracker_num_cpus" { +variable "firecracker_num_cpus" { type = number default = 4 description = "The number of CPUs to give to each firecracker VM" } -variable "executor_firecracker_memory" { +variable "firecracker_memory" { type = string default = "12GB" description = "The amount of memory to give to each firecracker VM" } -variable "executor_firecracker_disk_space" { +variable "firecracker_disk_space" { type = string default = "20GB" description = "The amount of disk space to give to each firecracker VM" } -variable "machine_image" { - type = string - description = "Executor node machine disk image to use for creating the boot volume." -} - -variable "machine_type" { - type = string - default = "c5n.metal" // 4 vCPU, 15GB - description = "Executor node machine type." -} - -variable "boot_disk_size" { - type = number - default = 100 // 100GB - description = "Executor node disk size in GB" -} - -variable "preemptible_machines" { - type = bool - default = false - description = "Whether to use preemptible machines instead of standard machines; usually way cheaper but might be terminated at any time" -} - variable "min_replicas" { type = number default = 1 @@ -127,20 +134,13 @@ variable "jobs_per_instance_scaling" { description = "The amount of jobs a single instance should have in queue. Used for autoscaling." } -variable "ssh_access_cidr_range" { - type = string - default = "0.0.0.0/0" - description = "CIDR range from where SSH access to the EC2 instances is acceptable from." -} - -variable "http_access_cidr_range" { +variable "metrics_environment_label" { type = string - default = "0.0.0.0/0" - description = "CIDR range from where HTTP access to the metrics endpoint is acceptable from." + description = "The value for environment by which to filter the custom metrics." } -variable "resource_prefix" { +variable "docker_registry_mirror" { type = string default = "" - description = "An optional prefix to add to all resources created." + description = "A URL to a docker registry mirror to use (falling back to docker.io)." } diff --git a/providers.tf b/providers.tf index 92ab48d..f67f415 100644 --- a/providers.tf +++ b/providers.tf @@ -9,7 +9,7 @@ terraform { } provider "aws" { - region = var.aws_region + region = var.region default_tags { tags = { "deployment" = "sourcegraph-executors" diff --git a/variables.tf b/variables.tf index 801ca3c..7a11efc 100644 --- a/variables.tf +++ b/variables.tf @@ -1,4 +1,180 @@ -variable "aws_region" { - type = string - default = "us-west-2" +variable "region" { + type = string +} + +variable "availability_zone" { + type = string + description = "The availability zone to create the instance in." +} + +variable "docker_mirror_machine_ami" { + type = string + default = "" + description = "AMI for the EC2 instance to use. Must be in the same availability zone." +} + +variable "docker_mirror_machine_type" { + type = string + default = "m5.large" // 2 vCPU, 8GB + description = "Docker registry mirror node machine type." +} + +variable "docker_mirror_boot_disk_size" { + type = number + default = 64 + description = "Docker registry mirror node disk size in GB." +} + +variable "docker_mirror_static_ip" { + type = string + default = "10.0.1.4" + description = "The IP to statically assign to the instance. Should be internal." +} + +variable "docker_mirror_ssh_access_cidr_range" { + type = string + default = "0.0.0.0/0" + description = "CIDR range from where SSH access to the EC2 instance is acceptable." +} + +variable "docker_mirror_http_access_cidr_range" { + type = string + default = "10.0.0.0/16" + description = "CIDR range from where HTTP access to the Docker registry is acceptable." +} + +variable "executor_resource_prefix" { + type = string + default = "" + description = "An optional prefix to add to all resources created." +} + +variable "executor_machine_image" { + type = string + description = "Executor node machine disk image to use for creating the boot volume." +} + +variable "executor_machine_type" { + type = string + default = "c5n.metal" // 4 vCPU, 15GB + description = "Executor node machine type." +} + +variable "executor_boot_disk_size" { + type = number + default = 100 // 100GB + description = "Executor node disk size in GB" +} + +variable "executor_preemptible_machines" { + type = bool + default = false + description = "Whether to use preemptible machines instead of standard machines; usually way cheaper but might be terminated at any time" +} +variable "executor_instance_tag" { + type = string + description = "A label tag to add to all the executors. Can be used for filtering out the right instances in stackdriver monitoring." +} + +variable "executor_ssh_access_cidr_range" { + type = string + default = "0.0.0.0/0" + description = "CIDR range from where SSH access to the EC2 instances is acceptable." +} + +variable "executor_http_access_cidr_range" { + type = string + default = "0.0.0.0/0" + description = "CIDR range from where HTTP access to the metrics endpoint is acceptable." +} + +variable "executor_sourcegraph_external_url" { + type = string + description = "The externally accessible URL of the target Sourcegraph instance." +} + +variable "executor_sourcegraph_executor_proxy_username" { + type = string + description = "The shared username used to authenticate requests to the internal executor proxy." +} + +variable "executor_sourcegraph_executor_proxy_password" { + type = string + description = "The shared password used to authenticate requests to the internal executor proxy." +} + +variable "executor_queue_name" { + type = string + description = "The queue from which the executor should dequeue jobs." +} + +variable "executor_maximum_runtime_per_job" { + type = string + default = "30m" + description = "The maximum wall time that can be spent on a single job" +} + +variable "executor_maximum_num_jobs" { + type = number + default = 1 + description = "The number of jobs to run concurrently per executor instance" +} + +variable "executor_num_total_jobs" { + type = string + default = "" + description = "The maximum number of jobs that will be dequeued by the worker" +} + +variable "executor_max_active_time" { + type = string + default = "" + description = "The maximum time that can be spent by the worker dequeueing records to be handled" +} + +variable "executor_firecracker_num_cpus" { + type = number + default = 4 + description = "The number of CPUs to give to each firecracker VM" +} + +variable "executor_firecracker_memory" { + type = string + default = "12GB" + description = "The amount of memory to give to each firecracker VM" +} + +variable "executor_firecracker_disk_space" { + type = string + default = "20GB" + description = "The amount of disk space to give to each firecracker VM" +} + +variable "executor_min_replicas" { + type = number + default = 1 + description = "The minimum number of executor instances to run in the autoscaling group." +} + +variable "executor_max_replicas" { + type = number + default = 1 + description = "The maximum number of executor instances to run in the autoscaling group." +} + +variable "executor_jobs_per_instance_scaling" { + type = number + default = 20 + description = "The amount of jobs a single instance should have in queue. Used for autoscaling." +} + +variable "executor_metrics_environment_label" { + type = string + description = "The value for environment by which to filter the custom metrics." +} + +variable "executor_docker_registry_mirror" { + type = string + default = "" + description = "A URL to a docker registry mirror to use (falling back to docker.io)." } From 0150fa326e91d073efff742ecfda3c597120781c Mon Sep 17 00:00:00 2001 From: Eric Fritz Date: Fri, 1 Oct 2021 13:52:54 -0500 Subject: [PATCH 8/8] Run fmt --- modules/networking/outputs.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/networking/outputs.tf b/modules/networking/outputs.tf index 0b11bce..95492ff 100644 --- a/modules/networking/outputs.tf +++ b/modules/networking/outputs.tf @@ -1,7 +1,7 @@ output "vpc_id" { - value = aws_vpc.default.id + value = aws_vpc.default.id } output "subnet_id" { - value = aws_subnet.default.id + value = aws_subnet.default.id }