Configuration
Customize HyperEnv to your needs. There are two types of configuration parameters:
- Global configuration: CloudFormation parameters
- GitHub workflow- or job-level parameters are defined within the GitHub workflow definition.
CloudFormation parameters
Parameter | Description | Required | Default |
---|---|---|---|
InfrastructureAlarmsEmail | Optional but strongly recommended email address receiving infrastructure alarms (for more than one email address, please subscribe to the Infrastructure Alarms SNS topic after stack creation). | no | - |
CidrIpBlock | The CIDR ip block of the VPC. | yes | 10.0.0.0/16 |
CidrSubnetBits | The size of a subnet. Two subnets have to fit in the defined ip block. | yes | 12 |
SSHIngressCidrIp | Optional ingress rule allows SSH access from this IP address range (e.g., access from anywhere: 0.0.0.0/0, from single public IP address 91.45.138.21/32). | no | - |
KeyPair | The key pair allowing you to establish a SSH connection with the EC2 instance executing the GitHub runner. | yes | - |
InstanceType | The default instance type used when launching EC2 instances to execute GitHub runners. It is possible to override this parameter for each GitHub job. | yes | m5.large |
SpotInstance | Reduce costs by launching spot instances instead of on-demand instances by defaut. It is possible to override this parameter for each GitHub job. | yes | false |
VolumeSize | The size of the volume attached to the EC2 instances exucting GitHub runners. | yes | 86 |
GitHubBaseUrl | The base URL of GitHub.com or a GitHub Entperise Server (e.g., https://github.enterpise.com) | yes | https://github.com |
GitHubRunnerLabels | The labels used to identify the GitHub runners configured in the workflow definition.' | yes | hyperenv |
GitHubWaitTimeout | The timeout (in minutes) a new EC2 instances waits for a new job.' | yes | 10 |
GitHubJobTimeout | The timeout (in minutes) for GitHub jobs. | yes | 120 |
LogsRetentionInDays | Specifies the number of days you want to retain log events. | yes | 14 |
Egress1Port | Allow outbound TCP connections to port. | no | 0 (0 = disabled) |
Egress1Destination | Allow outbound TCP connections to CIDR or security group ID. | no | - |
Egress2Port | Allow outbound TCP connections to port. | no | 0 (0 = disabled) |
Egress2Destination | Allow outbound TCP connections to CIDR or security group ID. | no | - |
GitHub job-level parameters
Defining parameters for each GitHub job enables you to override some of the CloudFormation parameters.
Just add the tag hyperenv-config
to the runs-on
parameter of a GitHub workflow. Doing so allows you to override the default instance type (CloudFormation parameter InstanceType
) and spot instance configuration (CloudFormation parameter SpotInstance
) from HyperEnv’s CloudFormation stack.
spot
: Launch spot instance instead of on-demand instance (allowed values: true or false).instance
: Define the instance type for the virtual machine (allowed values: see supported instance types below).
Here is an example that tells HyperEnv to launch an spot instance of type t3.small
for the job hyperenv-demo
.
name: hyperenv-demo
on:
workflow_dispatch
jobs:
hyperenv-demo:
runs-on:
- hyperenv
- hyperenv-config:instance=t3.small,spot=true
steps:
- run: 'echo "Hello HyperEnv"'
Supported EC2 instance types
HyperEnv supports the following instance types:
t3.small
t3.medium
t3.large
t3.xlarge
t3.2xlarge
m5.large
m5.xlarge
m5.2xlarge
m5.4xlarge
m5.8xlarge
m5.12xlarge
m5.16xlarge
m5.24xlarge
m6i.large
m6i.xlarge
m6i.2xlarge
m6i.4xlarge
m6i.8xlarge
m6i.12xlarge
m6i.16xlarge
m6i.24xlarge
m6i.32xlarge
m7i.large
m7i.xlarge
m7i.2xlarge
m7i.4xlarge
m7i.8xlarge
m7i.12xlarge
m7i.16xlarge
m7i.24xlarge
m7i.48xlarge
g4dn.xlarge
g4dn.2xlarge
g4dn.4xlarge
g4dn.8xlarge
g4dn.12xlarge
g4dn.16xlarge
Please ensure the instance type is available in the AWS region.