Script Execution
Script execution is EasyShell’s core capability. You can run scripts on individual hosts, clusters, or custom host selections with real-time output streaming.
Creating Scripts
Section titled “Creating Scripts”Navigate to Script Library → Create Script to write a new script:
- Name — A descriptive name for the script
- Type — Shell type (Bash, Python, etc.)
- Content — The script body, edited in the built-in Monaco code editor
- Parameters — Define input variables that are resolved at execution time
- Category — Classify the script (monitoring, deployment, maintenance, etc.)
Script Parameters
Section titled “Script Parameters”Scripts support parameterized variables using the {{variable_name}} syntax:
#!/bin/bashset -euo pipefail
echo "Deploying version {{version}} to {{environment}}"cd /opt/{{app_name}}git checkout {{version}}systemctl restart {{app_name}}When executing, users are prompted to fill in each parameter value.
Running Scripts
Section titled “Running Scripts”Single Host Execution
Section titled “Single Host Execution”- Navigate to a host’s detail page
- Click Execute Script
- Select a script from the library or enter ad-hoc commands
- Fill in any parameters
- Click Execute
Batch Execution
Section titled “Batch Execution”- Go to Script Library → select a script
- Click Batch Execute
- Choose target hosts (by selection, cluster, or tag filter)
- Configure execution settings:
- Concurrency — Maximum parallel executions (default: 10)
- Timeout — Per-host execution timeout (default: 300s)
- Stop on Error — Whether to halt remaining hosts on failure
- Click Execute
Real-time Log Streaming
Section titled “Real-time Log Streaming”During execution, EasyShell streams script output in real-time via WebSocket:
- Live Output — See stdout and stderr as they happen
- Per-Host View — Switch between individual host outputs in batch mode
- Search — Full-text search across log output
- Download — Export complete logs after execution
Execution History
Section titled “Execution History”All executions are recorded with:
| Field | Description |
|---|---|
| Script | Name and version of the executed script |
| Target | Host(s) or cluster |
| Status | Success, Failed, Timeout, Cancelled |
| Duration | Wall-clock execution time |
| Exit Code | Process exit code per host |
| Executor | User who initiated the execution |
| Timestamp | Start and end times |
Access execution history from the Tasks page or from individual host detail pages.
Scheduled Execution
Section titled “Scheduled Execution”Scripts can be scheduled for recurring execution:
- Select a script → Schedule
- Configure the cron expression (e.g.,
0 2 * * *for daily at 2 AM) - Select target hosts
- Enable/disable notifications on failure