Skip to content

Commit

Permalink
docs: improve user document for using minio as backuprepo (#5572)
Browse files Browse the repository at this point in the history
  • Loading branch information
fengluodb authored Oct 24, 2023
1 parent b230b1a commit 4e7433d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 10 deletions.
3 changes: 2 additions & 1 deletion deploy/helm/templates/addons/minio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ spec:
setValues:
- auth.rootUser=kubeblocks
- auth.rootPassword=kubeblocks

- extraEnvVars[0].name=MINIO_BROWSER_LOGIN_ANIMATION
- extraEnvVars[0].value=off
installable:
autoInstall: false

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 23 additions & 9 deletions docs/user_docs/backup-and-restore/backup/backup-repo.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ There are various ways to create a BackupRepo. Make sure you have done all the n
1. Install MinIO.

```bash
helm install minio oci://registry-1.docker.io/bitnamicharts/minio
helm install minio oci://registry-1.docker.io/bitnamicharts/minio --set "extraEnvVars[0].name=MINIO_BROWSER_LOGIN_ANIMATION" --set "extraEnvVars[0].value=off"
```
To get initial username and password, try the following.

Expand All @@ -92,11 +92,12 @@ There are various ways to create a BackupRepo. Make sure you have done all the n

![MinIO dashboard](./../../../img/backup-and-restore-configure-backuprepo-minio.png)

:::note
3. Create a bucket.

If you fail to log in on Chrome, try switching to Safari and give it another try.
Create a bucket named `test-minio` in the MinIO dashboard.

:::
![Create a bucket](./../../../img/backup-and-restore-configure-backuprepo-minio-bucket-0.png)
![Create a bucket](./../../../img/backup-and-restore-configure-backuprepo-minio-bucket-1.png)

### Install S3 CSI driver

Expand Down Expand Up @@ -156,6 +157,12 @@ helm install csi-s3 kubeblocks/csi-s3 --version=0.6.0 -n kb-system
--default
```

The above command creates a default backup repository `my-repo`.

* `my-repo` is the name of the created backup repository. If you do not specify a name, the system creates a random name, following the format `backuprepo-xxxxx`.
* `--default` means that this repository is set as the default repository. Note that there can only be one default global repository. If there exist multiple default repositories, KubeBlocks cannot decide which one to use (similar to the default StorageClass of Kubernetes), which further results in backup failure. Using `kbcli` to create BackupRepo can avoid such problems because `kbcli` checks whether there is another default repository before creating a new one.
* `--provider` specifies the storage type, i.e. `storageProvider`, and is required for creating a BakcupRepo. The available values are `s3`, `oss`, and `minio`. Parameters for different storage providers vary and you can run `kbcli backuprepo create --provider STORAGE-PROVIDER-NAME -h` to view the flags for different storage providers.

</TabItem>

<TabItem value="OSS" label="OSS">
Expand All @@ -171,6 +178,12 @@ helm install csi-s3 kubeblocks/csi-s3 --version=0.6.0 -n kb-system
--default
```

The above command creates a default backup repository `my-repo`.

* `my-repo` is the name of the created backup repository. If you do not specify a name, the system creates a random name, following the format `backuprepo-xxxxx`.
* `--default` means that this repository is set as the default repository. Note that there can only be one default global repository. If there exist multiple default repositories, KubeBlocks cannot decide which one to use (similar to the default StorageClass of Kubernetes), which further results in backup failure. Using `kbcli` to create BackupRepo can avoid such problems because `kbcli` checks whether there is another default repository before creating a new one.
* `--provider` specifies the storage type, i.e. `storageProvider`, and is required for creating a BakcupRepo. The available values are `s3`, `oss`, and `minio`. Parameters for different storage providers vary and you can run `kbcli backuprepo create --provider STORAGE-PROVIDER-NAME -h` to view the flags for different storage providers.

</TabItem>

<TabItem value="MinIO" label="MinIO">
Expand All @@ -185,15 +198,16 @@ helm install csi-s3 kubeblocks/csi-s3 --version=0.6.0 -n kb-system
--default
```

</TabItem>

</Tabs>

The above command creates a default backup repository `my-repo`.

* `my-repo` is the name of the created backup repository. If you do not specify a name, the system creates a random name, following the format `backuprepo-xxxxx`.
* `--default` means that this repository is set as the default repository. Note that there can only be one default global repository. If there exist multiple default repositories, KubeBlocks cannot decide which one to use (similar to the default StorageClass of Kubernetes), which further results in backup failure. Using `kbcli` to create BackupRepo can avoid such problems because `kbcli` checks whether there is another default repository before creating a new one.
* `--provider` specifies the storage type, i.e. `storageProvider`, and is required for creating a BakcupRepo. The available values are `s3`, `oss`, and `minio`. Parameters for different storage providers vary and you can run `kbcli backuprepo create --provider STORAGE-PROVIDER-NAME -h` to view the flags for different storage providers.
* `--endpoint` specifies the endpoint of MinIO server. If you install MinIO by above instructions, the endpoint is `http://minio.default.svc.cluster.local:9000`, and the `default` is the namespace where MinIO is installed.

</TabItem>

</Tabs>

After `kbcli backuprepo create` is executed successfully, the system creates the K8s resource whose type is `BackupRepo`. You can modify the annotation of this resource to adjust the default repository.

Expand Down

0 comments on commit 4e7433d

Please sign in to comment.