Upgrading AI plugins
Overview
Totara AI plugins follow standard Totara plugin architecture and installation procedures. The plugins are available via Git to all Totara Partners with access to the Totara Suite source code.
Update the plugin source code
Git repository URLs are published for partners within the Product and Technology updates workspace in Totara Community.
Fetch updates for the plugin: Execute the following command in the directory you cloned the plugin into originally.
git fetch --all --pruneCreate a new local branch for deployment: with the new version you want to deploy.
git checkout -b <name> git reset --hard <tag>Replace
<name>with a name that reflects the version of the plugin you are deploying and the version of Totara it is running. This should be different from the branch name you created when installing the plugin.
Replace<tag>with the specific git tag you wish to deploy.
Updating the plugin within Totara
The following instructions are provided as basic guidance.
It is recommended to have your technology team consider an appropriate deployment model that will fit within your processes and policies.
Follow the instructions below to update the plugin.
Put the site into maintenance mode
Log in as a Site Administrator.
Check the live logs to check if any users are currently using the site (Quick-access menu > Reports > Live Logs). The site will be offline while the upgrades are performed.
Run cron.
Enable maintenance mode in Totara (Quick-access menu > Server > Maintenance Mode).
Disable cron.
Log out.
Wait for any executing cron jobs to complete
Review running processes to ensure that there are no instances of cron still running.
If there are, wait for them to complete before proceeding.
Take backups
Backup the Totara database.
Backup the site data directory.
Backup the Totara source code directory.
Remove the plugin files from Totara Suite source code
Review the readme.md in the plugin source code for the previous version you had deployed.
Remove the directories and files you copied across during your installation or last upgrade.
Copy the updated plugin files:
Review the readme.md file that is distributed with the plugin and follow the installation steps it dictates.
Move the contents of the server directory in the cloned plugin folder into the relevant location within the Totara Suite server directory.
Move the contents of the client directory in the cloned plugin folder into the relevant location within the Totara Suite client directory.
Run Totara Upgrade:
Run the following command from the terminal:
sudo -u www-data php server/admin/cli/upgrade.phpReview the output from the command to ensure there are no errors.
Confirm Installation:
Log in to your Totara Suite as an administrator.
Review and save changes to new settings (if any)
Disable server maintenance mode.
Re-enable cron and let it run.