Overview
HyperEnv is a production-ready solution to deploy self-hosted GitHub runners on AWS. The architecture takes the following design considerations into account:
- Security
- Scalablity
- Reliability
- Performance
- Cost effectivness
We distribute and sell HyperEnv via the AWS Marketplace bundled into a product consisting of an AMI (Amazon Machine Image) and CloudFormation templates. The Infrastructure-as-Code approach allows you to setup and update the whole solution within minutes.
Architecture
HyperEnv consists of the following building blocks:
- API Gateway
- Lambda function
- Step Functions state machine
- Lambda function
- EC2 instances
- API Gateway recieves webhook event via HTTP request from GitHub.
- API Gateway invokes the Lambda function named
webhook
. - The Lambda function
webhook
verifies the incoming webhook event. - The Lambda function
webhook
starts an execution of the Step Functionrunner-orchestrator
. - The Step Function invokes the Lambda function
consumer
which tries to launch a spot instance. - In case a spot instance is not available in the selected availability zone, the Step Function retries launching a spot instance in another availability zone.
- In case it is not possible to launch a spot instance, the Step Function continues and calls the Lambda function
consumer
again to launch an on-demand instance.