Visibility
+Live logs, exit codes, and batch step markers surface progress at a glance.
+diff --git a/project/remotectl/templates/remotectl/manual.html b/project/remotectl/templates/remotectl/manual.html index 181929f..c43bf7f 100644 --- a/project/remotectl/templates/remotectl/manual.html +++ b/project/remotectl/templates/remotectl/manual.html @@ -1,130 +1,333 @@ {% extends 'remotectl/base.html' %} {% block title %}Manual | Remote Admin{% endblock %} {% block content %} -
Detailed reference for using the Remote Admin console. Use your - browser search (Ctrl+F) to find topics quickly.
-This application lets you manage remote Linux hosts over SSH, execute ad-hoc commands, run saved tasks, and - process multi-step batch scripts with real-time streaming output via WebSockets.
+Remote Admin Manual
+This guide highlights the essential flows for onboarding hosts, running + commands, orchestrating batches, and understanding every status signal the console emits.
+Snapshot
+Create remote hosts under Hosts. Each host stores:
-name: Friendly display namehostname: DNS name or IPport: SSH port (default 22)username: SSH login userauth_method: ssh_key or agent (password not yet implemented)key_path: Optional explicit private key path (not uploaded)strict_host_key_checking: Enforce known_hosts validationExample:
-Host: prod-app-1 ++ + + ++ + +01
+Overview
+Remote Admin lets you register hosts, dispatch commands through SSH, and observe output + in real time over WebSockets. Use it as a single pane of glass for routine ops, emergency fixes, and + long-running batch jobs.
++++ +Visibility
+Live logs, exit codes, and batch step markers surface progress at a glance.
++ +Repeatability
+Save complex commands as tasks or batches for consistent, auditable actions.
++ +Control
+Cancel runs safely, and rely on strict host key checks for production-grade SSH.
++ -+ +++Hosts
+ Inventory +Create remote endpoints under Hosts. Each entry + stores credentials without uploading your private key.
++
+++- name
+- Friendly display label.
+++- hostname
+- DNS or IP.
+++- port
+- Default 22 unless overridden.
+++- username
+- SSH login user.
+++- auth_method
+- +
ssh_keyoragent.++- key_path
+- Optional explicit key location.
+++Example
++Key Path: /home/deploy/.ssh/id_ed25519 +Host: prod-app-1 Hostname: 10.10.10.15 User: deploy Auth: ssh_key -Key Path: /home/deploy/.ssh/id_ed25519+ +++Console Modes
+ Run + Center +Connect to a host then choose how to execute.
++
+- +
+Saved Task
+Pick a curated command and optionally edit before launch.
+- +
+Ad-hoc
+Type anything (e.g.
+uname -a) for fast diagnostics.- +
+Batch
+Execute multi-step scripts with streamed STDOUT/STDERR markers.
+Cancel anytime; the UI highlights stderr lines so failures stand out instantly.
+3. Console
-Connect to a host then choose one of:
-
uname -a).While running you can cancel. Output streams in real-time; stderr lines are highlighted.
- -Tasks are named reusable commands. Fields:
-name: Unique internal key (no spaces recommended)label: Display labelcommand: Shell snippet executed exactly on remote hostExample task:
-Name: restart_app ++ -+ +Reusable Commands
+Tasks
+Tasks encapsulate commands with friendly labels so teams can run critical actions + without remembering exact syntax.
++
+- name: Unique key (use dashes/underscores).
+- label: Human friendly description.
+- command: Executed verbatim on the remote host.
+++- -Name: restart_app Label: Restart App Service -Command: sudo systemctl restart app.service5. Batch Scripts
-A batch script is a list of steps (one per line). Blank lines and lines starting with
-#are ignored. - A line starting withcd <dir>sets the working directory for subsequent commands.Example batch:
-# Deploy sequence +Command: sudo systemctl restart app.service++ +Multi-step orchestration
+Batch Scripts
+Define a sequence of commands, one per line. Blank lines or lines starting with +
+#are ignored. Usecd pathto change context for subsequent steps.++-# Deploy sequence cd /srv/app ./stop.sh ./build.sh -./start.shDuring execution you will see markers like:
->>> [2/4] ./build.sh+./start.sh +During execution you will see markers like
+>>> [2/4] ./build.sh+ to track progress.6. Status & Progress
-Status badge meanings:
-
Signals
+WebSocket open; idle until you run a task.
+Command or batch in-flight; watch the live stream.
+Terminate signal sent; waiting for graceful stop.
+Finished with exit code context.
+Non-zero exit or SSH/runtime problem.
+Each execution creates a log entry with:
-run_type: single or batchstatus, exit_codefailed_step (batch only on failure)Run evidence
+Every execution produces a structured record:
+run_type: single or batchstatus and exit_codefailed_step for batch failuresStructured errors
+{"event":"error","type":"ssh|runtime","message":"..."}
+ SSH errors reflect connection/auth issues. Runtime errors signal validation or + conflicting state (for example, duplicate run requests).
+Error events are structured as:
-{"event":"error","type":"ssh|runtime","message":"..."}
- SSH errors come from connection/auth issues; runtime errors are validation or state (e.g. duplicate run).
- -When you press Cancel the server sends a terminate signal; some commands may take time to exit gracefully. Batch - processing stops at the current step.
- -Task: build_assets -Command: npm run build - -Batch: -cd /srv/app ++ -++++ Best practice +Flow
+Deployment Workflow
++++ +Task example
++Task: build_assets +Command: npm run build+ +Batch companion
++./start.sh +cd /srv/app ./stop.sh ./deploy.sh -./start.sh++1. Connect to host with validated keys.+2. Choose saved task or attach ad-hoc pre-flight checks.+3. Launch batch for deterministic rollout, watching live markers.+4. Inspect logs, confirm exit codes, archive evidence.+Quick Diagnostics
-Ad-hoc: df -h | grep /data -Ad-hoc: sudo journalctl -u app.service -n 50++ -Control
+Cancellation
+Cancel sends a terminate signal to the remote process. Some commands need additional time + to unwind; batch processing stops immediately after the active step finishes.
+12. Troubleshooting
-
python -u).
- Security Notes
+Pro tips
+cd steps.python -u or stdbuf -o0 to force unbuffered output.Troubleshooting
+Verify SSH user, key permissions (chmod 600), and host-based ACLs.
Add the host to known_hosts or temporarily disable strict checks only for development.
Some binaries buffer stdout; prefer unbuffered flags such as python -u.
Roadmap hints
+