Skip to content

Commit

Permalink
remove all references to Config from docs/examples
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Kriss <[email protected]>
  • Loading branch information
skriss committed Oct 17, 2018
1 parent c36131a commit ec12467
Show file tree
Hide file tree
Showing 17 changed files with 44 additions and 308 deletions.
5 changes: 3 additions & 2 deletions docs/about.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# How Ark Works

Each Ark operation -- on-demand backup, scheduled backup, restore -- is a custom resource, defined with a Kubernetes [Custom Resource Definition (CRD)][20] and stored in [etcd][22]. The config custom resource specifies core information and options such as cloud provider settings. Ark also includes controllers that process the custom resources to perform backups, restores, and all related operations.
Each Ark operation -- on-demand backup, scheduled backup, restore -- is a custom resource, defined with a Kubernetes [Custom Resource Definition (CRD)][20] and stored in [etcd][22]. Ark also includes controllers that process the custom resources to perform backups, restores, and all related operations.

You can back up or restore all objects in your cluster, or you can filter objects by type, namespace, and/or label.

Expand Down Expand Up @@ -66,8 +66,9 @@ This allows restore functionality to work in a cluster migration scenario, where

Likewise, if a backup object exists in Kubernetes but not in object storage, it will be deleted from Kubernetes since the backup tarball no longer exists.

[10]: hooks.md
[19]: /docs/img/backup-process.png
[20]: https://kubernetes.io/docs/concepts/api-extension/custom-resources/#customresourcedefinitions
[21]: https://kubernetes.io/docs/concepts/api-extension/custom-resources/#custom-controllers
[22]: https://github.com/coreos/etcd
[10]: hooks.md

14 changes: 8 additions & 6 deletions docs/aws-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,15 @@ kubectl create secret generic cloud-credentials \
Specify the following values in the example files:
* In `examples/aws/00-ark-config.yaml`:
* Replace `<YOUR_REGION>`. See the [Config definition][6] for details.
* In `examples/aws/05-ark-backupstoragelocation.yaml`:
* Replace `<YOUR_BUCKET>` and `<YOUR_REGION>` (for S3 backup storage, region is optional and will be queried from the AWS S3 API if not provided). See the [BackupStorageLocation definition][21] for details.
* In `examples/aws/06-ark-volumesnapshotlocation.yaml`:
* Replace `<YOUR_REGION>`. See the [VolumeSnapshotLocation definition][6] for details.
* (Optional) If you run the nginx example, in file `examples/nginx-app/with-pv.yaml`:
* Replace `<YOUR_STORAGE_CLASS_NAME>` with `gp2`. This is AWS's default `StorageClass` name.
Expand Down Expand Up @@ -181,7 +182,8 @@ Specify the following values in the example files:
In the root of your Ark directory, run:
```bash
kubectl apply -f examples/aws/00-ark-config.yaml
kubectl apply -f examples/aws/05-ark-backupstoragelocation.yaml
kubectl apply -f examples/aws/06-ark-volumesnapshotlocation.yaml
kubectl apply -f examples/aws/10-deployment.yaml
```
Expand Down Expand Up @@ -300,7 +302,7 @@ It can be set up for Ark by creating a role that will have required permissions,
[0]: namespace.md
[5]: https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html
[6]: config-definition.md#aws
[6]: api-types/volumesnapshotlocation.md#aws
[14]: http://docs.aws.amazon.com/IAM/latest/UserGuide/introduction.html
[20]: faq.md
[21]: api-types/backupstoragelocation.md#aws
27 changes: 5 additions & 22 deletions docs/azure-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,31 +125,14 @@ kubectl create secret generic cloud-credentials \

Now that you have your Azure credentials stored in a Secret, you need to replace some placeholder values in the template files. Specifically, you need to change the following:

* In file `examples/azure/10-ark-config.yaml`:

* Replace `<YOUR_TIMEOUT>`. See the [Config definition][8] for details.

* In file `examples/azure/05-ark-backupstoragelocation.yaml`:

* Replace `<YOUR_BLOB_CONTAINER>`, `<YOUR_STORAGE_RESOURCE_GROUP>`, and `<YOUR_STORAGE_ACCOUNT>`. See the [BackupStorageLocation definition][21] for details.

