# ejyroghene/ocp4.10.3-install-gcp-upi architecture

> Architecture diagram of the GitHub repository ejyroghene/ocp4.10.3-install-gcp-upi, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ejyroghene/ocp4.10.3-install-gcp-upi
- Repository: https://github.com/ejyroghene/ocp4.10.3-install-gcp-upi

## Overview

1. This repository is an OpenShift 4.10 UPI deployment kit for GCP, not a runnable application. The architecture is centered on a bastion-driven installation workflow that provisions GCP infrastructure, then bootstraps OpenShift, then hands control over to the cluster itself.

2. The repo has two main parts: documentation/sample files at the root, and a `deployment_manager_templates/` directory containing Google Cloud Deployment Manager templates. Those templates are the actual infrastructure-as-code boundary for creating VMs, load balancers, health checks, and instance groups.

3. The installation environment is intentionally split into a local/admin plane and a private cluster plane. The bastion host is the admin entry point: it holds the OpenShift client tools, the GCP service account credentials, the ignition assets, and the reverse proxy used to expose the private console externally.

4. Network topology is a private GCP VPC with two subnets: `master-subnet` for bootstrap and control-plane nodes, and `worker-subnet` for workers. Private Google Access, Cloud Router, Cloud NAT, and a private Cloud DNS zone are all used to keep the cluster isolated while still allowing egress and name resolution.

5. The control-plane bootstrap flow is driven by OpenShift-generated ignition files and GCP Deployment Manager. First, a bootstrap VM is created, then three master VMs are created, and the bootstrap node is temporarily attached to the internal API load balancer until the masters can take over.

6. `02_lb_int.py` models the internal API load balancer subsystem. It creates the internal frontend IP, backend service, health check, and empty unmanaged instance groups that later receive the bootstrap and master nodes. This is the cluster’s initial API access path inside the VPC.

7. `04_bootstrap.py` creates the temporary bootstrap VM and its supporting resources. `05_control_plane.py` creates the three master nodes across zones, each in the master subnet and each joined to the API load balancer backends. These templates define the first durable compute tier of the cluster.

8. `06_worker.py` creates the worker nodes in the worker subnet, while `07_worker_with_2_interfaces.py` is an alternate worker template for dual-NIC nodes. That alternate path is specifically meant for attaching workers to an additional network, which matters for OpenShift Virtualization or multi-network experiments.

9. A second internal load balancer is used for application ingress traffic. Workers are placed into unmanaged instance groups, and the wildcard `*.apps` DNS record is pointed at the worker-plane load balancer so router pods on the workers can serve OpenShift routes and console traffic.

10. The repo also models the DNS/control flow explicitly: private zone records for `api` and `api-int` point to the API load balancer, while `*.apps` points to the ingress load balancer. This is why the cluster is private but still reachable through the bastion-host reverse proxy.

11. Artifact and credential flow is a big part of the architecture. The service account JSON is used for GCP API access, `bootstrap.ign` is stored in GCS and signed for temporary access, and the RHCOS image is uploaded to GCS then imported into a custom GCP image used by all nodes.

12. Operationally, the bootstrap node is transient, the masters become the long-lived control plane, and the workers are where ingress and application workloads land. The repository’s samples (`sample-install-config.yaml`, `sample-haproxy.cfg`, and `sample-cluster-ingress-default-ingresscontroller.yaml`) serve as reference configuration for those boundaries rather than as executable components themselves.

