Container Redeploy API
The automation of the container redeploy process can be implemented using:
Redeploy with API
A list of all API calls can be found in the API documentation.
Containers redeploy is performed with the environment.Control.RedeployContainers method, which is managed with the following parameters:
- envName - name of the environment where container(s) should be redeployed
- session - user session (or token) identifier used for authentication
- nodeGroup - identifier of the environment layer to update (optional)
- nodeId - identification number of the particular container to be redeployed (optional)
Note: You need to state nodeGroup or nodeId parameter to define the operation target. The method ignores nodeGroup if both are provided and fails if neither is specified.
If nodeGroup is provided, the redeployment will be performed sequentially without delay. If you need to set a custom delay, use the RedeployContainersByGroup method instead.
- tag - image version to be deployed
- useExistingVolumes - set it to true to keep data in the mounted volumes present within the updated container(s) (optional)
- login and password - credentials to access an image from the private registry (optional)
- manageDNSState – enable to exclude the currently redeploying node from DNS for the duration of the operation (optional)
Note: This parameter only works with the sequential processes (isSequential=true) and is ignored otherwise. Enabling the parameter will bring additional delay (as the DNS records have TTL and cannot be disabled instantly), while disabling can cause some of the requests to be lost.

For example:
| |
Redeploy with Cloud Scripting
A detailed overview of Cloud Scripting is provided via dedicated documentation.
When working via Cloud Scripting, the following constructions can be used to define container redeploy within your automation scripts:
1. Redeploying the whole layer of containers.
| |
Here:
- {nodeGroup} - environment layer (or node group) where all containers should be updated
- {myImage} - name of the image to be deployed
- {newTag} - the required version of the image above
2. Updating a particular container.
| |
Here, the {nodeId} value should be substituted with the ID number of the required node (other placeholders are the same as for the example above).
Redeploy with CLI
You can learn more about CLI implementation in the dedicated document.
A detailed example of container redeployment via CLI is provided in the linked guide.