📄 Extensive documentation is available via our GitHub Pages Docs site.
📢 We maintain the project as a truly open-source project. We maintain the project on a best effort basis. We welcome contributions from the community. Feel free to help us answering issues, reviewing PRs, or maintaining and improving the project.
📢
v5replaces Amazon Linux 2 with Amazon Linux 2023 as default OS. Check the PR for more details and other changes.
📢 For contributions to older versions you can make a PR to the related branch, e.g.
v4. We have no release process in place for older versions.
This Terraform module creates the required infrastructure needed to host GitHub Actions self-hosted, auto-scaling runners on AWS spot instances. It provides the required logic to handle the life cycle for scaling up and down using a set of AWS Lambda functions. Runners are scaled down to zero to avoid costs when no workflows are active.
<picture> <source media="(prefers-color-scheme: dark)" srcset="docs/assets/runners.dark.png"> <source media="(prefers-color-scheme: light)" srcset="docs/assets/runners.light.png"> <img alt="Runners overview" src="docs/assets/runners.light.png"> </picture>Check out the detailed instructions in the Getting Started section of the docs. On a high level, the following steps are required to get started:
Check out the provided Terraform examples in the examples directory for different scenarios.
Please check the configuration section of the docs for major configuration options. See the Terraform module documentation for all available options.
This project is licensed under the MIT License - see the LICENSE file for details.
We welcome contributions, please check out the contribution guide. Be aware we use pre commit hooks to update the docs.
This module is part of the Philips Forest.
___ _ / __\__ _ __ ___ ___| |_ / _\/ _ \| '__/ _ \/ __| __| / / | (_) | | | __/\__ \ |_ \/ \___/|_| \___||___/\__| Infrastructure
Talk to the forestkeepers in the runners-channel on Slack.
| Name | Version |
|---|---|
| <a name="requirement_terraform"></a> terraform | >= 1.3.0 |
| <a name="requirement_aws"></a> aws | ~> 5.27 |
| <a name="requirement_random"></a> random | ~> 3.0 |
| Name | Version |
|---|---|
| <a name="provider_aws"></a> aws | 5.31.0 |
| <a name="provider_random"></a> random | 3.6.0 |
| Name | Source | Version |
|---|---|---|
| <a name="module_ami_housekeeper"></a> ami_housekeeper | ./modules/ami-housekeeper | n/a |
| <a name="module_instance_termination_watcher"></a> instance_termination_watcher | ./modules/termination-watcher | n/a |
| <a name="module_runner_binaries"></a> runner_binaries | ./modules/runner-binaries-syncer | n/a |
| <a name="module_runners"></a> runners | ./modules/runners | n/a |
| <a name="module_ssm"></a> ssm | ./modules/ssm | n/a |
| <a name="module_webhook"></a> webhook | ./modules/webhook | n/a |
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| <a name="input_ami_filter"></a> ami_filter | Map of lists used to create the AMI filter for the action runner AMI. | map(list(string)) | <pre>{<br> "state": [<br> "available"<br> ]<br>}</pre> | no |
| <a name="input_ami_housekeeper_cleanup_config"></a> ami_housekeeper_cleanup_config | Configuration for AMI cleanup.<br><br> amiFilters - Filters to use when searching for AMIs to cleanup. Default filter for images owned by the account and that are available.<br> dryRun - If true, no AMIs will be deregistered. Default false.<br> launchTemplateNames - Launch template names to use when searching for AMIs to cleanup. Default no launch templates.<br> maxItems - The maximum numer of AMI's tha will be queried for cleanup. Default no maximum.<br> minimumDaysOld - Minimum number of days old an AMI must be to be considered for cleanup. Default 30.<br> ssmParameterNames - SSM parameter names to use when searching for AMIs to cleanup. This parameter should be set when using SSM to configure the AMI to use. Default no SSM parameters. | <pre>object({<br> amiFilters = optional(list(object({<br> Name = string<br> Values = list(string)<br> })),<br> [{<br> Name : "state",<br> Values : ["available"],<br> },<br> {<br> Name : "image-type",<br> Values : ["machine"],<br> }]<br> )<br> dryRun = optional(bool, false)<br> launchTemplateNames = optional(list(string))<br> maxItems = optional(number)<br> minimumDaysOld = optional(number, 30)<br> ssmParameterNames = optional(list(string))<br> })</pre> | {} | no |
| <a name="input_ami_housekeeper_lambda_s3_key"></a> ami_housekeeper_lambda_s3_key | S3 key for syncer lambda function. Required if using S3 bucket to specify lambdas. | string | null | no |
| <a name="input_ami_housekeeper_lambda_s3_object_version"></a> ami_housekeeper_lambda_s3_object_version | S3 object version for syncer lambda function. Useful if S3 versioning is enabled on source bucket. | string | null | no |
| <a name="input_ami_housekeeper_lambda_schedule_expression"></a> ami_housekeeper_lambda_schedule_expression | Scheduler expression for action runner binary syncer. | string | "rate(1 day)" | no |
| <a name="input_ami_housekeeper_lambda_timeout"></a> ami_housekeeper_lambda_timeout | Time out of the lambda in seconds. | number | 300 | no |
| <a name="input_ami_housekeeper_lambda_zip"></a> ami_housekeeper_lambda_zip | File location of the lambda zip file. | string | null | no |
| <a name="input_ami_id_ssm_parameter_name"></a> ami_id_ssm_parameter_name | Externally managed SSM parameter (of data type aws:ec2:image) that contains the AMI ID to launch runner instances from. Overrides ami_filter | string | null | no |
| <a name="input_ami_kms_key_arn"></a> ami_kms_key_arn | Optional CMK Key ARN to be used to launch an instance from a shared encrypted AMI | string | null | no |
| <a name="input_ami_owners"></a> ami_owners | The list of owners used to select the AMI of action runner instances. | list(string) | <pre>[<br> "amazon"<br>]</pre> | no |
| <a name="input_associate_public_ipv4_address"></a> associate_public_ipv4_address | Associate public IPv4 with the runner. Only tested with IPv4 | bool | false | no |
| <a name="input_aws_partition"></a> aws_partition | (optiona) partition in the arn namespace to use if not 'aws' | string | "aws" | no |
| <a name="input_aws_region"></a> aws_region | AWS region. | string | n/a | yes |
| <a name="input_block_device_mappings"></a> block_device_mappings | The EC2 instance block device configuration. Takes the following keys: device_name, delete_on_termination, volume_type, volume_size, encrypted, iops, throughput, kms_key_id, snapshot_id. | <pre>list(object({<br> delete_on_termination = optional(bool, true)<br> device_name = optional(string, "/dev/xvda")<br> encrypted = optional(bool, true)<br> iops = optional(number)<br> kms_key_id = optional(string)<br> snapshot_id = optional(string)<br> throughput = optional(number)<br> volume_size = number<br> volume_type = optional(string, "gp3")<br> }))</pre> | <pre>[<br> {<br> "volume_size": 30<br> }<br>]</pre> | no |
| <a name="input_cloudwatch_config"></a> cloudwatch_config | (optional) Replaces the module's default cloudwatch log config. See https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Agent-Configuration-File-Details.html for details. | string | null | no |
| <a name="input_create_service_linked_role_spot"></a> create_service_linked_role_spot | (optional) create the service linked role for spot instances that is required by the scale-up lambda. | bool | false | no |
| <a name="input_delay_webhook_event"></a> delay_webhook_event | The number of seconds the event accepted by the webhook is invisible on the queue before the scale up lambda will receive the event. | number | 30 | no |
| <a name="input_disable_runner_autoupdate"></a> disable_runner_autoupdate | Disable the auto update of the github runner agent. Be aware there is a grace period of 30 days, see also the GitHub article | bool | false | no |
| <a name="input_enable_ami_housekeeper"></a> enable_ami_housekeeper | Option to disable the lambda to clean up old AMIs. | bool | false | no |
| <a name="input_enable_cloudwatch_agent"></a> enable_cloudwatch_agent | Enables the cloudwatch agent on the ec2 runner instances. The runner uses a default config that can be overridden via cloudwatch_config. | bool | true | no |
| <a name="input_enable_ephemeral_runners"></a> enable_ephemeral_runners | Enable ephemeral runners, runners will only be used once. | bool | false | no |
| <a name="input_enable_event_rule_binaries_syncer"></a> enable_event_rule_binaries_syncer | DEPRECATED: Replaced by state_event_rule_binaries_syncer. | bool | null | no |
| <a name="input_enable_fifo_build_queue"></a> enable_fifo_build_queue | Enable a FIFO queue to keep the order of events received by the webhook. Recommended for repo level runners. | bool | false | no |
| <a name="input_enable_jit_config"></a> |


