Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The optional **Foresight** module extends the platform with long-range capacity
- `node_<suffix>` — Pin a VM to a specific node (e.g. `node_241` pins to the node whose IP ends in `.241`)
- `anti_<vm_name>` — Prevent two VMs from sharing the same node (e.g. `anti_dc02` on `dc01`)
- **Clusters configured in the tool** — Register one or more HyperCore clusters from the dashboard, in a folder of the tenant tree (Settings → Access → Tenants), by an installation, MSP or customer admin. Credentials are stored encrypted in PostgreSQL; nothing cluster-specific lives in `.env`. Every view, setting and Foresight analysis is per cluster, and the same physical cluster registered twice is detected and only balanced once.
- **Tenants, roles and access** — Clusters live in folders under customers and MSPs, shown in the sidebar rail (collapsible, colour-coded, searchable by folder, cluster name or address). Access is a role on a place: the installation, an MSP, a customer, a folder, a cluster, the VMs with a tag, or one VM. Five built-in roles (Admin, Engineer, App Manager, Backup Manager, Viewer) can be copied into your own; groups, invitations by mail, an audit log, and one-time guest console access for someone outside. Nobody hands out rights they do not hold.
- **Tenants, roles and access** — Clusters live in folders under customers and MSPs, shown in the cluster switcher in the top bar (collapsible, colour-coded, searchable by folder, cluster name or address). Access is a role on a place: the installation, an MSP, a customer, a folder, a cluster, the VMs with a tag, or one VM. Five built-in roles (Admin, Engineer, App Manager, Backup Manager, Viewer) can be copied into your own; groups, invitations by mail, an audit log, and one-time guest console access for someone outside. Nobody hands out rights they do not hold.
- **VM management and console** — Edit a VM's settings and power state, create VMs (also from a cloud image with cloud-init), take snapshots and clones, now or at a scheduled time, with the change history kept. Open a VM's console in the browser through HCM (no HyperCore session handed out), with every session logged. An optional check takes console screenshots and warns when a console was left logged in.
- **Cluster alerts** — HyperCore's own conditions (failed drive, node low on memory), terminated updates, open console sessions and backup problems as badges on the cluster card, with mute and history.
- **Live Configuration** — All tunable settings are stored in a shared PostgreSQL database. Change any parameter through the dashboard UI at runtime — no container restarts required.
Expand Down Expand Up @@ -72,7 +72,7 @@ The optional **Foresight** module extends the platform with long-range capacity
└───────▲──────────┘ └───────────────────────▲────────────────────────┘
│ │
┌───────┴──────────────────────────────────────┴────────────────────────┐
│ Dashboard (port 5000): cluster rail with folders, Infraviewer, │
│ Dashboard (port 5000): cluster switcher with folders, Infraviewer, │
│ Clusterbalancer, Foresight, Backup, Settings, in-app updater │
└───────────────────────────────────────────────────────────────────────┘
```
Expand All @@ -87,7 +87,7 @@ so clusters can be added, disabled or removed independently.
| **Balancer** | Decision engine — affinity, reactive, and predictive modes |
| **InfluxDB** | Time-series metrics storage with 1-year detailed + 5-year long-term retention |
| **PostgreSQL** | Config store and Foresight conclusions database |
| **Dashboard** | Web UI: cluster rail, monitoring, live configuration, access and tenants, VM management, Foresight, Backup, mail |
| **Dashboard** | Web UI: cluster switcher, monitoring, live configuration, access and tenants, VM management, Foresight, Backup, mail |
| **Sentinel** | Foresight capacity analysis, forecasting, and REST API |
| **Backup** | Backup scheduler and REST API: schedules, plans, restore points, restores, verification, test restores, imports, proxy deployment |
| **Console** | VM console relay for the browser, open-session check and boot checks (screen recognition) |
Expand Down Expand Up @@ -261,9 +261,9 @@ Affinity rules take priority over all other engines. A VM with a `node_` tag wil

## Dashboard

The dashboard is a single-page application served on port 5000. The UI is available in **English, Dutch, French, and German** — pick from the language selector in the header. The currently running version is shown in a small footer at the bottom-right of every page.
The dashboard is a single-page application served on port 5000. The UI is available in **English, Dutch, French, and German** — pick from the language selector in the top bar. The currently running version is shown in a small footer at the bottom-right of every page.

The left-hand **cluster rail** lists folders and clusters (collapsible, colour-coded, with a search box that matches folder names, cluster names and addresses). The selected cluster drives every tab; breadcrumbs in the header show where you are. Pages show state; adding or changing something opens a dialog. What a user sees depends on their roles: a panel or button they may not use is not shown, and the server checks every call anyway.
The **cluster switcher** in the top bar opens the list of folders and clusters (collapsible, colour-coded, with a search box that matches folder names, cluster names and addresses); its button also counts alerts on your other clusters. The selected cluster drives every tab; breadcrumbs under the top bar show where you are. The dashboard follows the system's light or dark setting, and **☾ Dark / ☀ Light** in the top bar overrides it. Pages show state; adding or changing something opens a dialog. What a user sees depends on their roles: a panel or button they may not use is not shown, and the server checks every call anyway.

| Area | Contents |
|------|----------|
Expand Down Expand Up @@ -291,7 +291,7 @@ Screenshots were taken on a three-node lab cluster; the [user manual](docs/manua

Access is given as roles on places in the tenant tree (Settings → Access): an MSP admin manages
their customers, a customer admin their folders, a Backup Manager restores without editing VMs, a
Viewer only looks. Folder menus in the rail (the "⋯" button) move clusters between folders, open the
Viewer only looks. Folder menus in the cluster list (the "⋯" button) move clusters between folders, open the
folder's access and assign a backup target. See [docs/administration.md](docs/administration.md) for
the full walkthrough.

Expand Down Expand Up @@ -340,7 +340,7 @@ available as a plan mode.

- **Targets (admin).** Settings → Targets holds the share URIs (`smb://nas.local/share/path` or
`nfs://nas.local/export/path`) and their credentials, stored encrypted. A target is assigned to a
folder from the folder's menu in the rail: one target for everyone, or one per tenant, as you
folder from the folder's menu in the cluster list: one target for everyone, or one per tenant, as you
prefer. Users never see a path or a password; a location is shown as `Target / Folder / vm`.
- **Schedules.** Back up many VMs of a folder on one timetable: daily, weekly, monthly, hourly or any
RRULE, with blackout periods and real or synthetic fulls on chosen days. Each VM's duration is learned
Expand All @@ -352,7 +352,7 @@ available as a plan mode.
copies from the cluster's own folder. The tenant folder is created over SMB when missing;
HyperCore creates the VM folder itself. Spaces in folder names become underscores on the share.
Clusters without a folder use `no_folder` and the target flagged as default for them (the "No
folder" group in the rail has the same Backup target menu).
folder" group in the cluster list has the same Backup target menu).
- **Retention.** After a successful run, older copies of that VM beyond the retention count are
deleted, oldest first. SMB targets are pruned over the protocol with the stored credentials; for
NFS, bind-mount the share into the `backup` container and set the prune path on the target.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.7.4
1.8.0
2 changes: 1 addition & 1 deletion dashboard/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ COPY docs/administration.md manual/extra/
RUN mkdir -p static/vendor && \
curl -sL "https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/chart.umd.min.js" -o static/vendor/chart.umd.min.js && \
curl -sL "https://cdn.jsdelivr.net/npm/chartjs-adapter-date-fns@3.0.0/dist/chartjs-adapter-date-fns.bundle.min.js" -o static/vendor/chartjs-adapter-date-fns.bundle.min.js && \
curl -sL "https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600;700&family=Space+Grotesk:wght@300;400;500;600;700&display=swap" -o static/vendor/fonts.css && \
curl -sL "https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;1,400&family=IBM+Plex+Mono:wght@400;500&display=swap" -o static/vendor/fonts.css && \
# Download the actual font files referenced in the CSS
grep -oP 'url\(\K[^)]+' static/vendor/fonts.css | while read url; do \
FILENAME=$(echo "$url" | sed 's/.*\///;s/?.*//' ); \
Expand Down
16 changes: 16 additions & 0 deletions dashboard/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,22 @@
app.config['SOCK_SERVER_OPTIONS'] = {'ping_interval': 25, 'max_message_size': None}
sock = Sock(app)


@app.template_global()
def theme_inline():
"""theme.css and theme.js written into the page, for pages a guest opens: only /guest/ is published to
outsiders, so those pages cannot load /static/. Read once per process."""
cached = getattr(theme_inline, '_cached', None)
if cached is None:
from markupsafe import Markup
base = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'static')
with open(os.path.join(base, 'theme.css'), encoding='utf-8') as f:
css = f.read()
with open(os.path.join(base, 'theme.js'), encoding='utf-8') as f:
js = f.read()
cached = theme_inline._cached = Markup(f'<style>{css}</style>\n<script>{js}</script>')
return cached

