|
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 | |
0 commit comments