Skip to content

Latest commit

 

History

History
107 lines (77 loc) · 2.59 KB

updates.adoc

File metadata and controls

107 lines (77 loc) · 2.59 KB

Updates

Before updating MONARC it is advised to configure database backup. For that you need to create a file data/backup/credentialsmysql.cnf:

[client]
host     = localhost
user     = sql-monarc-user
password = your-password
socket   = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host     = localhost
user     = sql-monarc-user
password = your-password
socket   = /var/run/mysqld/mysqld.sock
basedir  = /usr

If this file is not present, a warning message will be displayed during the update.

System update

Keep the software of your distribution up-to-date (Apache, PHP, MariaDB, Postfix, etc.). At least the security updates from the GNU/Linux distribution.

MONARC update

Update a single MONARC instance

If you have already installed MONARC and want to update to a later version, you can use the provided script:

$ ./scripts/update-all.sh -c
$ rm -Rf ./data/cache
$ sudo systemctl restart apache2.service

Updates from the last stable release of MONARC will be retrieved.

For more details the script will:

  • backup your databases in case the update fails (if enabled, as explained previously);

  • check the presence of composer and if needed install it;

  • retrieve the new code from the last stable release (master branch):

    • pull updates for module/[MonarcCore, MonarcBO/MonarcFO] via composer;

    • pull updates for node_modules/[ng_anr, ng_backoffice/ng_client].

  • run the appropriate database upgrade scripts;

  • update the translations.

Please be aware that by default the update script will run database migrations This behavior can be changed by passing the -b option to the update script.

Update MONARC when connected to a back office

When MONARC is connected to a back office and has been deployed with the ansible playbook, three steps are required for a full proper update.

  1. Update of the back office

  2. Update of MONARC

  3. Update of the configuration server (ansible playbook)

Always use the ansible user.

Back office
$ su ansible
$ cd /var/lib/monarc/bo/MonarcAppBO/
$ ./scripts/update-all.sh
$ sudo systemctl restart apache2.service
Front office
$ su ansible
$ cd /var/lib/monarc/fo
$ ./scripts/update-all.sh -b
$ sudo systemctl restart apache2.service
Configuration server
$ su ansible
$ cd /home/ansible/ansible-ubuntu/
$ git pull origin master

If you have any problem you can check the section dedicated to the common issues.