Commit d9bfa8a9 authored by Vic Iglesias's avatar Vic Iglesias

Add more detail to GCS backup and restore docs

parent a5730050
Pipeline #58463175 passed with stages
in 1 minute and 39 seconds
......@@ -101,10 +101,14 @@ Examples for [AWS][fog-aws](any S3 compatible) and [Google][fog-gcs] providers c
Backups are also stored in object storage, and need to be configured to point
externally rather than the included minio service. The backup/restore procedure makes
use of two separate buckets. A bucket for storing backups (`global.appConfig.backups.bucket`),
use of two separate buckets. A bucket for storing backups (`global.appConfig.backups.bucket`)
and a tmp bucket for preserving existing data during the restore process (`global.appConfig.backups.tmpBucket`).
Currently AWS S3-compatible object storage systems and Google Cloud Storage are supported backends
The backend tyhp is configurable by setting `global.appConfig.backups.objectStorage.backend` to `s3` and `gcs` respectively.
A connection configuration through the `gitlab.task-runner.backups.objectStorage.config` key must also be provided.
When using Google Cloud Storage, the GCP project must be set with the `global.appConfig.backups.objectStorage.confi.gcpProject` value.
For S3-compatible storage:
```
--set global.appConfig.backups.bucket=gitlab-backup-storage
--set global.appConfig.backups.tmpBucket=gitlab-tmp-storage
......@@ -112,6 +116,16 @@ A connection configuration through the `gitlab.task-runner.backups.objectStorage
--set gitlab.task-runner.backups.objectStorage.config.key=config
```
For Google Cloud Storage (GCS):
```
--set global.appConfig.backups.bucket=gitlab-backup-storage
--set global.appConfig.backups.tmpBucket=gitlab-tmp-storage
--set gitlab.task-runner.backups.objectStorage.backend=gcs
--set gitlab.task-runner.backups.objectStorage.config.gcpProject=my-gcp-project-id
--set gitlab.task-runner.backups.objectStorage.config.secret=storage-config
--set gitlab.task-runner.backups.objectStorage.config.key=config
```
See the [backup/restore object storage documentation](../../backup-restore/index.md#object-storage) for full details.
> **Note**: In order to backup/restore files from the other object storage locations, the config file needs to be
......
......@@ -39,7 +39,8 @@ when restoring a backup.
### Backups to Google Cloud Storage (GCS)
To backup to GCS you must set `gitlab.task-runner.backups.objectStorage.backend` to `gcs`. This ensures that the task-runner uses the `gsutil` CLI when storing and retrieving
objects. You must create a Kubernetes secret with the contents of an active service account JSON key where the service account has the `storage.admin` role for the buckets
objects. Additionally you must set `gitlab.task-runner.backups.objectStorage.config.gcpProject` to the project ID of the GCP project that contains your storage buckets.
You must create a Kubernetes secret with the contents of an active service account JSON key where the service account has the `storage.admin` role for the buckets
you will use for backup. Below is an example of using the `gcloud` and `kubectl` to create the secret.
```shell
......@@ -50,12 +51,14 @@ gcloud iam service-accounts keys create --iam-account gitlab-gcs@${PROJECT_ID}.i
kubectl create secret generic storage-config --from-file=config=storage.config
```
Configure your Helm chart as follows to use the service account key to authenticate for backups:
Configure your Helm chart as follows to use the service account key to authenticate to GCS for backups:
```sh
helm install gitlab \
helm install gitlab . \
--set gitlab.task-runner.backups.objectStorage.config.secret=storage-config \
--set gitlab.task-runner.backups.objectStorage.config.key=config .
--set gitlab.task-runner.backups.objectStorage.config.key=config \
--set gitlab.task-runner.backups.objectStorage.config.gcpProject=my-gcp-project-id \
--set gitlab.task-runner.backups.objectStorage.backend=gcs
```
In addition, two bucket locations need to be configured, one for storing the backups, and one temporary bucket that is used
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment