Skip to content

Commit

Permalink
Simplify license instructions
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Dec 13, 2023
1 parent c484a2a commit 3433976
Show file tree
Hide file tree
Showing 6 changed files with 147 additions and 59 deletions.
149 changes: 134 additions & 15 deletions content/docs/v2023.10.9/guides/cli/kubectl-plugin/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,11 @@ Available command for `kubectl stash` cli are:
| [debug backup](#debug-backup) | Debug Stash backup issues. |
| [debug restore](#debug-restore) | Debug Stash restore issues. |
| [debug operator](#debug-operator) | Debug Stash operator issues. |
| [key list](#key-list) | List the keys (passwords) of a restic repository. |
| [key add](#key-add) | Add a new key (password) to a restic repository. |
| [key update](#key-update) | Update current key (password) of a restic repository. |
| [key remove](#key-remove) | Remove a key (password) of a restic repository. |
| [gen rules](#generate-rules) | Generate restore rules from nearest snapshots at a specific time |

## Create Command

Expand Down Expand Up @@ -401,12 +406,8 @@ kubectl stash unlock <repository-name> [flags]
$ kubectl stash unlock my-repo --namespace=demo
```

## Pause Command

`kubectl stash pause` command is used to pause Stash backup temporarily.

### Pause Backup
To pause a backup you have to provide the `BackupConfiguration` name or `BackupBatch` name by using flags. The available flags are:
## Pause Backup
`kubectl stash pause` command is used to pause Stash backup temporarily. To pause a backup you have to provide the `BackupConfiguration` name or `BackupBatch` name by using flags. The available flags are:

| Flag | Description |
|------------------|-----------------------------------------------------------------------------------|
Expand All @@ -426,8 +427,9 @@ kubectl stash pause backup [flags]
$ kubectl stash pause backup --namespace=demo --backupconfig=my-config
```

### Resume Backup
To resume a backup you have to provide the `BackupConfiguration` name or `BackupBatch` name by using flags. The available flags are:
## Resume Backup

`kubectl stash pause` comand is used to resume a backup. To resume a backup you have to provide the `BackupConfiguration` name or `BackupBatch` name by using flags. The available flags are:

| Flag | Description |
|------------------|-----------------------------------------------------------------------------------|
Expand All @@ -451,7 +453,7 @@ $ kubectl stash resume backup --namespace=demo --backupconfig==my-config
`kubectl stash debug` command is used to debug stash resources. This command describes the necessary resources and shows logs from the related pods which makes the debugging process quicker and easier.

### Debug Backup
To debug a backup you have to provide the BackupConfiguration name or BackupBatch name by using flags. The available flags are:
This command is used to debug a backup. You have to provide the BackupConfiguration name or BackupBatch name by using flags. The available flags are:

| Flag | Description |
|------------------|-----------------------------------------------------------------------------------|
Expand All @@ -474,13 +476,13 @@ $ kubectl stash debug backup --namespace=demo --backupconfig=my-config

### Debug Restore

To debug a restore you have to provide the `RestoreSession` name or `RestoreBatch` name by using flags. The available flags are:
This command is used to debug a restore. You have to provide the `RestoreSession` name or `RestoreBatch` name by using flags. The available flags are:

| Flag | Description |
|--------------------|--------------------------------------------------------------------------------|
| `--namespace` | Indicates the namespace of the respective `RestoreSession` or `RestoreBatch.` |
| `--restoresession` | Name of the `RestoreSession`. |
| `--restorebatch` | Name of the `RestoreBatch`. |
| Flag | Description |
|--------------------|-------------------------------------------------------------------------------|
| `--namespace` | Indicates the namespace of the respective `RestoreSession` or `RestoreBatch`. |
| `--restoresession` | Name of the `RestoreSession`. |
| `--restorebatch` | Name of the `RestoreBatch`. |


**Format:**
Expand All @@ -494,3 +496,120 @@ kubectl stash debug restore [flags]
```bash
$ kubectl stash debug restore --namespace=demo --restoresession=my-restore
```

### Debug Operator

This command is used to show version related information and operator logs.

**Example:**

```bash
$ kubectl stash debug operator
```

## Key Command

`kubectl stash key` command is used to manage keys (passwords) of a restic repository.

### Key List

This command is used to list restic keys (passwords) of a restic repository.

**Format:**

```bash
kubectl stash key list <repository-name> [flags]
```

**Example:**

```bash
$ kubectl stash key list my-repo --namespace=demo
```

### Key Add

This command is used to add a new key (password) to a restic repository. You have to provide the information of the new key by using flags. The available flags are:

| Flag | Description |
|-----------------------|---------------------------------------------------------|
| `--namespace` | Indicates the namespace of the respective `Repository`. |
| `--host` | Host of the new key. |
| `--user` | User of the new key. |
| `--new-password-file` | File from which to read the new password file. |

**Format:**

```bash
kubectl stash key add <repository-name> [flags]
```

**Example:**

```bash
$ kubectl stash key list my-repo --namespace=demo --user root --host my-host --new-password-file password.txt
```

### Key Update

This command is used to update the current key (password) of a restic repository. The available flags for this command are:

| Flag | Description |
|-----------------------|---------------------------------------------------------|
| `--namespace` | Indicates the namespace of the respective `Repository`. |
| `--new-password-file` | File from which to read the new password file. |

**Format:**

```bash
kubectl stash key update <repository-name> [flags]
```

**Example:**

```bash
$ kubectl stash key list my-repo --namespace=demo --new-password-file password.txt
```

### Key Remove

This command is used to remove a key (password) of a restic repository. The available flags for this command are:

| Flag | Description |
|---------------|---------------------------------------------------------|
| `--namespace` | Indicates the namespace of the respective `Repository`. |
| `--id` | ID of the restic key. |

**Format:**

```bash
kubectl stash key remove <repository-name> [flags]
```

**Example:**

```bash
$ kubectl stash key remove my-repo --namespace=demo --id cdc89a7d
```

## Generate Rules

`kubectl stash debug` command is used to create rules for a RestoreSession to recover the database and application backups. This command finds the nearest repository snapshots for a given timestamp and generates two rules: one for the snapshots just before the specified timestamp and another for those at or after the specified timestamp. The available flags for this command are:

| Flag | Description |
|----------------------|-------------------------------------------------------------|
| `--namespace` | Indicates the namespace of the respective `Repository`. |
| `--timestamp` | Timestamp to find the closest snapshots. |
| `--group-interval` | Specifies the time gap between batches of backup snapshots. |
| `--request-timeout` | Request timeout duration for the kubectl command. |

**Format:**

```bash
kubectl stash gen rules <repository-name> [flags]
```
**Example:**

```bash
$ kubectl stash gen rules my-repo --namespace=demo --timestamp 2023-10-05T05:16:11Z
```
2 changes: 1 addition & 1 deletion content/docs/v2023.10.9/guides/platforms/aks/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ standard kubernetes.io/azure-disk 3m

Here, we have `standard` StorageClass in our cluster.

> **Note:** YAML files used in this tutorial are stored in [docs/guides/platforms/aks/examples](/docs/v2023.10.9/guides/platforms/aks/examples) directory of [stashed/doc](https://github.com/stashed/doc) repository.
> **Note:** YAML files used in this tutorial are stored in [docs/guides/platforms/aks/examples](/docs/v2023.10.9/guides/platforms/aks/examples) directory of [stashed/docs](https://github.com/stashed/docs) repository.
## Backup the Volume of a Deployment

Expand Down
2 changes: 1 addition & 1 deletion content/docs/v2023.10.9/guides/platforms/minio/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ standard (default) k8s.io/minikube-hostpath 130m

Here, we have `standard` StorageClass in our cluster.

> **Note:** YAML files used in this tutorial are stored in [docs/guides/platforms/minio/examples](/docs/v2023.10.9/guides/platforms/minio/examples) directory of [stashed/doc](https://github.com/stashed/doc) repository.
> **Note:** YAML files used in this tutorial are stored in [docs/guides/platforms/minio/examples](/docs/v2023.10.9/guides/platforms/minio/examples) directory of [stashed/docs](https://github.com/stashed/docs) repository.
## Backup the Volume of a Deployment

Expand Down
2 changes: 1 addition & 1 deletion content/docs/v2023.10.9/guides/platforms/rook/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ $ kubectl create ns demo
namespace/demo created
```

> **Note:** YAML files used in this tutorial are stored in [docs/guides/platforms/rook/examples](/docs/v2023.10.9/guides/platforms/rook/examples) directory of [stashed/doc](https://github.com/stashed/doc) repository.
> **Note:** YAML files used in this tutorial are stored in [docs/guides/platforms/rook/examples](/docs/v2023.10.9/guides/platforms/rook/examples) directory of [stashed/docs](https://github.com/stashed/docs) repository.
**Choosing StorageClass:**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ $ kubectl create ns demo
namespace/demo created
```

> **Note:** YAML files used in this tutorial are stored in [docs/guides/use-cases/pause-backup/examples](https://github.com/stashed/docs/raw/{{< param "info.version" >}}/docs/guides/use-cases/pause-backup/examples) directory of [stashed/doc](https://github.com/stashed/doc) repository.
> **Note:** YAML files used in this tutorial are stored in [docs/guides/use-cases/pause-backup/examples](https://github.com/stashed/docs/raw/{{< param "info.version" >}}/docs/guides/use-cases/pause-backup/examples) directory of [stashed/docs](https://github.com/stashed/docs) repository.
## Configure Backup

Expand Down
49 changes: 9 additions & 40 deletions content/docs/v2023.10.9/setup/install/stash/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,48 +78,11 @@ info:

# Install Stash

## Prerequisites
## Get a Free License

- **Kubernetes version**: Stash is compatible with any Kubernetes cluster with version `1.16` or later.
- **Extended API server**: Your cluster needs to support Kubernetes extended API server.
- **Webhook support**: Your cluster must support Kubernetes validation and mutation webhooks.
- **RBAC permissions**: Stash operator needs a few RBAC permissions on your cluster. You can find the list of the required RBAC permissions [here](/docs/v2023.10.9/guides/security/rbac/).
- **Installing on GKE cluster**: To install Stash on your GKE cluster, please check the requirements [here](https://stash.run/docs/{{< param "info.version" >}}/setup/install/troubleshoting/#installing-in-gke-cluster).
- **NFS volume**: If you are willing to use NFS volume as a backend, you need to customize the Stash installation like [here](https://stash.run/docs/{{< param "info.version" >}}/setup/install/troubleshoting/#configuring-network-volume-accessor).
Download a FREE license from [AppsCode License Server](https://appscode.com/issue-license?p=stash).

## Get a Free Trial License

In this section, we are going to show you how you can get a free **30 days trial** license for Stash. You can get a license for your Kubernetes cluster by going through the following steps:

- At first, go to [AppsCode License Server](https://appscode.com/issue-license?p=stash) and fill up the form. It will ask for your Name, Email, the product you want to install, and your cluster ID (UID of the `kube-system` namespace).
- Provide your name and email address. **You must provide your work email address**.
- Then, select `Stash` in the product field.
- Now, provide your cluster ID. You can get your cluster ID easily by running the following command:

```bash
kubectl get ns kube-system -o=jsonpath='{.metadata.uid}'
```

- Then, you have to agree with the terms and conditions. We recommend reading it before checking the box.
- Now, you can submit the form. After you submit the form, the AppsCode License server will send an email to the provided email address with a link to your license file.
- Navigate to the provided link and save the license into a file. Here, we save the license to a `license.txt` file.

Here is a screenshot of the license form.

<figure align="center">
<img alt="Stash Backend Overview" src="images/enterprise_license_form.png">
<figcaption align="center">Fig: Stash License Form</figcaption>
</figure>

You can create licenses for as many clusters as you want. You can upgrade your license any time without re-installing Stash by following the upgrading guide from [here](/docs/v2023.10.9/setup/upgrade/#upgrading-license).

>Stash licensing process has been designed to work with CI/CD workflow. You can automatically obtain a license from your CI/CD pipeline by following the guide from [here](https://github.com/appscode/offline-license-server#offline-license-server).
## Purchase Stash License

If you are interested in purchasing Stash license, please contact us via [email protected] for further discussion. You can also set up a meeting via our [calendly link](https://calendly.com/appscode/intro).

If you are willing to purchase Stash license but need more time to test in your dev cluster, feel free to contact [email protected]. We will be happy to extend your trial period.
> Stash licensing process has been designed to work with CI/CD workflow. You can automatically obtain a license from your CI/CD pipeline by following the guide from [here](https://github.com/appscode/offline-license-server#offline-license-server).
## Install

Expand Down Expand Up @@ -272,3 +235,9 @@ pvc-restore 5m2s
As you can see from the above output that Stash has created `Task` objects for each supported databases.

Now, you are ready to [take your first backup](/docs/v2023.10.9/guides/README) using Stash.

## Purchase Stash License

If you are interested in purchasing Stash license, please contact us via [email protected] for further discussion. You can also set up a meeting via our [calendly link](https://calendly.com/appscode/intro).

If you are willing to purchase Stash license but need more time to test in your dev cluster, feel free to contact [email protected]. We will be happy to extend your trial period.

0 comments on commit 3433976

Please sign in to comment.