Skip to content

Commit

Permalink
enable more runner features
Browse files Browse the repository at this point in the history
  • Loading branch information
DaMandal0rian committed Apr 9, 2024
1 parent b0df293 commit 5a3c438
Show file tree
Hide file tree
Showing 16 changed files with 1,424 additions and 67 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module "runners" {
enable_ssm_on_runners = true

# Let the module manage the service linked role
# create_service_linked_role_spot = true
create_service_linked_role_spot = true

instance_types = ["m6a.4xlarge", "c6a.4xlarge"]

Expand All @@ -60,20 +60,19 @@ module "runners" {
enable_ephemeral_runners = true

# # Example of simple pool usages
# pool_runner_owner = "subspace-scale-runners"
# pool_config = [{
# size = 3
# schedule_expression = "cron(* * * * ? *)"
# }]
#
#
pool_runner_owner = "subspace-scale-runners"
pool_config = [{
size = 3
schedule_expression = "cron(* * * * ? *)"
}]

enable_job_queued_check = true

# tracing_config = {
# mode = "Active"
# capture_error = true
# capture_http_requests = true
# }
tracing_config = {
mode = "Active"
capture_error = true
capture_http_requests = true
}


# AMI selection and userdata
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ module "runners" {
enable_ssm_on_runners = true

# Let the module manage the service linked role
# create_service_linked_role_spot = true
create_service_linked_role_spot = true

instance_types = ["m6a.4xlarge", "c6a.4xlarge"]

Expand All @@ -60,20 +60,19 @@ module "runners" {
enable_ephemeral_runners = true

# # Example of simple pool usages
# pool_runner_owner = "subspace-scale-runners"
# pool_config = [{
# size = 3
# schedule_expression = "cron(* * * * ? *)"
# }]
#
#
pool_runner_owner = "subspace-scale-runners"
pool_config = [{
size = 3
schedule_expression = "cron(* * * * ? *)"
}]

enable_job_queued_check = true

# tracing_config = {
# mode = "Active"
# capture_error = true
# capture_http_requests = true
# }
tracing_config = {
mode = "Active"
capture_error = true
capture_http_requests = true
}


# configure your pre-built AMI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,28 +41,28 @@ module "runners" {
source = "../../modules/multi-runner"
multi_runner_config = local.multi_runner_config
# Alternative to loading runner configuration from Yaml files is using static configuration:
multi_runner_config = {
"linux-x64" = {
matcherConfig : {
labelMatchers = [["self-hosted", "linux", "x64", "ubuntu-2204"], ["self-hosted", "linux", "x64", "ubuntu-latest"]]
exactMatch = true
}
fifo = true
delay_webhook_event = 0
runner_config = {
runner_os = "linux"
runner_architecture = "x64"
runner_name_prefix = "ubuntu-x64_"
create_service_linked_role_spot = true
enable_ssm_on_runners = true
instance_types = ["m6a.2xlarge", "m6a.4xlarge"]
runner_extra_labels = ["ubuntu-22.04", "ubuntu"]
runners_maximum_count = 3
enable_ephemeral_runners = true
scale_down_schedule_expression = "cron(* * * * ? *)"
}
}
}
# multi_runner_config = {
# "linux-x64" = {
# matcherConfig : {
# labelMatchers = [["self-hosted", "linux", "x64", "ubuntu-2204"], ["self-hosted", "linux", "x64", "ubuntu-latest"]]
# exactMatch = true
# }
# fifo = true
# delay_webhook_event = 0
# runner_config = {
# runner_os = "linux"
# runner_architecture = "x64"
# runner_name_prefix = "ubuntu-x64_"
# create_service_linked_role_spot = true
# enable_ssm_on_runners = true
# instance_types = ["m6a.2xlarge", "m6a.4xlarge"]
# runner_extra_labels = ["ubuntu-22.04", "ubuntu"]
# runners_maximum_count = 3
# enable_ephemeral_runners = true
# scale_down_schedule_expression = "cron(* * * * ? *)"
# }
# }
# }
aws_region = local.aws_region
vpc_id = module.base.vpc.vpc_id
subnet_ids = module.base.vpc.private_subnets
Expand All @@ -78,35 +78,35 @@ module "runners" {
webhook_secret = random_id.random.hex
}
# enable this section for tracing
# tracing_config = {
# mode = "Active"
# capture_error = true
# capture_http_requests = true
# }
tracing_config = {
mode = "Active"
capture_error = true
capture_http_requests = true
}
# Assuming local build lambda's to use pre build ones, uncomment the lines below and download the
# lambda zip files lambda_download
# webhook_lambda_zip = "../lambdas-download/webhook.zip"
# runner_binaries_syncer_lambda_zip = "../lambdas-download/runner-binaries-syncer.zip"
# runners_lambda_zip = "../lambdas-download/runners.zip"
webhook_lambda_zip = "../lambdas-download/webhook.zip"
runner_binaries_syncer_lambda_zip = "../lambdas-download/runner-binaries-syncer.zip"
runners_lambda_zip = "../lambdas-download/runners.zip"

# enable_workflow_job_events_queue = true
enable_workflow_job_events_queue = true
# override delay of events in seconds

# Enable debug logging for the lambda functions
# log_level = "debug"
log_level = "debug"

# Enable spot termination watcher
# spot_instance_termination_watcher = {
# enable = true
# }
spot_instance_termination_watcher = {
enable = true
}

# Enable to track the spot instance termination warning
# instance_termination_watcher = {
# enable = true
# enable_metric = {
# spot_warning = true
# }
# }
instance_termination_watcher = {
enable = true
enable_metric = {
spot_warning = true
}
}
}

module "webhook_github_app" {
Expand Down
Loading

0 comments on commit 5a3c438

Please sign in to comment.