Here is an example of a completed config file.

```yaml
apiVersion: ark.heptio.com/v1
kind: Config
metadata:
namespace: heptio-ark
name: default
persistentVolumeProvider:
name: azure
config:
apiTimeout: 15m
backupSyncPeriod: 30m
gcSyncPeriod: 30m
scheduleSyncPeriod: 1m
restoreOnlyMode: false
```
* In file `examples/azure/06-ark-volumesnapshotlocation.yaml`:

* Replace `<YOUR_TIMEOUT>`. See the [VolumeSnapshotLocation definition][8] for details.


## Start the server

Expand All @@ -160,7 +143,7 @@ In the root of your Ark directory, run:
```

[0]: namespace.md
[8]: config-definition.md#azure
[8]: docs/api-types/volumesnapshotlocation.md#azure
[17]: https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-application-objects
[18]: https://docs.microsoft.com/en-us/cli/azure/install-azure-cli
[19]: https://docs.microsoft.com/en-us/azure/architecture/best-practices/naming-conventions#storage
Expand Down
146 changes: 0 additions & 146 deletions docs/config-definition.md

This file was deleted.

8 changes: 3 additions & 5 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ across multiple Ark instances can lead to numerous problems - failed backups, ov
inadvertently deleted backups, etc., all of which can be avoided by using a separate bucket per Ark
instance.

Related to this, if you need to restore a backup from cluster A into cluster B, please use [restore-only][1]
mode in cluster B's Ark instance while it's configured to use cluster A's bucket. This will ensure no
Related to this, if you need to restore a backup from cluster A into cluster B, please use restore-only
mode in cluster B's Ark instance (via the `--restore-only` flag on the `ark server` command specified
in your Ark deployment) while it's configured to use cluster A's bucket. This will ensure no
new backups are created, and no existing backups are deleted or overwritten.


[1]: config-definition.md#main-config-parameters
3 changes: 2 additions & 1 deletion docs/gcp-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ Specify the following values in the example files:
In the root of your Ark directory, run:

```bash
kubectl apply -f examples/gcp/00-ark-config.yaml
kubectl apply -f examples/gcp/05-ark-backupstoragelocation.yaml
kubectl apply -f examples/gcp/06-ark-volumesnapshotlocation.yaml
kubectl apply -f examples/gcp/10-deployment.yaml
```

Expand Down
2 changes: 1 addition & 1 deletion docs/ibm-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Specify the following values in the example files:
In the root of your Ark directory, run:

```bash
kubectl apply -f examples/ibm/00-ark-config.yaml
kubectl apply -f examples/ibm/05-ark-backupstoragelocation.yaml
kubectl apply -f examples/ibm/10-deployment.yaml
```

Expand Down
30 changes: 17 additions & 13 deletions docs/namespace.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ you run Ark client commands.
## Edit the example files

The Ark repository includes [a set of examples][0] that you can use to set up your Ark server. The
examples place the server and backup/schedule/restore/config data in the `heptio-ark` namespace.
examples place the server and backup/schedule/restore/etc. data in the `heptio-ark` namespace.

To run the server in another namespace, you edit the relevant files, changing `heptio-ark` to
your desired namespace.
Expand All @@ -18,9 +18,9 @@ files, changing `heptio-ark` to your desired namespace. You also need to create

For all cloud providers, edit `https://github.com/heptio/ark/blob/master/examples/common/00-prereqs.yaml`. This file defines:

* CustomResourceDefinitions for the Ark objects (backups, schedules, restores, configs, downloadrequests)
* CustomResourceDefinitions for the Ark objects (backups, schedules, restores, downloadrequests, etc.)
* The namespace where the Ark server runs
* The namespace where backups, schedules, restores, and the config are stored
* The namespace where backups, schedules, restores, etc. are stored
* The Ark service account
* The RBAC rules to grant permissions to the Ark service account

Expand All @@ -29,31 +29,35 @@ For all cloud providers, edit `https://github.com/heptio/ark/blob/master/example

For AWS, edit:

* `https://github.com/heptio/ark/blob/master/examples/aws/05-ark-backupstoragelocation.yaml`
* `https://github.com/heptio/ark/blob/master/examples/aws/06-ark-volumesnapshotlocation.yaml`
* `https://github.com/heptio/ark/blob/master/examples/aws/10-deployment.yaml`
* `https://github.com/heptio/ark/blob/master/examples/aws/00-ark-config.yaml`


### GCP
### Azure

For GCP, edit:
For Azure, edit:

* `https://github.com/heptio/ark/blob/master/examples/gcp/10-deployment.yaml`
* `https://github.com/heptio/ark/blob/master/examples/gcp/00-ark-config.yaml`
* `https://github.com/heptio/ark/blob/master/examples/azure/00-ark-deployment.yaml`
* `https://github.com/heptio/ark/blob/master/examples/azure/05-ark-backupstoragelocation.yaml`
* `https://github.com/heptio/ark/blob/master/examples/azure/06-ark-volumesnapshotlocation.yaml`

### GCP

### Azure
For GCP, edit:

For Azure, edit:
* `https://github.com/heptio/ark/blob/master/examples/gcp/05-ark-backupstoragelocation.yaml`
* `https://github.com/heptio/ark/blob/master/examples/gcp/06-ark-volumesnapshotlocation.yaml`
* `https://github.com/heptio/ark/blob/master/examples/gcp/10-deployment.yaml`

* `https://github.com/heptio/ark/blob/master/examples/azure/00-ark-deployment.yaml`
* `https://github.com/heptio/ark/blob/master/examples/azure/10-ark-config.yaml`

### IBM

For IBM, edit:

* `https://github.com/heptio/ark/blob/master/examples/ibm/05-ark-backupstoragelocation.yaml`
* `https://github.com/heptio/ark/blob/master/examples/ibm/10-deployment.yaml`
* `https://github.com/heptio/ark/blob/master/examples/ibm/00-ark-config.yaml`


## Specify the namespace in client commands

Expand Down
2 changes: 0 additions & 2 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ NOTE: Make sure to check out the appropriate version. We recommend that you chec
kubectl apply -f examples/minio/
```

NOTE: If you get an error about Config creation, wait for a minute, then run the commands again.

1. Deploy the example nginx application:

```bash
Expand Down
6 changes: 3 additions & 3 deletions docs/use-cases.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ If you periodically back up your cluster's resources, you are able to return to
*Using Backups and Restores*
Heptio Ark can help you port your resources from one cluster to another, as long as you point each Ark Config to the same cloud object storage. In this scenario, we are also assuming that your clusters are hosted by the same cloud provider. **Note that Heptio Ark does not support the migration of persistent volumes across cloud providers.**
Heptio Ark can help you port your resources from one cluster to another, as long as you point each Ark instance to the same cloud object storage location. In this scenario, we are also assuming that your clusters are hosted by the same cloud provider. **Note that Heptio Ark does not support the migration of persistent volumes across cloud providers.**
1. *(Cluster 1)* Assuming you haven't already been checkpointing your data with the Ark `schedule` operation, you need to first back up your entire cluster (replacing `<BACKUP-NAME>` as desired):
Expand All @@ -39,7 +39,7 @@ Heptio Ark can help you port your resources from one cluster to another, as long
```
The default TTL is 30 days (720 hours); you can use the `--ttl` flag to change this as necessary.
2. *(Cluster 2)* Make sure that the `persistentVolumeProvider` and `backupStorageProvider` fields in the Ark Config match the ones from *Cluster 1*, so that your new Ark server instance is pointing to the same bucket.
2. *(Cluster 2)* Make sure that the `BackupStorageLocation` and `VolumeSnapshotLocation` CRDs match the ones from *Cluster 1*, so that your new Ark server instance is pointing to the same bucket.
3. *(Cluster 2)* Make sure that the Ark Backup object has been created. Ark resources are synced with the backup files available in cloud storage.
Expand All @@ -49,4 +49,4 @@ ark restore create --from-backup <BACKUP-NAME>
```
[0]: #disaster-recovery
[1]: #cluster-migration
[1]: #cluster-migration
Loading

0 comments on commit ec12467

Please sign in to comment.