This repository is a sample designed to demonstrate how to deploy TIBCO BusinessWorks Container Edition (BWCE) applications to Kubernetes using ArgoCD. It serves as a blueprint for implementing a GitOps workflow.
The purpose of this repository is to implement a GitOps workflow for BWCE applications. It automates the deployment process, ensures environment consistency, and provides a clear audit trail of all infrastructure changes.
- Automated Deployments: Any change pushed to the manifests is automatically synced to the cluster.
- Drift Detection: ArgoCD monitors the cluster and automatically corrects manual overrides to match the Git state.
- Environment Isolation: Uses dedicated namespaces (e.g., bwce-test) to separate application workloads.
- Secure Access: Configured specifically to work with GitHub Fine-grained Personal Access Tokens (PATs).
- /bwce-manifests: This directory contains all Kubernetes resource definitions, including:
bw-app-deployment.yaml: The Deployment configuration for the BWCE application.my-license-secret.yaml: The Secret to save license file used by BWCE application.
- /argocd-apps
bwce-argocd-app.yaml: The ArgoCD Application manifest used to register this project with the ArgoCD controller.
- A running Kubernetes cluster (Docker Desktop, K3s, or similar).
- A GitHub Fine-grained Token with 'Metadata' (Read) and 'Contents' (Read) permissions.
- A valid license base64 file in
./bwce-manifest/my-secret-license - BW images built locally (in my case is my-bw-app:6.12.0. Base image used: BW 6.12)
To bootstrap this environment, follow the sequence below:
- Install ArgoCD into the
argocdnamespace. - Create the repository secret in the
argocdnamespace using your GitHub PAT and thex-access-tokenusername. - Label the secret with
argocd.argoproj.io/secret-type=repository.
Apply the Application manifest to start the sync:
kubectl apply -f bwce-argocd-app.yaml -n argocd
The following diagram illustrates how a change (like a log level update) moves from your computer to the running cluster:
%%{init: {
'theme': 'base',
'look': 'handDrawn',
'themeVariables': {
'fontFamily': 'Comic Sans MS, cursive',
'primaryColor': '#ffffff',
'mainBkg': '#ffffff',
'lineColor': '#444444'
}
}}%%
%%{init: {'theme': 'neutral'}}%%
graph LR
A[Git Commit: Update Env Var Log = Debug] --> B(GitHub Private Repo)
B --> C{ArgoCD Controller}
C -->|Detect Change| D[Sync: Update Deployment]
subgraph "Namespace: bwce-test"
D --> E[Create New Pod]
E -->|Health Check| F[Terminate Old Pod]
F --> G((New Pod Started: Log = Debug ))
end
%% Apply more colors using style classes or individual styles
style A fill:#a2d2ff,stroke:#0056b3,stroke-width:2px,rx:10,ry:10,color:#000
style B fill:#d8f3dc,stroke:#2d6a4f,stroke-width:2px,rx:10,ry:10,color:#000
style C fill:#f96,stroke:#a33b00,stroke-width:3px,color:#000,font-weight:bold
style D fill:#ffb703,stroke:#e85d04,stroke-width:2px,rx:10,ry:10,color:#000
style E fill:#e6ccb2,stroke:#a68a64,stroke-width:2px,rx:10,ry:10,color:#000
style F fill:#ffcccc,stroke:#cc0000,stroke-width:2px,rx:10,ry:10,color:#000
style G fill:#9f9,stroke:#008000,stroke-width:3px,color:#000,font-weight:bold
Test Case: Environment variable update. Changing LOG from INFO to DEBUG in Git to verify ArgoCD's automated synchronization and the subsequent Pod restart in K8s.
Follow these steps to verify that the GitOps pipeline is working correctly (file local-commands.txt contains all commands executed in terminal):
Run the following to register the app:
kubectl apply -f argocd-apps/bwce-argocd-app.yaml -n argocd
Modify bwce-manifests/bw-app-deployment.yaml to change the log level:
env:
- name: BW_LOGLEVEL
value: "DEBUG" #-->Previous value was INFOgit add .
git commit -m "update env var log"
git push origin mainArgoCD UI: The application will transition to OutOfSync and then Synced.
Kubernetes: A new Pod will be created (in RED). Verify the env var with: kubectl exec -it <pod-name> -n bwce-test -- env | grep BW_LOGLEVEL
- ArgoCD Namespace: argocd
- Application Namespace: bwce-test
- Sync Policy: Automated (Prune: True, SelfHeal: True)
- Target Revision: HEAD
