Configuration

Customize HyperEnv to your needs. There are two types of configuration parameters:

  1. Global configuration: CloudFormation parameters
  2. GitHub workflow- or job-level parameters are defined within the GitHub workflow definition.

CloudFormation parameters

ParameterDescriptionRequiredDefault
InfrastructureAlarmsEmailOptional 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-
CidrIpBlockThe CIDR ip block of the VPC.yes10.0.0.0/16
CidrSubnetBitsThe size of a subnet. Two subnets have to fit in the defined ip block.yes12
SSHIngressCidrIpOptional 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-
KeyPairThe key pair allowing you to establish a SSH connection with the EC2 instance executing the GitHub runner.yes-
InstanceTypeThe default instance type used when launching EC2 instances to execute GitHub runners. It is possible to override this parameter for each GitHub job.yesm5.large
SpotInstanceReduce costs by launching spot instances instead of on-demand instances by defaut. It is possible to override this parameter for each GitHub job.yesfalse
VolumeSizeThe size of the volume attached to the EC2 instances exucting GitHub runners.yes86
GitHubBaseUrlThe base URL of GitHub.com or a GitHub Entperise Server (e.g., https://github.enterpise.com)yeshttps://github.com
GitHubRunnerLabelsThe labels used to identify the GitHub runners configured in the workflow definition.'yeshyperenv
GitHubWaitTimeoutThe timeout (in minutes) a new EC2 instances waits for a new job.'yes10
GitHubJobTimeoutThe timeout (in minutes) for GitHub jobs.yes120
LogsRetentionInDaysSpecifies the number of days you want to retain log events.yes14
Egress1PortAllow outbound TCP connections to port.no0 (0 = disabled)
Egress1DestinationAllow outbound TCP connections to CIDR or security group ID.no-
Egress2PortAllow outbound TCP connections to port.no0 (0 = disabled)
Egress2DestinationAllow 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.