Skip to content

Commit

Permalink
[Docs] Add CloudWatch Logs instruction (#1606)
Browse files Browse the repository at this point in the history
Co-authored-by: peterschmidt85 <andrey.cheptsov@gmail.com>
  • Loading branch information
un-def and peterschmidt85 authored Aug 22, 2024
1 parent 8737b4d commit 3a32226
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
16 changes: 9 additions & 7 deletions docs/docs/installation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Follow the steps below to set up the server.
If you want the `dstack` server to run containers or manage clusters in your cloud accounts (or use Kubernetes),
create the [`~/.dstack/server/config.yml`](../reference/server/config.yml.md) file and configure backends.

### 2. Start the server
### 3. Start the server

Once the `~/.dstack/server/config.yml` file is configured, proceed to start the server:

Expand Down Expand Up @@ -55,13 +55,15 @@ Once the `~/.dstack/server/config.yml` file is configured, proceed to start the

> For more details on how to deploy `dstack` using Docker, check its [Docker repo](https://hub.docker.com/r/dstackai/dstack).

By default, the `dstack` server stores its state in `~/.dstack/server/data` using SQLite.
To use a database, set the [`DSTACK_DATABASE_URL`](../reference/cli/index.md#environment-variables) environment variable.
By default, the `dstack` server stores its state in `~/.dstack/server/data` using SQLite,
while run logs are stored in `~/.dstack/server/projects/<project name>/logs`.
To store the state in a database, set the [`DSTACK_DATABASE_URL`](../reference/cli/index.md#environment-variables) environment variable.
To store the logs in AWS CloudWatch, set the [`SERVER_CLOUDWATCH_LOG_GROUP`](../reference/cli/index.md#environment-variables) environment variable.

The `dstack` server can run anywhere: on your laptop, a dedicated server, or in the cloud. Once it's up, you
can use either the CLI or the API.

### 3. Set up the CLI
### 4. Set up the CLI

To point the CLI to the `dstack` server, configure it
with the server address, user token, and project name:
Expand All @@ -81,8 +83,8 @@ Configuration is updated at ~/.dstack/config.yml

This configuration is stored in `~/.dstack/config.yml`.

### 4. Create on-prem fleets
### 5. Create on-prem fleets

If you want the `dstack` server to run containers on your on-prem servers,
use [fleets](../fleets.md#__tabbed_1_2).

Expand All @@ -95,4 +97,4 @@ use [fleets](../fleets.md#__tabbed_1_2).

!!! info "dstack Sky"
If you don't want to host the `dstack` server or would like to access GPU from the `dstack` marketplace,
check [dstack Sky](../guides/dstack-sky.md).
check [dstack Sky](../guides/dstack-sky.md).
2 changes: 2 additions & 0 deletions docs/docs/reference/cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,8 @@ $ dstack pool delete --help
* `DSTACK_SERVER_PORT` – (Optional) Has the same effect as `--port`. Defaults to `3000`.
* `DSTACK_SERVER_ADMIN_TOKEN` – (Optional) Has the same effect as `--token`. Defaults to `None`.
* `DSTACK_DATABASE_URL` – (Optional) The database URL to use instead of default SQLite. Currently `dstack` supports Postgres. Example: `postgresql+asyncpg://myuser:mypassword@localhost:5432/mydatabase`. Defaults to `None`.
* `SERVER_CLOUDWATCH_LOG_GROUP` – (Optional) The CloudWatch Logs group for workloads logs. If not set, the default file-based log storage is used.
* `SERVER_CLOUDWATCH_LOG_REGION` — (Optional) The CloudWatch Logs region. Defaults to `None`.
* `DSTACK_SERVER_DIR` – (Optional) Sets path to store data and server configs. Defaults to `~/.dstack/server`.

??? info "Internal environment variables"
Expand Down

0 comments on commit 3a32226

Please sign in to comment.