AI一键生成PPT,就用博思AIPPT!
博思AIPPT,新一代的AI生成PPT平台,支持智能生成PPT、AI美化PPT、文本&链接生成PPT、导入Word/PDF/Markdown 文档生成PPT等,内置海量精美PPT模板,涵盖商务、教育、科技等不同风格,同时针对每个页面提供多种版式,一键自适应切换,完美适配各种办公场景。


AI赋能电商视觉革命,一站式智能商拍平台
潮际好麦深耕服装行业,是国内AI试衣效果最好的软件。使用先进AIGC能力为电商卖家批量提供优质的、低成本的商拍图。合作品牌有Shein、Lazada、安踏、百丽等65个国内外头部品牌,以及国内10万+淘宝、天猫、京东等主流平台的品牌商家,为卖家节省将近85%的出图成本,提升约3倍出图效率,让品牌能够快速上架。


企业专属的AI法律顾问
iTerms是法大大集团旗下法律子品牌,基于最先进的大语言模型(LLM)、专业的法律知识库和强大的智能体架构,帮助企业扫清合规障碍,筑牢风控防线,成为您企业专属的AI法律顾问。


稳定高效的流量提升解决方案,助力品牌曝光
稳定高效的流量提升解决方案,助力品牌曝光


最新版Sora2模型免费使用,一键生成无水印视频
最新版Sora2模型免费使用,一键生成无水印视频


