Commit graph

171 commits

Author SHA1 Message Date
admin
f7689b4d6a fix: check node.yaml for success, ignore env.list exit code 2026-08-01 18:57:24 +00:00
admin
8484ca46a7 fix: keep env.list alive with background goroutine during setup.sh 2026-08-01 18:37:17 +00:00
admin
0922102226 fix: patch setup.sh env.list sed lines to be non-fatal, kill port with ss 2026-08-01 18:36:11 +00:00
admin
bc66018af3 fix: kill existing process on target port before starting nginx 2026-08-01 18:29:03 +00:00
admin
4432855a2d fix: trap DEBUG to ensure env.list always exists during setup.sh 2026-08-01 18:27:20 +00:00
admin
8638f198ff fix: basic nginx.conf (no wallarm directives before module loads) 2026-08-01 17:35:26 +00:00
admin
d405c98ff8 fix: deploy to real /opt/wallarm, then move to /opt/fw/{name}/wallarm
No symlinks, no path patching. Setup.sh runs in its native environment.
After success, os.Rename moves everything to the instance directory.
2026-08-01 17:30:05 +00:00
admin
9cf6a2a66b fix: patch setup.sh /opt/wallarm paths instead of symlink 2026-08-01 17:28:04 +00:00
admin
bb45f8606d fix: robust symlink creation, handle /opt/wallarm existing as directory 2026-08-01 17:22:13 +00:00
admin
a1d71b3eac feat: start per-instance NGINX with status endpoint before setup.sh 2026-08-01 17:18:19 +00:00
admin
c38535398d refactor: per-instance NGINX, clean native.go 2026-08-01 17:16:02 +00:00
admin
91b8b0e980 fix: set cmd.Dir to instance dir so setup.sh finds modules/ 2026-08-01 17:14:45 +00:00
admin
fd3a005fe8 fix: use Wallarm v6.12.5 (matching AIO_BASE from ingress repo) 2026-08-01 17:11:19 +00:00
admin
02e9fd2793 fix: add --custom-ngx-build back, fix preflight URL 2026-08-01 17:10:51 +00:00
admin
83f73c0e9c simplify: setup.sh just builds and drops binary in /opt/fw/
No directory structure creation, no confusing messages.
Deploy binary handles everything else.
2026-08-01 17:00:43 +00:00
admin
b44da10ae7 fix: preflight URL, /opt/fw/ refactor complete 2026-08-01 16:55:53 +00:00
admin
02f3368fa6 fix: remove cmd.Dir — setup.sh cp -a . /opt/wallarm self-destructs when cwd is /opt/wallarm 2026-08-01 16:53:19 +00:00
admin
af8df1a659 fix: add --keep flag to prevent Makeself from deleting /opt/wallarm on failure 2026-08-01 16:52:40 +00:00
admin
7875dbca13 fix: remove --force flag — caused setup.sh to hang 2026-08-01 16:46:23 +00:00
admin
d3db8ce4c0 fix: extract AIO to /opt/wallarm/ (setup.sh hardcodes this path)
setup.sh uses /opt/wallarm/ for env.list and all paths.
Extract once to base dir, each node registers with --force.
Simplified InstallNode to 4 steps: nginx → download → extract → setup.
2026-08-01 16:38:58 +00:00
admin
5a0cfe92e1 fix: flush log file, show last lines in error output 2026-08-01 16:34:48 +00:00
admin
b86d9d3604 fix: systemd unit starts per-instance NGINX before Wallarm services 2026-08-01 16:27:52 +00:00
admin
d8390eab2a feat: per-instance NGINX — each node gets its own nginx binary and config
- Shared NGINX binary at /opt/wallarm/nginx/sbin/nginx (installed once)
- Each node gets /opt/wallarm/nodes/{name}/nginx/ with:
  - sbin/nginx (copied from shared)
  - conf/nginx.conf (per-instance, unique port + upstream)
  - logs/ (per-instance access/error logs)
