stx

command module
v0.0.2-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

README

STX

One-stop SeaTunnel ops platform — make SeaTunnel ops no longer a black box.

中文文档 · Secondary development · Quick start (CN)

Why STX

Running SeaTunnel in production is rarely “just submit a job”. Teams also need host monitoring, cluster restart, install and upgrade, connector distribution, config changes, runtime diagnosis, Checkpoint inspection, and recovery after job failures.

STX is the control plane for that work: one place to manage hosts, clusters, packages, plugins, monitoring, diagnostics, and job operations — with a native AI Agent ops entry (CLI + Skill).

Highlights

  • Host & Agent — host onboarding, Agent install, heartbeat and capacity
  • Cluster lifecycle — create, deploy, start/stop, and upgrade SeaTunnel clusters
  • Packages & plugins — package management and connector marketplace installs
  • Observability & diagnosis — monitoring center, inspections, error clues, recovery actions
  • Job workbench — HOCON/DAG workflows, Checkpoint visualization, debuggable runs
  • AI Agent entry — CLI + Skill oriented intelligent ops entry (in progress)
  • Auth & audit — password login, optional GitHub/Google OAuth, audit logs, user admin

Screenshots

Page Preview
Login Login
Dashboard Dashboard
Workbench Workbench
Hosts Hosts
Clusters Clusters
Monitoring Monitoring
Diagnostics Diagnostics
Packages Packages
Plugins Plugins
Data Sync Data Sync
User Center User Center

Architecture

┌─────────────────┐     ┌─────────────────┐     ┌─────────────────┐
│  Frontend       │     │  Backend        │     │  Database       │
│  Next.js        │◄───►│  Go (Gin)       │◄───►│  SQLite/MySQL/  │
│  React 19       │     │  GORM + gRPC    │     │  PostgreSQL     │
└─────────────────┘     └────────┬────────┘     └─────────────────┘
                                 │
                                 ▼
                        ┌─────────────────┐
                        │  STX Agent      │
                        │  on each host   │
                        └─────────────────┘

Supported platforms

One-click control-plane install targets Linux on amd64 / arm64.

Distro amd64 arm64 Notes
Ubuntu / Debian Yes Yes Preferred; skip Node download if local Node ≥ 18.18
Rocky / Alma / CentOS Stream / RHEL 8+ Yes Yes Official Node 22
CentOS 7 (glibc 2.17) Yes No amd64 only via node-18-glibc217. No arm64 glibc217 Node build
Other systemd Linux Usually Usually Needs glibc ≥ 2.17; glibc < 2.27 follows CentOS 7 Node rules

macOS / Windows are for local development, not the one-click installer. Default ports: API 17800, frontend 17880, gRPC 17890.

Quick start

Requirements (local development)
  • Go >= 1.24
  • Node.js >= 18
  • pnpm >= 8 (recommended)
Run locally
git clone https://github.com/LeonYoah/stx.git
cd stx
cp config.example.yaml config.yaml

go mod tidy
go run main.go api

In another terminal:

cd frontend
pnpm install
pnpm dev

Open http://localhost:3000 and sign in with admin / admin123 (or the values in config.yaml).

Installs the latest Release by default.

# Global
curl -fsSL https://github.com/LeonYoah/stx/releases/latest/download/install-online.sh | bash

# China (URL already wrapped with gh-proxy)
curl -fsSL https://v4.gh-proxy.org/https://github.com/LeonYoah/stx/releases/latest/download/install-online.sh | bash

Useful flags: --install-dir /opt/stx, --arch amd64|arm64, --without-node, --without-observability, --no-systemd, --no-start.
Scripts pick Node variant from glibc (<2.27 → glibc217); skip Node when local ≥ 18.18, or pass --without-node.

Offline install (script-built bundle)
curl -fsSL https://github.com/LeonYoah/stx/releases/latest/download/download-bundle.sh | bash
# China: https://v4.gh-proxy.org/https://github.com/LeonYoah/stx/releases/latest/download/download-bundle.sh
Environment Bundle includes Node?
glibc ≤ 2.17 (CentOS 7) Yes — node-18-glibc217 (amd64 only)
glibc > 2.17 and local Node ≥ 18.18 No (or --without-node)
glibc > 2.17 without usable Node Yes — node-22-official

CentOS 7: bash -s -- --node-variant glibc217 --arch amd64. Output: dist/offline/stx-offline-bundle-*.tar.gz.

tar -xzf dist/offline/stx-offline-bundle-*-linux-*.tar.gz
cd stx-offline-bundle-*-linux-*
sudo ./install.sh --install-dir /opt/stx --offline
Manual download (cannot run scripts)
  1. Download helpers: stx-install-helpers.tar.gz
  2. Put assets below into packages/
  3. ./install.sh --offline

China: paste links into https://gh-proxy.com/.

Asset amd64 arm64
stx download download
frontend download download
stx-agent download download
observability download download
ldd --version | head -1
node -v
Environment amd64 arm64
glibc ≤ 2.17 (CentOS 7) node-18-glibc217 unsupported
glibc > 2.17, no Node ≥ 18.18 node-22-official node-22-official
Node ≥ 18.18 already skip skip
Docker full stack

Release asset: stx-docker-compose.tar.gz (wired in packaging; available on new tags, not yet on older latest if 404).

mkdir -p stx-docker && cd stx-docker
curl -fsSL https://github.com/LeonYoah/stx/releases/latest/download/stx-docker-compose.tar.gz | tar -xz
cd docker
cp config.example.yaml config.yaml   # edit database for the compose file you use
docker compose up -d                 # MySQL default