Main entry points: [`deployment_manager_templates/02_lb_int.py`](https://github.com/ejyroghene/ocp4.10.3-install-gcp-upi/blob/main/deployment_manager_templates/02_lb_int.py) (API LB template), [`README.md`](https://github.com/ejyroghene/ocp4.10.3-install-gcp-upi/blob/main/README.md) (README), [`sample-install-config.yaml`](https://github.com/ejyroghene/ocp4.10.3-install-gcp-upi/blob/main/sample-install-config.yaml) (Install config), [`sample-haproxy.cfg`](https://github.com/ejyroghene/ocp4.10.3-install-gcp-upi/blob/main/sample-haproxy.cfg) (HAProxy cfg)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_docs["Docs & samples"]
  node_readme["README<br/>docs<br/>[README.md]"]
  node_sample_install_config["Install config<br/>sample config"]
  node_sample_haproxy["HAProxy cfg<br/>sample config<br/>[sample-haproxy.cfg]"]
  node_sample_ingress["Ingress sample<br/>sample config"]
end

subgraph group_templates["Deployment Manager"]
  node_dm_api_lb["API LB template<br/>dm template<br/>[02_lb_int.py]"]
  node_dm_bootstrap["Bootstrap template<br/>dm template<br/>[04_bootstrap.py]"]
  node_dm_masters["Master template<br/>dm template"]
  node_dm_workers["Worker template<br/>dm template<br/>[06_worker.py]"]
  node_dm_workers_dual["Dual-NIC worker<br/>dm template"]
end

subgraph group_runtime["Install runtime"]
  node_bastion["Bastion host<br/>admin plane"]
  node_vpc["Private VPC<br/>network"]
  node_api_lb[("API load balancer<br/>cluster lb")]
  node_ingress_lb[("Ingress LB<br/>cluster lb")]
  node_bootstrap["Bootstrap node<br/>transient vm"]
  node_masters["Masters<br/>control plane"]
  node_workers["Workers<br/>workload plane"]
  node_dns["Private DNS<br/>name resolution"]
  node_artifacts["Artifacts<br/>credential/artifact flow"]
end

node_readme -->|"describes"| node_dm_api_lb
node_sample_install_config -->|"feeds"| node_artifacts
node_sample_haproxy -->|"proxies"| node_bastion
node_sample_ingress -->|"guides"| node_dns
node_bastion -->|"stores"| node_artifacts
node_bastion -->|"admin access"| node_api_lb
node_bastion -->|"proxy access"| node_ingress_lb
node_vpc -->|"hosts"| node_api_lb
node_vpc -->|"hosts"| node_ingress_lb
node_vpc -->|"contains"| node_bootstrap
node_vpc -->|"contains"| node_masters
node_vpc -->|"contains"| node_workers
node_dm_api_lb -->|"implements"| node_api_lb
node_dm_bootstrap -->|"implements"| node_bootstrap
node_dm_masters -->|"implements"| node_masters
node_dm_workers -->|"implements"| node_workers
node_dm_workers_dual -.->|"variants"| node_workers
node_api_lb -->|"attaches first"| node_bootstrap
node_api_lb -->|"fails over to"| node_masters
node_masters -->|"serves"| node_dns
node_workers -->|"backends"| node_ingress_lb
node_ingress_lb -->|"advertises"| node_dns
node_artifacts -->|"boots"| node_bootstrap
node_artifacts -->|"provisions"| node_masters
node_artifacts -->|"provisions"| node_workers

click node_readme "https://github.com/ejyroghene/ocp4.10.3-install-gcp-upi/blob/main/README.md"
click node_sample_install_config "https://github.com/ejyroghene/ocp4.10.3-install-gcp-upi/blob/main/sample-install-config.yaml"
click node_sample_haproxy "https://github.com/ejyroghene/ocp4.10.3-install-gcp-upi/blob/main/sample-haproxy.cfg"
click node_sample_ingress "https://github.com/ejyroghene/ocp4.10.3-install-gcp-upi/blob/main/sample-cluster-ingress-default-ingresscontroller.yaml"
click node_dm_api_lb "https://github.com/ejyroghene/ocp4.10.3-install-gcp-upi/blob/main/deployment_manager_templates/02_lb_int.py"
click node_dm_bootstrap "https://github.com/ejyroghene/ocp4.10.3-install-gcp-upi/blob/main/deployment_manager_templates/04_bootstrap.py"
click node_dm_masters "https://github.com/ejyroghene/ocp4.10.3-install-gcp-upi/blob/main/deployment_manager_templates/05_control_plane.py"
click node_dm_workers "https://github.com/ejyroghene/ocp4.10.3-install-gcp-upi/blob/main/deployment_manager_templates/06_worker.py"
click node_dm_workers_dual "https://github.com/ejyroghene/ocp4.10.3-install-gcp-upi/blob/main/deployment_manager_templates/07_worker_with_2_interfaces.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_readme,node_sample_install_config,node_sample_haproxy,node_sample_ingress toneBlue
class node_dm_api_lb,node_dm_bootstrap,node_dm_masters,node_dm_workers,node_dm_workers_dual toneAmber
class node_bastion,node_vpc,node_api_lb,node_ingress_lb,node_bootstrap,node_masters,node_workers,node_dns,node_artifacts toneMint
```

## Components

### Docs & samples

Reference configuration and repository overview files.

- [README](https://github.com/ejyroghene/ocp4.10.3-install-gcp-upi/blob/main/README.md): docs · High-level install guidance and workflow notes. · `README.md`
- [Install config](https://github.com/ejyroghene/ocp4.10.3-install-gcp-upi/blob/main/sample-install-config.yaml): sample config · OpenShift install-config example used to derive ignition and cluster settings. · `sample-install-config.yaml`
- [HAProxy cfg](https://github.com/ejyroghene/ocp4.10.3-install-gcp-upi/blob/main/sample-haproxy.cfg): sample config · Reverse-proxy example for exposing private services through the bastion. · `sample-haproxy.cfg`
- [Ingress sample](https://github.com/ejyroghene/ocp4.10.3-install-gcp-upi/blob/main/sample-cluster-ingress-default-ingresscontroller.yaml): sample config · Reference ingresscontroller configuration for route handling. · `sample-cluster-ingress-default-ingresscontroller.yaml`

### Deployment Manager

Google Cloud infrastructure templates that define the cluster buildout.

- [API LB template](https://github.com/ejyroghene/ocp4.10.3-install-gcp-upi/blob/main/deployment_manager_templates/02_lb_int.py): dm template · Deployment Manager template for the internal API load balancer and backend groups. · `deployment_manager_templates/02_lb_int.py`
- [Bootstrap template](https://github.com/ejyroghene/ocp4.10.3-install-gcp-upi/blob/main/deployment_manager_templates/04_bootstrap.py): dm template · Deployment Manager template for the transient bootstrap node. · `deployment_manager_templates/04_bootstrap.py`
- [Master template](https://github.com/ejyroghene/ocp4.10.3-install-gcp-upi/blob/main/deployment_manager_templates/05_control_plane.py): dm template · Deployment Manager template for the three control-plane masters. · `deployment_manager_templates/05_control_plane.py`
- [Worker template](https://github.com/ejyroghene/ocp4.10.3-install-gcp-upi/blob/main/deployment_manager_templates/06_worker.py): dm template · Deployment Manager template for standard worker nodes. · `deployment_manager_templates/06_worker.py`
- [Dual-NIC worker](https://github.com/ejyroghene/ocp4.10.3-install-gcp-upi/blob/main/deployment_manager_templates/07_worker_with_2_interfaces.py): dm template · Alternate worker template for nodes with two network interfaces. · `deployment_manager_templates/07_worker_with_2_interfaces.py`

### Install runtime

Bastion, network, load balancers, and cluster nodes involved in the deployment flow.

- **Bastion host**: admin plane · Local admin entry point holding oc tools, GCP credentials, ignition assets, and proxy access.
- **Private VPC**: network · Isolated GCP network with master and worker subnets, private access, routing, and NAT.
- **API load balancer**: cluster lb · Internal API entry path used during bootstrap and control-plane takeover.
- **Ingress LB**: cluster lb · Internal load balancer for application ingress and console traffic.
- **Bootstrap node**: transient vm · Temporary node that brings up the initial control plane.
- **Masters**: control plane · Durable OpenShift control-plane nodes in the master subnet.
- **Workers**: workload plane · Worker nodes in the worker subnet where routers and workloads run.
- **Private DNS**: name resolution · Private zone records for api, api-int, and *.apps.
- **Artifacts**: credential/artifact flow · Service account access, ignition assets, and custom image staging in GCS.

## Connections

- README → API LB template: describes · Repository overview points to the infrastructure templates that build the cluster.
- Install config → Artifacts: feeds · Install config is used to generate ignition and bootstrap assets.
- HAProxy cfg → Bastion host: proxies · Bastion reverse proxy uses the HAProxy pattern to expose private services.
- Ingress sample → Private DNS: guides · Ingress configuration aligns with wildcard apps DNS routing.
- Bastion host → Artifacts: stores · Admin host holds credentials and ignition material for the install.
- Bastion host → API load balancer: admin access · Bastion is the operator entry point to private cluster services.
- Bastion host → Ingress LB: proxy access · Reverse proxy path can surface private console and route traffic.
- Private VPC → API load balancer: hosts · The internal API load balancer is bound to the private VPC.
- Private VPC → Ingress LB: hosts · Ingress load balancer lives inside the isolated GCP network.
- Private VPC → Bootstrap node: contains · Bootstrap VM is created in the private cluster network.
- Private VPC → Masters: contains · Master nodes run in the master subnet.
- Private VPC → Workers: contains · Worker nodes run in the worker subnet.
- API LB template → API load balancer: implements · Template defines the internal API frontend, backend service, health check, and instance groups.
- Bootstrap template → Bootstrap node: implements · Template creates the transient bootstrap VM and supporting resources.
- Master template → Masters: implements · Template creates the three control-plane masters across zones.
- Worker template → Workers: implements · Template creates standard worker nodes.
- Dual-NIC worker → Workers: variants · Alternate template models worker nodes with a second network interface.
- API load balancer → Bootstrap node: attaches first · Bootstrap node is temporarily added to the API backend group.
- API load balancer → Masters: fails over to · Masters take over the internal API backend once ready.
- Masters → Private DNS: serves · api and api-int records point to the internal API endpoint.
- Workers → Ingress LB: backends · Workers join unmanaged groups that receive ingress traffic.
- Ingress LB → Private DNS: advertises · Wildcard *.apps resolves to the ingress load balancer.
- Artifacts → Bootstrap node: boots · Ignition assets and image staging enable the bootstrap VM to start the cluster.
- Artifacts → Masters: provisions · Custom image and ignition material are reused by the masters.
- Artifacts → Workers: provisions · Workers also consume the staged image and cluster credentials.