# seed tunables DB from env vars on first run (no-op if already seeded)
config_db.seed_from_env()

Expand Down
46 changes: 26 additions & 20 deletions dashboard/manual.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,32 +77,38 @@ def page(title: str, body_html: str, nav: list[dict], current: str, version: str
return f'''<!doctype html>
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
<title>{html.escape(title)} · HyperCore Manager manual</title>
<link rel="stylesheet" href="/static/vendor/fonts.css">
<link rel="stylesheet" href="/static/theme.css">
<script src="/static/theme.js"></script>
<link rel="icon" href="/static/favicon.svg" type="image/svg+xml">
<style>
:root {{ --bg: #0b1220; --card: #111a2b; --line: #1f2a3f; --text: #e5e9f0; --muted: #94a3b8; --accent: #38bdf8; }}
* {{ box-sizing: border-box; }}
body {{ margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 -apple-system, "Segoe UI", Roboto, sans-serif; }}
header {{ display: flex; align-items: center; gap: 16px; padding: 12px 24px; border-bottom: 1px solid var(--line); background: var(--card); position: sticky; top: 0; }}
header .brand {{ font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 700; letter-spacing: .02em; }}
header .brand span {{ color: var(--accent); }}
header a {{ color: var(--muted); text-decoration: none; font-size: 13px; }}
body {{ margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 var(--font-ui); }}
header {{ display: flex; align-items: center; gap: 16px; padding: 0 24px; height: 52px; background: var(--bar); color: var(--bar-ink); position: sticky; top: 0; z-index: 5; }}
header .brand {{ display: flex; align-items: center; gap: 9px; font-weight: 600; }}
header .brand::before {{ content: 'H'; width: 22px; height: 22px; border-radius: 5px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: 12px; }}
header .brand span {{ color: var(--bar-ink-2); font-weight: 400; }}
header a {{ color: var(--bar-ink-2); text-decoration: none; font-size: 13px; }}
header a:hover {{ color: var(--bar-ink); }}
.wrap {{ display: grid; grid-template-columns: 260px 1fr; gap: 32px; max-width: 1200px; margin: 0 auto; padding: 24px; }}
nav {{ position: sticky; top: 72px; align-self: start; display: flex; flex-direction: column; gap: 4px; }}
nav a {{ color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 6px; font-size: 14px; }}
nav a.cur, nav a:hover {{ background: var(--card); color: var(--text); }}
main {{ min-width: 0; }}
main img {{ max-width: 100%; border: 1px solid var(--line); border-radius: 8px; margin: 8px 0 16px; }}
nav {{ position: sticky; top: 76px; align-self: start; display: flex; flex-direction: column; gap: 2px; }}
nav a {{ color: var(--ink-2); text-decoration: none; padding: 6px 10px; border-radius: 6px; font-size: 14px; }}
nav a:hover {{ background: var(--row-hover); color: var(--ink); }}
nav a.cur {{ background: var(--accent-tint); color: var(--accent-2); font-weight: 500; }}
main {{ min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 32px 32px; }}
main img {{ max-width: 100%; border: 1px solid var(--border); border-radius: 8px; margin: 8px 0 16px; }}
main h1, main h2, main h3 {{ line-height: 1.25; }}
main h1 {{ font-size: 28px; margin-top: 0; }}
main h2 {{ font-size: 20px; margin-top: 32px; border-top: 1px solid var(--line); padding-top: 16px; }}
main a {{ color: var(--accent); }}
main code {{ background: var(--card); padding: 1px 5px; border-radius: 4px; font-size: 13px; }}
main pre {{ background: var(--card); padding: 12px 14px; border-radius: 8px; overflow: auto; }}
main h1 {{ font-size: 28px; margin-top: 24px; }}
main h2 {{ font-size: 20px; margin-top: 32px; border-top: 1px solid var(--border); padding-top: 16px; }}
main a {{ color: var(--accent-2); }}
main code {{ font-family: var(--font-mono); background: var(--surface-3); padding: 1px 5px; border-radius: 4px; font-size: 13px; }}
main pre {{ background: var(--surface-2); border: 1px solid var(--border); padding: 12px 14px; border-radius: 8px; overflow: auto; }}
main pre code {{ padding: 0; background: none; }}
main table {{ border-collapse: collapse; margin: 12px 0; width: 100%; font-size: 14px; }}
main th, main td {{ border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }}
main th {{ background: var(--card); color: var(--muted); font-weight: 600; }}
main blockquote {{ border-left: 3px solid var(--accent); margin: 0; padding: 4px 14px; color: var(--muted); }}
@media (max-width: 860px) {{ .wrap {{ grid-template-columns: 1fr; }} nav {{ position: static; flex-direction: row; flex-wrap: wrap; }} }}
main th, main td {{ border: 1px solid var(--border); padding: 6px 10px; text-align: left; vertical-align: top; }}
main th {{ background: var(--surface-2); color: var(--ink-2); font-weight: 600; }}
main blockquote {{ border-left: 3px solid var(--accent); margin: 0; padding: 4px 14px; color: var(--ink-2); }}
@media (max-width: 860px) {{ .wrap {{ grid-template-columns: 1fr; }} nav {{ position: static; flex-direction: row; flex-wrap: wrap; }} main {{ padding: 8px 16px 24px; }} }}
</style></head>
<body><header><div class="brand">HyperCore <span>Manager</span> · manual</div><a href="/">← back to the dashboard</a>{f'<a style="margin-left:auto">{html.escape(version)}</a>' if version else ''}</header>
<div class="wrap"><nav>{items}<a href="/manual/administration">Administration guide</a></nav><main>{body_html}</main></div>
Expand Down
Loading
Loading