实时语音翻译/同声传译工具
Transly是一个多场景的AI大语言模型驱动的同声传译、专业翻译助手,它拥有超精准的音频识别翻译能力,几乎零延迟的使用体验和支持多国语言可以让你带它走遍全球,无论你是留学生 、商务人士、韩剧美剧爱好者,还是出国游玩、多国会议、跨国追星等等,都可以满足你所有需要同传的场景需求,线上线下通用,扫除语言障碍,让全世界的语言交流不再有国界。


选题、配图、成文,一站式创作,让内容运营更高效
讯飞绘文,一个AI集成平台,支持写作、选题、配图、排版和发布。高效生成适用于各类媒体的定制内容,加速品牌传播,提升内容营销效果。


AI辅助编程,代码自动修复
Trae是一种自适应的集成开发环境(IDE),通过自动化和多元协作改变开发流程。利用Trae,团队能够更快速、精确地编写和部署代码,从而提高编程效率和项目交付速度。Trae具备上下文感知和代码自动完成功能,是提升开发 效率的理想工具。


最强AI数据分析助手
小浣熊家族Raccoon,您的AI智能助手,致力于通过先进的人工智能技术,为用户提供高效、便捷的智能服务。无论是日常咨询还是专业问题解答,小浣熊都能以快速、准确的响应满足您的需求,让您的生活更加智能便捷。


像人一样思考的AI智能体
imini 是一款超级AI智能体,能根据人类指令,自主思考、自主完成、并且交付结果的AI智能体。
最新AI工具、AI资讯
独家AI资源、AI项目落地

微信扫一扫关注公众号