China: paste into gh-proxy.com, or use the v4.gh-proxy.org/https://github.com/... URL.

DB Start
MySQL (default) docker compose up -d
SQLite docker compose -f docker-compose.sqlite.yml up -d
PostgreSQL docker compose -f docker-compose.postgres.yml up -d
Service URL
UI http://127.0.0.1:17880
API http://127.0.0.1:17800
Grafana http://127.0.0.1:3000
Prometheus http://127.0.0.1:9090
Alertmanager http://127.0.0.1:9093

Single container (no monitoring): docker run -d -p 17800:17800 -p 17880:17880 -p 17890:17890 ghcr.io/leonyoah/stx-all-in-one:latest.

More: docs/00-快速开始.md, docs/打包发布说明.md.

Configuration essentials

Key Purpose Default
auth.default_admin_username Initial admin username admin
auth.default_admin_password Initial admin password admin123
database.type Database type sqlite
app.addr HTTP listen address see config.example.yaml
grpc.port Agent gRPC port see config.example.yaml

Optional OAuth providers (github / google) can be enabled under oauth_providers in config.yaml. Callback URL is typically http://localhost:3000/callback.

Docs

License

Apache License 2.0. See LICENSE.

This project was originally adapted from linux-do/cdk (MIT).

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package docs Code generated by swaggo/swag.
Package docs Code generated by swaggo/swag.
internal
apps/admin
Package admin 提供管理员后台功能
Package admin 提供管理员后台功能
apps/agent
Package agent provides Agent connection management for the STX Control Plane.
Package agent provides Agent connection management for the STX Control Plane.
apps/audit
Package audit provides command logging and audit trail functionality for the STX Agent system.
Package audit provides command logging and audit trail functionality for the STX Agent system.
apps/auth
Package auth 提供用户认证相关的 HTTP 处理器
Package auth 提供用户认证相关的 HTTP 处理器
apps/capability
Package capability 提供当前服务端操作能力查询。
Package capability 提供当前服务端操作能力查询。
apps/cluster
Package cluster provides cluster management functionality for the STX Agent system.
Package cluster provides cluster management functionality for the STX Agent system.
apps/config
Package config provides cluster configuration file management.
Package config provides cluster configuration file management.
apps/dashboard
Package dashboard provides dashboard statistics for the STX system.
Package dashboard provides dashboard statistics for the STX system.
apps/diagnostics
Package diagnostics provides the diagnostics workspace skeleton for error center, inspections, and diagnostic bundle tasks.
Package diagnostics provides the diagnostics workspace skeleton for error center, inspections, and diagnostic bundle tasks.
apps/discovery
Package discovery provides cluster discovery functionality.
Package discovery provides cluster discovery functionality.
apps/execution
Package execution 提供跨业务模块的公共执行记录、安全确认和取消约定。
Package execution 提供跨业务模块的公共执行记录、安全确认和取消约定。
apps/host
Package host provides host management functionality for the STX Agent system.
Package host provides host management functionality for the STX Agent system.
apps/installer
Package installer provides SeaTunnel installation management APIs for Control Plane.
Package installer provides SeaTunnel installation management APIs for Control Plane.
apps/monitor
Package monitor provides process monitoring and auto-restart functionality.
Package monitor provides process monitoring and auto-restart functionality.
apps/monitoring
Package monitoring provides cluster monitoring overview APIs for STX.
Package monitoring provides cluster monitoring overview APIs for STX.
apps/plugin
Package plugin provides SeaTunnel plugin marketplace management.
Package plugin provides SeaTunnel plugin marketplace management.
apps/releasebundle
Package releasebundle provides temporary download and install endpoints for STX bundles.
Package releasebundle provides temporary download and install endpoints for STX bundles.
apps/task
Package task provides task management for Control Plane to Agent communication.
Package task provides task management for Control Plane to Agent communication.
cli/client
Package client 提供 STX CLI 访问远端 API 的最小 HTTP 客户端。
Package client 提供 STX CLI 访问远端 API 的最小 HTTP 客户端。
cli/command
Package command 根据操作登记构建普通 STX CLI 命令。
Package command 根据操作登记构建普通 STX CLI 命令。
cli/config
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.
cli/output
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.
cmd
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.
* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.
db
grpc
Package grpc provides the gRPC server implementation for Agent communication.
Package grpc provides the gRPC server implementation for Agent communication.
operation
Package operation 定义 STX API、CLI 与能力查询共用的操作登记结构。
Package operation 定义 STX API、CLI 与能力查询共用的操作登记结构。
operation/contract
Package contract 提供操作登记表与源码路由、Swagger 的开发期检查。
Package contract 提供操作登记表与源码路由、Swagger 的开发期检查。
router
Package router 提供 HTTP 路由配置 Package router provides HTTP routing configuration
Package router 提供 HTTP 路由配置 Package router provides HTTP routing configuration
seatunnel
Package seatunnel 提供 SeaTunnel 版本元数据等跨层共享信息。
Package seatunnel 提供 SeaTunnel 版本元数据等跨层共享信息。
session
Package session 提供会话管理功能。
Package session 提供会话管理功能。
tlsbootstrap
Package tlsbootstrap provisions gRPC TLS materials when grpc.tls_enabled is explicitly true.
Package tlsbootstrap provisions gRPC TLS materials when grpc.tls_enabled is explicitly true.
version
Package version 保存 STX 服务端和 CLI 共用的版本信息。
Package version 保存 STX 服务端和 CLI 共用的版本信息。

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL