How to achieve incremental upgrades of a YACS server?

Life is constantly requiring us to adapt, and software is no exception to this rule.

Imagine the situation: you have discovered YACS, installed it, played a while with a number of interesting features. Then you have started to push some content, to structure your work, to tune a skin.

Some weeks later, a brand new version of the software has been made available, and of course it is very appealing because of the new things that have been added.

Can this change put your server at risk? And how much time will you have to burn in such upgrades?

Learn how to use advanced synchronization features embedded into YACS to integrate new features -smoothly.

YACS has been conceived from the outset as an evolving piece of software, with numerous iterative releases to swiftly benefit from technology breakthroughs.

[title]YACS uses MD5 hashes to identify changed scripts[/title] YACS releases do have version numbers, in order to clearly identify set of scripts. However, internally, YACS has no version numbering scheme for individual scripts. At one time, there is a set of various reference scripts with related MD5 hashes. If running scripts at your server have the same MD5 hashes, they are up-to-date. Else they should be upgraded against the reference server.

Actually some scripts are fully devoted to the management of the software.

[title]YACS automates the job[/title]

Several scripts have been designed specifically to process most tedious parts of software updates. Moreover, these scripts are chained together, like several steps of a software assistant. Technical details are available in the software documentation ( see scripts/index.php).

These scripts will: - get the list of reference scripts - stage locally those reference scripts that are new or that have changed - switch the server off - actually upgrade scripts from the staging store - scan updated scripts for hooks - update the database structure - run one-time execution scripts - switch the server on again

[title]Provide an updated archive[/title]

To trigger an update after some release announcement, get the new archive and upload it in the inbox/yacs directory of the server to upgrade. You will have to create the directory manually if it does not exist.

Then, from the browser window, go to the Control Panel of the server to be upgraded. Click on the System tab, then on the 'Scripts' link. In the next page, select the link 'Update' in the menu bar under page title.

The staging script lists several options to consider. Select the latest archive to use it as a local reference of updated scripts.

[title]Use a remore reference server[/title]

This approach works only for minor releases, and requires specific network conditions. Use it at your own risks, and fall back to the previous method if any trouble.

By default scripts update a server against the public YACS Internet server, at

http://www.yacs.fr

Some organizations may want to maintain their own reference server, and better control the spread of YACS-based software. For example, this is probably a good technique to share a corporate skin among a set of servers.

The name of the reference server to be used during updates can be changed from the configuration panel for scripts, listed in the Control Panel.

Then, go to the Control Panel of the server to be upgraded. Click on the System tab, then on the 'Scripts' link. In the next page, select the link 'Update' in the menu bar under page title.

The staging script lists several options to consider. Select to update against the reference server. YACS will offer to stage new scripts, then you will have the opportunity to review downloaded files before replacing running scripts. Then the actual upgrade will take place.

[title]Houston, we've got a problem[/title] Normally, an upgrade lasts less than 10 minutes, including the staging of new scripts, the review of the database structure and the execution of any post-installation script. Is this difficult? Well, not really, but you may face issues in some cases.

The automatic upgrade may be impossible for some reason. Some situations that have been reported by end users: - An full hard drive, with no capability to stage updated scripts. - No permission to build the staging store. - Staging scripts is timed out because of poor transmissions across the Internet. - An ISP that prevents its hosts to visit other servers and block network requests to the reference server.

If this happens to you, don't panic, and apply the Plan B: How to manually upgrade a YACS server?.

Another issue is to have the sessions killed for some reason during the update. Don't worry, it is usually possible to finalize the installation anyway: How to finalize an upgrade on abrupt logout?