Wake-on-LAN targets can be sent automatically whenever this desktop boots.
script/common.sh: shared ansible and server-id helpers for remote boot scriptsscript/wake_targets.sh: send magic packets for one or more named targetsscript/run_remote_boot.sh: boot entrypoint that loads config and runs the target scriptscript/create_test_container.sh: create a temporary GPU container without touching the DBscript/delete_test_container.sh: remove the temporary test containerscript/check_server_boot_health.sh: verify mount, GPU, container create, SSH service, and container GPUscript/wait_for_priority_servers.sh: retry health checks until timeout before waking the restscript/restart_all_remote_containers.sh: rundocker restart $(docker ps -aq)on selected servers with retryscript/integration_smoke_test.sh: manual ansible/docker/GPU smoke test before enabling boot automationscript/install_remote_boot_service.sh: installs and enables the systemd boot serviceconfig/remote_boot.local.env: local defaults used at boot time
- Copy the example config and edit only your local file
cp config/remote_boot.example.env config/remote_boot.local.env- Fill in server-specific values in
config/remote_boot.local.env - Review
config/remote_boot.local.env - Install the boot service
./script/install_remote_boot_service.sh- Reboot, or run once manually
sudo systemctl start remote-boot.serviceList available targets:
./script/wake_targets.sh --list-targetsWake a group manually:
./script/wake_targets.sh allBoot orchestration with staged wake-up:
REMOTE_BOOT_PRIORITY_TARGETS="FARM1 LAB1"is sent firstREMOTE_BOOT_ENABLE_GATE=truewaits for priority servers to pass health checks- the gate retries for up to
REMOTE_BOOT_GATE_TIMEOUT_SECONDS=360 - once the gate passes, the remaining selected targets are sent
- finally, if
REMOTE_BOOT_ENABLE_CONTAINER_RESTART=true, all selected servers run a full docker container restart
Standalone test container commands:
./script/create_test_container.sh --server-id FARM1
./script/delete_test_container.sh --server-id FARM1Recommended manual integration test:
./script/integration_smoke_test.sh --scope priorityconfig/remote_boot.local.envis ignored by.gitignore- commit
config/remote_boot.example.envand keep real server-specific values, including MAC addresses, only inconfig/remote_boot.local.env - when a server is added, update
REMOTE_BOOT_FARM_TARGETSorREMOTE_BOOT_LAB_TARGETSplus the matchingREMOTE_BOOT_MAC_<TARGET>value inconfig/remote_boot.local.env
wakeonlanmust be installed on this desktop.wake_targets.shreads MAC addresses fromREMOTE_BOOT_MAC_<TARGET>variables inconfig/remote_boot.local.env.LAB*targets use192.168.1.255, andFARM*targets use192.168.2.255by default.- remote scripts can use
REMOTE_BOOT_ANSIBLE_INVENTORY, or fall back to your existingansible.cfgdefault inventory. - host mount checks expect
100.100.100.100:/294t/dcloud/sharefor LAB and100.100.100.120:/volume1/sharefor FARM. - boot health checks create a temporary GPU test container directly via Docker and remove it without writing to the DB.
- test container share mounts can use
REMOTE_BOOT_TEST_SHARE_SOURCE_TEMPLATE="/home/tako%s/share/user-share/";%sis replaced with the server number, soFARM1andLAB1both use/home/tako1/share/user-share/. - container restart uses
docker ps -aq; if a server has no containers, it logs and continues. - If the network is not ready at boot, increase
REMOTE_BOOT_PRE_DELAY_SECONDS.