Move a deployment
This is a privileged operation that needs to be executed by a member of the VSETH ISG.
Use-Cases
The move deployment can be used to:
- Link an existing deployment to a new application: for example when you have to rename an application. This is a non trivial operation since the name of the application is used to generate all sorts of stuff like databse names etc.
- Move a deployment from one to another cluster.
How to
Execute this rundeck job.
Original Design Writeup by Jan Veen
We want to support two use cases
- Copy a deployment from prod to staging for test development purposes
- Migrate a deployment from an old cluster to a new one
Source and destination deployment are referred to as old and new one.
Steps
- Stop the old deployment, wait for termination
- Dump all state resources of the deployment
- postgresql
- mysql
- S3
- volumes
- Start the old deployment
- Delete all state of the old application. This has to happen to avoid naming collisions between the old resource which is owned by the old deployments's sip-manager and the new resource owned by the new deployment's sip-manager
- sipctl-deploy the new deployment. set it to 0 replicas. Copy sipsecrets of old deployment into new deployment
- (sip-manager will create the new state resources)
- Restore all state of the old deployment in the new deployment's state resources
- Start the new deployment by settings replicas > 0