Skip to content
GitLab
Next
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 52,620
    • Issues 52,620
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,542
    • Merge requests 1,542
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #7545
Closed
Open
Issue created Sep 11, 2018 by Jason Yavorska@jyavorskaContributor

Add timed deployments to AutoDevOps incremental rollouts

Problem to solve

To reduce operational risk when rolling out new code, a best practice is to slowly, incrementally roll out code changes to a fleet, pausing in between certain breakpoints, and optionally allowing for metrics to pause or abort a rollout. Our current Kubernetes canary deployment is implemented only as a definable rollout percentage that can be set on a per- manual run basis, which you can see below.

Additional Details

https://gitlab.com/gitlab-org/gitlab-ce/issues/51352 introduces the ability to schedule/delay job execution. Building on this feature we're able to update the incremental rollouts procedure in AutoDevOps to schedule each increment automatically.

Proposal

This is a v2 iteration for the existing k8s incremental rollouts feature (above), that exists in production today. What this adds to the existing functionality is the ability to set an automatic timeout whereupon the deployment will continue forward to the next rollout percentage in the deployment phase. For the MVC, this will be a pre-set value of 5m for users choosing timed incremental rollouts; this value is editable in the CI yml after generation by the end user.

The current idea to get this shipped is to provide a generic function, not a specific function for k8s rollout. Generic in sense that this is available for any type of the workflow at Job level, not Environment level, and is also not k8s specific (i.e., implemented inside the AutoDevOps shell script).

We will provide a way to enable the timed incremental rollout in AutoDevOps, in addition to the existing manual one, using the shared when: in 1hour feature.

Pre-Defined Values

image

Rollout Percentages

  • 10%
  • 25%
  • 50%
  • 100%

Each of these rollout percentages will be implemented in a separate stage, so that if one of the jobs for the percentages is canceled, that all of the progress pauses.

Default AutoDevOps (generated config) wait between steps: 5m - this can be edited in the YML after the fact by the user to change the timeout.

Configuration

For the Incremental rollout https://docs.gitlab.com/ee/topics/autodevops/#incremental-rollout-to-production, users can set the secret variable INCREMENTAL_ROLLOUT_ENABLED=1 to choose between Manual-Incremental rollout(10%/25%/50%/100%) or standard deploy(100%).

The configuration is available when setting up a new AutoDevOps project directly:

Screenshot_from_2018-09-28_10-43-01

Links / references

  • Alternate: Canary deploys: https://gitlab.com/gitlab-org/gitlab-ee/issues/1659
  • Tweet: https://twitter.com/officesunshine/status/821787299084173320
  • Pausing and Resuming a Deployment
  • Canary deployments
Edited Sep 28, 2018 by Jason Yavorska
Assignee
Assign to
Time tracking