How cisco-open/forge works
1. What this repo is
ForgeMT is an infrastructure-as-code platform for running GitHub Actions runners on AWS. The repository is mostly OpenTofu/Terraform modules plus Terragrunt examples, with a few helper Lambdas, container images, and automation scripts.
2. Primary architectural split: control plane vs tenant plane
The README’s core model is a control plane that provisions and manages the platform, and a tenant plane that executes ephemeral CI/CD jobs. The control plane owns lifecycle, scaling, and trust relationships; tenants consume runners through GitHub workflows and assume short-lived AWS roles via OIDC.
3. modules/platform/forge_runners is the central orchestration layer
This is the main platform module that assembles runner capabilities end-to-end. It wires together EC2 runners, ARC/Kubernetes runners, GitHub webhook relay, GitHub App management, trust validation, job log handling, SSM, service catalog, and supporting IAM/resources. If you are drawing the core architecture, this is the hub.
4. Two runner execution paths
ForgeMT supports:
- EC2 runners for full VM control, custom AMIs, and per-tenant sandboxing.
- ARC/EKS runners for containerized execution using Actions Runner Controller, Karpenter, and Kubernetes namespaces.
These are separate runtime paths but share the same control-plane patterns: automation, ephemeral provisioning, and AWS identity boundaries.
5. EC2 runner subsystem
modules/platform/ec2_deployment and modules/platform/forge_runners/ec2_runners.tf cover EC2 runner provisioning and lifecycle. The module includes launch/template files, security groups, roles, AMI handling, and Lambda-driven automation for updating runner AMIs and tags. This path is where custom instance shapes and OS-level control live.
6. EKS/ARC runner subsystem
modules/core/arc and modules/infra/eks provide the Kubernetes side of the platform. The EKS module provisions cluster-level infrastructure, add-ons, node classes/pools, and Calico-related networking. The ARC module deploys runner scale sets and controller pieces via Helm and generated manifests, bridging GitHub job demand to Kubernetes pods.
7. Foundational AWS infrastructure modules
modules/infra contains reusable AWS building blocks: EKS, ECR, S3 storage, IAM/service-linked roles, AMI sharing/policy, CloudFormation, opt-in regions, and Forge subscription scaffolding. These are the base resources that the platform and integrations depend on before runners can be deployed.
8. Integration modules connect the platform to external systems
modules/integrations handles non-runner services such as:
- GitHub webhook relay source/destination and receiver Lambdas
- Splunk observability and cloud data manager integrations
- AWS billing/export pipelines
- Teleport identity/access integration
- Secrets and cross-account trust plumbing
These modules usually bridge AWS services, GitHub, and third-party SaaS rather than hosting workloads themselves.
9. GitHub App and webhook lifecycle are first-class
The repo includes a Dockerized forge-github-app-register utility and GitHub App manifest assets. The platform also includes modules and Lambdas for validating trust, relaying webhooks, cleaning up locks, and managing runner groups. This indicates GitHub is not just a consumer; it is part of the control-plane workflow.
10. Observability and governance are built into the platform
Splunk-oriented modules and dashboards are a major subsystem: runner logs, CloudWatch pipelines, S3/Kinesis/Firehose/Lambda log shipping, and dashboards for EC2, K8s, Lambda, SQS, and billing. Governance also shows up in trust validation, secrets handling, and policy modules.
11. Terragrunt examples define real deployment topologies
examples/ is not sample code only; it is the operational blueprint for deployments. It shows layered configuration for:
- global settings
- environment-wide settings
- region-wide settings
- VPC/tenant-specific settings
This is important for the architecture diagram because the repo uses Terragrunt inheritance to compose real environments from the module stack.
12. Operational tooling around the IaC
The repo also contains CI and maintenance tooling: GitHub Actions workflows, pre-commit/lint configs, Renovate, helper scripts for tenant migration, EKS reinstall, GitHub App secret updates, and Terraform docs generation. These are supporting automation boundaries around the platform, not part of runtime runner execution.
13. How the main data/control flows work
The high-level flow is: repository configuration → Terragrunt/OpenTofu applies modules → AWS resources and Lambdas are provisioned → GitHub App/webhooks authenticate and route events → runner capacity is created on EC2 or EKS → jobs execute with OIDC-based AWS access → logs/metrics/traces are shipped to observability backends. The control plane continuously reconciles and updates these pieces.
14. What to emphasize in an architecture diagram
Show four layers: repo/automation, control-plane modules, AWS runtime infrastructure, and tenant job execution. Then draw external edges to GitHub, AWS services, and optional Splunk/Teleport integrations. The strongest boundary is between platform-managed infrastructure and tenant-owned CI workloads.
Main entry points: forge_runners Forge Runners · github_webhook_relay Webhook Relay · integrations Splunk Stack · examples Examples
Components 24
Repo & automation
Documentation, examples, CI workflows, build helpers, and maintenance scripts that drive platform changes.
- README · Entry-point documentation for the platform architecture and operating model.
README.md - Examples · Real deployment topologies composed from layered Terragrunt configuration.
examples - CI Workflows · Repository automation for building images and validating local changes.
.github/workflows - Ops Scripts · Helper scripts for migrations, EKS reinstall, secret rotation, and docs generation.
scripts - GitHub App Tool · Dockerized utility for registering and packaging the GitHub App.
.docker/forge-github-app-register
Control plane
Top-level orchestration modules that assemble runner lifecycle, identity, logs, and GitHub integration.
- Forge Runners · Central orchestration module that wires runner paths, GitHub lifecycle, trust, logs, and platform services.
modules/platform/forge_runners - EC2 Deploy · EC2 runner provisioning, AMI handling, security groups, and Lambda-driven updates.
modules/platform/ec2_deployment - ARC Deploy · Platform wrapper for Actions Runner Controller deployment on Kubernetes.
modules/platform/arc_deployment - Trust Validator · Validates platform trust relationships and related GitHub/AWS assumptions.
modules/platform/forge_runners/forge_trust_validator - Job Logs · Archives and dispatches GitHub Actions job logs into storage and downstream processing.
modules/platform/forge_runners/github_actions_job_logs - Webhook Relay · Receives and relays GitHub webhook events into the control plane.
modules/platform/forge_runners/github_webhook_relay - Runner Group · Creates and manages GitHub runner group metadata for platform tenants.
modules/platform/forge_runners/github_app_runner_group - Global Lock · Cleans up and coordinates global lock state used by runner operations.
modules/platform/forge_runners/github_global_lock - Redrive · Moves failed work from dead-letter paths back into processing flows.
modules/platform/forge_runners/redrive_deadletter - Service Catalog · Publishes platform-managed resources and access surfaces for consumers.
modules/platform/forge_runners/service_catalog.tf
AWS infrastructure
Reusable infrastructure modules for EKS, storage, ECR, IAM-style foundations, and regional AWS resources.
- EKS · Reusable EKS cluster provisioning with add-ons, node pools, and Calico networking.
modules/infra/eks - Core Infra · Base AWS building blocks such as ECR, storage, CloudFormation, roles, AMI policy/sharing, opt-in regions, and subscription scaffolding.
modules/infra - ARC Core · Controller-side Kubernetes plumbing for Actions Runner Controller and node integration.
modules/core/arc
Integrations & observability
External-system bridges for GitHub, Splunk, Teleport, and related governance/telemetry pipelines.
- GitHub Relay · Source and destination webhook relay modules plus receiver Lambdas for external callbacks.
modules/integrations/github_webhook_relay_source - Splunk Stack · CloudWatch, Firehose, Kinesis, S3, dashboards, and Splunk Cloud/Observability integrations.
modules/integrations - Teleport · Teleport access and tenant integration for privileged entry and identity boundaries.
modules/integrations/teleport
Tenant runtime
Ephemeral CI execution paths and tenant-specific deployment composition.
- Tenant Blueprint · Tenant-specific layered configuration showing how one tenant consumes the platform.
examples/deployments/forge-tenant - ARC Runners · Ephemeral containerized runner path executed on Kubernetes via ARC.
modules/platform/forge_runners/arc_runners.tf - EC2 Runners · Ephemeral VM-based runner path executed on AWS EC2.
modules/platform/forge_runners/ec2_runners.tf
Connections 31
- README → Forge Runners: describes · Documentation centers the main orchestration module and operating model.
- Examples → Core Infra: composes · Terragrunt blueprints layer regional and environment settings over reusable AWS modules.
- Examples → Forge Runners: deploys · Deployment examples instantiate the platform control plane.
- Examples → Tenant Blueprint: defines · Tenant examples show per-tenant overlays and runner settings.
- CI Workflows → GitHub App Tool: builds · CI builds the GitHub App registration image.
- CI Workflows → Examples: validates · Automation checks repository changes against example deployment patterns.
- Ops Scripts → Forge Runners: operates · Maintenance scripts update secrets, migrate tenants, and refresh platform docs.
- GitHub App Tool → Webhook Relay: registers · Container utility prepares GitHub App assets used by webhook-oriented automation.
- Forge Runners → EC2 Deploy: includes · The main platform module wires the EC2 runner execution path.
- Forge Runners → ARC Deploy: includes · The main platform module wires the ARC/Kubernetes execution path.
- Forge Runners → Trust Validator: includes · Trust validation is part of the control plane.
- Forge Runners → Job Logs: includes · Job log handling is managed as a first-class platform concern.
- Forge Runners → Webhook Relay: includes · GitHub event intake is part of the orchestration layer.
- Forge Runners → Runner Group: includes · Runner-group automation belongs to the control plane.
- Forge Runners → Global Lock: includes · Global lock cleanup and coordination are platform-managed.
- Forge Runners → Redrive: includes · Dead-letter recovery is handled centrally.
- Forge Runners → Service Catalog: publishes · The platform exposes consumable services and resources.
- EC2 Deploy → Core Infra: depends on · EC2 runner deployment consumes base AWS primitives.
- ARC Deploy → EKS: depends on · ARC deployment requires EKS cluster infrastructure.
- EKS → ARC Core: hosts · Kubernetes infrastructure hosts the ARC controller and runner scale sets.
- Core Infra → Splunk Stack: feeds · Foundational AWS resources provide data and access paths for telemetry integrations.
- GitHub Relay → Webhook Relay: connects · GitHub webhook relay transports events into the platform.
- Splunk Stack → Job Logs: ingests · Observability stack receives runner and job log data.
- Splunk Stack → EC2 Runners: observes · Dashboards and pipelines cover EC2 runner behavior and resource usage.
- Splunk Stack → ARC Runners: observes · Dashboards and pipelines cover Kubernetes runner behavior and resource usage.
- Teleport → Forge Runners: secures · Teleport provides access and identity integration around the platform.
- Tenant Blueprint → EC2 Runners: configures · Tenant overlays drive the EC2-based runner path.
- Tenant Blueprint → ARC Runners: configures · Tenant overlays can also target the ARC-based runner path.
- Webhook Relay → EC2 Runners: triggers · Webhook events can fan out into VM-based ephemeral runners.
- Webhook Relay → ARC Runners: triggers · Webhook events can fan out into Kubernetes-based ephemeral runners.
- Trust Validator → Core Infra: validates · Trust validation governs IAM and cross-account assumptions.