Commit 07aef07
committed
roachprod: add web UI for cluster management
This commit introduces a new web-based UI for roachprod, providing an
intuitive interface for managing CockroachDB clusters. Previously, all
roachprod operations required command-line usage, which could be cumbersome
for common workflows like viewing cluster status, creating clusters, and
managing cluster lifecycle.
The new UI is accessible via `roachprod ui` and provides:
**Cluster Management:**
- List all clusters or filter to show only user's clusters
- View cluster details: nodes, lifetime remaining, cloud provider, machine type
- Create new clusters with an interactive modal
- Delete, extend, start, stop, stage, and wipe clusters
- Real-time cluster status with node-level information
- Access to Admin UI and PostgreSQL connection strings
**Interactive Terminals:**
- SSH terminal access to cluster nodes via WebSocket
- SQL console for direct database interaction
- Backend console showing roachprod command output
**Cloud Provider Integration:**
- Dynamic machine type and zone selection based on cloud provider
- Queries GCE, AWS, and Azure APIs for up-to-date options
- Displays machine specifications (vCPUs, RAM) alongside each type
- Intelligent sorting by machine class and size
- Multi-zone selection for geo-distributed clusters
**User Experience:**
- Real-time notifications for operations
- Confetti celebration when clusters are created successfully
- Split-panel layout with cluster list and terminal/console views
- Loading states and error handling throughout
**Technical Implementation:**
Backend (Go):
- Embedded web server with HTTP and WebSocket handlers
- REST API for cluster operations (/api/clusters/*, /api/cloud-providers/*)
- WebSocket endpoints for SSH and SQL console streaming
- Integration with existing roachprod cluster management functions
- UI assets embedded in binary via Bazel
Frontend (React + TypeScript):
- Ant Design component library for consistent UI
- XTerm.js for terminal emulation
- Real-time WebSocket communication for terminals
- Notification system with drawer interface
- Split panel layout
The UI is launched with `roachprod ui [--port 8080]` and opens automatically
in the default browser.
Release note: none
Epic: None1 parent ae0b3d7 commit 07aef07
File tree
48 files changed
+9332
-283
lines changed- pkg
- cmd/roachprod/cli
- gen
- roachprod
- ui
- vm/gce
- ui
- workspaces/roachprod-ui
- public
- src
- api
- components
- BackendConsole
- CreateClusterModal
- ExtendClusterModal
- NotificationDrawer
- SQLConsole
- SSHTerminal
- contexts
- pages/ClustersPage
- styles
- types
- util/assetbundle/gen
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
48 files changed
+9332
-283
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
| 310 | + | |
310 | 311 | | |
311 | 312 | | |
312 | 313 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2256 | 2256 | | |
2257 | 2257 | | |
2258 | 2258 | | |
| 2259 | + | |
| 2260 | + | |
| 2261 | + | |
| 2262 | + | |
| 2263 | + | |
| 2264 | + | |
| 2265 | + | |
| 2266 | + | |
| 2267 | + | |
| 2268 | + | |
| 2269 | + | |
| 2270 | + | |
| 2271 | + | |
| 2272 | + | |
| 2273 | + | |
| 2274 | + | |
| 2275 | + | |
| 2276 | + | |
| 2277 | + | |
| 2278 | + | |
| 2279 | + | |
| 2280 | + | |
| 2281 | + | |
| 2282 | + | |
| 2283 | + | |
| 2284 | + | |
| 2285 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| 101 | + | |
| 102 | + | |
101 | 103 | | |
102 | 104 | | |
103 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| |||
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
| 47 | + | |
44 | 48 | | |
45 | 49 | | |
46 | 50 | | |
| |||
0 commit comments