-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add "Supported Backends" doc to new guides (#756)
- Loading branch information
1 parent
4370029
commit 84be8e6
Showing
33 changed files
with
1,660 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: stash.appscode.com/v1alpha1 | ||
kind: Repository | ||
metadata: | ||
name: azure-repo | ||
namespace: demo | ||
spec: | ||
backend: | ||
azure: | ||
container: stash-backup | ||
prefix: /demo/deployment/my-deploy | ||
storageSecretName: azure-secret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: stash.appscode.com/v1alpha1 | ||
kind: Repository | ||
metadata: | ||
name: b2-repo | ||
namespace: demo | ||
spec: | ||
backend: | ||
b2: | ||
bucket: stash-backup | ||
prefix: /demo/deployment/my-deploy | ||
storageSecretName: b2-secret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: stash.appscode.com/v1alpha1 | ||
kind: Repository | ||
metadata: | ||
name: gcs-repo | ||
namespace: demo | ||
spec: | ||
backend: | ||
gcs: | ||
bucket: stash-backup | ||
prefix: /demo/deployment/my-deploy | ||
storageSecretName: gcs-secret |
13 changes: 13 additions & 0 deletions
13
docs/examples/guides/v1beta1/backends/local_awsElasticBolckStore.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: stash.appscode.com/v1alpha1 | ||
kind: Repository | ||
metadata: | ||
name: local-repo-with-awsebs | ||
namespace: demo | ||
spec: | ||
backend: | ||
local: | ||
mountPath: /safe/data | ||
awsElasticBlockStore: # This AWS EBS volume must already exist. | ||
volumeID: <volume-id> | ||
fsType: ext4 | ||
storageSecretName: local-secret |
13 changes: 13 additions & 0 deletions
13
docs/examples/guides/v1beta1/backends/local_azureDisk.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: stash.appscode.com/v1alpha1 | ||
kind: Repository | ||
metadata: | ||
name: local-repo-with-azuredisk | ||
namespace: demo | ||
spec: | ||
backend: | ||
local: | ||
mountPath: /safe/data | ||
azureDisk: | ||
diskName: stash.vhd | ||
diskURI: https://someaccount.blob.microsoft.net/vhds/stash.vhd | ||
storageSecretName: local-secret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: stash.appscode.com/v1alpha1 | ||
kind: Repository | ||
metadata: | ||
name: local-repo-with-emptydir | ||
namespace: demo | ||
spec: | ||
backend: | ||
local: | ||
mountPath: /safe/data | ||
emptyDir: {} | ||
storageSecretName: local-secret |
13 changes: 13 additions & 0 deletions
13
docs/examples/guides/v1beta1/backends/local_gcePersistentDisk.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: stash.appscode.com/v1alpha1 | ||
kind: Repository | ||
metadata: | ||
name: local-repo-with-gcepersistentdisk | ||
namespace: demo | ||
spec: | ||
backend: | ||
local: | ||
mountPath: /safe/data | ||
gcePersistentDisk: | ||
pdName: stash-repo | ||
fsType: ext4 | ||
storageSecretName: local-secret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: stash.appscode.com/v1alpha1 | ||
kind: Repository | ||
metadata: | ||
name: local-repo-with-hostpath | ||
namespace: demo | ||
spec: | ||
backend: | ||
local: | ||
mountPath: /safe/data | ||
hostPath: | ||
path: /data/stash-test/repo | ||
storageSecretName: local-secret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: stash.appscode.com/v1alpha1 | ||
kind: Repository | ||
metadata: | ||
name: local-repo-with-nfs | ||
namespace: demo | ||
spec: | ||
backend: | ||
local: | ||
mountPath: /safe/data | ||
nfs: | ||
server: "nfs-service.storage.svc.cluster.local" # use you own NFS server address | ||
path: "/" # this path is relative to "/exports" path of NFS server | ||
storageSecretName: local-secret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: stash.appscode.com/v1alpha1 | ||
kind: Repository | ||
metadata: | ||
name: local-repo-with-pvc | ||
namespace: demo | ||
spec: | ||
backend: | ||
local: | ||
mountPath: /safe/data | ||
persistentVolumeClaim: | ||
claimName: repo-pvc | ||
storageSecretName: local-secret |
13 changes: 13 additions & 0 deletions
13
docs/examples/guides/v1beta1/backends/local_storageOS.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: stash.appscode.com/v1alpha1 | ||
kind: Repository | ||
metadata: | ||
name: local-repo-with-storageos | ||
namespace: demo | ||
spec: | ||
backend: | ||
local: | ||
mountPath: /safe/data | ||
storageos: | ||
volumeName: stash-vol01 # The `stash-vol01` volume must already exist within StorageOS in the `demo` namespace. | ||
fsType: ext4 | ||
storageSecretName: local-secret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: stash.appscode.com/v1alpha1 | ||
kind: Repository | ||
metadata: | ||
name: rest-repo | ||
namespace: demo | ||
spec: | ||
backend: | ||
rest: | ||
url: http://rest-server.demo.svc:8000/stash-backup-demo | ||
storageSecretName: rest-secret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: stash.appscode.com/v1alpha1 | ||
kind: Repository | ||
metadata: | ||
name: s3-repo | ||
namespace: demo | ||
spec: | ||
backend: | ||
s3: | ||
endpoint: s3.amazonaws.com # use server URL for s3 compatible other storage service | ||
bucket: stash-demo | ||
prefix: /backup/demo/deployment/stash-demo | ||
storageSecretName: s3-secret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: stash.appscode.com/v1alpha1 | ||
kind: Repository | ||
metadata: | ||
name: swift-repo | ||
namespace: demo | ||
spec: | ||
backend: | ||
swift: | ||
container: stash-backup | ||
prefix: /demo/deployment/my-deploy | ||
storageSecretName: swift-secret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
title: Backends | Stash | ||
menu: | ||
product_stash_0.8.3: | ||
identifier: backend | ||
name: Supported Backends | ||
parent: latest-guides | ||
weight: 10 | ||
menu_name: product_stash_0.8.3 | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
--- | ||
title: Azure Backend | Stash | ||
description: Configure Stash to use Microsoft Azure Storage as Backend. | ||
menu: | ||
product_stash_0.8.3: | ||
identifier: backend-azure | ||
name: Azure Blob Storage | ||
parent: backend | ||
weight: 40 | ||
product_name: stash | ||
menu_name: product_stash_0.8.3 | ||
section_menu_id: guides | ||
--- | ||
|
||
# Microsoft Azure Storage | ||
|
||
Stash supports Microsoft's [Azure Blob Storage](https://azure.microsoft.com/en-us/services/storage/blobs/) as a backend. This tutorial will show you how to use this backend. | ||
|
||
In order to use Azure Blob Storage as backend, you have to create a `Secret` and a `Repository` object pointing to the desired blob container. | ||
|
||
#### Create Storage Secret | ||
|
||
To configure storage secret for this backend, following secret keys are needed: | ||
|
||
| Key | Type | Description | | ||
| -------------------- | ---------- | ---------------------------------------------------------- | | ||
| `RESTIC_PASSWORD` | `Required` | Password that will be used to encrypt the backup snapshots | | ||
| `AZURE_ACCOUNT_NAME` | `Required` | Azure Storage account name | | ||
| `AZURE_ACCOUNT_KEY` | `Required` | Azure Storage account key | | ||
|
||
Create storage secret as below, | ||
|
||
```console | ||
$ echo -n 'changeit' > RESTIC_PASSWORD | ||
$ echo -n '<your-azure-storage-account-name>' > AZURE_ACCOUNT_NAME | ||
$ echo -n '<your-azure-storage-account-key>' > AZURE_ACCOUNT_KEY | ||
$ kubectl create secret generic -n demo azure-secret \ | ||
--from-file=./RESTIC_PASSWORD \ | ||
--from-file=./AZURE_ACCOUNT_NAME \ | ||
--from-file=./AZURE_ACCOUNT_KEY | ||
secret/azure-secret created | ||
``` | ||
|
||
### Create Repository | ||
|
||
Now, you have to create a `Repository` crd. You have to provide the storage secret that we have created earlier in `spec.backend.storageSecretName` field. | ||
|
||
Following parameters are available for `azure` backend. | ||
|
||
| Parameter | Type | Description | | ||
| ---------------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------- | | ||
| `azure.container` | `Required` | Name of Storage container. | | ||
| `azure.prefix` | `Optional` | Path prefix inside the container where backed up data will be stored. | | ||
| `azure.maxConnections` | `Optional` | Maximum number of parallel connections to use for uploading backup data. By default, Stash will use maximum 5 parallel connections. | | ||
|
||
Below, the YAML of a sample `Repository` crd that uses an Azure Blob container as a backend. | ||
|
||
```yaml | ||
apiVersion: stash.appscode.com/v1alpha1 | ||
kind: Repository | ||
metadata: | ||
name: azure-repo | ||
namespace: demo | ||
spec: | ||
backend: | ||
azure: | ||
container: stash-backup | ||
prefix: /demo/deployment/my-deploy | ||
storageSecretName: azure-secret | ||
``` | ||
Create the `Repository` we have shown above using the following command, | ||
|
||
```console | ||
$ kubectl apply -f https://raw.githubusercontent.com/appscode/stash/0.8.3/docs/examples/guides/v1beta1/backends/azure.yaml | ||
repository/azure-repo created | ||
``` | ||
|
||
Now, we are ready to use this backend to backup our desired data using Stash. | ||
|
||
## Next Steps | ||
|
||
- Learn how to use Stash to backup workloads data from [here](/docs/guides/latest/workloads/backup.md). | ||
- Learn how to use Stash to backup databases from [here](/docs/guides/latest/databases/backup.md). | ||
- Learn how to use Stash to backup stand-alone PVC from [here](/docs/guides/latest/volumes/backup.md). |
Oops, something went wrong.