Skip to content

Commit da0e267

Browse files
authored
Replace booster-ui with Horizon UI (#187)
1 parent acd0909 commit da0e267

20 files changed

Lines changed: 644 additions & 208 deletions

README.md

Lines changed: 96 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,103 @@ There are required values that you must set explicitly when deploying SkyWalking
1919
| ---- | ----------- | ------- |
2020
| `oap.image.tag` | the OAP docker image tag | `10.4.0` |
2121
| `oap.storageType` | the storage type of the OAP | `elasticsearch`, `postgresql`, `banyandb`, etc. |
22-
| `ui.image.tag` | the UI docker image tag | `10.4.0` |
22+
| `ui.image.tag` | the Horizon UI docker image tag | `horizon-1.0.0` |
2323

2424
You can set these required values via command line (e.g. `--set oap.image.tag=10.4.0 --set oap.storageType=elasticsearch`),
2525
or edit them in a separate file(e.g. [`values.yaml`](chart/skywalking/values.yaml), [`values-my-es.yaml`](chart/skywalking/values-my-es.yaml))
2626
and use `-f <filename>` or `--values=<filename>` to set them.
2727

28+
## Web UI (Horizon UI)
29+
30+
The web UI shipped by this chart is [Apache SkyWalking Horizon UI](https://github.com/apache/skywalking-horizon-ui),
31+
which replaces the legacy `skywalking-booster-ui`. Compared to booster-ui:
32+
33+
- The container bundles a Node-based BFF in front of the SPA. It connects to OAP on **two** ports: the GraphQL query port (`12800`, `oap.ports.rest`) and the admin REST port (`17128`, `oap.ports.admin`, available on OAP 10.5+).
34+
- The container exposes **port 8081** (was 8080) and **does not pass-through `/graphql`** to OAP. Callers that previously talked to the UI's GraphQL endpoint (e.g. `swctl --base-url=http://<ui>/graphql`) must now talk to the OAP service directly (`http://<oap>:12800/graphql`).
35+
- The BFF requires **authentication**. There is no built-in `admin/admin` fallback — `ui.config.auth.local.users` ships **empty**, and the BFF refuses to start until you provide at least one user.
36+
- The full `horizon.yaml` schema (server, oap, auth, rbac, session, audit, debugLog) is owned upstream:
37+
- Canonical commented example: [horizon.example.yaml](https://github.com/apache/skywalking-horizon-ui/blob/main/horizon.example.yaml) (also shipped inside the image at `/app/horizon.example.yaml`)
38+
- Per-section reference: [docs/setup/horizon-yaml.md](https://github.com/apache/skywalking-horizon-ui/blob/main/docs/setup/horizon-yaml.md)
39+
40+
Anything you set under `ui.config:` in your Helm values is rendered verbatim into `horizon.yaml`, so the upstream docs apply 1:1.
41+
- Release images are published to Docker Hub as `apache/skywalking-ui:horizon-x.y.z`. Pre-release / dev images live at `ghcr.io/apache/skywalking-horizon-ui` (tags: SHA, `vX.Y.Z`, `main`).
42+
43+
### Quick demo install (publicly-known credentials)
44+
45+
For a first-run / trusted-network demo, paste the snippet below into a values file. It seeds two users — **`admin/admin`** (admin role) and **`skywalking/skywalking`** (viewer + maintainer) — using `argon2id` hashes of those plaintext passwords.
46+
47+
> ⚠ The hashes below are publicly known in this repo. Use only on trusted networks; rotate before exposing the UI externally.
48+
49+
```yaml
50+
# demo-values.yaml
51+
ui:
52+
config:
53+
auth:
54+
backend: local
55+
local:
56+
users:
57+
- username: admin # password: admin
58+
passwordHash: "$argon2id$v=19$m=65536,t=3,p=4$eemqy1r72oSXR58y8VpRqw$Bn/dULrmJTHEi3263KfgWDEwQmUsqNLi3xwyv/DekHM"
59+
roles: [admin]
60+
- username: skywalking # password: skywalking
61+
passwordHash: "$argon2id$v=19$m=65536,t=3,p=4$Zqj8HhQDqm8d5c2MipHYZw$BsaCnu4bdd4uadIldx3wwYLsdo47Thxb7Lv1MXpWG2Q"
62+
roles: [viewer, maintainer]
63+
```
64+
65+
```shell
66+
helm install "${SKYWALKING_RELEASE_NAME}" \
67+
oci://registry-1.docker.io/apache/skywalking-helm \
68+
--version "${SKYWALKING_RELEASE_VERSION}" \
69+
-n "${SKYWALKING_RELEASE_NAMESPACE}" \
70+
--set oap.image.tag=<release> \
71+
--set oap.storageType=elasticsearch \
72+
--set ui.image.tag=horizon-<release> \
73+
-f demo-values.yaml
74+
```
75+
76+
Then port-forward and log in as `admin/admin`:
77+
78+
```shell
79+
kubectl port-forward -n "${SKYWALKING_RELEASE_NAMESPACE}" \
80+
svc/${SKYWALKING_RELEASE_NAME}-skywalking-helm-ui 8080:80
81+
open http://127.0.0.1:8080
82+
```
83+
84+
### Production: hash via Kubernetes Secret
85+
86+
For anything beyond a demo, swap the publicly-known hash for one you generated yourself and feed it through a Secret + `${VAR}` interpolation:
87+
88+
```shell
89+
HASH=$(cd skywalking-horizon-ui && pnpm --filter bff cli:hash 'your-strong-password' | tail -1)
90+
91+
kubectl create secret generic horizon-admin \
92+
-n "${SKYWALKING_RELEASE_NAMESPACE}" \
93+
--from-literal=HORIZON_ADMIN_HASH="$HASH"
94+
95+
cat > my-values.yaml <<'EOF'
96+
ui:
97+
envFromSecret: horizon-admin
98+
config:
99+
auth:
100+
local:
101+
users:
102+
- username: admin
103+
passwordHash: "${HORIZON_ADMIN_HASH}"
104+
roles: [admin]
105+
EOF
106+
107+
helm install "${SKYWALKING_RELEASE_NAME}" \
108+
oci://registry-1.docker.io/apache/skywalking-helm \
109+
--version "${SKYWALKING_RELEASE_VERSION}" \
110+
-n "${SKYWALKING_RELEASE_NAMESPACE}" \
111+
--set oap.image.tag=<release> \
112+
--set oap.storageType=elasticsearch \
113+
--set ui.image.tag=horizon-<release> \
114+
-f my-values.yaml
115+
```
116+
117+
Full `horizon.yaml` reference: https://github.com/apache/skywalking-horizon-ui/blob/main/docs/setup/horizon-yaml.md
118+
28119
# Install
29120

30121
Let's set some variables for convenient use later.
@@ -44,7 +135,7 @@ helm install "${SKYWALKING_RELEASE_NAME}" \
44135
-n "${SKYWALKING_RELEASE_NAMESPACE}" \
45136
--set oap.image.tag=10.4.0 \
46137
--set oap.storageType=elasticsearch \
47-
--set ui.image.tag=10.4.0
138+
--set ui.image.tag=horizon-1.0.0
48139
```
49140

50141
To use BanyanDB as storage solution, you can try
@@ -56,7 +147,7 @@ helm install "${SKYWALKING_RELEASE_NAME}" \
56147
-n "${SKYWALKING_RELEASE_NAMESPACE}" \
57148
--set oap.image.tag=10.4.0 \
58149
--set oap.storageType=banyandb \
59-
--set ui.image.tag=10.4.0 \
150+
--set ui.image.tag=horizon-1.0.0 \
60151
--set elasticsearch.enabled=false \
61152
--set banyandb.enabled=true \
62153
--set banyandb.image.tag=0.10.1
@@ -135,7 +226,7 @@ here are some examples.
135226
helm install "${SKYWALKING_RELEASE_NAME}" ${REPO}/skywalking -n "${SKYWALKING_RELEASE_NAMESPACE}" \
136227
--set oap.image.tag=10.4.0 \
137228
--set oap.storageType=elasticsearch \
138-
--set ui.image.tag=10.4.0 \
229+
--set ui.image.tag=horizon-1.0.0 \
139230
--set eck-operator.installCRDs=false
140231
```
141232

@@ -179,7 +270,7 @@ helm -n istio-system install skywalking \
179270
-n "${SKYWALKING_RELEASE_NAMESPACE}" \
180271
--set oap.image.tag=10.4.0 \
181272
--set oap.storageType=elasticsearch \
182-
--set ui.image.tag=10.4.0
273+
--set ui.image.tag=horizon-1.0.0
183274
```
184275

185276
## Install development version using source codes

chart/operator/templates/crds.yaml

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3424,7 +3424,7 @@ kind: CustomResourceDefinition
34243424
metadata:
34253425
annotations:
34263426
cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ include "operator.fullname" . }}-serving-cert
3427-
controller-gen.kubebuilder.io/version: v0.14.0
3427+
controller-gen.kubebuilder.io/version: v0.19.0
34283428
name: uis.operator.skywalking.apache.org
34293429
spec:
34303430
conversion:
@@ -3501,7 +3501,26 @@ spec:
35013501
description: UISpec defines the desired state of UI
35023502
properties:
35033503
OAPServerAddress:
3504-
description: Backend OAP server address
3504+
description: |-
3505+
Backend OAP server address.
3506+
For kind=booster, exported as the SW_OAP_ADDRESS env var.
3507+
For kind=horizon, used as oap.queryUrl in the generated horizon.yaml.
3508+
type: string
3509+
OAPServerAdminAddress:
3510+
description: |-
3511+
OAPServerAdminAddress is the OAP admin host (port 17128 by default; runtime-rule,
3512+
dsl-debug, inspect, status). Only used when kind=horizon. If unset, defaults to
3513+
http://<name>-oap.<namespace>:17128.
3514+
type: string
3515+
OAPServerZipkinAddress:
3516+
description: |-
3517+
OAPServerZipkinAddress is the OAP Zipkin REST host. Only used when kind=horizon.
3518+
If unset, defaults to <OAPServerAddress>/zipkin.
3519+
type: string
3520+
config:
3521+
description: |-
3522+
Config is a raw horizon.yaml that, when set, fully replaces the operator-generated
3523+
config mounted into the Horizon UI container. Only used when kind=horizon.
35053524
type: string
35063525
image:
35073526
description: Image is the UI Docker image to deploy.
@@ -3510,6 +3529,16 @@ spec:
35103529
description: Count is the number of UI pods
35113530
format: int32
35123531
type: integer
3532+
kind:
3533+
default: horizon
3534+
description: |-
3535+
Kind selects which SkyWalking web UI to deploy.
3536+
"horizon" deploys the next-generation Horizon UI (default).
3537+
"booster" deploys the legacy Booster UI image.
3538+
enum:
3539+
- horizon
3540+
- booster
3541+
type: string
35133542
service:
35143543
description: Service relevant settings
35153544
properties:
@@ -3677,4 +3706,4 @@ spec:
36773706
storage: true
36783707
subresources:
36793708
status: {}
3680-
{{- end }}
3709+
{{- end }}

0 commit comments

Comments
 (0)