[Feature] Add alias -R for --reuse with dstack apply #2032
[Feature] Add alias -R for --reuse with dstack apply #2032peterschmidt85 merged 3 commits intomasterfrom
-R for --reuse with dstack apply #2032Conversation
docs/docs/concepts/fleets.md
Outdated
| ## Creation policy | ||
|
|
||
| [//]: # (By default, when running dev environments, tasks, and services, `dstack apply` tries to reuse `idle` ) | ||
| [//]: # (instances from existing fleets. ) | ||
| [//]: # (If no `idle` instances meet the requirements, it creates a new fleet automatically.) | ||
| [//]: # (To avoid creating new fleet, specify pass `--reuse` to `dstack apply` or (or set [) | ||
| [//]: # (`creation_policy`](../reference/dstack.yml/dev-environment.md#creation_policy) to `reuse` in the configuration).) | ||
| By default, `dstack apply` reuses `idle` instances from an existing [fleet](../concepts/fleets.md), | ||
| or automatically creates a new fleet via backends. | ||
|
|
||
| To ensure `dstack apply` doesn't create a new fleet but reuses an existing one, | ||
| pass `-R` (or `--reuse`) to `dstack apply`. | ||
|
|
||
| <div class="termy"> | ||
|
|
||
| ```shell | ||
| $ dstack apply -R -f examples/.dstack.yml | ||
| ``` | ||
|
|
||
| </div> | ||
|
|
||
| Alternatively, set [`creation_policy`](reference/dstack.yml/dev-environment.md#creation_policy) to `reuse` in the task configuration. |
There was a problem hiding this comment.
I'm not sure this section is supposed to be here, as creation policies are relevant for runs and this page is about fleets. Every paragraph is a bit confusing 👇
By default,
dstack applyreusesidleinstances from an existing [fleet](../concepts/fleets.md),
This link references the current page itself.
It's also not clear that dstack apply here refers to applying run configurations, not fleet configurations discussed in this page.
pass
-R(or--reuse) todstack apply.
Not clear that --reuse is an option when applying run configurations, not fleet configurations discussed in this page.
Alternatively, set [
creation_policy](reference/dstack.yml/dev-environment.md#creation_policy) toreusein the task configuration.
Not only in the task configuration, it can be set in service and dev-environment configurations too.
There was a problem hiding this comment.
Thank you! Fixed.
- [Docs] Addressing feedback from the review; plus minor improvements
…2032) * - [Feature] Add alias `-R` for `--reuse` with `dstack apply` dstackai#2030 - [Docs] Addressing feedback from the review; plus minor improvements
Fixes #2030