How to Enable Auto-Update for Running Containers
To configure your running containers to upgrade themselves automatically, set the following environment variables to true:
- AUTO_UPDATE
Controls auto update of Crane itself on Docker, default: true. - AUTO_KUBERNETES_UPDATE
Controls auto update of Crane itself on Kubernetes, default: false. - AUTO_UPDATE_CONTAINERS_WHILE_RUNNING
Controls auto update of components, default false. Also, either AUTO_UPDATE or AUTO_KUBERNETES_UPDATE must be true for this option to work, depending on the platform Crane is running on.
When auto-upgrade is enabled, the agent checks periodically whether there is a new version of the Crane agent component images. The first check is right after starting, and from then on, once per hour. As soon as a newer image is found, the running container is replaced by the new one, and it will use the newer image.
What are the benefits of auto-upgrade?
- You do not need to check versions manually and restart running services manually to have the latest images.
- On Kubernetes, there is no outage of the running crane components.
What are the drawbacks of auto-upgrade?
- You will lose the virtual services' state.
- Once the running virtual services are replaced, all logs are lost.
- On Docker, there will be a short outage for any running virtual services. A new instance needs to download transactions using the Service Virtualization API and reconfigure itself. This outage length depends on network speed and the number of transactions within the virtual services.