|
1 | 1 | # How-to instructions |
2 | 2 |
|
3 | | -Detailed how-to instructions for upgrade scenarios. |
| 3 | +Detailed how-to instructions for upgrading Matomo. |
4 | 4 |
|
5 | 5 | ## Upgrade Database Engine |
6 | 6 |
|
7 | 7 | The database engine is managed by [mitlib-tf-workloads-matomo](https://github.com/mitlibraries/mitlib-tf-workloads-matomo). In testing, Matomo had no problems with database engine upgrades through different MariaDB versions. |
8 | 8 |
|
9 | 9 | ## Update Matomo version |
10 | 10 |
|
| 11 | +These instructions assume you are working in the **dev** environment. Change to the appropriate <env> tag if you are working in a different environment. |
| 12 | + |
11 | 13 | 1. Ensure that a backup of the current `config/config.ini.php` exists in the EFS mount. |
12 | | -1. Publish updated container to ECR. |
| 14 | + * SSH (via AWSCLI + Session Manager) to the container(see the [Troubleshooting](./HOWTO-miscellaneous.md) section for the AWS CLI connection command). |
| 15 | + * Run the **backup-data.sh** script `/usr/local/bin/backup-data.sh` |
| 16 | +1. Make any necessary changes to the repo. |
| 17 | + * For version upgrades, change line 1 in **Dockerfile** to the new version. |
| 18 | +1. Publish the updated container to ECR. |
| 19 | + * Run `make dist-dev` to create the updated container. |
| 20 | + * Run `make publish-dev` to push the new container to ECR and tag it as 'latest'. |
13 | 21 | 1. Deploy updated container for ECS service. |
14 | | -1. Verify via webUI that the Matomo installation is ready to be upgraded. |
15 | | -1. SSH (via AWSCLI + Session Manager) to the container and run the upgrade on the CLI (see the [Troubleshooting](./HOWTO-miscellaneous.md) section for the AWS CLI connection command). The database update command is `php /var/www/html/console core:update`. |
16 | | -1. For the 3.x to 4.x upgrade, there is an additional step to update to the utf8mb4 character set. Once the database upgrade is complete, run `/var/www/html/console core:convert-to-utf8mb4` to update the tables. |
17 | | -1. Copy updated `config/config.ini.php` to the EFS mount. |
| 22 | + * Via the AWS Console: |
| 23 | + * Go to ECS |
| 24 | + * Click on **matomo-ecs-dev-cluster** |
| 25 | + * Click on the checkbox in **Services** next to `matomo-ecs-dev-service` |
| 26 | + * Click `Update` |
| 27 | + * On the next page, expand **Deployment options** and choose `Force new deployment` |
| 28 | + * Click `Update` |
| 29 | + * Via AWS CLI |
| 30 | + * `aws ecs update-service --cluster matomo-ecs-dev-cluster --service matomo-ecs-dev-service --force-new-deployment` |
| 31 | + *Either method takes a few minutes to complete the deployment. It's easiest to verify completion in the AWS Console. A green bar will appear at the top of the page stating `Service updated: matomo-ecs-dev-cluster:matomo-ecs-dev-service` |
| 32 | +1. Verify via webUI that the Matomo installation is ready to be upgraded. Ask someone in DEP to assist with this step. |
| 33 | + * This step is only necessary when a database update is required. |
| 34 | +1. SSH (via AWSCLI + Session Manager) to the container and run the upgrade on the CLI (see the [Troubleshooting](./HOWTO-miscellaneous.md) section for the AWS CLI connection command). |
| 35 | + * The database update command is `php /var/www/html/console core:update`. |
| 36 | + * This step is only necessary when there is a required update to the table structure in Matomo listed in the release notes. |
| 37 | +1. Copy the updated `config/config.ini.php` to the EFS mount. |
| 38 | + * Run the **backup-data.sh** script as in step 1. |
18 | 39 | 1. Verify that there were no changes to the `config.ini.php` file that need to be captured back in this repo. |
19 | | -1. Log back in to the webUI to verify that everything is working. |
| 40 | + * See [compare-ini-files](./HOWTO-compare-ini-files.md) |
| 41 | +1. Log back in to the webUI to verify that everything is working. Ask someone in DEP to assist with this step. |
0 commit comments