From 408c0dfb5ad0c21870a1f4d9677dc5b9a38ec4fa Mon Sep 17 00:00:00 2001 From: Ashish Amarnath Date: Mon, 6 Jan 2020 12:13:02 -0800 Subject: [PATCH] Add documentation for velero install cli (#2155) * Add documentation for velero install cli Signed-off-by: Ashish Amarnath * mirror doc changes into v1.2.0 Signed-off-by: Ashish Amarnath --- pkg/cmd/cli/install/install.go | 17 ++++---- site/docs/master/customize-installation.md | 22 +---------- site/docs/master/velero-install.md | 45 ++++++++++++++++++++++ site/docs/v1.2.0/customize-installation.md | 22 +---------- site/docs/v1.2.0/velero-install.md | 45 ++++++++++++++++++++++ 5 files changed, 104 insertions(+), 47 deletions(-) create mode 100644 site/docs/master/velero-install.md create mode 100644 site/docs/v1.2.0/velero-install.md diff --git a/pkg/cmd/cli/install/install.go b/pkg/cmd/cli/install/install.go index 7abb3f1cc..ceaa638e8 100644 --- a/pkg/cmd/cli/install/install.go +++ b/pkg/cmd/cli/install/install.go @@ -195,19 +195,22 @@ Use '--wait' to wait for the Velero Deployment to be ready before proceeding. Use '-o yaml' or '-o json' with '--dry-run' to output all generated resources as text instead of sending the resources to the server. This is useful as a starting point for more customized installations. `, - Example: ` # velero install --bucket mybucket --provider gcp --secret-file ./gcp-service-account.json + Example: ` # velero install --provider gcp --plugins velero/velero-plugin-for-gcp:v1.0.0 --bucket mybucket --secret-file ./gcp-service-account.json - # velero install --bucket backups --provider aws --secret-file ./aws-iam-creds --backup-location-config region=us-east-2 --snapshot-location-config region=us-east-2 + # velero install --provider aws --plugins velero/velero-plugin-for-aws:v1.0.0 --bucket backups --secret-file ./aws-iam-creds --backup-location-config region=us-east-2 --snapshot-location-config region=us-east-2 - # velero install --bucket backups --provider aws --secret-file ./aws-iam-creds --backup-location-config region=us-east-2 --snapshot-location-config region=us-east-2 --use-restic + # velero install --provider aws --plugins velero/velero-plugin-for-aws:v1.0.0 --bucket backups --secret-file ./aws-iam-creds --backup-location-config region=us-east-2 --snapshot-location-config region=us-east-2 --use-restic - # velero install --bucket gcp-backups --provider gcp --secret-file ./gcp-creds.json --wait + # velero install --provider gcp --plugins velero/velero-plugin-for-gcp:v1.0.0 --bucket gcp-backups --secret-file ./gcp-creds.json --wait - # velero install --bucket backups --provider aws --backup-location-config region=us-west-2 --snapshot-location-config region=us-west-2 --no-secret --pod-annotations iam.amazonaws.com/role=arn:aws:iam:::role/ + # velero install --provider aws --plugins velero/velero-plugin-for-aws:v1.0.0 --bucket backups --backup-location-config region=us-west-2 --snapshot-location-config region=us-west-2 --no-secret --pod-annotations iam.amazonaws.com/role=arn:aws:iam:::role/ - # velero install --bucket gcp-backups --provider gcp --secret-file ./gcp-creds.json --velero-pod-cpu-request=1000m --velero-pod-cpu-limit=5000m --velero-pod-mem-request=512Mi --velero-pod-mem-limit=1024Mi + # velero install --provider gcp --plugins velero/velero-plugin-for-gcp:v1.0.0 --bucket gcp-backups --secret-file ./gcp-creds.json --velero-pod-cpu-request=1000m --velero-pod-cpu-limit=5000m --velero-pod-mem-request=512Mi --velero-pod-mem-limit=1024Mi - # velero install --bucket gcp-backups --provider gcp --secret-file ./gcp-creds.json --restic-pod-cpu-request=1000m --restic-pod-cpu-limit=5000m --restic-pod-mem-request=512Mi --restic-pod-mem-limit=1024Mi + # velero install --provider gcp --plugins velero/velero-plugin-for-gcp:v1.0.0 --bucket gcp-backups --secret-file ./gcp-creds.json --restic-pod-cpu-request=1000m --restic-pod-cpu-limit=5000m --restic-pod-mem-request=512Mi --restic-pod-mem-limit=1024Mi + + # velero install --provider azure --plugins velero/velero-plugin-for-microsoft-azure:v1.0.0 --bucket $BLOB_CONTAINER --secret-file ./credentials-velero \ + --backup-location-config resourceGroup=$AZURE_BACKUP_RESOURCE_GROUP,storageAccount=$AZURE_STORAGE_ACCOUNT_ID[,subscriptionId=$AZURE_BACKUP_SUBSCRIPTION_ID] --snapshot-location-config apiTimeout=[,resourceGroup=$AZURE_BACKUP_RESOURCE_GROUP,subscriptionId=$AZURE_BACKUP_SUBSCRIPTION_ID] `, Run: func(c *cobra.Command, args []string) { diff --git a/site/docs/master/customize-installation.md b/site/docs/master/customize-installation.md index eab691c8b..dcb671cef 100644 --- a/site/docs/master/customize-installation.md +++ b/site/docs/master/customize-installation.md @@ -37,25 +37,7 @@ If you've already run `velero install` without the `--use-restic` flag, you can By default, the Velero deployment requests 500m CPU, 128Mi memory and sets a limit of 1000m CPU, 256Mi. Default requests and limits are not set for the restic pods as CPU/Memory usage can depend heavily on the size of volumes being backed up. -If you need to customize these resource requests and limits, you can set the following flags in your `velero install` command: - -```bash -velero install \ - --provider \ - --bucket \ - --secret-file \ - --velero-pod-cpu-request \ - --velero-pod-mem-request \ - --velero-pod-cpu-limit \ - --velero-pod-mem-limit \ - [--use-restic] \ - [--restic-pod-cpu-request ] \ - [--restic-pod-mem-request ] \ - [--restic-pod-cpu-limit ] \ - [--restic-pod-mem-limit ] -``` - -Values for these flags follow the same format as [Kubernetes resource requirements][5]. +Customization of these resource requests and limits may be performed using the [velero install][6] CLI command. ## Configure more than one storage location for backups or volume snapshots @@ -110,4 +92,4 @@ Run `velero install --help` or see the [Helm chart documentation](https://github [2]: namespace.md [3]: restic.md [4]: on-premises.md -[5]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-cpu +[6]: velero-install.md#usage diff --git a/site/docs/master/velero-install.md b/site/docs/master/velero-install.md new file mode 100644 index 000000000..58718d16c --- /dev/null +++ b/site/docs/master/velero-install.md @@ -0,0 +1,45 @@ +# Velero Install CLI + +This document serves as a guide to using the `velero install` CLI command to install `velero` server components into your kubernetes cluster. + +_NOTE_: `velero install` will, by default, use the CLI's version information to determine the version of the server compoents to deploy. This behavior may be overridden by using the `--image` flag. Refer to [Building Server Component Container Images][1]. + +## Usage + +This section explains some of the basic flags supported by the `velero install` CLI command. For a complete explanation of the flags, please run `velero install --help` + +```bash +velero install \ + --plugins + --provider \ + --bucket \ + --secret-file \ + --velero-pod-cpu-request \ + --velero-pod-mem-request \ + --velero-pod-cpu-limit \ + --velero-pod-mem-limit \ + [--use-restic] \ + [--restic-pod-cpu-request ] \ + [--restic-pod-mem-request ] \ + [--restic-pod-cpu-limit ] \ + [--restic-pod-mem-limit ] +``` + +The values for the resource requests and limits flags follow the same format as [Kubernetes resource requirements][3] +For plugin container images, please refer to our [supported providers][2] page. + +## Examples + +This section provides examples that serve as a starting point for more customized installations. + +```bash +velero install --provider gcp --plugins velero/velero-plugin-for-gcp:v1.0.0 --bucket mybucket --secret-file ./gcp-service-account.json + +velero install --provider aws --plugins velero/velero-plugin-for-aws:v1.0.0 --bucket backups --provider aws --secret-file ./aws-iam-creds --backup-location-config region=us-east-2 --snapshot-location-config region=us-east-2 --use-restic + +velero install --provider azure --plugins velero/velero-plugin-for-microsoft-azure:v1.0.0 --bucket $BLOB_CONTAINER --secret-file ./credentials-velero --backup-location-config resourceGroup=$AZURE_BACKUP_RESOURCE_GROUP,storageAccount=$AZURE_STORAGE_ACCOUNT_ID[,subscriptionId=$AZURE_BACKUP_SUBSCRIPTION_ID] --snapshot-location-config apiTimeout=[,resourceGroup=$AZURE_BACKUP_RESOURCE_GROUP,subscriptionId=$AZURE_BACKUP_SUBSCRIPTION_ID] +``` + +[1]: build-from-source.md#making-images-and-updating-velero +[2]: supported-providers.md +[3]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/ diff --git a/site/docs/v1.2.0/customize-installation.md b/site/docs/v1.2.0/customize-installation.md index eab691c8b..dcb671cef 100644 --- a/site/docs/v1.2.0/customize-installation.md +++ b/site/docs/v1.2.0/customize-installation.md @@ -37,25 +37,7 @@ If you've already run `velero install` without the `--use-restic` flag, you can By default, the Velero deployment requests 500m CPU, 128Mi memory and sets a limit of 1000m CPU, 256Mi. Default requests and limits are not set for the restic pods as CPU/Memory usage can depend heavily on the size of volumes being backed up. -If you need to customize these resource requests and limits, you can set the following flags in your `velero install` command: - -```bash -velero install \ - --provider \ - --bucket \ - --secret-file \ - --velero-pod-cpu-request \ - --velero-pod-mem-request \ - --velero-pod-cpu-limit \ - --velero-pod-mem-limit \ - [--use-restic] \ - [--restic-pod-cpu-request ] \ - [--restic-pod-mem-request ] \ - [--restic-pod-cpu-limit ] \ - [--restic-pod-mem-limit ] -``` - -Values for these flags follow the same format as [Kubernetes resource requirements][5]. +Customization of these resource requests and limits may be performed using the [velero install][6] CLI command. ## Configure more than one storage location for backups or volume snapshots @@ -110,4 +92,4 @@ Run `velero install --help` or see the [Helm chart documentation](https://github [2]: namespace.md [3]: restic.md [4]: on-premises.md -[5]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-cpu +[6]: velero-install.md#usage diff --git a/site/docs/v1.2.0/velero-install.md b/site/docs/v1.2.0/velero-install.md new file mode 100644 index 000000000..58718d16c --- /dev/null +++ b/site/docs/v1.2.0/velero-install.md @@ -0,0 +1,45 @@ +# Velero Install CLI + +This document serves as a guide to using the `velero install` CLI command to install `velero` server components into your kubernetes cluster. + +_NOTE_: `velero install` will, by default, use the CLI's version information to determine the version of the server compoents to deploy. This behavior may be overridden by using the `--image` flag. Refer to [Building Server Component Container Images][1]. + +## Usage + +This section explains some of the basic flags supported by the `velero install` CLI command. For a complete explanation of the flags, please run `velero install --help` + +```bash +velero install \ + --plugins + --provider \ + --bucket \ + --secret-file \ + --velero-pod-cpu-request \ + --velero-pod-mem-request \ + --velero-pod-cpu-limit \ + --velero-pod-mem-limit \ + [--use-restic] \ + [--restic-pod-cpu-request ] \ + [--restic-pod-mem-request ] \ + [--restic-pod-cpu-limit ] \ + [--restic-pod-mem-limit ] +``` + +The values for the resource requests and limits flags follow the same format as [Kubernetes resource requirements][3] +For plugin container images, please refer to our [supported providers][2] page. + +## Examples + +This section provides examples that serve as a starting point for more customized installations. + +```bash +velero install --provider gcp --plugins velero/velero-plugin-for-gcp:v1.0.0 --bucket mybucket --secret-file ./gcp-service-account.json + +velero install --provider aws --plugins velero/velero-plugin-for-aws:v1.0.0 --bucket backups --provider aws --secret-file ./aws-iam-creds --backup-location-config region=us-east-2 --snapshot-location-config region=us-east-2 --use-restic + +velero install --provider azure --plugins velero/velero-plugin-for-microsoft-azure:v1.0.0 --bucket $BLOB_CONTAINER --secret-file ./credentials-velero --backup-location-config resourceGroup=$AZURE_BACKUP_RESOURCE_GROUP,storageAccount=$AZURE_STORAGE_ACCOUNT_ID[,subscriptionId=$AZURE_BACKUP_SUBSCRIPTION_ID] --snapshot-location-config apiTimeout=[,resourceGroup=$AZURE_BACKUP_RESOURCE_GROUP,subscriptionId=$AZURE_BACKUP_SUBSCRIPTION_ID] +``` + +[1]: build-from-source.md#making-images-and-updating-velero +[2]: supported-providers.md +[3]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/