All Projects → nikovirtala → cdk-github-actions-runner

nikovirtala / cdk-github-actions-runner

Licence: MIT license
Deploy self-hosted GitHub Actions runner to AWS Fargate using AWS Cloud Development Kit (CDK)

Programming Languages

typescript
32286 projects
shell
77523 projects
Dockerfile
14818 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to cdk-github-actions-runner

terraform-aws-ecs-fargate-task-definition
AWS ECS Fargate Task Definition Terraform Module
Stars: ✭ 20 (-77.53%)
Mutual labels:  aws-ecs, fargate, aws-fargate
aws-ecs-orb
An orb that simplifies deployment to Amazon's Elastic Container Service (ECS). Supports both EC2 and Fargate launch types.
Stars: ✭ 48 (-46.07%)
Mutual labels:  aws-ecs, fargate, aws-fargate
container-demo
How can I manage microservices using ecs-cli?
Stars: ✭ 30 (-66.29%)
Mutual labels:  ecs-service, fargate
cdk-eventbridge-socket
CDK construct that creates a WebSocket endpoint for you for any EventBridge rule you are interested in. (Built for debugging + testing )
Stars: ✭ 43 (-51.69%)
Mutual labels:  cdk, cdk-examples
ecs-container-exporter
AWS ECS side car that exports ECS container level docker stats metrics to Prometheus as well as publish it via Statsd.
Stars: ✭ 22 (-75.28%)
Mutual labels:  aws-ecs, fargate
Awesome Ecs
A curated list of awesome ECS guides, development tools, and resources
Stars: ✭ 2,672 (+2902.25%)
Mutual labels:  aws-ecs, aws-fargate
cdk-examples
AWS CDK Examples Repository
Stars: ✭ 49 (-44.94%)
Mutual labels:  cdk, cdk-examples
e9-cloudformation-docker-ecs
Docker on Amazon ECS with AWS Fargate using CloudFormation. https://devteds.com/episodes/9-docker-on-amazon-ecs-using-cloudformation
Stars: ✭ 78 (-12.36%)
Mutual labels:  aws-ecs, aws-fargate
terraform-aws-ecs-service
Creates an ECS Service.
Stars: ✭ 86 (-3.37%)
Mutual labels:  aws-ecs, ecs-service
ecs composex
Manage, Configure and Deploy your services and AWS services and applications from your docker-compose definitions
Stars: ✭ 79 (-11.24%)
Mutual labels:  aws-ecs, aws-fargate
document-understanding-solution
Example of integrating & using Amazon Textract, Amazon Comprehend, Amazon Comprehend Medical, Amazon Kendra to automate the processing of documents for use cases such as enterprise search and discovery, control and compliance, and general business process workflow.
Stars: ✭ 180 (+102.25%)
Mutual labels:  cdk
bl mcu sdk
bl_mcu_sdk is MCU software development kit provided by Bouffalo Lab Team for BL602/BL604, BL702/BL704/BL706, BL616/BL618, BL808 and other series of RISC-V based chips in the future.
Stars: ✭ 147 (+65.17%)
Mutual labels:  cdk
aws-ecs-devops-using-aws-cdk
This repository provides a general DevOps practices such MSA, IaC, CICD and Monitoring. AWS various services are used to provide DevOps best practices.
Stars: ✭ 110 (+23.6%)
Mutual labels:  cdk
on-demand
CloudFormation resources for scheduling On-Demand Buildkite Agents with AWS ECS and AWS Fargate
Stars: ✭ 19 (-78.65%)
Mutual labels:  fargate
aws-usage-queries
This application bootstraps everything needed to query the AWS Cost and Usage reports through Amazon Athena. It also includes reference data and preconfigured SQL queries.
Stars: ✭ 28 (-68.54%)
Mutual labels:  cdk
ecommerce-shopfront-on-aws
A high availability, API-first reference architecture for ecommerce using AWS services
Stars: ✭ 56 (-37.08%)
Mutual labels:  aws-fargate-application
tfc-agent
Examples related to the Terraform Cloud Agent, a remote runner for Terraform Cloud Business and Terraform Enterprise
Stars: ✭ 44 (-50.56%)
Mutual labels:  aws-ecs
rds-snapshot-export-to-s3-pipeline
RDS Snapshot Export to S3 Pipeline
Stars: ✭ 88 (-1.12%)
Mutual labels:  cdk
cloudpatrol
Policy as Code for the Cloud Development Kit (CDK)
Stars: ✭ 21 (-76.4%)
Mutual labels:  cdk
ecs-autoscale
A framework that runs on AWS Lambda for autoscaling ECS clusters and services
Stars: ✭ 69 (-22.47%)
Mutual labels:  aws-ecs

GitHub Actions runner on AWS Fargate

This repository contains an example how to run self-hosted GitHub Actions runners on AWS Fargate!

Construct

The solution presented in this repository is available as a Construct library in NPM and GitHub.

You can import it to your project by:

import { GithubActionsRunner } from "@cloudgardener/cdk-aws-fargate-github-actions-runner";

Docker image

Docker image is based on ubuntu:20.04 / focal. I may consider moving back to ubuntu:rolling once actions/runner#1584 is resolved.

On top the base image I have installed GitHub Actions Runner based on About self-hosted runners in GitHub documentation.

Deployment

The application is deployed to AWS using AWS Cloud Development Kit (AWS CDK).

  • Store two parameters GITHUB_ACCESS_TOKEN and GITHUB_ACTIONS_RUNNER_CONTEXT in to SSM Parameter Store.
    • For repository level runner set GITHUB_ACTIONS_RUNNER_CONTEXT value to https://github.com/<owner>/<repository>
    • For organization level runner set GITHUB_ACTIONS_RUNNER_CONTEXT value to https://github.com/<organization>
  • Run cdk synth --profile <your-aws-cli-profile>
  • Run cdk deploy --profile <your-aws-cli-profile>
  • Wait a little while ...

Now you should be able find your self-hosted runner from repository setting in GitHub:

We can see also from the Fargate Task Logs that the runner is successfully registered:

Personal Access Token Scopes

Registering self-hosted runner to repository level requires admin access to the repository, and repo scope for the access token.

Registering self-hosted runner to Organization level requires admin access to the organization, and admin:org scope for the access token.

Price Comparision

You can read about the comparisions I made from Price Comparision document.

Useful commands

  • npm run build compile typescript to js
  • npm run watch watch for changes and compile
  • npm run test perform the jest unit tests
  • cdk deploy deploy this stack to your default AWS account/region
  • cdk diff compare deployed stack with current state
  • cdk synth emits the synthesized CloudFormation template
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].