Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add option to create custom ec2 provider #514

Closed
wants to merge 0 commits into from

Conversation

pharindoko
Copy link
Contributor

No description provided.

@pharindoko
Copy link
Contributor Author

@kichik your feedback is appreciated :)

@kichik kichik mentioned this pull request Mar 9, 2024
@pharindoko pharindoko closed this Mar 13, 2024
mergify bot pushed a commit that referenced this pull request Mar 27, 2024
Add an option for enabling [fast launch](https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/win-ami-config-fast-launch.html) for Windows AMIs. This should speed up booting up of EC2 Windows runners.

Note that it does come with [extra cost](https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/win-fast-launch-manage-costs.html).

```typescript
const ec2WindowsImageBuilder = Ec2RunnerProvider.imageBuilder(stack, 'Windows EC2 Builder', {
  os: Os.WINDOWS,
  vpc,
  awsImageBuilderOptions: {
    fastLaunchOptions: {
      enabled: true,
    },
  },
});
const runners = new GitHubRunners(stack, 'runners', {
  providers: [
    new Ec2RunnerProvider(stack, 'Fast Windows', {
      labels: ['windows'],
      imageBuilder: ec2WindowsImageBuilder,
    }),
  ],
}
```

Before:
<img width="69" alt="image" src="https://github.com/CloudSnorkel/cdk-github-runners/assets/1156773/f92a363e-9892-430a-9511-f70800909fe0">

After:
<img width="74" alt="image" src="https://github.com/CloudSnorkel/cdk-github-runners/assets/1156773/d7da163c-4f82-4cbb-9b48-bfb1e8da3850">

Resolves #466
Closes #514
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant