• Document Up to Date
  • Updated On 4.1.1

Upgrading CrafterCMS on Docker/Kuber

This section details how to upgrade your CrafterCMS installations in Kubernetes or Docker Compose.

Upgrading Docker Compose

These upgrade instructions are for both authoring and delivery compose projects:

  1. Run docker-compose down to fully stop the environment.

  2. If you are using a clone of https://github.com/craftercms/docker-compose, then just pull the latest changes. If you’re using your own Docker Compose files, then remember to update the versions of the CrafterCMS Docker images.

  3. Check the release notes of the new CrafterCMS version (Release Notes) for upgrades to OpenSearch. If there has been an upgrade, then also update the OpenSearch image versions.

  4. Check the configuration file changes between the previous version and the new version. If you have overwritten any of them in a volume, we recommend you do the following:

    1. Compare the original configuration files and the files you have overwritten, so you know what are the changes you have made (for example, if you’re currently in 4.1.0, then run a diff between the original 4.1.0 configuration files and your overwritten versions).

    2. Copy your changes to the new version of the configuration file (for example, if the new version you’re upgrading to is 4.1.1, then copy your configuration overrides to the 4.1.1 version of the file).

    3. Replace the file in the volume with the new configuration file with your changes.

  5. Check the Release Notes for any other additional tasks you need to perform.

  6. Run docker-compose up.

  7. Monitor the Docker logs for any upgrade errors.

Upgrading 4.0.x -> 4.1.x (from ES)

Please read through the upgrade instructions above first. The steps for upgrading to 4.1.x follows almost exactly the same steps as listed above. When upgrading from version 4.0.x to version 4.1.x, we need to reindex and recreate the Deployer targets, in addition to performing the steps listed above.

  1. Run docker-compose down to fully stop the environment.

  2. Run docker compose up elasticsearch, to startup Elasticsearch only

  3. Run curl -X GET http://localhost:9201/_cat/indices\?v to verify the ES indexes

  4. Run curl -X DELETE "localhost:9201/_all?pretty" to remove all ES indexes (if custom indexes are used in elasticsearch, please remove only the CrafterCMS indexes one by one)

  5. The next step is to update the images. If you are using a clone of https://github.com/craftercms/docker-compose, then just pull the latest changes. If you’re using your own Docker Compose files, then remember to update the versions of the CrafterCMS Docker images, and the search images and corresponding items in the Docker Compose files to use OpenSearch.

  6. Check the configuration file changes between the previous version and the new version. If you have overwritten any of them in a volume, we recommend you do the following:

    1. Compare the original configuration files and the files you have overwritten, so you know what are the changes you have made (for example, if you’re currently in 4.1.0, then run a diff between the original 4.1.0 configuration files and your overwritten versions).

    2. Copy your changes to the new version of the configuration file (for example, if the new version you’re upgrading to is 4.1.1, then copy your configuration overrides to the 4.1.1 version of the file).

    3. Replace the file in the volume with the new configuration file with your changes.

  7. Check the Release Notes for any other additional tasks you need to perform.

  8. Run docker-compose up.

  9. Monitor the Docker logs for any upgrade errors.

  10. Run curl -X POST http://localhost:9191/api/1/target/deploy-all -d '{"reprocess_all_files":true}' -H 'content-type: application/json' to do a reprocess.

  11. Your installation is now upgraded and ready.

Upgrading Kubernetes Deployments

These upgrade instructions are for both Authoring and Delivery deployments:

  1. Update the CrafterCMS image versions in your deployment files.

  2. Check the release notes of the new CrafterCMS version (Release Notes) for upgrades to OpenSearch. If there has been an upgrade, then also update the OpenSearch image versions in your deployment files.

  3. Check the configuration file changes between the previous version and the new version. If you have overwritten any of them in a ConfigMap or Secret, we recommend you do the following:

    1. Compare the original configuration files and the files you have overwritten, so you know what are the changes you have made (for example, if you’re currently in 4.1.0, then run a diff between the original 4.1.0 configuration files and your overwritten versions).

    2. Copy your changes to the new version of the configuration file (for example, if the new version you’re upgrading to is 4.1.1, then copy your configuration overrides to the 4.1.1 version of the file).

    3. Replace the file in the ConfigMap or Secret with the new configuration file with your changes.

  4. Check the Release Notes for any other additional tasks you need to perform.

  5. Apply the updated deployment files (kubectl apply) so the containers are restarted and the configuration changes detected.

  6. Monitor the Kubernetes logs for any upgrade errors.

Configuration changes between CrafterCMS versions

None at this time.