Updating My Custom Service When a new Custom image is published
Objective
Become familiar with how the SOAJS Dashboard notifies you about a custom image updates & upgrades and learn how to pull and apply them and apply them on related custom services deployed in any Environment.
Steps
Locate Update Notifications
Understand what the Update is about
Apply the Update
Step 1
The Dashboard contains a notification system that informs you whenever new image updates or upgrades are published for your custom image.
These notifications appear Under Deploy pillar → Updates & Upgrades.
In Updates & Upgrades you will see notifications about new image updates or upgrades with a link so you can learn more about them.
Step 2
Since your image is published on Docker Hub, pull the image by running one of the following commands :
# pull the image based on tag name as a release
> docker pull repositoryName/image@releaseName
# pull the image based on tag name as a version
> docker pull repositoryName/image@1.0.x
Step 3
Go to Deploy pillar → Clouds & Deployments
Make sure you are in the right environment
Lookup the service you want to update
Open the Service Operations menu
Click Redeploy Service
Redeploy Service
This operation will load the catalog recipe again, if the catalog recipe has changed then the service will be affected then it redeploys the service with the new recipe changes.
The SOAJS deployer inside your custom image will perform a git clone operation that will clone the latest code updates from the specified branch.
Once the code is pulled, the deployer will run an NPM INSTALL command to install the dependencies needed and will start your service.
While the deployer is running, your old service remains operational until the new service is flagged as running by either Docker Swarm or Kubernetes depending on which of the two drivers you have chosen to deploy your SOAJS cloud with.
When the new service becomes ready, then the old one will be terminated; your Custom Service is now updated and is using the new image upgrades.