Skip to main content

Moving containers

Using the SDK ClI you can move a container running on a specific runner to another runner.

Principle

When asking to move a container from a runner (A) to another runner (B), the platform handles the automatic re-deployment of the last deployed container on the new runner, configure the certicates and update DNS entries.

The move is realized in 'hot' way meaning that the end user accessing the container does not have any stops of traffic.

In order to maintain the traffic and due to the DNS propagation time and caches, on the original runner (A) we maintain a redirection of the traffic to the container moved on runner (B).

This is why on the 'runner' page of the console you will see a type of container named 'redirect' running on the original runner (A).

Using the console you can delete the redirection any time. To be sure their is no more traffic, we provide redirect metrics. When there is no more redirection requests, that means that all the traffic has moved to the container running on Runner (B).

By default the platform delete the redirection after 24 hours.

CLI

To move a container to a new runner, use the command below. <container_name> corresponds to the name id of the container you want to move in the environment and <runner_name> corresponds to the runner you want to move your container.

npx warp env runner set <container_name> <runner_name>

To get the list of all container names and associated urls, use the command

npx warp env info

If you need to have the list of available runners for that env, use

npx warp runner list