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

Donation: Runner AMI template + slimmed-down user_data to match #1313

Closed
skyzyx opened this issue Oct 20, 2021 · 3 comments
Closed

Donation: Runner AMI template + slimmed-down user_data to match #1313

skyzyx opened this issue Oct 20, 2021 · 3 comments

Comments

@skyzyx
Copy link
Contributor

skyzyx commented Oct 20, 2021

terraform-aws-github-runner v0.21.0
Terraform 1.0.9

I built out a custom AMI for GHA Runners, based on Amazon Linux 2. Had to pre-compile some packages that aren't in Amazon’s yum repos, but I got there. Cool, I've got a runner AMI.

After digging into the code, trying to figure out the nitty-gritty for how this project works, I found that the default user_data file attempts to do a lot of extra (for me, unnecessary) work at boot. I was able to slim it down to only the things it needed, and pass the filename to the proper Terraform parameter.

I'm wondering if the developers feel there's value in providing a standard Packer template for producing an AL2 AMI ready to use as a GHA Runner. The idea being, if a user wants to use this template to generate their own Base AMI, then this project could also ship a slimmed-down user_data file that focuses exclusively on connecting itself to the Actions system.

I have both written right now. I'd need a little time to clean things up before having a complete, e2e, Terraform-y implementation done to open a ready-to-PR, but I wanted to know if this is something that would be welcome. I used the word "donation" in the title because I could always donate the code to you, then you could decide how to use/expose it to your end-users. Either way, I'm cool.

@npalm
Copy link
Member

npalm commented Oct 21, 2021

Would be super nice when we can add AMI templates! Contribution would be very welcome!

@ScottGuymer
Copy link
Member

@skyzyx I have started to add exactly this functionality in #1444 with a sample AMI that provides the same OOTB functionality as the current user_data

@npalm
Copy link
Member

npalm commented Dec 3, 2021

We have added hooks so you can build a custom AMI, also an example for building an AMI with packer is added.

@npalm npalm closed this as completed Dec 3, 2021
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

No branches or pull requests

3 participants