Skip to content

Commit 24defbb

Browse files
[Docs] Make it explicit that fleets are required (#3339)
Plus, a number of minor improvements
1 parent 476347a commit 24defbb

File tree

7 files changed

+117
-118
lines changed

7 files changed

+117
-118
lines changed

docs/docs/concepts/backends.md

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
# Backends
22

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.
54

6-
`dstack` supports three types of backends:
5+
`dstack` supports two types of backends:
76

87
* [VM-based](#vm-based) – use `dstack`'s native integration with cloud providers to provision VMs, manage clusters, and orchestrate container-based runs.
98
* [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.
119

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.
1412

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.
1614

1715
## VM-based
1816

@@ -1154,16 +1152,6 @@ projects:
11541152

11551153
Also, the `vastai` backend supports on-demand instances only. Spot instance support coming soon.
11561154

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-
11671155
SSH fleets support the same features as [VM-based](#vm-based) backends.
11681156

11691157
!!! info "What's next"

docs/docs/concepts/dev-environments.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22

33
A dev environment lets you provision an instance and access it with your desktop IDE.
44

5+
??? info "Prerequisites"
6+
Before running a dev environment, make sure you’ve [installed](../installation/index.md) the server and CLI, and created a [fleet](fleets.md).
7+
58
## Apply a configuration
69

7-
First, define a dev environment configuration as a YAML file in your project folder.
10+
First, define a dev environment configuration as a YAML file.
811
The filename must end with `.dstack.yml` (e.g. `.dstack.yml` or `dev.dstack.yml` are both acceptable).
912

1013
<div editor-title="examples/.dstack.yml">

docs/docs/concepts/fleets.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,31 @@ Fleets act both as pools of instances and as templates for how those instances a
44

55
`dstack` supports two kinds of fleets:
66

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))
88
* [SSH fleets](#ssh-fleets) – created using on-prem servers; do not require backends
99

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.
1113
1214
## Backend fleets
1315

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.
1617

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
1822

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
2024
`.dstack.yml` extension (e.g. `.dstack.yml` or `fleet.dstack.yml`).
2125

22-
<div editor-title="examples/misc/fleets/.dstack.yml">
26+
<div editor-title="fleet.dstack.yml">
2327

2428
```yaml
2529
type: fleet
2630
# The name is optional, if not specified, generated randomly
27-
name: default-fleet
31+
name: default
2832

2933
# Can be a range or a fixed number
3034
# Allow to provision of up to 2 instances
@@ -48,7 +52,7 @@ To create or update the fleet, pass the fleet configuration to [`dstack apply`](
4852
<div class="termy">
4953

5054
```shell
51-
$ dstack apply -f examples/misc/fleets/.dstack.yml
55+
$ dstack apply -f fleet.dstack.yml
5256

5357
Provisioning...
5458
---> 100%
@@ -59,18 +63,15 @@ Provisioning...
5963

6064
</div>
6165

62-
`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.
6667

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).
6869
6970
??? info "Target number of nodes"
7071

7172
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.
7273

73-
<div editor-title=".dstack.yml">
74+
<div editor-title="fleet.dstack.yml">
7475

7576
```yaml
7677
type: fleet

docs/docs/concepts/services.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
Services allow you to deploy models or web apps as secure and scalable endpoints.
44

5+
??? info "Prerequisites"
6+
Before running a service, make sure you’ve [installed](../installation/index.md) the server and CLI, and created a [fleet](fleets.md).
7+
58
## Apply a configuration
69

710
First, define a service configuration as a YAML file in your project folder.

docs/docs/concepts/tasks.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# Tasks
22

3-
A task allows you to run arbitrary commands on one or more nodes.
4-
They are best suited for jobs like training or batch processing.
3+
A task allows you to run arbitrary commands on one or more nodes. They are best suited for jobs like training or batch processing.
4+
5+
??? info "Prerequisites"
6+
Before running a task, make sure you’ve [installed](../installation/index.md) the server and CLI, and created a [fleet](fleets.md).
57

68
## Apply a configuration
79

8-
First, define a task configuration as a YAML file in your project folder.
10+
First, define a task configuration as a YAML file.
911
The filename must end with `.dstack.yml` (e.g. `.dstack.yml` or `dev.dstack.yml` are both acceptable).
1012

1113
[//]: # (TODO: Make tabs - single machine & distributed tasks & web app)

docs/docs/installation/index.md

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@
88

99
### Configure backends
1010

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).
1612

1713
??? info "SSH fleets"
1814
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
7975
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.
8076

8177
!!! info "Server deployment"
82-
For more details on server deployment options, see the
83-
[Server deployment](../guides/server-deployment.md) guide.
78+
For more details on server deployment options, see the [Server deployment](../guides/server-deployment.md) guide.
8479

8580
## Set up the CLI
8681

@@ -206,5 +201,5 @@ This configuration is stored in `~/.dstack/config.yml`.
206201
1. Follow [Quickstart](../quickstart.md)
207202
2. See [Backends](../concepts/backends.md)
208203
3. Check the [server deployment](../guides/server-deployment.md) guide
209-
4. Browse [examples](/examples)
204+
4. Browse [examples](../../examples.md)
210205
5. Join the community via [Discord](https://discord.gg/u8SmfwPpMd)

0 commit comments

Comments
 (0)