Commit graph

34 commits

Author SHA1 Message Date
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
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
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
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
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
ff5a09b994 refactor: drop Docker, single-binary native-only world
Removed:
- docker/ (scripts, binaries, images) - no longer needed
- native/, common/ bash scripts - replaced by Go binary
- setup.sh - replaced by deploy.sh
- internal/docker/ Go package - no longer needed

Added:
- deploy.sh - one-command bootstrap
- --version flag

Result: one binary, one TUI, one deployment type. Zero Docker.
Binary distributed via Gitea releases (not in repo).
2026-08-01 14:31:25 +00:00
admin
1a11e40c66 feat: wired TUI form to deployment — wizard actually deploys now
- Wizard: type pick → cloud region → token → node config → deploys via native.InstallNode / docker.DeployContainer
- State saved after successful deployment with API token
- Dashboard reflects real node state from ~/.wallarm/state.json
- Removed old unused HuhForm stub
2026-08-01 13:59:25 +00:00
admin
2db33343a8 feat: native and docker deployment packages + Makefile
- internal/native/ — systemd units, installer download, node install/remove/status
  (ported from wallarm-native.sh)
- internal/docker/ — Docker engine install (apt/yum/apk), image load, container
  deploy/remove/status (ported from wallarm-ct-deploy.sh)
- Makefile — cross-compile targets (linux-amd64, linux-arm64)
2026-08-01 13:55:28 +00:00
admin
dfd7180556 feat: bubbletea TUI — wizard + dashboard
- Wizard: type pick → cloud region → token → node config (huh forms)
- Dashboard: node list with status, action shortcuts
- Auto-routes based on ~/.wallarm/state.json existence
- Replaces text stubs with proper interactive TUI
2026-08-01 13:16:08 +00:00
admin
1a2a0fbd7b feat: Go binary — preflight, state, tunnel over TLS:443
Single-binary wallarm deployment manager:
- shared/ — system detection, validation, connectivity (port of wallarm-lib.sh)
- preflight/ — mandatory checks on every start (OS, arch, disk, memory, cloud)
- state/ — ~/.wallarm/state.json persistence (nodes, deployment type)
- tunnel/ — reverse SSH tunnel over TLS:443 via Zoraxy edge proxy
- cmd/wallarm/main.go — auto-detect state, route to wizard or dashboard

wallarm-docker.sh wrapper delegates to existing ct-* scripts for now.
2026-08-01 09:25:22 +00:00