- setup.sh runs with --custom-ngx-build (uses our nginx)
2026-08-01 16:26:41 +00:00
admin
0a301fbd05 refactor: install NGINX under /opt/wallarm/nginx/ 2026-08-01 16:23:24 +00:00
admin
0ac2fc82cf fix: try all package managers for NGINX, clear error if all fail 2026-08-01 16:21:51 +00:00
admin
f299f7f895 feat: show version on startup and in setup.sh output 2026-08-01 16:11:57 +00:00
admin
82a28c6101 fix: remove --host flag, --cloud and --host are mutually exclusive 2026-08-01 16:04:22 +00:00
admin
2e6eca019d fix: use setup.sh batch mode with --batch --token --cloud
- Uses AIO installer's built-in batch mode instead of interactive prompts
- --batch --token TOKEN --cloud US|EU --host HOST for non-interactive install
- cloudFromHost() maps api.wallarm.com → EU, us1.api.wallarm.com → US
- No more stdin piping, proper CLI flags
2026-08-01 15:59:54 +00:00
admin
0ce12f4742 fix: use correct installer URL from storage.googleapis.com
Source: github.com/wallarm/ingress build/fetch-module.sh
URL: storage.googleapis.com/meganode_storage/6.13/wallarm-6.13.0.x86_64-glibc.sh
Preflight checks meganode_storage reachability instead of meganode.wallarm.com
2026-08-01 15:58:49 +00:00
admin
5923f684ec fix: auto-install NGINX before Wallarm node setup
Wallarm node (native deployment) requires NGINX as a runtime
dependency.  installNginx() runs apt-get install nginx if not
already present, before extracting/running the Wallarm installer.

Also fixed repo.wallarm.com → meganode.wallarm.com in preflight.
2026-08-01 15:53:02 +00:00
admin
157373ea16 refactor: rename wallarm → deploy, deploy.sh → setup.sh
- setup.sh bootstraps /opt/wallarm/ structure, builds deploy binary
- deploy binary at /opt/wallarm/deploy (renamed from wallarm)
- /opt/wallarm/source/ — Go source for local rebuilds
- /opt/wallarm/nodes/{instance}/ — per-node directories
- cmd/deploy/main.go replaces cmd/wallarm/main.go
2026-08-01 15:39:56 +00:00
admin
c1e1be2ab2 fix: deploy.sh copies source to /opt/wallarm/source/ for local rebuilds
- Binary + source installed to /opt/wallarm/
- Clients can rebuild: cd /opt/wallarm/source && go build ./cmd/wallarm/
- Source stays at repo root, not in a subdirectory
2026-08-01 15:34:02 +00:00
admin
5dc449b7af Revert "refactor: move Go source into source/ directory"
This reverts commit 78e316af64.
2026-08-01 15:33:35 +00:00
admin
78e316af64 refactor: move Go source into source/ directory
- source/cmd/wallarm/main.go — binary entrypoint
- source/internal/ — all packages
- source/go.mod, source/go.sum
- deploy.sh builds from source/ subdirectory
- Clean separation: source code vs deployment configs
2026-08-01 15:33:17 +00:00
admin
e2c0f5af08 refactor: move everything under /opt/wallarm/
- deploy.sh installs to /opt/wallarm/wallarm (not ~/deploy/)
- state.json at /opt/wallarm/state.json (not ~/.wallarm/)
- instances under /opt/wallarm/{name}/
- .env will live at /opt/wallarm/.env for global defaults
- Single tree, no home directory clutter
2026-08-01 15:30:37 +00:00
admin
f5919b4c85 fix: extract Makeself archive with --noexec, then run setup.sh
- Uses Makeself --noexec --target to extract without running
- Then runs the embedded setup.sh with WALLARM_API_TOKEN and
  WALLARM_API_HOST env vars
- Interactive prompts handled via stdin pipe
2026-08-01 15:25:44 +00:00
admin
b1c596ccf2 fix: use correct meganode.wallarm.com installer URL
- Updated from deprecated repo.wallarm.com to meganode.wallarm.com/6.12/
- Installer URL: wallarm-6.12.7.x86_64-glibc.sh
- Override with WALLARM_INSTALLER_URL env var
- Pipes token+region via stdin to skip interactive prompts
- Preflight checks meganode.wallarm.com reachability
2026-08-01 15:24:03 +00:00
admin
d0ad1c5243 fix: installer URL overridable, simplified deploy form
- WALLARM_INSTALLER_URL env var overrides the native node installer URL
- Address simplified: default IP 0.0.0.0, only ask for port
- Added upstream IP/port prompts
- Per-instance .env file saved to /opt/wallarm/{name}/.env
  (allows resuming/reinstalling from saved state)
