diff --git a/content/cli-v2.md b/content/cli-v2.md index 2ac7f4bf..94f694cd 100644 --- a/content/cli-v2.md +++ b/content/cli-v2.md @@ -973,6 +973,9 @@ See [CPI config](cpi-config.md). bosh -e vbox -d cf deploy cf.yml -v system_domain=sys.example.com -o large-footprint.yml ``` +!!! note + As of bosh-cli version the deploy command supports the usage of global flags which are applied to every deploy command automatically. Please refer to [Deploy config](deploy-config.md) for more information. + #### Delete-Deployment {: #delete-deployment } - `bosh [GLOBAL-CLI-OPTIONS] delete-deployment [--force]` (Alias: `deld`) diff --git a/content/deploy-config.md b/content/deploy-config.md new file mode 100644 index 00000000..7294efb5 --- /dev/null +++ b/content/deploy-config.md @@ -0,0 +1,55 @@ +!!! note + This feature is available with bosh-cli-release . + +The Director has a way to specify global flags for all deploy commands. The deploy config is a YAML file that defines global flags that apply to all deployments. + +--- +## Updating and retrieving deploy config {: #update } + +To update deploy config on the Director use [`bosh update-config --type deploy --name `](cli-v2.md#update-config) CLI command. + +!!! note + See [example deploy config](#example1) below. + +```shell +bosh update-config --type deploy --name test deploy.yml +bosh config --type deploy --name test +``` + +```text +Acting as user 'admin' on 'micro' + +flags: +- recreate +- fix-releases + +include: +- test_deployment + + +``` + +The Director will apply the specified flags for the specified deployments during the next `bosh deploy` for that deployment. + +--- +## Example {: #example1 } + +```yaml +flags: + - recreate + - fix-releases +include: + - foo +``` + +You can include and exclude deployments by using EITHER the `include` or `exclude` property. The [example](#example1) above will only apply the flags if the deployment "foo" gets deployed. +In contrast, the [example](#example2) config below will ensure that only for the "foo" deployment the flags will NOT be applied. Only specifying the `flags` property will apply the flags for all deployments. + + +```yaml +flags: + - recreate + - fix-releases +exclude: + - foo +```