You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/concepts/services.md
+10-4Lines changed: 10 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -681,7 +681,7 @@ utilization_policy:
681
681
682
682
## Rolling deployment
683
683
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.
685
685
686
686
<div class="termy">
687
687
@@ -700,6 +700,8 @@ Update the run? [y/n]:
700
700
701
701
</div>
702
702
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 — `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
+
703
705
You can track the deployment progress in both `dstack apply` or `dstack ps`.
704
706
Older replicas have lower `deployment` numbers; newer ones have higher.
The rolling deployment stops when all replicas are updated or when a new deployment is submitted.
722
724
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.
724
731
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.
727
733
728
734
To trigger a rolling deployment when no properties have changed (e.g., after updating [secrets](secrets.md) or to restart all replicas),
729
735
make a minor config change, such as adding a dummy [environment variable](#environment-variables).
0 commit comments