- Confirmation summary before deploying
2026-08-01 15:21:04 +00:00
admin
ed9655ee79 fix: move deploy form out of TUI into plain terminal
Bubbletea and huh cannot coexist in the same process.  Fixed by:
- TUI handles only display: deploy choice + dashboard
- Deploy wizard runs as plain terminal prompts in main.go
- No more terminal conflicts, keys work correctly
- Same flow: wallarm → choice → form → deploy → state saved
2026-08-01 15:12:42 +00:00
admin
e378c2a436 fix: remove alt screen to prevent huh/bubbletea terminal conflict
tea.WithAltScreen() caused the alternate buffer to conflict with
huh form rendering.  Using normal screen lets huh render inline.
Also reverted broken tea.Suspend/tea.Resume (not valid commands).
2026-08-01 15:08:25 +00:00
admin
f5ddb145cb fix: prevent recursive form launch — set deploying before huh runs
m.deploying is now set synchronously before the goroutine starts,
preventing bubbletea from re-capturing number keys meant for the
huh form.  Removed duplicate '1' key handler from wizard view.
2026-08-01 15:06:33 +00:00
admin
a6e12d54cc fix: numbered cloud region options [1] US [2] EU for quick selection 2026-08-01 15:04:11 +00:00
admin
91add96b7d fix: Enter key now triggers deploy form from wizard view 2026-08-01 15:03:36 +00:00
admin
56a22756f8 docs: jump server setup guide for remote assistance
Step-by-step instructions for configuring a Linux VM as a jump server:
- SSH server config (AllowTcpForwarding, GatewayPorts, keepalive)
- Tunnel user creation (password or key auth, no shell)
- Zoraxy/Nginx reverse proxy for TLS:443
- Testing and troubleshooting
2026-08-01 15:01:37 +00:00
admin
8b610b1bdb fix: tunnel credentials now use plain terminal prompts
Bubbletea and huh were fighting over terminal input. Fixed by:
- TUI exits when user selects 'Remote Assistance'
- Plain terminal prompts in main.go collect jumphost URL, user, pass
- Starts tunnel directly, shows connection string for admin
- No more conflicting rendering between TUI and forms
2026-08-01 14:54:08 +00:00
admin
c169887fed feat: remote assistance — deploy locally or open tunnel for admin
Startup flow now offers:
- [1] Deploy locally — config wizard, deploys on this server
- [2] Remote assistance — prompts for jumphost URL, user, password
  (or SSH key path), opens reverse TLS:443 tunnel so a remote admin
  can connect and run deployment through their terminal.

Tunnel now supports password auth in addition to key auth.
2026-08-01 14:47:49 +00:00
admin
58faccbb27 fix: source-based deploy.sh — clones repo, builds binary
Gitea server has strict HTTP body limits (~1MB) preventing binary
uploads.  deploy.sh now clones the repo and builds from source using
Go (auto-installed if missing).

Build takes ~30 seconds.  Binary is ~7MB stripped, ~2MB with UPX.
2026-08-01 14:37:28 +00:00
admin
67d9a6a7d8 build: UPX compression — binary 6.9MB → 2.1MB (70% smaller)
UPX with --best --lzma compresses the Go binary for distribution.
Integrated into Makefile targets (fallback if upx not installed).
2026-08-01 14:33:43 +00:00
admin
c64f12a360 chore: Makefile release target with versioned builds 2026-08-01 14:32:23 +00:00
admin
19d16b1e4a fix: deploy.sh uses Gitea releases API instead of raw branch
Binary is now distributed via Gitea releases (not committed to repo).
deploy.sh queries API for latest release tag and downloads the correct
architecture binary.
2026-08-01 14:32:03 +00:00