Server Update Steps: Difference between revisions
mNo edit summary |
m (Complete rewrite for automated CI/CD deployment flow) |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
All deployments are managed through GitHub PRs, CI pipelines, and the Discord dashboard. No manual SSH builds required. | |||
== | == Overview == | ||
{| class="wikitable" | |||
|- | |||
! Component !! Repo !! Branch !! CI Trigger !! Deploy Method | |||
|- | |||
| NWN Module || [https://github.com/layonara/nwn-module layonara/nwn-module] || <code>ee</code> || Push to <code>ee</code> || Dashboard → Deploy | |||
|- | |||
| Hak Packs || [https://github.com/layonara/nwn-haks layonara/nwn-haks] || <code>64bit</code> || Push to <code>64bit</code> || Dashboard → Deploy (requires Stop first) | |||
|- | |||
| NWNX (Unified) || [https://github.com/plenarius/unified plenarius/unified] || <code>master</code> || Push to <code>master</code> || Dashboard → Update NWNX | |||
|- | |||
| Discord Bot || [https://github.com/layonara/discord-bot-aragen discord-bot-aragen] || <code>main</code> || Push to <code>main</code> || Auto-deploy via Coolify | |||
|} | |||
== Module Update == | |||
# Create a PR targeting the <code>ee</code> branch on [https://github.com/layonara/nwn-module nwn-module] | |||
# Merge the PR — CI automatically runs <code>stage-module.sh</code> on leanthar, which compiles with nasher and stages the <code>.mod</code> file to ee64's <code>.staged</code> directory | |||
# On the Discord dashboard, click '''Deploy''' → select the staged version from the dropdown → set wait time → confirm | |||
# The bot promotes the staged module to live, updates <code>NWN_MODULE</code> in the environment, and triggers a restart | |||
== Hak Pack Update == | |||
'''Note:''' Hak updates require a full server stop because players must re-download via NWSync. | |||
# Create a PR targeting the <code>64bit</code> branch on [https://github.com/layonara/nwn-haks nwn-haks] | |||
# Merge the PR — CI runs <code>build.sh</code> and <code>stage-haks.sh</code> on leanthar, which builds haks and stages them to ee64 | |||
# On the Discord dashboard, click '''Stop''' to shut down the server (it will NOT auto-restart) | |||
# Click '''Deploy''' to promote staged module + haks to live | |||
# Click '''Restart''' to bring the server back up with new haks | |||
== NWNX Update == | |||
NWNX is the C++ plugin framework. Changes to <code>plenarius/unified</code> (including the Layonara plugin) require a Docker image rebuild. | |||
# Create a PR targeting <code>master</code> on [https://github.com/plenarius/unified plenarius/unified] | |||
# Merge the PR — CI compiles, builds a Docker image, and pushes to <code>ghcr.io/plenarius/unified:latest</code> | |||
# On the Discord dashboard, click '''Update NWNX''' → it shows running vs latest version → click '''Pull & Restart''' | |||
# The bot pulls the new Docker image on ee64 and triggers a restart | |||
== Discord Bot Update == | |||
# Create a PR targeting <code>main</code> on [https://github.com/layonara/discord-bot-aragen discord-bot-aragen] | |||
# Merge the PR — CI builds a Docker image and Coolify automatically restarts the bot container | |||
# No manual action needed | |||
== Release / Versioning == | |||
Use the <code>/deploy_confirm</code> Discord command to create a GitHub release: | |||
# Run <code>/deploy_preview</code> to see unreleased changelog entries | |||
# Run <code>/deploy_confirm</code> with minor or major bump | |||
# This creates a GitHub tag (<code>vX.Y</code>) on the <code>ee</code> branch, which triggers <code>release-module.yml</code> to build a versioned module | |||
# The bot posts release notes to the changelog channel, SMF forums, wiki, and in-game | |||
# Bug threads in Discord get "Now Live" follow-ups | |||
== Dashboard Buttons == | |||
{| class="wikitable" | |||
|- | |||
! Button !! What it does | |||
|- | |||
| '''Deploy''' || Shows a dropdown of the 5 most recent module versions (staged marked). Promotes staged files, sets NWN_MODULE, cleans hotfix overrides, restarts. | |||
|- | |||
| '''Restart''' || Sends in-game countdown then restarts. If server is stopped, starts the container instead. | |||
|- | |||
| '''Stop''' || Sends in-game countdown then stops the container. Server will NOT auto-restart. Use Restart to bring it back. | |||
|- | |||
| '''Update NWNX''' || Compares running vs latest NWNX image. Pull & Restart to upgrade. | |||
|- | |||
| '''Logs''' || Tail the last N lines of the server log. | |||
|- | |||
| '''Refresh''' || Force-refresh the dashboard embed. | |||
|} | |||
== Hotfixes == | |||
For emergency single-file fixes without a full module rebuild: | |||
# Use the <code>/hotfix</code> Discord command to SCP individual compiled scripts to <code>/opt/layonara/nwserver-docker/server/development/</code> on ee64 | |||
# These override module scripts at runtime | |||
# On the next full Deploy, non-persistent hotfix files are automatically cleaned | |||
== Infrastructure == | |||
{| class="wikitable" | |||
|- | |||
! Host !! Role !! Address | |||
|- | |||
| leanthar || Build server, bot, wiki, forums || 5.161.122.37 (Hetzner) | |||
|- | |||
| ee64 || Game server, MariaDB, Redis || 10.99.0.3 (via WireGuard) | |||
|- | |||
| Coolify || Service management || https://leanthar.layonara.com | |||
|- | |||
| Grafana || Monitoring || https://grafana.layonara.com | |||
|} | |||
Servers connected via WireGuard tunnel (10.99.0.x). Bot reaches ee64 via SSH over the tunnel. | |||
Latest revision as of 23:14, 17 April 2026
All deployments are managed through GitHub PRs, CI pipelines, and the Discord dashboard. No manual SSH builds required.
Overview
| Component | Repo | Branch | CI Trigger | Deploy Method |
|---|---|---|---|---|
| NWN Module | layonara/nwn-module | ee |
Push to ee |
Dashboard → Deploy |
| Hak Packs | layonara/nwn-haks | 64bit |
Push to 64bit |
Dashboard → Deploy (requires Stop first) |
| NWNX (Unified) | plenarius/unified | master |
Push to master |
Dashboard → Update NWNX |
| Discord Bot | discord-bot-aragen | main |
Push to main |
Auto-deploy via Coolify |
Module Update
- Create a PR targeting the
eebranch on nwn-module - Merge the PR — CI automatically runs
stage-module.shon leanthar, which compiles with nasher and stages the.modfile to ee64's.stageddirectory - On the Discord dashboard, click Deploy → select the staged version from the dropdown → set wait time → confirm
- The bot promotes the staged module to live, updates
NWN_MODULEin the environment, and triggers a restart
Hak Pack Update
Note: Hak updates require a full server stop because players must re-download via NWSync.
- Create a PR targeting the
64bitbranch on nwn-haks - Merge the PR — CI runs
build.shandstage-haks.shon leanthar, which builds haks and stages them to ee64 - On the Discord dashboard, click Stop to shut down the server (it will NOT auto-restart)
- Click Deploy to promote staged module + haks to live
- Click Restart to bring the server back up with new haks
NWNX Update
NWNX is the C++ plugin framework. Changes to plenarius/unified (including the Layonara plugin) require a Docker image rebuild.
- Create a PR targeting
masteron plenarius/unified - Merge the PR — CI compiles, builds a Docker image, and pushes to
ghcr.io/plenarius/unified:latest - On the Discord dashboard, click Update NWNX → it shows running vs latest version → click Pull & Restart
- The bot pulls the new Docker image on ee64 and triggers a restart
Discord Bot Update
- Create a PR targeting
mainon discord-bot-aragen - Merge the PR — CI builds a Docker image and Coolify automatically restarts the bot container
- No manual action needed
Release / Versioning
Use the /deploy_confirm Discord command to create a GitHub release:
- Run
/deploy_previewto see unreleased changelog entries - Run
/deploy_confirmwith minor or major bump - This creates a GitHub tag (
vX.Y) on theeebranch, which triggersrelease-module.ymlto build a versioned module - The bot posts release notes to the changelog channel, SMF forums, wiki, and in-game
- Bug threads in Discord get "Now Live" follow-ups
Dashboard Buttons
| Button | What it does |
|---|---|
| Deploy | Shows a dropdown of the 5 most recent module versions (staged marked). Promotes staged files, sets NWN_MODULE, cleans hotfix overrides, restarts. |
| Restart | Sends in-game countdown then restarts. If server is stopped, starts the container instead. |
| Stop | Sends in-game countdown then stops the container. Server will NOT auto-restart. Use Restart to bring it back. |
| Update NWNX | Compares running vs latest NWNX image. Pull & Restart to upgrade. |
| Logs | Tail the last N lines of the server log. |
| Refresh | Force-refresh the dashboard embed. |
Hotfixes
For emergency single-file fixes without a full module rebuild:
- Use the
/hotfixDiscord command to SCP individual compiled scripts to/opt/layonara/nwserver-docker/server/development/on ee64 - These override module scripts at runtime
- On the next full Deploy, non-persistent hotfix files are automatically cleaned
Infrastructure
| Host | Role | Address |
|---|---|---|
| leanthar | Build server, bot, wiki, forums | 5.161.122.37 (Hetzner) |
| ee64 | Game server, MariaDB, Redis | 10.99.0.3 (via WireGuard) |
| Coolify | Service management | https://leanthar.layonara.com |
| Grafana | Monitoring | https://grafana.layonara.com |
Servers connected via WireGuard tunnel (10.99.0.x). Bot reaches ee64 via SSH over the tunnel.