Once you've prepared your server patch, and optionally prepared and pre-published your client patch (TODO: Link), you're ready to deploy the latest version to your servers.
This process works both for installing a new server, and for upgrading an existing server.
The c1_shard_patch.py
script, which was run in the previous step, prepared the new patch under Y:\ryzomcore\pipeline\bridge_server
. Upload this folder to /home/nevrax/bridge_server
on the VM which is running your Patchman Bridge.
It is recommended to automate this step using
rclone
orrsync
.
The following batch script is provided as an example.
rem Remote sfo2 is a DigitalOcean Spaces storage with CDN
rclone copy "Y:\ryzomcore\pipeline\client_patch\patch" sfo2:ryzom/core/patch --verbose
if %errorlevel% neq 0 pause
rem Remote classic is an SFTP server running the patchman bridge server
rclone sync "Y:\ryzomcore\pipeline\bridge_server" demo:bridge_server --verbose --exclude /.patchman.file_index
pause
Launch the patchman terminal. Wait for all the services to connect.
Update and restart all patchman services.
If it failed, try again. In case of serious failure (patchman does not come back online, for example), you must shut all shards and services down and reinstall Patchman services to recover.
The server patch can be distributed before shutting down the servers, only if none of the server layout has changed. Otherwise, you will have conflicting configurations, as Patchman is also used to update and deploy live configuration changes.
If you are changing the shard layout, shut down all the shards of this domain first.
Assuming a domain named demo, issue the following commands from/home/nevrax
, on each server.
cd bin
./domain_demo stop
Then, hit the Deploy button in the Patchman Terminal, before proceeding. This reconfigures all the servers.
To distribute the patch to all servers, issue the following command in the Patchman Terminal, substituting demo with your domain name, and 000018 with the applicable patch number, as can be found in the bridge_server
folder.
terminal.install demo 000018
Verify SPA States, and wait for all servers in the domain to have finished downloading and unpacking the specified version. You will see something like live 17 inst 18 untared
on all the SPAs.
If the shards are still running, shut them down now. This is a manual step, that should be done by Patchman in the future.
Assuming a domain named demo, issue the following commands from /home/nevrax
, on each server. Shut down the VM with the Shard Unifier last.
cd bin
./domain_demo stop
Verify on the web admin panel that all the services have gone offline.
This is a good time to download a backup snapshot of your shards from the Shard Unifier.
/home/nevrax/demo/save_shard_lgs
/home/nevrax/demo/save_shard_bs
/home/nevrax/demo/save_shard_www
A backup of your SQL server is also advised.
If you have a client patch, this is the time to publish your client patch version in the NeL domains SQL.
Hit the Deploy button on Patchman to publish all the latest configuration files.
Issue the following command to switch over to the patched installation. Adjust as previously described.
terminal.launch demo 000018
Verify the status through the admin panel.
The shard will be up and running now. That's it.