Manage deploys

2 weeks ago3 min read
Cloud

The steps outlined on this page guide you through the tasks required to manage your deployments from the CircleCI web app.

Prerequisites

Before following the steps below, ensure the environment integration has been set up and configured successfully. Refer to the Set up CircleCI deploys and Configure your Kubernetes components pages for more information.

Restore version

The Restore Version action restores a previously deployed version of a component.

Screenshot showing the restore version button

Steps

  1. Select Deploys in the CircleCI web app sidebar.

  2. You are now in the timeline view. Find your component in the timeline list, you can use the search bar to filter the list.

  3. Scroll to locate the version your want to restore, and select the "Restore this version" icon in the Actions column.

  4. Read through the recommendations in the popup, and if you want to proceed type RESTORE, then select Restore. We recommend reverting the associated changes in your source repository as soon as possible after using this action.

Notes

To understand the Restore Version action, it may be helpful to understand the equivalent commands for Kubernetes Deployments, Helm, and Argo Rollouts. Selecting the Restore Version action from the CircleCI web app is the equivalent of using the following:

  • If you are using Helm (Helm opt-in instructions are here):

    helm rollback <release-name> <revision-number> -n <namespace>
  • If you are using Argo Rollouts and not Helm:

    kubectl argo rollouts undo <rollout-name> --to-revision=<revision_number>

    If revision_number is not supplied the component will be rolled back to the previous revision

  • For a Kubernetes Deployment:

    kubectl rollout undo deployment/<deployment-name> -n <namespace> --to-revision=<revision-number>

Scale component

The Scale Component action allows you to scale up or down a currently live version of a component.

Screenshot showing the scale component button

Steps

  1. Select Deploys in the CircleCI web app sidebar.

  2. Select the Components tab.

  3. Scroll to find and select your component to enter the component view.

  4. Find the active version that you would like to scale and select the ellipsis menu icon ().

  5. Select Scale Component.

  6. Read through the notes associated with this action in the popup and to proceed type SCALE and select Scale.

Notes

To understand the Scale Component action, it may be helpful to understand the equivalent commands for Kubernetes Deployments, Helm, and Argo Rollouts. Selecting the Scale Component action is the equivalent of the following:

  • If you are using Argo Rollouts:

    kubectl patch rollout <rollout_name> -n <namespace> --type='json' -p='[{"op": "replace", "path": "/spec/replicas", "value": <number_of_replicas>}]'
  • For a Kubernetes Deployment:

    kubectl patch deployment <deployment_name> -n <namespace> --type='json' -p='[{"op": "replace", "path": "/spec/replicas", "value": <number_of_replicas>}]'

Restart component

The Restart Component action allows you to restart a currently live version of a component.

Screenshot showing the restart component button

Steps

  1. Select Deploys in the CircleCI web app sidebar.

  2. Select the Components tab.

  3. Scroll to find and select your component to enter the component view.

  4. Find the active version that you would like to restart and select the ellipsis menu icon ().

  5. Select Restart Component.

  6. Read the note associated with this action in the popup and to proceed type RESTART and select RESTART.

Notes

To understand the Restart Component action, it may be helpful to understand the equivalent commands for Kubernetes Deployments, Helm, and Argo Rollouts. Executing the Restart Component action is the equivalent of the following:

  • If you are using Argo Rollouts:

    kubectl patch rollout my-rollout -n my-namespace --type='json' -p='[{"op": "replace", "path": "/spec/restartAt", "value": <timestamp>}]'
  • For a Kubernetes Deployment:

    kubectl rollout restart deployment/<deployment-name> -n <namespace>

Retry Rollout

Use the Retry Rollout action to retry a Rollout that has failed or been cancelled. For more information about this action, see Argo Rollout retry.

Screenshot showing the retry release button

Steps

  1. Select Deploys in the CircleCI web app sidebar.

  2. You are now in the timeline view. Find your component in the timeline list, you can use the search bar to filter the list.

  3. Scroll to locate the failed or cancelled deployment you want to retry. Select the version number to enter the deployment details page.

  4. Select Retry Rollout.

Notes

Selecting the Retry Rollout action is the equivalent to running:

kubectl argo rollouts retry <rollout-name> -n=<namespace>

Promote

Use the Promote or Promote All action to progress a deployment that is paused at a step. You have the following options:

  • Promote a single step.

  • Skip the step.

  • Promote All to skip all steps and complete the deployment.

The Promote and Promote All options are visible in the step view on the deployment details page, which you can access by selecting a version number in the deploys UI.

Screenshot showing the promote deploy step options

For more information on the Rollouts Promote commands see the Argo Rollouts docs for Rollouts Promote.

Steps

  1. Select Deploys in the CircleCI web app sidebar.

  2. You are now in the timeline view. Find your component in the timeline list, you can use the search bar to filter the list.

  3. Scroll to locate the running deployment you want to promote. Select the version number to enter the deployment details page.

  4. You will now see the Promote and Promote All options. Select Promote to promote the deployment as required. The action is run immediately with no intermediary checks.

Notes

Selecting a Promote action is equivalent to the following:

  • Promote a single step:

    kubectl argo rollouts promote <rollout-name>
  • Promote all:

    kubectl argo rollouts promote --full <rollout-name>

Cancel deployment

Use the Cancel Deployment action to stop a deployment from progressing, and revert all steps. For more information see the Argo Rollouts docs for Rollouts Abort.

Screenshot showing the cancel deployment button

Steps

  1. Select Deploys in the CircleCI web app sidebar.

  2. You are now in the timeline view. Find your component in the timeline list, you can use the search bar to filter the list.

  3. Scroll to locate the running deployment you want to cancel. Select the version number to enter the deployment details page.

  4. Select Cancel Deployment.

Notes

Selecting the Cancel Deployment action is the equivalent to running:

kubectl argo rollouts abort <rollout-name> -n=<namespace>