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/backends.md
+5-17Lines changed: 5 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,16 @@
1
1
# Backends
2
2
3
-
Backends allow `dstack` to manage compute across various environments.
4
-
They can be configured via `~/.dstack/server/config.yml` or through the [project settings page](../concepts/projects.md#backends) in the UI.
3
+
Backends allow `dstack` to provision fleets across cloud providers or Kubernetes clusters.
5
4
6
-
`dstack` supports three types of backends:
5
+
`dstack` supports two types of backends:
7
6
8
7
*[VM-based](#vm-based) – use `dstack`'s native integration with cloud providers to provision VMs, manage clusters, and orchestrate container-based runs.
9
8
*[Container-based](#container-based) – use either `dstack`'s native integration with cloud providers or Kubernetes to orchestrate container-based runs; provisioning in this case is delegated to the cloud provider or Kubernetes.
10
-
*[On-prem](#on-prem) – use `dstack`'s native support for on-prem servers without needing Kubernetes.
11
9
12
-
!!! info "dstack Sky"
13
-
If you're using [dstack Sky](https://sky.dstack.ai), backend configuration is optional. dstack Sky lets you use pre-configured backends to access GPU marketplace.
10
+
??? info "SSH fleets"
11
+
When using `dstack` with on-prem servers, backend configuration isn’t required. Simply create [SSH fleets](../concepts/fleets.md#ssh-fleets) once the server is up.
14
12
15
-
See the examples of backend configuration below.
13
+
Backends can be configured via `~/.dstack/server/config.yml` or through the [project settings page](../concepts/projects.md#backends) in the UI. See the examples of backend configuration below.
16
14
17
15
## VM-based
18
16
@@ -1154,16 +1152,6 @@ projects:
1154
1152
1155
1153
Also, the `vastai` backend supports on-demand instances only. Spot instance support coming soon.
1156
1154
1157
-
## On-prem
1158
-
1159
-
In on-prem environments, the [Kubernetes](#kubernetes) backend can be used if a Kubernetes cluster is already set up and configured.
1160
-
However, often [SSH fleets](../concepts/fleets.md#ssh-fleets) are a simpler and lighter alternative.
1161
-
1162
-
### SSH fleets
1163
-
1164
-
SSH fleets require no backend configuration.
1165
-
All you need to do is [provide hostnames and SSH credentials](../concepts/fleets.md#ssh-fleets), and `dstack` sets up a fleet that can orchestrate container-based runs on your servers.
1166
-
1167
1155
SSH fleets support the same features as [VM-based](#vm-based) backends.
Copy file name to clipboardExpand all lines: docs/docs/concepts/fleets.md
+16-15Lines changed: 16 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,27 +4,31 @@ Fleets act both as pools of instances and as templates for how those instances a
4
4
5
5
`dstack` supports two kinds of fleets:
6
6
7
-
*[Backend fleets](#backend-fleets) – dynamically provisioned through configured backends; they are supported with any type of backends: [VM-based](backends.md#vm-based) and [container-based](backends.md#container-based) (incl. [`kubernetes`](backends.md#kubernetes))
7
+
*[Backend fleets](#backend-fleets) – dynamically provisioned through configured backends; they are supported with any type of backends: [VM-based](backends.md#vm-based) and [container-based](backends.md#container-based) (incl. [Kubernetes](backends.md#kubernetes))
8
8
*[SSH fleets](#ssh-fleets) – created using on-prem servers; do not require backends
9
9
10
-
When you run `dstack apply` to start a dev environment, task, or service, `dstack` will reuse idle instances from an existing fleet whenever available.
10
+
When you submit a dev environment, task, or service, `dstack` reuses idle instances or provisions new ones based on the fleet configuration.
11
+
12
+
> You must create a fleet before submitting runs.
11
13
12
14
## Backend fleets
13
15
14
-
If you configured [backends](backends.md), `dstack` can provision fleets on the fly.
15
-
However, it’s recommended to define fleets explicitly.
16
+
Backend fleets allow provisioning compute across cloud providers or Kubernetes clusters.
16
17
17
-
### Apply a configuration
18
+
??? info "Prerequisites"
19
+
Before creating a backend fleet, make sure to configure the corresponding [backends](backends.md).
20
+
21
+
### Apply the configuration
18
22
19
-
To create a backend fleet, define a configuration as a YAML file in your project directory. The file must have a
23
+
To create a backend fleet, define a configuration as a YAML file. The file must have a
20
24
`.dstack.yml` extension (e.g. `.dstack.yml` or `fleet.dstack.yml`).
`dstack` always keeps the minimum number of nodes provisioned. Additional instances, up to the maximum limit, are provisioned on demand.
63
-
64
-
!!! info "Container-based backends"
65
-
For [container-based](backends.md#container-based) backends (such as `kubernetes`, `runpod`, etc), `nodes` must be defined as a range starting with `0`. In these cases, instances are provisioned on demand as needed.
66
+
If `nodes` is a range that starts above `0`, `dstack` pre-creates the initial number of instances up front, while any additional ones are created on demand.
66
67
67
-
<!-- TODO: Ensure the user sees the error or warning otherwise -->
68
+
> Setting the `nodes` range to start above `0` is supported only for [VM-based backends](backends.md#vm-based).
68
69
69
70
??? info "Target number of nodes"
70
71
71
72
If `nodes` is defined as a range, you can start with more than the minimum number of instances by using the `target` parameter when creating the fleet.
Copy file name to clipboardExpand all lines: docs/docs/installation/index.md
+3-8Lines changed: 3 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,11 +8,7 @@
8
8
9
9
### Configure backends
10
10
11
-
To orchestrate compute across cloud providers or existing Kubernetes clusters, you need to configure backends.
12
-
13
-
Backends can be set up in `~/.dstack/server/config.yml` or through the [project settings page](../concepts/projects.md#backends) in the UI.
14
-
15
-
For more details, see [Backends](../concepts/backends.md).
11
+
To orchestrate compute across cloud providers or Kubernetes clusters, you need to configure [backends](../concepts/backends.md).
16
12
17
13
??? info "SSH fleets"
18
14
When using `dstack` with on-prem servers, backend configuration isn’t required. Simply create [SSH fleets](../concepts/fleets.md#ssh-fleets) once the server is up.
@@ -79,8 +75,7 @@ The server can run on your laptop or any environment with access to the cloud an
79
75
To verify that backends are properly configured, use the [`dstack offer`](../reference/cli/dstack/offer.md#list-gpu-offers) command to list available GPU offers.
80
76
81
77
!!! info "Server deployment"
82
-
For more details on server deployment options, see the
0 commit comments