From 87480baf97b7aef034cb4a8d3163cf1456793617 Mon Sep 17 00:00:00 2001 From: David Eliahu Date: Wed, 7 Apr 2021 16:27:56 -0700 Subject: [PATCH 1/2] Mention cluster export command in cluster update docs --- docs/clusters/management/update.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/clusters/management/update.md b/docs/clusters/management/update.md index 915dc20aa7..c50c059ab9 100644 --- a/docs/clusters/management/update.md +++ b/docs/clusters/management/update.md @@ -27,7 +27,7 @@ cortex cluster up cluster.yaml In production environments, you can upgrade your cluster without downtime if you have a backend service or DNS in front of your Cortex cluster: 1. Spin up a new cluster. For example: `cortex cluster up new-cluster.yaml --configure-env new` (this will create a CLI environment named `new` for accessing the new cluster). -1. Re-deploy your APIs in your new cluster. For example, if the name of your CLI environment for your old cluster is `old`, you can use `cortex get --env old` to list all running APIs in your old cluster, and re-deploy them in the new cluster by changing directories to each API's project folder and running `cortex deploy --env new`. +1. Re-deploy your APIs in your new cluster. For example, if the name of your CLI environment for your old cluster is `old`, you can use `cortex get --env old` to list all running APIs in your old cluster, and re-deploy them in the new cluster by changing directories to each API's project folder and running `cortex deploy --env new`. Alternatively, you can run `cortex cluster export --name --region ` to export all of your APIs (including configuration and application code), change directories into each API/ID subfolder that was exported, and run `cortex deploy --env new`. 1. Route requests to your new cluster. * If you are using a custom domain: update the A record in your Route 53 hosted zone to point to your new cluster's API load balancer. * If you have a backend service which makes requests to Cortex: update your backend service to make requests to the new cluster's endpoints. From 380bbea96203dd00153535f47f9dd0614d910391 Mon Sep 17 00:00:00 2001 From: David Eliahu Date: Thu, 8 Apr 2021 12:57:02 -0700 Subject: [PATCH 2/2] Rename old to previous --- docs/clusters/management/update.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/clusters/management/update.md b/docs/clusters/management/update.md index c50c059ab9..be1115e41d 100644 --- a/docs/clusters/management/update.md +++ b/docs/clusters/management/update.md @@ -27,9 +27,9 @@ cortex cluster up cluster.yaml In production environments, you can upgrade your cluster without downtime if you have a backend service or DNS in front of your Cortex cluster: 1. Spin up a new cluster. For example: `cortex cluster up new-cluster.yaml --configure-env new` (this will create a CLI environment named `new` for accessing the new cluster). -1. Re-deploy your APIs in your new cluster. For example, if the name of your CLI environment for your old cluster is `old`, you can use `cortex get --env old` to list all running APIs in your old cluster, and re-deploy them in the new cluster by changing directories to each API's project folder and running `cortex deploy --env new`. Alternatively, you can run `cortex cluster export --name --region ` to export all of your APIs (including configuration and application code), change directories into each API/ID subfolder that was exported, and run `cortex deploy --env new`. +1. Re-deploy your APIs in your new cluster. For example, if the name of your CLI environment for your existing cluster is `previous`, you can use `cortex get --env previous` to list all running APIs in your cluster, and re-deploy them in the new cluster by changing directories to each API's project folder and running `cortex deploy --env new`. Alternatively, you can run `cortex cluster export --name --region ` to export all of your APIs (including configuration and application code), change directories into each API/ID subfolder that was exported, and run `cortex deploy --env new`. 1. Route requests to your new cluster. * If you are using a custom domain: update the A record in your Route 53 hosted zone to point to your new cluster's API load balancer. * If you have a backend service which makes requests to Cortex: update your backend service to make requests to the new cluster's endpoints. * If you have a self-managed API Gateway in front of your Cortex cluster: update the routes to use new cluster's endpoints. -1. Spin down your old cluster. If you updated DNS settings, wait 24-48 hours before spinning down your old cluster to allow the DNS cache to be flushed. +1. Spin down your previous cluster. If you updated DNS settings, wait 24-48 hours before spinning down your previous cluster to allow the DNS cache to be flushed.