Skip to content

Commit 49f55c3

Browse files
committed
Add Strimzi, Console and Registry installation
* Add the Strimzi, StreamsHub Console and Apicurio Registry Operator install to the base kustomization * Add the single-node Kafka, Streamshub Console instance and Apircurio Registry instance installation to the stack kustomization * Add install and uninstall scripts * Add version update script * Add Readme with intall and usage instructions Signed-off-by: Thomas Cooper <code@tomcooper.dev>
1 parent 547602b commit 49f55c3

21 files changed

Lines changed: 1310 additions & 2 deletions

File tree

.github/workflows/validate.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Validate
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
kustomize-build:
11+
name: Validate Kustomize configs
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v6
15+
16+
- name: Set up kubectl
17+
uses: azure/setup-kubectl@v4
18+
19+
- name: Build base layer
20+
run: kubectl kustomize base/
21+
22+
- name: Build stack layer
23+
run: kubectl kustomize stack/
24+
25+
- name: Verify quick-start labels in base
26+
run: |
27+
kubectl kustomize base/ | grep -q 'app.kubernetes.io/part-of: streamshub-developer-quickstart'
28+
29+
- name: Verify quick-start labels in stack
30+
run: |
31+
kubectl kustomize stack/ | grep -q 'app.kubernetes.io/part-of: streamshub-developer-quickstart'
32+
33+
shellcheck:
34+
name: Lint shell scripts
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v6
38+
39+
- name: Run ShellCheck
40+
uses: ludeeus/action-shellcheck@2.0.0
41+
with:
42+
version: v0.11.0
43+
scandir: "."
44+
additional_files: "install.sh uninstall.sh update-version.sh"
45+
46+
yamllint:
47+
name: Lint YAML files
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: actions/checkout@v6
51+
52+
- name: Install yamllint
53+
run: apt install yamllint
54+
55+
- name: Run yamllint
56+
run: yamllint -d relaxed .

README.md

