Managing Docker Swarm with usulnet: Visual Orchestration Made Simple
Docker Swarm remains one of the most straightforward container orchestration platforms available. It uses the same Docker CLI and Compose file format you already know, adds built-in service discovery and load balancing, and requires no additional infrastructure beyond Docker itself. What it lacks, however, is a comprehensive management interface. The docker service and docker stack CLI commands are functional but provide limited visibility into cluster state, no role-based access, and no historical metrics.
usulnet fills this gap by providing a full visual management layer for Docker Swarm clusters. This guide covers how to connect your Swarm cluster to usulnet, manage services and stacks through the UI, configure rolling updates, and monitor cluster health across multiple Swarm environments.
Prerequisites
Before connecting a Swarm cluster to usulnet, ensure you have:
- A running Docker Swarm cluster (at least one manager node)
- usulnet installed on a manager node or with Docker API access to a manager
- Docker Engine 24.0+ on all Swarm nodes
- Network connectivity between usulnet and the Swarm manager API
# Verify your Swarm cluster is active
docker info --format '{{.Swarm.LocalNodeState}}'
# Expected output: active
# Check node status
docker node ls
# ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS
# abc123 * manager-01 Ready Active Leader
# def456 worker-01 Ready Active
# ghi789 worker-02 Ready Active
Connecting Swarm Clusters to usulnet
usulnet detects Docker Swarm mode automatically when it connects to a Docker daemon running as a Swarm manager. There are two connection approaches:
Direct Socket Connection
If usulnet runs on a Swarm manager node, it connects directly via the Docker socket:
# In usulnet's config.yaml
docker:
host: unix:///var/run/docker.sock
api_version: "1.45"
# Or via Docker Compose for usulnet itself
services:
usulnet:
image: usulnet/usulnet:latest
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "8080:8080"
- "7443:7443"
Remote API Connection
For usulnet instances running outside the Swarm, connect via the Docker API with TLS:
# Enable Docker remote API on the Swarm manager
# /etc/docker/daemon.json
{
"hosts": ["unix:///var/run/docker.sock", "tcp://0.0.0.0:2376"],
"tls": true,
"tlscacert": "/etc/docker/ca.pem",
"tlscert": "/etc/docker/server-cert.pem",
"tlskey": "/etc/docker/server-key.pem",
"tlsverify": true
}
# usulnet configuration for remote Docker
docker:
host: tcp://manager-01.example.com:2376
tls_verify: true
tls_ca_cert: /certs/ca.pem
tls_cert: /certs/client-cert.pem
tls_key: /certs/client-key.pem
Once connected, usulnet's dashboard automatically detects Swarm mode and activates the Swarm management panels, showing node topology, service status, and cluster-wide metrics.
Service Management
Docker Swarm services are the primary unit of deployment. usulnet provides a visual interface for all service operations that would normally require CLI commands.
Creating Services
The service creation form in usulnet maps to all docker service create options:
| UI Field | CLI Equivalent | Description |
|---|---|---|
| Service Name | --name |
Unique service identifier |
| Image | image argument | Container image with tag |
| Replicas | --replicas |
Number of task instances |
| Mode | --mode |
replicated or global |
| Published Ports | -p / --publish |
Port mappings with routing mesh |
| Networks | --network |
Overlay networks to attach |
| Placement Constraints | --constraint |
Node selection rules |
| Resource Limits | --limit-cpu/memory |
CPU and memory limits per task |
| Resource Reservations | --reserve-cpu/memory |
Guaranteed resources per task |
| Update Config | --update-* |
Rolling update parameters |
| Rollback Config | --rollback-* |
Automatic rollback settings |
Service Inspection
Clicking on a service in usulnet's service list opens a detailed view that shows:
- Current task distribution across nodes with health status
- Service configuration (environment variables, mounts, networks)
- Update history with rollback points
- Aggregated logs from all replicas with per-replica filtering
- Resource usage charts per replica and aggregated
Scaling Services
Scaling in usulnet is a single slider or input field change. Behind the scenes, it executes the equivalent of:
# CLI equivalent of usulnet's scale operation
docker service scale webapp=5
# Or for multiple services simultaneously
docker service scale webapp=5 api=3 worker=10
usulnet adds value beyond the CLI with its scaling recommendations feature. By analyzing historical CPU and memory usage patterns, it suggests optimal replica counts and displays a projection of resource utilization at the proposed scale.
Rolling Updates
Rolling updates are where Swarm's simplicity shines, and usulnet makes the process fully visible. When you update a service through usulnet, you configure the update strategy visually:
# The update configuration usulnet manages for you:
docker service update \
--image myapp:v2.1.0 \
--update-parallelism 2 \
--update-delay 10s \
--update-failure-action rollback \
--update-max-failure-ratio 0.25 \
--update-monitor 30s \
--update-order start-first \
webapp
Update Parameters Explained
| Parameter | Default | Recommendation |
|---|---|---|
| Parallelism | 1 | Set to 25% of replicas for balanced speed/safety |
| Delay | 0s | At least 10s to allow health checks to stabilize |
| Failure Action | pause | Use rollback for production services |
| Max Failure Ratio | 0 | 0.1-0.25 to tolerate occasional transient failures |
| Monitor Duration | 5s | Set to at least 2x your health check interval |
| Order | stop-first | Use start-first for zero-downtime updates |
During an update, usulnet displays a real-time progress view showing which tasks are being updated, which have completed, and which have failed. If the failure threshold is exceeded, it shows the rollback in progress with the reason for the rollback.
Stack Deployment
Docker Swarm stacks use the same Compose file format you already know, with Swarm-specific extensions under the deploy key. usulnet provides a full stack management interface:
# Example stack file managed through usulnet's editor
version: "3.8"
services:
web:
image: nginx:alpine
deploy:
replicas: 3
placement:
constraints:
- node.role == worker
resources:
limits:
cpus: "0.5"
memory: 256M
reservations:
cpus: "0.25"
memory: 128M
update_config:
parallelism: 1
delay: 10s
failure_action: rollback
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
ports:
- "80:80"
networks:
- frontend
api:
image: myapi:latest
deploy:
replicas: 2
update_config:
order: start-first
networks:
- frontend
- backend
db:
image: postgres:16
deploy:
replicas: 1
placement:
constraints:
- node.labels.storage == ssd
volumes:
- pgdata:/var/lib/postgresql/data
networks:
- backend
networks:
frontend:
driver: overlay
backend:
driver: overlay
internal: true
volumes:
pgdata:
usulnet's stack manager tracks the deployed version of each stack and maintains a history of previous deployments. You can compare configurations between versions and roll back to any previous deployment with one click.
Node Management
Swarm nodes are managed through usulnet's cluster view, which provides a visual topology of your cluster:
Node Operations
- Drain: Gracefully remove workloads from a node for maintenance
- Pause: Stop scheduling new tasks on a node without draining existing ones
- Activate: Return a drained or paused node to active scheduling
- Promote/Demote: Change node role between manager and worker
- Remove: Remove a node from the Swarm cluster
- Label: Add or modify node labels for placement constraints
# usulnet executes these operations via the Docker API:
docker node update --availability drain worker-01
docker node update --availability active worker-01
docker node promote worker-02
docker node update --label-add storage=ssd worker-03
Secrets and Configs
Docker Swarm has native secrets and config objects that are distributed to services securely. usulnet manages both through a dedicated interface:
# Creating a Swarm secret through usulnet (API equivalent)
echo "my-database-password" | docker secret create db_password -
# Creating a config object
docker config create nginx_conf ./nginx.conf
# Referencing in a service (managed via usulnet's service editor)
docker service create \
--name webapp \
--secret db_password \
--config source=nginx_conf,target=/etc/nginx/nginx.conf \
myapp:latest
usulnet adds secret rotation workflows on top of Swarm's native capabilities. You can schedule secret rotation, and usulnet handles creating the new secret version and updating all services that reference it with zero-downtime rolling updates.
Monitoring and Logging
Cluster monitoring in usulnet covers three layers:
Cluster-Level Metrics
- Total cluster CPU and memory capacity vs. usage
- Node count and health status
- Service and task counts
- Overlay network statistics
Service-Level Metrics
- Per-service resource usage (CPU, memory, network I/O)
- Task placement and health
- Update progress and history
- Published port endpoint health
Centralized Logging
usulnet aggregates logs from all service replicas across all nodes. The log viewer supports:
- Real-time log streaming with WebSocket
- Per-replica and aggregated views
- Full-text search across all replicas
- Time-range filtering
- Log download as text or JSON
For production logging: While usulnet's built-in log viewer is excellent for debugging, production environments should also forward logs to a dedicated log aggregation system (ELK, Loki, or similar) using Docker's logging drivers.
Multi-Cluster Support
usulnet can manage multiple Swarm clusters from a single interface. Each cluster is connected as a separate environment in usulnet's configuration:
# usulnet config.yaml - Multiple Swarm clusters
environments:
- name: production
docker:
host: tcp://swarm-prod-manager:2376
tls_verify: true
tls_ca_cert: /certs/prod/ca.pem
tls_cert: /certs/prod/cert.pem
tls_key: /certs/prod/key.pem
- name: staging
docker:
host: tcp://swarm-staging-manager:2376
tls_verify: true
tls_ca_cert: /certs/staging/ca.pem
tls_cert: /certs/staging/cert.pem
tls_key: /certs/staging/key.pem
- name: development
docker:
host: unix:///var/run/docker.sock
The environment switcher in usulnet's navigation bar lets you switch between clusters instantly. RBAC applies per-environment, so you can give developers full access to the development cluster while restricting production access to operators and admins.
Docker Swarm's simplicity combined with usulnet's visual management creates a powerful platform for teams that need container orchestration without the complexity overhead of Kubernetes. usulnet transforms the Swarm CLI experience into an accessible, auditable, and secure management workflow suitable for production environments of any scale.