Skip to content

rhpds/service-enablement-app-platform-runtime-gitops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Service Enablement: App Platform Runtime — GitOps

This repository contains the GitOps configuration for the Runtime cluster. ArgoCD on the runtime cluster watches this repo and deploys whatever is promoted here by the Software Factory CI pipeline.

How it works

Factory CI pipeline finishes a build
      │
      ▼
Pipeline commits updated manifests to this repo
(e.g. updates the image tag in deployment.yaml)
      │
      ▼
ArgoCD on the runtime cluster detects the change
      │
      ▼
Application is deployed to the runtime cluster

This is the GitOps promotion pattern: the factory cluster builds and tests, the runtime cluster runs. The two clusters are kept separate so a broken factory never affects the running application.

Repository Structure

example-app/
  namespace.yaml     Namespace for the example application
  deployment.yaml    Deployment using Red Hat UBI httpd image
  service.yaml       ClusterIP service
  route.yaml         OpenShift Route with TLS edge termination

ansible/
  bootstrap.yml      Playbook for imperative setup steps (namespace creation, ConfigMaps, RBAC)
  requirements.yml   Ansible collection dependencies (kubernetes.core)

Getting Started

1. Fork this repo into your GitLab instance

During the lab, the CI pipeline on the factory cluster will write to this repo as part of the promotion stage. Fork it into your GitLab instance and grant the pipeline service account write access.

2. Point ArgoCD at your fork

Create an ArgoCD Application on the runtime cluster that points to your GitLab fork:

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: example-app
  namespace: openshift-gitops
spec:
  project: default
  source:
    repoURL: https://<your-gitlab>/service-enablement-app-platform-runtime-gitops.git
    targetRevision: main
    path: example-app
  destination:
    server: https://kubernetes.default.svc
    namespace: example-app
  syncPolicy:
    automated:
      prune: true
      selfHeal: true

3. Run the Ansible bootstrap (optional)

The ansible/bootstrap.yml playbook handles tasks that cannot be expressed declaratively — for example, creating namespaces or configuring RBAC before ArgoCD first syncs.

# Install required collections
ansible-galaxy collection install -r ansible/requirements.yml

# Run the bootstrap playbook
ansible-playbook ansible/bootstrap.yml

example-app

The example-app directory contains a minimal OpenShift application (Red Hat UBI httpd) that serves as the promotion target. In a real pipeline, the CI job on the factory cluster would update the image tag in deployment.yaml and commit it here — ArgoCD then picks up the change and rolls out the new version automatically.

Companion Repo

The factory cluster GitOps config lives in: service-enablement-app-platform-factory-gitops

About

Service Enablement: App Platform Runtime

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors