...
Code Block | ||
---|---|---|
| ||
POST /services { "imageTag": "216c0204fa1e71f93603c0d5087ef16d6b2ba5bce9084874bf9b2aebcddebc77", "promote": false, // Denote if this is a promote or upgrade. Promote runs an additional // step to PatchIngress. } |
...
Code Block | ||
---|---|---|
| ||
➜ iiq-wp-platform git:(dev) kc describe -n wp-platform deployment/green-deployment Name: green-deployment Namespace: wp-platform CreationTimestamp: Wed, 05 Apr 2023 15:06:04 -0600 Labels: app=green Annotations: deployment.kubernetes.io/revision: 63 Selector: app=green Replicas: 1 desired | 1 updated | 1 total | 1 available | 0 unavailable StrategyType: RollingUpdate MinReadySeconds: 0 RollingUpdateStrategy: 25% max unavailable, 25% max surge Pod Template: Labels: app=green Annotations: kubectl.kubernetes.io/restartedAt: 2023-04-11T05:00:45-06:00 Containers: web: Image: 961406424767.dkr.ecr.us-west-2.amazonaws.com/rezfusion-cloud@sha256:1274e8bc4d963536e88265781170e72a2939caae25127cd9d400ab124393f946 |
...
Upgrading a site is the act of moving it from the current service to the active canary service. When a site upgrades the following queued jobs are triggered.
Jobs Executed:
PatchService - updates the entry in the sites repository so the site.Service value reflects the service a site is moved to/actively on.
FlushCaches - flushes the caches on the WP site.
Code Block |
---|
PUT /sites/{site-id}/upgrade |
...
Jobs executed:
FlushCaches
PatchIngress
PatchService
Code Block |
---|
PUT /sites/{site-id}/promote |
Bulk Promotions/Upgrades
To roll an upgrade or promotion out for all sites on a given service, simply execute a PUT
request against the /services
endpoint.
Upgrade
Code Block |
---|
PUT /services
{
"imageTag": "f2e9a5d05ef6fe7714962afaa468d643b6c7195656ffc86b15b0435daeef91a4",
"promote": "false"
} |
Promote
Code Block |
---|
PUT /services
PUT /services
{
"imageTag": "f2e9a5d05ef6fe7714962afaa468d643b6c7195656ffc86b15b0435daeef91a4",
"promote": "true"
} |
Reverting Bad Deployments/Rollbacks
...