Patchman Service

The patchman_cfg directory to edit is the C:\Ryzom\patchman_cfg version that was used during the 0_setup.py build phase.This will be the main config for preparing and deploying services to the ep1.mini01.mups.co.uk development server which includes the Linux service binaries, server data and client patches.

Patchman comes pre-configured under the assumption you’re using mini01 as has been used throughout this wiki. It does however use the “ryzomcore.local” domain, all occurrences of which need changing to “mups.co.uk”

If you have msys available on windows use (or use visual studios find/replace in files)

find . -exec sed -i 's/ryzomcore.local/mups.co.uk/g' {} \;

The configuration to be used will assume all services are running on a single linux server ep1.mini01.mups.co.uk including the various patchman services. The setup is vastly more flexible than this for both Patchman and Ryzom but you’re on your own with that.

In shard_ctrl_mini01.txt change DBHost = “ep1.mini01.mups.co.uk”; to DBHost = “localhost”;

In cfg/01_domain_mini01.cfg change DBNelUser and DBRingUser to “root” and the Pass to the mysql root password.

For anything beyond testing, you should create a dedicated ryzom user with suitable database/table permissions.

Build the patchman admin install archive (switch to the R:/code/netl/tools/build_gamedata directory)

c1_shard_patch.py --admininstall

Copy the resulting T:/bridge_server/admin_install.tgz to the ep1.mini01.mups.co.uk /srv/core/ directory and extract. Copy C:\Ryzom\patchman_cfg\admin_install\patchman_service_local.cfg to /srv/core and ensure the hostname is identical to the machines name ep1.mini01.mups.co.uk

chmod -R +x /srv/core/bin
chmod -R +x /srv/core/patchman

To start the patchman services run “bin/startup” to stop “bin/admin stop”. You may also start/stop the shard via the “bin/shard” script. Services run in screen sessions, “screen -list” to view and “screen -r” to reconnect.

Deployment

The patchman services on ep1.mini01 are behind a firewall. Setup a ssh tunnel to enable localhost:44751 to connect to localhost:44751 on ep1.mini01. Edit the patchman_service.cfg and modify the ep1.mini01.mups.co.uk:44751 to “localhost:44751”

NOTE: With a real deployment where patchman may be running across multiple servers you’ll likely want an ssh tunnel only into the gateway machine, with all other machine firewalls allowing access on relevant patchman ports from the bridge server. However you setup, take care to restrict public access to services where possible.

Edit the terminial_mini01.bat to have the correct build path. Ensure patchman services are running on ep1 (bin/startup) and run terminal_mini01/terminal_mini01.bat Once connected, press “Deploy”. This will ensure all patchman servers are now configured (although we’re using only one). The /srv/core/mini01 folder will contain various service folders and configs.

Server Binaries and Data

The actual shard/server binaries and data now needs building and transferring over to the main patchman bridge server (ep1.mini01 in this case is the patchman bridge server and one and only patchman server). Run c1_shard_patch.py to generate a new server data patch file and copy the result from T:\bridge_server\ into the /srv/core/bridge_server/ directory.

Press “Quit pams” to have patchman restart remotely and pickup on the new patch.

The new patch can now be installed to all servers (in this case again just ep1.mini01) by terminal.install mini01 1

Where mini01 is the “domain” and “1” is the patch version to install.

To make an installed patch the current live version (and also launch the shard) wait until the install reports “live 0 inst 1” for the spa status and then run terminal.launch mini01 1

If you make changes to the data and wish to deploy updates to the server. Simply re-run c1_shard_patch.py to generate a new patch set. Upload this manually to the /srv/core/bridge_server folder on the bridge server and repeat the quit pams, terminal.install and terminal.launch.

Updating Patchman

The admin_install.tgz can be updated on all patchman services by generating a new “-admininstall” and then using “Update PAMS” followed by “Quit PAMS”. The manual bootstrap was only needed for the first time setup (and for copying new data patch files to the bridge server).

Note: DBHost had to be set to 127.0.0.1 and the ep1.mini01.mups.co.uk machine needed its LAN ip adding into /etc/hosts otherwise after looking up its own hostname locally it would send the 127.0.0.1 IP to connecting clients instead of the LAN IP (Use a public ip obviously for live). This has been fixed in a later commit.

There’s a lot more to configuring patchman beyond a single server setup using the shipped mini01 example configs. This is just a bare minimum to get running.

Continue on to Running the Server