Skip to content

Add backup support for Azure blob storage

Gerard Hickey requested to merge 2298_backup_azure_support into master

What does this MR do?

The support of backups via azcopy to Azure Block Storage is being in introduced in gitlab-org/build/CNG!1138 (merged). This MR exposes this functionality to the Helm chart.

Related issues/MRs

Relates #2298 (closed)

Depends on gitlab-org/build/CNG!1138 (merged)

Test Plan

  1. Create an Azure Storage account
  2. Build the toolbox container image at the feature branch of gitlab-org/build/CNG!1138 (merged)
  3. Push it to a registry you can access from your test cluster
  4. Configure the chart to use Azure as external object storage
  5. Configure backups to Azure by following doc/backup-restore/index.md
  6. Deploy the chart with the modified toolbox image

Values I used for local development/testing:
global:
  hosts:
    domain: <REDAC>.nip.io # use a real domain here
  appConfig:
    object_store:
      enabled: true
      connection:
        secret: gitlab-rails-storage
        key: connection
certmanager-issuer:
  email: <REDAC>

gitlab:
  toolbox:
    backups:
      objectStorage:
        config:
          secret: gitlab-rails-storage
          key: connection
        backend: azure
      cron:
        enabled: true
        schedule: "*/5 * * * *" # every 5 minutes
        persistence:
          enabled: true
          accessMode: ReadWriteOnce
          size: 2Gi
        extraArgs: "--maximum-backups 3"
    image: # local toolbox build of https://gitlab.com/gitlab-org/build/CNG/-/merge_requests/1138
      pullPolicy: Never
      repository: docker.io/library/toolbox
      tag: local

Expected observations:

  1. every x minutes (see your cron config) a backup is uploaded to the bucket
  2. the maximum number of backups (see cron.extraArgs) is not exceeded (old backups are being deleted)

Last test step: Restore a backup by following https://docs.gitlab.com/charts/backup-restore/restore.html.

Expected observations:

  1. backup restored successfully

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion.

Required

  • Merge Request Title and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com
  • Pipeline is green on dev.gitlab.org if the change is touching anything besides documentation or internal cookbooks
  • trigger-package has a green pipeline running against latest commit

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • Tests added
  • Integration tests added to GitLab QA
    • not applicable
  • Equivalent MR/issue for omnibus-gitlab opened
    • not applicable
Edited by Jason Plum

Merge request reports