Skip to content

Commit 710d412

Browse files
authored
Merge pull request #8 from JinwangMok/feat/scalex-dash
feat: scalex dash — multi-cluster Kubernetes TUI dashboard
2 parents 4f5e1cb + 1f99f4a commit 710d412

File tree

27 files changed

+6105
-1006
lines changed

27 files changed

+6105
-1006
lines changed

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ cargo fmt --check # Format check
6767
## Key Patterns
6868

6969
- **GitOps-First**: Post-bootstrap, ArgoCD manages all cluster state via ApplicationSets.
70-
- **Sync waves**: 0=ArgoCD/cluster-config, 1=Cilium/cert-manager/Kyverno/storage, 2=cilium-resources/cert-issuers/kyverno-policies, 3=tunnel/keycloak, 4=RBAC.
70+
- **Sync waves**: 0=ArgoCD/cluster-config, 1=Cilium/cert-manager/Kyverno/local-path-provisioner, 2=cilium-resources/cert-issuers/kyverno-policies, 3=tunnel/keycloak, 4=RBAC.
7171
- **Idempotent**: Every CLI operation safe to re-run.
7272
- **Pure Functions**: Rust CLI uses pure functions for HCL/inventory/vars generation. No side effects in generators.
7373
- **Secrets**: Created by CLI, stored in `credentials/` (gitignored). Templates in `credentials/*.example`.

README.md

Lines changed: 71 additions & 503 deletions
Large diffs are not rendered by default.

docs/ARCHITECTURE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ spread.yaml (루트 Application)
6868
| 0 | ArgoCD, cluster-config |
6969
| 1 | Cilium, cert-manager, Kyverno, local-path-provisioner |
7070
| 2 | cilium-resources, cert-issuers, kyverno-policies |
71-
| 3 | cloudflared-tunnel, socks5-proxy, keycloak |
71+
| 3 | cloudflared-tunnel, keycloak |
7272
| 4 | rbac |
7373

7474
---
@@ -139,5 +139,5 @@ spread.yaml (root Application)
139139
| 0 | ArgoCD, cluster-config |
140140
| 1 | Cilium, cert-manager, Kyverno, local-path-provisioner |
141141
| 2 | cilium-resources, cert-issuers, kyverno-policies |
142-
| 3 | cloudflared-tunnel, socks5-proxy, keycloak |
142+
| 3 | cloudflared-tunnel, keycloak |
143143
| 4 | rbac |

docs/CLI-REFERENCE.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# CLI Reference (`scalex`)
2+
3+
The `scalex` CLI is the primary tool for managing the entire ScaleX-POD-mini platform — from hardware facts gathering through SDI virtualization to multi-cluster provisioning.
4+
5+
## Build
6+
7+
```bash
8+
cd scalex-cli && cargo build --release
9+
# Binary: target/release/scalex
10+
```
11+
12+
## Core Commands
13+
14+
| Command | Description |
15+
|---------|-------------|
16+
| `scalex facts --all` | Gather hardware info from all bare-metal nodes |
17+
| `scalex facts --host <name>` | Gather from a single node |
18+
| `scalex sdi init <sdi-specs.yaml>` | Virtualize bare-metal → resource pool → VM pools |
19+
| `scalex sdi clean --hard --yes-i-really-want-to` | Full infrastructure reset |
20+
| `scalex sdi sync` | Reconcile bare-metal changes (add/remove nodes) |
21+
| `scalex cluster init <k8s-clusters.yaml>` | Kubespray → multi-cluster provisioning |
22+
| `scalex secrets apply` | Generate and apply pre-bootstrap K8s secrets |
23+
| `scalex bootstrap` | Install ArgoCD + register clusters + apply spread.yaml |
24+
25+
## Query Commands
26+
27+
| Command | Description |
28+
|---------|-------------|
29+
| `scalex get baremetals` | Hardware facts table |
30+
| `scalex get sdi-pools` | VM pool status |
31+
| `scalex get clusters` | Cluster inventory |
32+
| `scalex get config-files` | Config file validation |
33+
| `scalex validate` | Pre-provisioning config validation (YAML parsing, IP/CIDR conflicts, pool mapping) |
34+
| `scalex status` | 5-layer platform status report |
35+
| `scalex kernel-tune` | Kernel parameter recommendations and diff |
36+
37+
## Quick Reference
38+
39+
```bash
40+
scalex facts --all # HW facts
41+
scalex sdi init config/sdi-specs.yaml # VM pools
42+
scalex cluster init config/k8s-clusters.yaml # K8s clusters
43+
scalex secrets apply # Secrets
44+
scalex bootstrap # ArgoCD + GitOps
45+
scalex status # Full status
46+
scalex get clusters # Cluster list
47+
scalex sdi clean --hard --yes-i-really-want-to # Full reset
48+
```
49+
50+
## VM Resource Budget
51+
52+
`scalex plan` computes VM specs from component budgets. Source: `resource_planner.rs`
53+
54+
| Cluster Role | CPU (mc) | RAM (MB) | Disk (MB) | VM Spec (vCPU / GB / disk GB) |
55+
|--------------|----------|----------|-----------|-------------------------------|
56+
| **Management** (Tower) | 2,450 | 3,904 | 11,136 | **3 / 4 / 20** |
57+
| **Workload** (Sandbox) | 1,450 | 2,368 | 8,064 | **2 / 3 / 20** |
58+
59+
> Included: base-os, k8s-cp, cilium, coredns, argocd(mgmt), cert-manager, kyverno, keycloak(mgmt), cloudflared(mgmt), local-path(workload)
60+
> VM conversion: `vCPU = ceil(mc/1000)`, `GB = ceil(MB/1024)`, `disk = max(ceil(MB/1024), 20)`
61+
62+
## Config Files
63+
64+
| File | Purpose |
65+
|------|---------|
66+
| `credentials/.baremetal-init.yaml` | SSH access to bare-metal nodes |
67+
| `credentials/.env` | SSH passwords/key paths |
68+
| `credentials/secrets.yaml` | Keycloak, ArgoCD, Cloudflare secrets |
69+
| `config/sdi-specs.yaml` | VM pool definitions (CPU, RAM, disk, GPU) |
70+
| `config/k8s-clusters.yaml` | Cluster definitions (mode, role, addons) |

0 commit comments

Comments
 (0)