UpdateΒΆ
The following guide explains how to update the stack to a newer version.
Warning
Before doing anything you should first make sure the host running the stack has enough free disk space remaining to perform an update. (Each new module takes around 500Mo)
Warning
The following process aims at minimizing services interruption time but restart of service will always create a downtime.
Note
To speed up the whole process you can pull all required images for the new version before starting the update.
(optional) to free space beforehand and make sure after update you only have versions N and N-1
docker image prune
Ensure that the Composer version is at least the same as the wanted version
Update the configuration-dispatcher version
Edit the file
modules/configuration-dispatcher/main/module.service
fromimage: ${{image-repository}}osp-configuration-dispatcher${{image-version}} environment: - IMAGE_REPO=nexus.onsphere.ch - IMAGE_VERSION=[old-version]to
image: ${{image-repository}}osp-configuration-dispatcher:[new-version] environment: - IMAGE_REPO=nexus.onsphere.ch - IMAGE_VERSION=[old-version]Note
If the environment section of your configuration does not look like this but instead uses only variables (i.e ${{optional-env-section}}, ${{image-repo-env}}, ${{image-version-env}}) you can simply replace ${{image-repo-env}} and ${{image-version-env}} with above format : IMAGE_REPO and IMAGE_VERSION.
Warning
If you change the
IMAGE_VERSION
, every module will restart and wait for the configuration. The valid configuration will not be available until step 8.
Push the configuration
Update your configuration by applying patches
Set the version for all modules
Edit the file
modules/configuration-dispatcher/main/module.service
fromimage: ${{image-repository}}osp-configuration-dispatcher:[new-version] environment: - IMAGE_REPO=nexus.onsphere.ch - IMAGE_VERSION=[old-version]to
image: ${{image-repository}}osp-configuration-dispatcher${{image-version}} environment: - IMAGE_REPO=nexus.onsphere.ch - IMAGE_VERSION=[new-version]
Wait until the osp-configuration-dispatcher is running with the targeted version
Push the updated configuration
Check if the configuration is accepted
Fix it if it is not by using providing error message then re-push
Wait until the system is running with the new version
Note
Updates take disk space. Keeping version N-1 (N being the version now running) on the host is always a good idea in case a rollback is needed. Anything prior N-1 can (should) be removed.