Crates.io | rallyup |
lib.rs | rallyup |
version | 0.1.1 |
source | src |
created_at | 2024-10-26 19:08:30.139683 |
updated_at | 2024-10-27 22:17:36.632936 |
description | rallyup is a lightweight Wake-On-LAN (WOL) scheduler and dependency manager that ensures infrastructure services, such as firewalls, storage, and hypervisors, are brought online in the correct sequence and at the right time. |
homepage | |
repository | https://github.com/darwindarak/rallyup |
max_upload_size | |
id | 1424054 |
size | 105,253 |
rallyup
rallyup
is a lightweight Wake-On-LAN (WOL) scheduler and dependency manager designed for small businesses and homelabs. It ensures that infrastructure services like firewalls, storage, and hypervisors are brought online in the correct order, particularly after events like power outages.
A typical setup involves configuring most of the infrastructure for WOL but not for Wake-On-Power, and setting rallyup
to run on startup on a low-power device like a Raspberry Pi. When you need to bring the entire environment online, simply power on the device running rallyup
, and the rest of the infrastructure will automatically follow in the correct order.
rallyup servers.yaml
The dependencies between servers, along with the methods for validating that they are online, are defined in a YAML configuration file.
Fields:
Example:
- name: "firewall"
mac: "00:11:22:33:44:55"
interface: "eth0"
vlan: 100
depends:
- "storage"
check: [... see below]
Each server can have multiple health checks to ensure the server is fully online before the next device starts up.
The HTTP health check verifies whether a specified endpoint responds as expected.
Fields
http
for an HTTP health check.Note: You must provide either
status
orregex
, or both.
Example
- type: http
url: "http://192.168.1.1/health"
status: 200
retry: 5s
timeout: 30s
The port health check verifies whether a specified TCP port on a server is open and accessible. This is really a stand-in for verifying NFS and SMB ports until I can figure out how to check if those services are online.
Fields
port
for a port health checkExample
- type: port
ip: "192.168.1.1"
port: 22
retry: "10s"
timeout: "1m"
The shell health check executes a shell command checks the result. This is to provide the option of user-defined health checks.
Fields
shell
for a shell health check.Note: You must provide either
status
orregex
, or both.
Example
- type: shell
command: ping -c 1 192.168.1.1
status: 0
retry: 5s
timeout: 20s
TODO:
- Need to test in the lab and post the actual sample
- name: "Firewall"
mac: "00:1A:2B:3C:4D:5E"
interface: eth0
vlan: 10
depends: []
check:
- type: http
url: "http://192.168.1.1/health"
status: 200
regex: 'ok'
- name: "Storage Server 1"
mac: "00:1A:2B:3C:4D:5F"
interface: eth0
vlan: 100
depends:
- "Firewall"
check:
- type: port
ip: 192.168.100.101
port: 2049
timeout: 5 minutes
- name: "Storage Server 2"
mac: "00:1A:2B:3C:4D:5G"
vlan: 100
depends:
- "Firewall"
check:
- type: port
ip: 192.168.100.102
port: 445
retry: 5s
- name: "VM Host"
mac: "00:1A:2B:3C:4D:60"
vlan: 200
depends:
- "Storage Server 1"
- "Storage Server 2"
check:
- type: command
command: "ping -c 192.168.200.10"
status 0
This project is licensed under either of the following licenses, at your option:
You may choose to use this project under the terms of either license.