Lines changed: 184 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,184 @@
1-
# developer-quickstart
2-
A kustomize-based quick start setup for deploying the StreamsHub event stack in a local ephemeral or remote development kubernetes cluster.
1+
# StreamsHub Developer Quick-Start
2+
3+
A Kustomize-based repository for deploying the StreamsHub event-streaming stack on a local or development Kubernetes cluster using only `kubectl`.
4+
5+
> **Note:** This is a **development-only** configuration. Resource limits, security settings and storage configurations are **not** suitable for production use.
6+
7+
## What Gets Deployed
8+
9+
| Component | Namespace | Description |
10+
|-----------|-----------|-------------|
11+
| Strimzi Kafka Operator | `strimzi` | Manages Kafka clusters via CRDs |
12+
| Kafka cluster (`dev-cluster`) | `kafka` | Single-node Kafka for development |
13+
| Apicurio Registry Operator | `apicurio-registry` | Manages schema registry instances |
14+
| Apicurio Registry instance | `apicurio-registry` | In-memory schema registry |
15+
| StreamsHub Console Operator | `streamshub-console` | Manages console instances |
16+
| StreamsHub Console instance | `streamshub-console` | Web UI for Kafka management |
17+
18+
## Prerequisites
19+
20+
- `kubectl` v1.27 or later (for Kustomize v5.0 `labels` transformer support)
21+
- A running Kubernetes cluster (minikube, KIND, etc.)
22+
- An Ingress controller for StreamsHub Console access (e.g. `minikube addons enable ingress`)
23+
24+
## Quick-Start Install
25+
26+
Deploy the entire stack with a single command:
27+
28+
```shell
29+
curl -sL https://raw.githubusercontent.com/streamshub/developer-quickstart/main/install.sh | bash
30+
```
31+
32+
This script installs operators, waits for them to become ready, then deploys the operands.
33+
34+
### Configuration
35+
36+
The install script accepts the following environment variables:
37+
38+
| Variable | Default | Description |
39+
|----------|---------|-------------|
40+
| `REPO` | `streamshub/developer-quickstart` | GitHub repository path |
41+
| `REF` | `main` | Git ref, branch, or tag |
42+
| `TIMEOUT` | `120s` | `kubectl wait` timeout |
43+
44+
Example with a pinned version:
45+
46+
```shell
47+
curl -sL https://raw.githubusercontent.com/streamshub/developer-quickstart/main/install.sh | REF=v1.0.0 bash
48+
```
49+
50+
## Manual Install
51+
52+
If you prefer to control each step, the stack is installed in two phases:
53+
54+
### Phase 1 — Operators and CRDs
55+
56+
```shell
57+
kubectl apply -k 'https://github.com/streamshub/developer-quickstart//base?ref=main'
58+
```
59+
60+
Wait for the operators to become ready:
61+
62+
```shell
63+
kubectl wait --for=condition=Available deployment/strimzi-cluster-operator -n strimzi --timeout=120s
64+
kubectl wait --for=condition=Available deployment/apicurio-registry-operator -n apicurio-registry --timeout=120s
65+
kubectl wait --for=condition=Available deployment/streamshub-console-operator -n streamshub-console --timeout=120s
66+
```
67+
68+
### Phase 2 — Operands
69+
70+
```shell
71+
kubectl apply -k 'https://github.com/streamshub/developer-quickstart//stack?ref=main'
72+
```
73+
74+
## Accessing the Console
75+
76+
### Minikube
77+
78+
When using minikube, (if you didn't eanble it when you created the minikube cluster) enable the ingress addon and run `minikube tunnel`:
79+
80+
```bash
81+
minikube addons enable ingress
82+
minikube tunnel
83+
```
84+
85+
Then use port-forwarding to access the console:
86+
87+
```bash
88+
kubectl port-forward -n streamshub-console svc/streamshub-console-console-service 8080:80
89+
```
90+
91+
Open [http://localhost:8080](http://localhost:8080) in your browser.
92+
93+
## Teardown
94+
95+
### Using the Uninstall Script
96+
97+
The uninstall script handles safe teardown with shared-cluster safety checks:
98+
99+
```shell
100+
curl -sL https://raw.githubusercontent.com/streamshub/developer-quickstart/main/uninstall.sh | bash
101+
```
102+
103+
The script:
104+
1. Deletes operand custom resources and waits for finalizers to complete
105+
2. Checks each operator group for non-quick-start CRs on the cluster
106+
3. Fully removes operator groups with no shared CRDs
107+
4. For shared operator groups, removes only the operator deployment (retaining CRDs)
108+
5. Reports any retained groups and remaining resources
109+
110+
### Manual Teardown
111+
112+
**Phase 1 — Delete operands:**
113+
114+
```shell
115+
kubectl delete -k 'https://github.com/streamshub/developer-quickstart//stack?ref=main'
116+
```
117+
118+
Wait for all custom resources to be fully removed before proceeding.
119+
120+
**Phase 2 — Delete operators and CRDs:**
121+
122+
> **Warning:** On shared clusters, deleting CRDs will cascade-delete ALL custom resources of that type cluster-wide. Check for non-quick-start resources first:
123+
> ```shell
124+
> kubectl get kafkas -A --selector='!app.kubernetes.io/part-of=streamshub-developer-quickstart'
125+
> ```
126+
127+
```shell
128+
kubectl delete -k 'https://github.com/streamshub/developer-quickstart//base?ref=main'
129+
```
130+
131+
### Finding Quick-Start Resources
132+
133+
All resources carry the label `app.kubernetes.io/part-of=streamshub-developer-quickstart`:
134+
135+
```shell
136+
kubectl get all -A -l app.kubernetes.io/part-of=streamshub-developer-quickstart
137+
kubectl get crds,clusterroles,clusterrolebindings -l app.kubernetes.io/part-of=streamshub-developer-quickstart
138+
```
139+
140+
## Updating Component Versions
141+
142+
Use the `update-version.sh` script to update component versions:
143+
144+
```shell
145+
# List available versions
146+
./update-version.sh --list strimzi
147+
148+
# Preview changes
149+
./update-version.sh --dry-run strimzi 0.52.0
150+
151+
# Check if a release exists
152+
./update-version.sh --check apicurio-registry 3.2.0
153+
154+
# Update a component
155+
./update-version.sh strimzi 0.52.0
156+
```
157+
158+
Supported components: `strimzi`, `apicurio-registry`, `streamshub-console`
159+
160+
## Repository Structure
161+
162+
```
163+
base/ # Phase 1: Operators & CRDs
164+
├── kustomization.yaml # Composes all operator sub-components
165+
├── strimzi-operator/ # Strimzi Kafka Operator
166+
├── apicurio-registry-operator/ # Apicurio Registry Operator
167+
└── streamshub-console-operator/ # StreamsHub Console Operator
168+
169+
stack/ # Phase 2: Operands (Custom Resources)
170+
├── kustomization.yaml # Composes all operand sub-components
171+
├── kafka/ # Single-node Kafka cluster
172+
├── apicurio-registry/ # In-memory registry instance
173+
└── streamshub-console/ # Console instance
174+
175+
overlays/ # Future: variant configurations
176+
```
177+
178+
## Current Component Versions
179+
180+
| Component | Version |
181+
|-----------|---------|
182+
| Strimzi | 0.51.0 |
183+
| Apicurio Registry | 3.1.7 |
184+
| StreamsHub Console | 0.11.0 |
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
namespace: apicurio-registry
5+
6+
resources:
7+
- https://raw.githubusercontent.com/Apicurio/apicurio-registry/3.1.7/operator/install/install.yaml
8+
- namespace.yaml
9+
10+
labels:
11+
- pairs:
12+
app.kubernetes.io/part-of: streamshub-developer-quickstart
13+
includeSelectors: false
14+
15+
patches:
16+
# Set namespace for ClusterRoleBinding subjects
17+
- target:
18+
kind: ClusterRoleBinding
19+
patch: |-
20+
- op: replace
21+
path: /subjects/0/namespace
22+
value: apicurio-registry
23+
# Strip version suffix from operator Deployment name
24+
- target:
25+
kind: Deployment
26+
labelSelector: app.kubernetes.io/name=apicurio-registry-operator
27+
patch: |-
28+
- op: replace
29+
path: /metadata/name
30+
value: apicurio-registry-operator
31+
# Set watched namespaces (replace OLM valueFrom with direct value)
32+
- target:
33+
kind: Deployment
34+
name: apicurio-registry-operator
35+
patch: |-
36+
apiVersion: apps/v1
37+
kind: Deployment
38+
metadata:
39+
name: apicurio-registry-operator
40+
spec:
41+
template:
42+
spec:
43+
containers:
44+
- name: apicurio-registry-operator
45+
env:
46+
- name: APICURIO_OPERATOR_WATCHED_NAMESPACES
47+
value: '*'
48+
valueFrom: null
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
apiVersion: v1
2+
kind: Namespace
3+
metadata:
4+
name: apicurio-registry

base/kustomization.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
resources:
5+
- strimzi-operator
6+
- apicurio-registry-operator
7+
- streamshub-console-operator
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
namespace: streamshub-console
5+
6+
resources:
7+
- https://github.com/streamshub/console/releases/download/0.11.0/streamshub-console-operator.yaml
8+
- namespace.yaml
9+
10+
labels:
11+
- pairs:
12+
app.kubernetes.io/part-of: streamshub-developer-quickstart
13+
includeSelectors: false
14+
15+
patches:
16+
# Set namespace for ClusterRoleBinding subjects
17+
- target:
18+
kind: ClusterRoleBinding
19+
patch: |-
20+
- op: replace
21+
path: /subjects/0/namespace
22+
value: streamshub-console
23+
# Set namespace for RoleBinding subjects
24+
- target:
25+
kind: RoleBinding
26+
patch: |-
27+
- op: replace
28+
path: /subjects/0/namespace
29+
value: streamshub-console
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
apiVersion: v1
2+
kind: Namespace
3+
metadata:
4+
name: streamshub-console
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
apiVersion: rbac.authorization.k8s.io/v1
2+
kind: ClusterRoleBinding
3+
metadata:
4+
name: strimzi-cluster-operator-watched
5+
roleRef:
6+
apiGroup: rbac.authorization.k8s.io
7+
kind: ClusterRole
8+
name: strimzi-cluster-operator-watched
9+
subjects:
10+
- kind: ServiceAccount
11+
name: strimzi-cluster-operator
12+
---
13+
apiVersion: rbac.authorization.k8s.io/v1
14+
kind: ClusterRoleBinding
15+
metadata:
16+
name: strimzi-cluster-operator-namespaced
17+
roleRef:
18+
apiGroup: rbac.authorization.k8s.io
19+
kind: ClusterRole
20+
name: strimzi-cluster-operator-namespaced
21+
subjects:
22+
- kind: ServiceAccount
23+
name: strimzi-cluster-operator
24+
---
25+
apiVersion: rbac.authorization.k8s.io/v1
26+
kind: ClusterRoleBinding
27+
metadata:
28+
name: strimzi-cluster-operator-entity-operator-delegation
29+
roleRef:
30+
apiGroup: rbac.authorization.k8s.io
31+
kind: ClusterRole
32+
name: strimzi-entity-operator
33+
subjects:
34+
- kind: ServiceAccount
35+
name: strimzi-cluster-operator

0 commit comments

Comments
 (0)