{"id":23527926,"url":"https://github.com/nerdingitout/sat-cicd","last_synced_at":"2026-01-24T16:43:26.448Z","repository":{"id":84626959,"uuid":"430773808","full_name":"nerdingitout/sat-cicd","owner":"nerdingitout","description":"Step-by-step guide on how to set up CI/CD pipelines among OpenShift Clusters Residing in Satellite or the Cloud.","archived":false,"fork":false,"pushed_at":"2022-02-01T08:35:29.000Z","size":80,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-14T10:32:23.772Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nerdingitout.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-22T16:01:01.000Z","updated_at":"2022-01-31T08:30:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"6fb6f101-cee3-4a0c-918b-7756471cfb34","html_url":"https://github.com/nerdingitout/sat-cicd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nerdingitout/sat-cicd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nerdingitout%2Fsat-cicd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nerdingitout%2Fsat-cicd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nerdingitout%2Fsat-cicd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nerdingitout%2Fsat-cicd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nerdingitout","download_url":"https://codeload.github.com/nerdingitout/sat-cicd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nerdingitout%2Fsat-cicd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28731754,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T10:24:43.181Z","status":"ssl_error","status_checked_at":"2026-01-24T10:24:36.112Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-25T20:18:55.995Z","updated_at":"2026-01-24T16:43:26.412Z","avatar_url":"https://github.com/nerdingitout.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Build CI/CD Pipeline across multiple Red Hat OpenShift Clusters\nThis guide will focus on setting up the pipeline across different clusters on the Cloud and Satellite.\n## Content\n\n- \u003ca href=\"https://github.com/nerdingitout/sat-cicd#prerequisites\"\u003ePrerequisites\u003c/a\u003e\n- \u003ca href=\"https://github.com/nerdingitout/sat-cicd#architecture-diagram\"\u003eArchitecture Diagram\u003c/a\u003e\n- \u003ca href=\"https://github.com/nerdingitout/sat-cicd#location-b---production-environment\"\u003eLocation B - Production Environment\u003c/a\u003e\n    - \u003ca href=\"https://github.com/nerdingitout/sat-cicd#setting-up-the-pipeline-in-production-environment\"\u003eSetting up the pipeline in Production Environment\u003c/a\u003e\n- \u003ca href=\"https://github.com/nerdingitout/sat-cicd#location-a---dev-environment\"\u003eLocation A - Dev Environment\u003c/a\u003e\n    - \u003ca href=\"https://github.com/nerdingitout/sat-cicd#setting-up-the-pipeline-in-development-environment\"\u003eSetting up the pipeline in Development Environment\u003c/a\u003e\n- \u003ca href=\"https://github.com/nerdingitout/sat-cicd#trigger-the-pipeline#\"\u003eTrigger the Pipeline\u003c/a\u003e\n- \u003ca href=\"https://github.com/nerdingitout/sat-cicd#connect-to-postgres-db\"\u003e(Optional)Connect to Postgres DB\u003c/a\u003e\n- \u003ca href=\"https://github.com/nerdingitout/sat-cicd#resources\"\u003eResources\u003c/a\u003e\n## Prerequisites\n- For each classic virtual server (worker nodes) for the openshift cluster, it should have minimum 4vCPU, 16 GB RAM, 3 disks (100 GB for boot, at least 25 GB for /var/data disk, a free unmounted and unpartitioned disk can be 100 GB).\n- Shared Storage for the pipeline. Check: \u003ca href=\"https://cloud.ibm.com/docs/satellite?topic=satellite-config-storage-local-file\"\u003eSetting up local file storage on Red Hat OpenShift on IBM Cloud Satellite\u003c/a\u003e\n- \u003ca href=\"https://cloud.ibm.com/docs/openshift?topic=openshift-registry\"\u003eSet up Image Registry for Red Hat OpenShift Cluster on IBM Cloud Satellite\u003c/a\u003e\n## Architecture Diagram\n![sat](https://user-images.githubusercontent.com/36239840/144072701-4de95c75-9b9b-495f-8fb1-e40723ce4a93.png)\n\n## Location B - Production Environment\n- Create ```prod-env``` project\n```\noc new-project prod-env\n```\n- Create Service account and give it the right permissions \n```\noc create sa pipeline-starter -n prod-env\n```\n```\noc create -f https://raw.githubusercontent.com/nerdingitout/sat-cicd/main/location%20b/pipeline-starter-clusterrole.yaml -n prod-env\n```\n```\noc create -f https://raw.githubusercontent.com/nerdingitout/sat-cicd/main/location%20b/pipeline-starter-rolebinding.yaml -n prod-env\n```\n- Obtain the ```pipeline-starter```authentication token\n```\noc sa get-token pipeline-starter -n prod-env\n```\n- Get the server URL from OpenShift cluster Overview page, copy the Cluster service URL from the Networking section and save it \u003ca href=\"https://github.com/nerdingitout/sat-cicd#:~:text=Make%20sure%20to%20edit%20the%20openshift%2Dserver%2Durl%20parameter%20in%20exectue%2Dremote%2Dpipeline%20task%20in%20the%20pipeline%20yaml%20(line%20101).%20Add%20the%20remote%20cluster%20URL%20(Location%20B)%20to%20connect%20to%20it.%20(the%20following%20lines%20for%20reference\"\u003e  to use it at a later step when editing the pipeline\u003c/a\u003e\n\n### Setting up the pipeline in Production Environment\n- Create tasks\n```\noc create -f https://raw.githubusercontent.com/nerdingitout/sat-cicd/main/tasks/apply-manifest-task.yaml -n prod-env\noc create -f https://raw.githubusercontent.com/nerdingitout/sat-cicd/main/tasks/test-task.yaml -n prod-env\noc create -f https://raw.githubusercontent.com/nerdingitout/sat-cicd/main/tasks/update-deployment-task.yaml -n prod-env\n```\n- Create Pipeline\n```\noc create -f https://raw.githubusercontent.com/nerdingitout/sat-cicd/main/location%20b/pipeline-b.yaml -n prod-env\n```\n- Create PVC\n\u003cbr\u003eFrom the Administrator perspective on the web console, go to storage and access PersistentVolumeClaims section. Click Create Persistent Volume Claim. Fill in the details as shown in the screenshot below.\u003cbr\u003e\n![image](https://user-images.githubusercontent.com/36239840/144010178-f6296011-7f0a-4fe9-b1ae-f7102b05a264.png)\n\n## Location A - Dev Environment\n- Create ```dev-env``` project\n```\noc new-project dev-env\n```\n- Create ```pipeline-starter``` secret in ```dev-env``` project to access the ```prod-env``` project\n```\noc create secret generic --from-literal=openshift-token=INSERT_TOKEN_HERE pipeline-starter -n dev-env\n```\n### Setting up the pipeline in Development Environment\n- Create tasks\n```\noc create -f https://raw.githubusercontent.com/nerdingitout/sat-cicd/main/location%20a/execute-remote-pipeline-task.yaml -n dev-env\noc create -f https://raw.githubusercontent.com/nerdingitout/sat-cicd/main/tasks/apply-manifest-task.yaml -n dev-env\noc create -f https://raw.githubusercontent.com/nerdingitout/sat-cicd/main/tasks/test-task.yaml -n dev-env\noc create -f https://raw.githubusercontent.com/nerdingitout/sat-cicd/main/tasks/update-deployment-task.yaml -n dev-env\n```\n- Create Pipeline\n```\noc create -f https://raw.githubusercontent.com/nerdingitout/sat-cicd/main/location%20a/pipeline-a.yaml -n dev-env\n```\n- Create PVC\n\u003cbr\u003eFrom the Administrator perspective on the web console, go to storage and access PersistentVolumeClaims section. Click Create Persistent Volume Claim. Fill in the details as shown in the screenshot below.\u003cbr\u003e\n![image](https://user-images.githubusercontent.com/36239840/144009663-35e70b43-0ee0-4b12-b1e4-04e7decd11f3.png)\n\n- Make sure to edit the ```openshift-server-url``` parameter in ```exectue-remote-pipeline``` task in the pipeline yaml (line 101). Add the remote cluster URL (Location B) to connect to it. (the following lines for reference)\n```\n- name: execute-remote-pipeline\n    params:\n    - name: APP_NAME\n      value: $(params.deployment-name)\n    - name: url\n      value: $(params.git-url)\n    - name: pipeline-name\n      value: prod-pipeline\n    - name: pipeline-namespace\n      value: prod-env\n    - name: openshift-server-url\n      value: INSERT_OPENSHIFT_URL_HERE\n    - name: openshift-token-secret\n      value: pipeline-starter\n ```\n## Trigger the Pipeline\n- Run the following command to trigger the pipeline that starts from location A which in turn triggers the pipeline in location B. Make sure to change the values indicated below according to your project, pipeline and deployment details.\n```\ntkn pipeline start \u003cpipeline-name\u003e -w name=shared-workspace,ClaimName=source-pvc -p deployment-name=\u003cdeployment-name\u003e\n    -p git-url=\u003cgit-url\u003e --use-param-defaults\n```\n## Connect to Postgres DB\n- This step is to be applied once and only for the backend application \u003ca href=\"https://github.com/nerdingitout/form-bff\"\u003eform bff\u003c/a\u003e. Make sure to connect to your postgres database by creating a secret in each environment using the following command. Make sure to replace the values wit the right credentials for each variable. Leave port 8080 as is.\u003cbr\u003e\n```\noc create secret generic postgredb-secret --from-literal=DB_USER=\u003cadd-db-user-here\u003e --from-literal=DB_PASSWORD=\u003cadd-db-password-here\u003e --from-literal=DB_HOST=\u003cadd-db-host-here\u003e --from-literal=DB_PORT=\u003cadd-db-port-here\u003e --from-literal=DB_NAME=\u003cadd-db-name-here\u003e --from-literal=PORT=8080\n```\n- Then set the secret you create as environment variable for your application\u003cbr\u003e\n```\noc set env --from=secret/postgredb-secret deployment/form-bff\n```\n## Resources\n- https://piotrminkowski.com/2021/08/05/kubernetes-ci-cd-with-tekton-and-argocd/\n- https://dzone.com/articles/cicd-pipeline-spanning-multiple-openshift-clusters\n- https://github.com/noseka1/execute-remote-pipeline\n- https://containerjournal.com/features/standardizing-multi-cloud-k8s-deployments-with-tekton/\n- https://cloud.ibm.com/docs/satellite?topic=satellite-hosts\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnerdingitout%2Fsat-cicd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnerdingitout%2Fsat-cicd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnerdingitout%2Fsat-cicd/lists"}