CLI Tutorial: Container Redeploy
This guide has been reviewed and reformatted for Ruk-Com Cloud PaaS. Screens may vary slightly by platform version.
Click or tap a screenshot to view it at its original size.
Objective
This guide explains how to use CLI Tutorial: Container Redeploy on Ruk-Com Cloud PaaS, with ordered procedures and practical verification points.
Before you begin
- Sign in with an account permitted to manage the relevant environment.
- Confirm the target environment, region and resources before saving changes.
- Create a backup or rollback plan before changing a production system.
In this guide we will show you how.redeployNew container from one image tag to another If necessary, this option supports deploying all layers.
1. The first step is to find out the envionment name and node ID/layer of the container that should be redeployed. You can view the required information through the dashboard or using the method.GetEnvsandGetEnvInfoto get data directly from the terminal (for the whole environment or sequentially)
You will get information about the environment -layer names,node IDs,Docker images,tags, etc.
2. Once you have the container ID and layer (nodeGroup name), you can view the list of available tags for the image using theGetContainerNodeTagsAlong with the environment name and node ID parameters:
~/jelastic/environment/control/getcontainernodetags --envName {envName} --nodeId {nodeId}
In our case we will list the tags for redis.
3. You will now have all the information needed to redeploy the container via CLI and call the method.RedeployContainers
~/jelastic/environment/control/redeploycontainers --envName {envName} [--nodeGroup {nodeGroup}] [--nodeId {nodeId}] --tag {tag} [--useExistingVolumes {useExistingVolumes}] [--login {login}] [--password {password}]
using the following parameters:
- {envName}- The name of the environment where the new container will be deployed.
- {nodeGroup}- specifyenvironment layerto update(optional)
- {nodeId}- Specify the number of containers for a particular new deployment.(optional)
Note:You must specify parameters.{nodeGroup}or{nodeId}To set goals for operations The method ignores{nodeGroup}If both are specified and will fail if not specified.
- {tag}- The version of the image to be deployed.
- {useExistingVolumes}- Set to true to keep data in mounted volumes within the updated container.(optional)
This process can take several minutes and will respond with result: "0" (operation successful), including the pre- and post-new redeploy version. as well as the duration of each container update.