7549437c99b9f29d31546b695642a78aa5c16ea2
GhostRunner
This project aims to create a way to schedule commands to be run as soon as possible when they offline initialy.
The way to accomplish this is to create a tracked task list, and keep track of it has been successfully done.
Technical details.
Go(lang) backend server which exposes an HTTP API which can be used to add tasks to the process.
Python executor/runner which actually executes the commands, Python was chosen because of the availability of: LibMeshCtrl Python Library.
Create a python virtual environment inside the runner folder.
JSON Templates:
Following is mock data.
InfoResponse
{
"status": 200,
"message": "Request successful",
"data": {
"example": "This is some mock data"
}
}
TokenCreateDetails
{
"name": "DeploymentToken123"
}
TokenCreateBody
{
"authtoken": "abc123securetoken",
"details": {
"name": "DeploymentToken123"
}
}
TokenListBody
{
"authtoken": "abc123securetoken"
}
TaskData
{
"name": "UpdateScript",
"command": "sudo apt update && sudo apt upgrade -y",
"nodeids": ["node-001", "node-002", "node-003"],
"creation": "2025-05-27T10:15:30Z",
"status": "pending"
}
TaskBody
{
"authtoken": "abc123securetoken",
"details": {
"name": "UpdateScript",
"command": "sudo apt update && sudo apt upgrade -y",
"nodeids": ["node-001", "node-002", "node-003"],
"creation": "2025-05-27T10:15:30Z",
"status": "pending"
}
}
Device
{
"name": "RaspberryPi-01",
"nodeid": "node-001"
}
PyOnlineDevices
{
"online_devices": [
{
"name": "RaspberryPi-01",
"nodeid": "node-001"
},
{
"name": "Server-02",
"nodeid": "node-005"
}
],
"offline_devices": [
{
"name": "IoT-Gateway",
"nodeid": "node-003"
}
],
"total_devices": 3
}
Description
Languages
Go
83.5%
Python
15.2%
Shell
1.3%