You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add support for building scripts as an image externally
Signed-off-by: Patrick Knight <pknight@redhat.com>
* Fix EOL and add some more owners
Signed-off-by: Patrick Knight <pknight@redhat.com>
* Test build and push
Signed-off-by: Patrick Knight <pknight@redhat.com>
* Remove build and push from PR
Signed-off-by: Patrick Knight <pknight@redhat.com>
* Fix issue with additional \ in oc and helm script
Signed-off-by: Patrick Knight <pknight@redhat.com>
* Allow for multi-stage and writable cache in Dockerfile
Signed-off-by: Patrick Knight <pknight@redhat.com>
* Fix file names in kustomization file
Signed-off-by: Patrick Knight <pknight@redhat.com>
* Update stage one to use Quay instead of Red Hat registry
Signed-off-by: Patrick Knight <pknight@redhat.com>
---------
Signed-off-by: Patrick Knight <pknight@redhat.com>
Copy file name to clipboardExpand all lines: README.md
+199-5Lines changed: 199 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,19 @@
2
2
3
3
A collection of resources and scripts to quickly deploy an RHDH instance in Kubernetes, preloaded with useful plugins, example entities, and third-party integrations for rapid testing and development.
4
4
5
+
## Table of Contents
6
+
7
+
## Table of Contents
8
+
9
+
-[Background and Purpose](#background-and-purpose)
10
+
-[Outline of this project](#outline-of-this-project)
11
+
-[Running the Scripts](#running-the-scripts)
12
+
-[Option 1: Local Installation](#option-1-local-installation)
13
+
-[Option 2: Run with Docker](#option-2-run-with-docker)
14
+
-[Option 3: Deploy as Kubernetes Job](#option-3-deploy-as-kubernetes-job)
15
+
-[Next Steps](#next-steps)
16
+
-[General notes](#general-notes)
17
+
5
18
## Background and Purpose
6
19
7
20
These scripts were created out of a need to quickly spin up an RHDH instance preconfigured for testing. The goal is to streamline the process of deploying Red Hat Developer Hub with preconfigured plugins and supporting resources, making it easy for team members, especially those working on plugins, to verify changes, report bugs, and explore features in a real environment. It also serves as a practical example of how RHDH and its plugins can be integrated and showcased.
@@ -70,12 +83,15 @@ More details about this directory and how to populate it are provided in the plu
70
83
71
84
## Running the Scripts
72
85
73
-
You have two options to run these scripts:
86
+
There are three ways to run the testbed scripts, depending on your environment and preferences:
74
87
75
-
1.**Locally** - Install dependencies (`oc`, `helm`) and run directly
76
-
2.**Docker** - Use containerized environment (especially useful for macOS users)
|**Local**| Development, quick iterations, full control |`oc`, `helm` installed locally |
91
+
|**Docker Compose**| macOS users, isolated environment, no local tool setup | Docker Desktop |
92
+
|**Kubernetes Job**| CI/CD pipelines, fully automated, no local tools needed | Cluster access only |
77
93
78
-
##First Steps (Local Installation)
94
+
### Option 1: Local Installation
79
95
80
96
These scripts are designed to work out-of-the-box with minimal setup. In fact, it's recommended that you start with the default setup to better understand how everything fits together. You can always customize and extend things later.
81
97
@@ -125,7 +141,7 @@ Step 6. Access your RHDH instance:
125
141
126
142
You'll now have a clean, working instance of RHDH that's ready to be enhanced in the next steps
127
143
128
-
## Alternative: Run with Docker
144
+
## Option 2: Run with Docker
129
145
130
146
If you prefer containerized execution, use this instead of the local installation above:
131
147
@@ -143,6 +159,184 @@ docker compose up rhdh-start
143
159
docker compose up rhdh-teardown
144
160
```
145
161
162
+
## Option 3: Deploy as Kubernetes Job
163
+
164
+
For fully automated, hands-off deployment directly on your cluster without any local tooling requirements, you can deploy the testbed as a Kubernetes Job.
165
+
166
+
### Prerequisites
167
+
168
+
- Access to an OpenShift cluster with `cluster-admin` or equivalent permissions
169
+
-`oc` or `kubectl` CLI (only needed to apply the manifests)
170
+
171
+
### Using the Pre-built Image
172
+
173
+
A pre-built container image is available at `ghcr.io/PatAKnight/rhdh-testbed:latest`.
174
+
175
+
**Step 1.** Create the deployment namespace:
176
+
177
+
`oc new-project rhdh-testbed`
178
+
179
+
**Step 2a.** Configure the deployment by editing `deploy/configmap.yaml`:
The Kubernetes Job requires elevated permissions to:
331
+
332
+
- Create namespaces and projects
333
+
- Install Operators via OLM
334
+
- Create ClusterRoles and ClusterRoleBindings
335
+
- Deploy various workloads and CRDs
336
+
337
+
**This tool is designed for disposable, non-production clusters.** The included ClusterRole grants broad permissions necessary for the automation. Always review `deploy/cluster-role.yaml` before applying.
338
+
The Job uses a dedicated ServiceAccount (`rhdh-testbed-runner`) that is scoped to only what's necessary for the deployment automation.
339
+
146
340
## Next Steps
147
341
148
342
So, you now have a running RHDH (Red Hat Developer Hub) instance, great! But this base setup is just the foundation. To transform it into a useful demo or testing environment, here are some next steps to take:
0 commit comments