The Upgrade Notifier appears on the Course Administration page of the admin course. When you log in you will see something like this:
As you can see this installation has fallen behind! There are upgrades available from branch develop in remote origin for WeBWorK and PG. This means that there are commits in the develop branch of the origin remote (usually the openwebwork github repository) which are not in the currently selected git branch on our server. In addition, the OPL is also out of date.
Note: The Upgrade Notifier is very much git based in terms of its setup and configuration. In particular you should know about remotes and branches and be running your WeBWorK server from a git based installation. You can read more about github and WeBWorK in this article, or learn git here.
Why origin and develop? Well that comes from our configuration file. The upgrade notifier block of localOverrides.conf.dist looks like this:
################################################################################ # Repository Information ############################################################################### # This is where you put your remote and branch for your WeBWorK, PG and OPL # github repositories. # To disable checking for a particular repository, set the remote and branch # variables to be empty strings. $enableGitUpgradeNotifier = 1; $gitWeBWorKRemoteName = "origin"; $gitWeBWorKBranchName = "master"; $gitPGRemoteName = "origin"; $gitPGBranchName = "master"; $gitLibraryRemoteName = "origin"; $gitLibraryBranchName = "master";
As we can see there is an option to turn the Upgrade Notifier on and off, as well as options to set the remote and branch for WeBWorK, PG, and the OPL. Most people will use this default setup. For the above server we have changed the branch for PG and WeBWorK to develop but left the remote as origin (because that currently points to openwebwork). If we wanted to we could even have the update notifier point at our own personal repository or at some feature branch we care about. We haven't changed the library branch or remote, and usually you won't. Of course if you want to use this feature you will need to copy these lines over to localOverrides.conf.
Note: If you are working with a fresh installation or upgrade, you should also make sure that the external program git is defined in the site.conf file by the line $externalPrograms{git} = "/usr/bin/git";
Once your repository information is configured, whenever you visit the Course Administration page your server will use git and ls-remote to check and see if the configured remote and branch has commits which are not in your currently selected local branch. If you are using the default setup of pointing to origin and master then you will only see an upgrade message for PG or WeBWorK when there are important bugfixes or a new version. If you point to a different branch, like develop, you will see upgrade messages more often. (Usually you will want to select a local branch which tracks the configured remote and branch. However, you can have additional commits and customization in your local branch without affecting the upgrade notifier.) The OPL gets updated frequently so you are likely to see upgrade messages for that component frequently, even on the master branch. If you would like to disable notifications for any portion of the system, just set the remote name and branch name for that component's variables to be empty strings.
Note: The upgrade notifier will also let you know when there is a new version of WeBWorK available. This is mostly important for people using the default setup. Upgrades to the master branch of WeBWorK or PG will always be pretty safe. However if you see the new version message then the upgrade process will likely be a lot more involved. However, it will be worth it because you will also get all of the new features that come with a new release. Our releases are biannual so you should only see this message twice a year.
When there are upgrades available you can download them by using the following command as necessary in /opt/webwork/webwork2 or /opt/webwork/pg or /opt/webwork/libraries/webwork-open-problem-library
git pull <remote name> <branch name>If you are using the default setup then this command should be pretty safe, unless there is a new WeBWorK version. Since the above server is tracking develop there could be any number of changes waiting upstream and we may have additional configuration or conflict fixing to do. In any case, after updating all three components on our server we get a message which looks like this
Everything is up to date, but we forgot to run OPL-update. After doing so we refresh the page and get the message.
Finally even system administrators get to experience the thrill of seeing the green bar.



No comments:
Post a Comment
Note: Only a member of this blog may post a comment.