Auto-Upgrade Is Back!

Auto-Upgrade Is Back!

The auto-upgrade feature that we introduced in ActiveCollab 3.3 changed the way people manage their self-hosted installations.

It also gave us the means to ship improvements and bug fixes without overwhelming our customers with excess maintenance work. Thanks to auto-upgrade we shipped a lot of releases in 3.3, 4.0, 4.1 and 4.2 branches without any major bumps along the way.

The original plan for ActiveCollab 5 rollout was to have Heartbeat as a good shepherd that watches over self-hosted ActiveCollab installations and provides them with all sorts of useful services. One such service was auto-upgrade. When Heartbeat proved to be an unrealistic service to provide given the diversity of setups that ActiveCollab runs on, we had to rethink the auto-upgrade as well.

First stable iteration of this new auto-upgrade engine comes in ActiveCollab 5.0.88\. Once you ask ActiveCollab to upgrade itself, it will do several things:

  1. Check if there are new releases,
  2. Download the latest release and unpack it (new engine uses 50% smaller upgrade packages than the old auto-upgrade system),
  3. Check if the current environment meets the system requirements of the new release and whether all migrations can run or not,
  4. Backup the database prior to running the database migrations,
  5. Update the database.

Once all steps are done, ActiveCollab is switched over to the new release and temporal data is cleaned up. Database backup is kept, for the reference and in case you need to revert to it for whatever reason.

To start the upgrade process, open your command line, `cd` to `/tasks` folder of your ActiveCollab and run:

php activecollab-cli.php check_for_updates

As you can see on the screenshot, our internal 5.0.86 build that we used for testing reported that there’s a new release available for download. Let's upgrade by running the following command:

php activecollab-cli.php upgrade

We wanted to ship this as soon as possible, so there’s no web interface for auto-upgrade just yet, but that’s definitely planned for one of the upcoming releases. Until then command line utility is here to automate what used to be a manual process.

Upgrading from Older ActiveCollab 5 Beta

If you already have ActiveCollab 5.0.x beta installed, please follow these upgrade instructions:

  1. Go to my.activecollab.com and click on Licenses option. There you can download ActiveCollab 5.0.88.
  2. Unpack the ZIP archive.
  3. Upload `/activecollab/5.0.88` from the package to `/activecollab/5.0.88` folder of your current ActiveCollab 5 installation. Don’t delete the older ActiveCollab version from your server just yet, we still need it.
  4. Empty `/tasks` folder on your server and upload all the new files from `/tasks` folder of the ActiveCollab 5.0.88 installation package. We’ll need all of these files, including `activecollab-cli.php`, as well as all three cron jobs that are in `/tasks/cron_jobs` folder.
  5. Overwrite `/activecollab/X.Y.Z/angie/src/Angie/Command/UpgradeCommand.php` file (where X.Y.Z is your current version) with the file from this ZIP archive: UpgradeCommand.php.zip,
  6. Using your terminal, `cd` to `/tasks` folder on your server and run: `php activecollab-cli.php upgrade`. This command will run all the required database migrations and upgrade your `/config/version.php` file.
  7. Delete everything inside `/compile` and `/cache` folders (delete everything except `.htaccess` file if you have it).
  8. If you are upgrading from ActiveCollab 5.0.49, log in and go to System Settings and under Technical Settings configure outgoing mail, search, and Cron jobs.

That's it. If you notice any problems or need our help, do get in touch.

Close