# Deployment Scripts for Hermes Node Agent

These scripts build installers for deploying Hermes Node Agent on target machines.

## Structure

```
deploy/
├── README.md              - This file
├── linux/
│   └── install-node.sh    - Self-contained Linux installer (embedded files)
├── windows/
│   ├── build-installer.sh - Build script for Windows .exe installer
│   └── installer.nsi      - NSIS installer template
```

## Building Installers

### Linux
The Linux installer is self-contained (no build required):

```bash
sudo deploy/linux/install-node.sh
```

Features:
- All agent files embedded (base64 tarball)
- Uses system Python 3
- pip installs `websockets`
- Creates SysV init service as root

### Windows
Build the Windows .exe offline installer:

```bash
cd deploy/windows
bash build-installer.sh
```

Dependencies: `makensis`, `wget`, `python3`, `pip`.

Output: `deploy/windows/hermes-node-agent-installer.exe` (~11 MB)

Installer includes:
- Python 3.13.1 embeddable
- websockets library (cp313 win_amd64)
- Node agent source files
- Batch launchers + config wizard
- GUI NSIS installer

## Release Process

1. Linux installer is already built: `deploy/linux/install-node.sh`
2. Build Windows installer: `cd deploy/windows && bash build-installer.sh`
3. Create release bundle:
   ```bash
   cd /path/to/hermes-node-agent
   cp deploy/linux/install-node.sh ./
   cp deploy/windows/hermes-node-agent-installer.exe ./
   zip -r node-agent-v2.zip install-node.sh hermes-node-agent-installer.exe
   ```
4. Upload release to website: `https://lisa.nexlab.net/files/node-agent-v2.zip`

## Notes

- Both installers are fully **offline-capable** after build
- No git clone on target
- Zero external network dependencies on target machines
- All source code included; only network during Windows **build**, not during install
