# cloudera-labs/cldr-runner architecture

> Architecture diagram of the GitHub repository cloudera-labs/cldr-runner, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cloudera-labs/cldr-runner
- Repository: https://github.com/cloudera-labs/cldr-runner

## Overview

##### Project type and purpose
- This is an open-source tooling repository that defines and builds Ansible Execution Environment container images for Cloudera Data Platform (CDP).
- Purpose: Provide ready-to-use container images (“execution environments”) that bundle Ansible Core, required collections, Python libs, CLIs (AWS/Azure/GCP), and tooling for CDP automation.

##### File structure
- Top-level directories:
- base, aws, azure, gcp, full – each contains an execution-environment.yml and bindep/requirements files for that profile.
- aws, azure, gcp and full build on “base” via container image inheritance.
- .github/workflows – CI/CD pipelines to build, test, tag, and publish images.
- img – static assets for documentation (e.g., AWX screenshot).
- local_development.yml + supporting scripts for host-based local setup.
- CI files orchestrate building multiple profiles in parallel and pushing to GitHub Container Registry.

##### README for additional insights
- Describes how images are built (ansible-builder build), tagged, and consumed by ansible-navigator and AWX/AAP.
- Explains five image profiles, version tagging, customization and local development workflows.

## Diagram (Mermaid)

```mermaid
graph TB
  subgraph "Source Code & Configs"
    Repo["GitHub Repository"]:::code
  end

  subgraph "CI/CD Engine (GitHub Actions)"
    CI_DIR["Workflows Directory"]:::ci
    BP["build_push_image.yml"]:::ci
    PM["publish_matrix_images.yml"]:::ci
    PS["publish_single_image.yml"]:::ci
    VI["validate_image.yml"]:::ci
    PR1["validate_pr.yml"]:::ci
    PR2["label_pr.yml"]:::ci
    PR3["reset_pr.yml"]:::ci
    PC["pre-commit.yml"]:::ci
    CI_DIR --> BP
    CI_DIR --> PM
    CI_DIR --> PS
    CI_DIR --> VI
    CI_DIR --> PR1
    CI_DIR --> PR2
    CI_DIR --> PR3
    CI_DIR --> PC
  end

  Builder["Ansible Builder"]:::ci

  subgraph "Execution Environment Definitions"
    BaseDef["base/execution-environment.yml"]:::code
    AWSDef["aws/execution-environment.yml"]:::code
    AzDef["azure/execution-environment.yml"]:::code
    GCPDef["gcp/execution-environment.yml"]:::code
    FullDef["full/execution-environment.yml"]:::code
  end

  subgraph "Container Image Profiles"
    Base["base"]:::image
    AWS["aws"]:::image
    Az["azure"]:::image
    GCP["gcp"]:::image
    Full["full"]:::image
    AWS -->|inherits| Base
    Az -->|inherits| Base
    GCP -->|inherits| Base
    Full -->|inherits| AWS
    Full -->|inherits| Az
    Full -->|inherits| GCP
    Full -->|inherits| Base
  end

  subgraph "Local Development Host"
    Playbook["local_development.yml"]:::script
    RHEL["rhel9-init-base.sh"]:::script
    UBUNTU["ubuntu-init-base.sh"]:::script
    Host["Local Host"]:::consumer
  end

  Registry[(GitHub Container Registry)]:::registry

  subgraph "Consumers"
    Nav["ansible-navigator"]:::consumer
    AWX["AWX / AAP"]:::consumer
    Direct["docker/podman exec"]:::consumer
  end

  Repo -->|"push"| CI_DIR
  CI_DIR -->|"triggers"| Builder
  Builder -->|"build images"| BaseDef
  Builder -->|"build images"| AWSDef
  Builder -->|"build images"| AzDef
  Builder -->|"build images"| GCPDef
  Builder -->|"build images"| FullDef
  BaseDef -->|"defines"| Base
  AWSDef -->|"defines"| AWS
  AzDef -->|"defines"| Az
  GCPDef -->|"defines"| GCP
  FullDef -->|"defines"| Full
  Base -->|"push"| Registry
  AWS -->|"push"| Registry
  Az -->|"push"| Registry
  GCP -->|"push"| Registry
  Full -->|"push"| Registry
  Registry -->|"pull"| Nav
  Registry -->|"pull"| AWX
  Registry -->|"pull"| Direct
  Repo -->|"source for"| Playbook
  Playbook -->|"exec on host"| Host

  click Repo "https://github.com/cloudera-labs/cldr-runner/tree/main//"
  click CI_DIR "https://github.com/cloudera-labs/cldr-runner/tree/main/.github/workflows/"
  click BP "https://github.com/cloudera-labs/cldr-runner/blob/main/.github/workflows/build_push_image.yml"
  click PM "https://github.com/cloudera-labs/cldr-runner/blob/main/.github/workflows/publish_matrix_images.yml"
  click PS "https://github.com/cloudera-labs/cldr-runner/blob/main/.github/workflows/publish_single_image.yml"
  click VI "https://github.com/cloudera-labs/cldr-runner/blob/main/.github/workflows/validate_image.yml"
  click PR1 "https://github.com/cloudera-labs/cldr-runner/blob/main/.github/workflows/validate_pr.yml"
  click PR2 "https://github.com/cloudera-labs/cldr-runner/blob/main/.github/workflows/label_pr.yml"
  click PR3 "https://github.com/cloudera-labs/cldr-runner/blob/main/.github/workflows/reset_pr.yml"
  click PC "https://github.com/cloudera-labs/cldr-runner/blob/main/.github/workflows/pre-commit.yml"
  click BaseDef "https://github.com/cloudera-labs/cldr-runner/blob/main/base/execution-environment.yml"
  click AWSDef "https://github.com/cloudera-labs/cldr-runner/blob/main/aws/execution-environment.yml"
  click AzDef "https://github.com/cloudera-labs/cldr-runner/blob/main/azure/execution-environment.yml"
  click GCPDef "https://github.com/cloudera-labs/cldr-runner/blob/main/gcp/execution-environment.yml"
  click FullDef "https://github.com/cloudera-labs/cldr-runner/blob/main/full/execution-environment.yml"
  click Playbook "https://github.com/cloudera-labs/cldr-runner/blob/main/local_development.yml"
  click RHEL "https://github.com/cloudera-labs/cldr-runner/blob/main/rhel9-init-base.sh"
  click UBUNTU "https://github.com/cloudera-labs/cldr-runner/blob/main/ubuntu-init-base.sh"

  classDef code fill:#D6E9FF,stroke:#333,stroke-width:1px
  classDef ci fill:#FFD2A6,stroke:#333,stroke-width:1px
  classDef image fill:#EAD1DC,stroke:#333,stroke-width:1px
  classDef script fill:#FFF2CC,stroke:#333,stroke-width:1px
  classDef registry fill:#F2F2F2,stroke:#333,stroke-width:1px
  classDef consumer fill:#D5E8D4,stroke:#333,stroke-width:1px
```
