pl-strflt / ipdx

2 stars 0 forks source link

Use self-hosted runners with testground & libp2p/test-plan repo #38

Closed laurentsenta closed 1 year ago

laurentsenta commented 2 years ago
laurentsenta commented 2 years ago

using a test repo (forked to an organization): https://github.com/singulargarden/pl-github

I could use the self-hosted runner that you created @galargh. The self-hosted runner works 🥳

except our runner is missing gcc (and maybe a few other dependencies) to build testground: https://github.com/singulargarden/pl-github/runs/6692012837?check_suite_focus=true

galargh commented 2 years ago

Sweet. Let's create an ami with all the required dependencies using packer.

laurentsenta commented 2 years ago

Getting close: https://github.com/philips-labs/terraform-aws-github-runner/compare/develop...laurentsenta:feat/ipdx-testground-image

Built with:

packer build -var-file="./testground.pkrvars.hcl" .
packer build -var-file="./go1.18.pkrvars.hcl" .

It generates AMI like: github-runner-ubuntu-focal-amd64-202206021224-testground.

If you login with the AWS testground org, they are visible in https://eu-west-1.console.aws.amazon.com/ec2/v2/home?region=eu-west-1#Images:visibility=owned-by-me

We should be able to use them with something like: https://github.com/pl-strflt/tf-aws-gh-runner/pull/1/files

Would it make sense to merge this PR and test it works end to end before we make it nice and reusable?

I'm not sure yet:

galargh commented 2 years ago

For anyone else following this issue, we're going to pair on this tomorrow. We'll update the issue with whatever we come up with together.

laurentsenta commented 2 years ago

Current state: We got the whole workflow running with custom AMIs, etc: https://github.com/singulargarden/pl-github/actions/runs/2435526535

Left to do:

aktech commented 2 years ago

2 cents on self-hosting runners:

I built a service for running self-hosted GitHub Action runners on cloud with 0 maintenance and free for open source: https://cirun.io/

galargh commented 1 year ago

@laurentsenta Do we still want to proceed with this?

laurentsenta commented 1 year ago

@galargh with stability improvements and TaaS getting closer, it's not that urgent. I'm going to close this, we can reopen it later, thanks for asking,