Skip to content

Commit

Permalink
chore: updated ubuntu examples multi-runner
Browse files Browse the repository at this point in the history
  • Loading branch information
npalm authored and bdellegrazie committed Nov 16, 2024
1 parent 0a83408 commit 987a159
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 3 deletions.
4 changes: 3 additions & 1 deletion examples/multi-runner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
This module shows how to create GitHub action runners with multiple runner configuration together in one deployment. This example has the configurations for the following runner types with the relevant labels supported by them as matchers:

- Linux ARM64 `["self-hosted", "linux", "arm64", "amazon"]`: Amazon Linux ARM64 non ephemeral runner based on module defaults
- Linux Ubuntu `["self-hosted", "linux", "x64", "ubuntu-latest"]` or `["self-hosted", "linux", "x64", "ubuntu-2204"]`: Ubuntu runners non ephemeral based on a custom start script.
- Linux Ubuntu 22.04 `["self-hosted", "linux", "x64", "ubuntu-latest"]` or `["self-hosted", "linux", "x64", "ubuntu-2204"]`: Ubuntu runners non ephemeral based on a custom start script.
- Linux Ubuntu 24.04 `["self-hosted", "linux", "x64", "ubuntu-24.04"]`: Ubuntu runners non ephemeral based on a custom start script.
- Linux X64 `["self-hosted", "linux", "x64", "amazon"]`: Amazon X64 Linux runners ephemeral with retry enabled.
- Windows X64 `["self-hosted", "windows", "x64", "servercore-2022"]`: Windows X64 Servercore 2022 runners non ephemeral based on a custom start script.
- Windows X64 `["self-hosted", "windows", "x64", "servercore-2022"]`: Windows X64 Servercore 2022 runners non ephemeral based on a custom start script.

The module will decide the runner for the workflow job based on the match in the labels defined in the workflow job and runner configuration. Also the runner configuration allows the match to be exact or non-exact match. We recommend to use only exact matches.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ matcherConfig:
labelMatchers:
- [self-hosted, linux, x64, ubuntu-latest]
- [self-hosted, linux, x64, ubuntu-2204]
fifo: true
redrive_build_queue:
enabled: false
maxReceiveCount: null
runner_config:
runner_os: linux
runner_architecture: x64
runner_run_as: ubuntu
runner_name_prefix: ubuntu-2204-x64_
runner_name_prefix: ubuntu2204-x64_
enable_ssm_on_runners: true
credit_specification: standard
instance_types:
Expand Down
52 changes: 52 additions & 0 deletions examples/multi-runner/templates/runner-configs/ubuntu2404-x64.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
matcherConfig:
exactMatch: true
labelMatchers:
- [self-hosted, linux, x64, ubuntu-2404]
redrive_build_queue:
enabled: false
maxReceiveCount: null
runner_config:
runner_os: linux
runner_architecture: x64
runner_run_as: ubuntu
runner_name_prefix: ubuntu2404-x64_
enable_ssm_on_runners: true
credit_specification: standard
instance_types:
- t3a.large
- m5ad.large
- m5a.large
runners_maximum_count: 1
delay_webhook_event: 0
scale_down_schedule_expression: cron(* * * * ? *)
userdata_template: ./templates/user-data.sh
ami_owners:
- "099720109477" # Canonical's Amazon account ID
ami_filter:
name:
- ubuntu/images/hvm-ssd-gp3/ubuntu-noble-24.04-amd64-server-*
state:
- available
block_device_mappings:
- device_name: /dev/sda1
delete_on_termination: true
volume_type: gp3
volume_size: 30
encrypted: true
iops: null
throughput: null
kms_key_id: null
snapshot_id: null
runner_log_files:
- log_group_name: syslog
prefix_log_group: true
file_path: /var/log/syslog
log_stream_name: "{instance_id}"
- log_group_name: user_data
prefix_log_group: true
file_path: /var/log/user-data.log
log_stream_name: "{instance_id}/user_data"
- log_group_name: runner
prefix_log_group: true
file_path: /opt/actions-runner/_diag/Runner_**.log
log_stream_name: "{instance_id}/runner"

0 comments on commit 987a159

Please sign in to comment.