bcgov / Cloud-Pathfinder-Azure

Apache License 2.0
0 stars 0 forks source link

GitHub Self-Hosted Runners Implementation #118

Open AErmie opened 1 month ago

AErmie commented 1 month ago

As part of supporting more secure application infrastructure deployments, leveraging technologies like Private Link Endpoints, VNet Service Endpoints, and VNet Integration, etc. we need to explore how to support using self-hosted Agents/Runners for pipeline workflow execution. This would allow the Runner to operate within a private network, and thus be able to support deployment of, and interaction with, private-only resources (ie. Azure resources that do not have public access enabled).

Part of this work initially started with the Azure Startup Sample Application (Serverless) example.

[!NOTE] The Azure Startup Sample Application (Serverless) repo currently has separate sub-module code for deploying the networking required for the GitHub self-hosted Runner environment, along with code for the Azure Container App Jobs-based implementation of self-hosted runners.

This code should be moved into its own repository, so that it can be more easily iterated on, and centrally used and referenced by various Ministry teams.

Implementation Options

[!NOTE] The current self-hosted runner implementation utilizes Container Apps, which does not support running docker commands.

We need to investigate options for running Docker-in-Docker (DIND), and if the Container App method works with this. This would remove the need to also create and maintain a VM-based runner approach (via VM Scale Sets). If we do need to explore a VM-based option, a good starting point would be the GitHub Actions Runner Images, and Azure Virtual Machine Scale Set agents repos.

Reference articles:

In addition to the custom created Terraform code, and Azure Verified Module implementation options, we also need to explore implementation and usage of GitHub-hosted runners in a private network.

[!NOTE] We are currently working with the Security, and Developer Experience (DevEx) teams to explore this option, as it is implemented and configured at the GitHub Organization level.

Acceptance Criteria

Generated by Zenhub AI

AErmie commented 1 month ago

Met with DevEx team (who is responsible for the GitHub Enterprise Organization). Will continue to explore options, including the GitHub-managed runners, and include the DevEx team when ready to test.