Skip to content

Commit 5a79e41

Browse files
committed
Fix
1 parent 6853688 commit 5a79e41

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

docs/docs/concepts/services.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ utilization_policy:
681681

682682
## Rolling deployment
683683

684-
To deploy a new version of a service that is already `running`, use `dstack apply`. `dstack` will automatically detect changes and update replicas one by one. New and old replicas coexist and handle requests simultaneously until deployment finishes.
684+
To deploy a new version of a service that is already `running`, use `dstack apply`. `dstack` will automatically detect changes and suggest to update the run.
685685

686686
<div class="termy">
687687

@@ -700,6 +700,8 @@ Update the run? [y/n]:
700700

701701
</div>
702702

703+
To update a replica, `dstack` starts a new replica, then waits until it becomes `running`, then terminates the old replica. If the service has multiple replicas, they are updated one by one &mdash; `dstack` does not proceed to updating the next replica until the previous one was fully updated. New and old replicas can coexist and handle requests simultaneously until deployment finishes.
704+
703705
You can track the deployment progress in both `dstack apply` or `dstack ps`.
704706
Older replicas have lower `deployment` numbers; newer ones have higher.
705707

@@ -720,10 +722,14 @@ $ dstack apply -f my-service.dstack.yml
720722

721723
The rolling deployment stops when all replicas are updated or when a new deployment is submitted.
722724

723-
<!-- NOTE: should be in sync with constants in server/services/runs.py -->
725+
??? info "Updatable properties"
726+
<!-- NOTE: should be in sync with constants in server/services/runs.py -->
727+
728+
Rolling deployments apply to the following configuration properties: `resources`, `volumes`, `docker`, `files`, `image`, `user`, `privileged`, `entrypoint`, `working_dir`, `python`, `nvcc`, `single_branch`, `env`, `shell`, `commands`. They also apply to changes to [repo](repos.md) or [file](#files) contents.
729+
730+
Additionally, changes to `replicas` and `scaling` can be applied without redeploying replicas.
724731

725-
??? info "Force a redeployment"
726-
`dstack` automatically detects changes to `resources`, `volumes`, `docker`, `files`, `image`, `user`, `privileged`, `entrypoint`, `working_dir`, `python`, `nvcc`, `single_branch`, `env`, `shell`, `commands`, and to [repo](repos.md) and [files](#files) contents.
732+
Changes to other properties will require a full service restart.
727733

728734
To trigger a rolling deployment when no properties have changed (e.g., after updating [secrets](secrets.md) or to restart all replicas),
729735
make a minor config change, such as adding a dummy [environment variable](#environment-variables).

src/dstack/_internal/server/services/runs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,7 @@ def _validate_run_spec_and_set_defaults(run_spec: RunSpec):
930930
"replicas",
931931
"scaling",
932932
# rolling deployment
933-
# NOTE: keep this list in sync with the "Deployments" section in services.md
933+
# NOTE: keep this list in sync with the "Rolling deployment" section in services.md
934934
"resources",
935935
"volumes",
936936
"docker",

0 commit comments

Comments
 (0)