Deploy and Master Spug: An Open‑Source Visual Automation Ops Platform
This guide introduces Spug, a lightweight, agent‑less automation operations platform for small‑to‑medium enterprises, outlines its core features, lists installation prerequisites, provides step‑by‑step Docker installation commands, and demonstrates essential usage such as host management, batch execution, application deployment, configuration, monitoring, alerting, and system administration.
Overview
Spug is a lightweight, agent‑less automation operations platform for small‑to‑medium enterprises. It consolidates host management, batch command execution, an online SSH terminal, file upload/download, application publishing, task scheduling, a configuration center, monitoring, and alerting into a single UI built with Ant Design.
Key Features
Batch execution of commands on multiple hosts simultaneously.
Browser‑based SSH terminal.
File management for uploading and downloading files directly from the browser.
Flexible online cron‑style task scheduling.
Customizable application publishing workflows (standard and custom modes).
Configuration center supporting KV, text, and JSON values.
Monitoring center with site, port, process, and custom script checks.
Alert center with notifications via SMS, email, DingTalk, and WeChat.
Elegant UI based on Ant Design.
Fully open‑source front‑end and back‑end code.
Installation Requirements
Python 3.6+
Django 2.2
Node 12.14
React 16.11
Docker‑Based Installation
Install and start Docker:
yum install docker -y
systemctl start dockerPull the Spug image (Alibaba Cloud mirror recommended for China): docker pull registry.aliyuncs.com/openspug/spug Run the container (add a volume for persistent /data if needed):
# Standard run
docker run -d --name=spug -p 80:80 registry.aliyuncs.com/openspug/spug
# With persistence (replace /mydata with a local path)
docker run -d --name=spug -p 80:80 -v /mydata/:/data registry.aliyuncs.com/openspug/spugInitialize the admin account (default admin/spug.dev, replace as desired):
docker exec spug init_spug admin spug.dev
docker restart spugAccess the UI at http://localhost using the credentials created above.
Basic Usage
Host Management
Add hosts by providing SSH credentials; passwords are stored for subsequent operations.
Batch Execution
Select one or more registered hosts, write commands directly or load them from saved templates, and execute them remotely.
Application Publishing
Manage applications, define environment‑specific deployment configurations, and trigger releases. Two release modes are supported: standard and custom.
Configuration Center
Environment management (dev, test, prod).
Service management for shared resources such as databases.
Application management for public and private configuration items.
Configuration editing of KV, text, or JSON values.
Task Scheduling
Create periodic jobs through the online scheduler.
Monitoring Center
Site check: HTTP GET request with status‑code verification.
Port check: verify connectivity to a host’s port.
Process check: ensure a specific process is running.
Custom script check: run a script on a host and evaluate its exit code.
Alert Center
Configure alerts via SMS, email, DingTalk, or WeChat and view alert history.
System Management (CLI)
Spug provides manage.py user commands for user administration.
# Create an admin account (non‑Docker setup)
cd spug/spug_api
source venv/bin/activate
python manage.py user add -u admin -p 123 -n "YourName" -s
# Create an admin account (Docker setup)
docker exec spug python3 /data/spug/spug_api/manage.py user add -u admin -p 123 -n "YourName" -s
# Reset password
python manage.py user reset -u admin -p newpass
# Enable a disabled account
python manage.py user enable -u admin
# Docker equivalents
docker exec spug python3 /data/spug/spug_api/manage.py user reset -u admin -p newpass
docker exec spug python3 /data/spug/spug_api/manage.py user enable -u adminReferences
Code repository: https://github.com/openspug/spug.dev
Official website: https://www.spug.dev
Documentation: https://www.spug.dev/docs/about-spug/
Change log: https://www.spug.dev/docs/change-log/
FAQ: https://www.spug.dev/docs/faq/
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
