-
Notifications
You must be signed in to change notification settings - Fork 217
Add Exports concept page and CLI reference #3659
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+230
−2
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
1ba14ff
Add Exports concept page and CLI reference
2bce3eb
Update docs/docs/concepts/exports.md
peterschmidt85 4dc9341
Update docs/docs/concepts/exports.md
peterschmidt85 868fef4
Add tenant isolation section to Fleets and Exports docs
3a87188
Update tenant isolation wording per review feedback
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,143 @@ | ||
| --- | ||
| title: Exports | ||
| description: Exporting resources across projects | ||
| --- | ||
|
|
||
| # Exports | ||
|
|
||
| Exports allow making resources from one project available to other projects. When a project exports a resource, | ||
| the specified importer projects can see and use it as if it were their own. | ||
|
|
||
| !!! warning "Experimental" | ||
| Exports are an experimental feature. | ||
| Currently, only [SSH fleets](fleets.md#ssh-fleets) can be exported. | ||
|
|
||
| An export is created in the exporter project and specifies the resources to export and the | ||
| importer projects that will gain access to them. | ||
|
|
||
| Once an export is created, the importer projects can see the exported resources in their resource lists and use them | ||
| for running tasks, dev environments, and services. Imported resources appear with a project prefix | ||
| (e.g., `team-a/my-fleet`) to distinguish them from the project's own resources. | ||
|
|
||
| !!! info "Required project role" | ||
| The user creating or updating an export must have the project admin role on both the exporter project and | ||
| any importer project they add. Alternatively, a global admin can add any project as an importer. | ||
|
|
||
| ## Manage exports | ||
|
|
||
| ### Create exports | ||
|
|
||
| Use the `dstack export create` command to create a new export. Specify the fleets to export | ||
| with `--fleet` and the importer projects with `--importer`: | ||
|
|
||
| <div class="termy"> | ||
|
|
||
| ```shell | ||
| $ dstack export create my-export --fleet my-fleet --importer team-b | ||
| NAME FLEETS IMPORTERS | ||
| my-export my-fleet team-b | ||
|
|
||
| ``` | ||
|
|
||
| </div> | ||
|
|
||
| Both `--fleet` and `--importer` can be specified multiple times: | ||
|
|
||
| <div class="termy"> | ||
|
|
||
| ```shell | ||
| $ dstack export create shared-gpus --fleet gpu-fleet-1 --fleet gpu-fleet-2 --importer team-b --importer team-c | ||
| NAME FLEETS IMPORTERS | ||
| shared-gpus gpu-fleet-1, gpu-fleet-2 team-b, team-c | ||
|
|
||
| ``` | ||
|
|
||
| </div> | ||
|
|
||
| ### List exports | ||
|
|
||
| Use `dstack export list` (or simply `dstack export`) to list all exports in the project: | ||
|
|
||
| <div class="termy"> | ||
|
|
||
| ```shell | ||
| $ dstack export list | ||
| NAME FLEETS IMPORTERS | ||
| my-export my-fleet team-b | ||
| shared-gpus gpu-fleet-1, gpu-fleet-2 team-b, team-c | ||
|
|
||
| ``` | ||
|
|
||
| </div> | ||
|
|
||
| ### Update exports | ||
|
|
||
| Use the `dstack export update` command to add or remove fleets and importers from an existing export: | ||
|
|
||
| <div class="termy"> | ||
|
|
||
| ```shell | ||
| $ dstack export update my-export --add-fleet another-fleet --add-importer team-c | ||
| NAME FLEETS IMPORTERS | ||
| my-export my-fleet, another-fleet team-b, team-c | ||
|
|
||
| ``` | ||
|
|
||
| </div> | ||
|
|
||
| To remove a fleet or importer: | ||
|
|
||
| <div class="termy"> | ||
|
|
||
| ```shell | ||
| $ dstack export update my-export --remove-importer team-b | ||
| NAME FLEETS IMPORTERS | ||
| my-export my-fleet, another-fleet team-c | ||
|
|
||
| ``` | ||
|
|
||
| </div> | ||
|
|
||
| ### Delete exports | ||
|
|
||
| Use the `dstack export delete` command to delete an export. This revokes access for all importer projects: | ||
|
|
||
| <div class="termy"> | ||
|
|
||
| ```shell | ||
| $ dstack export delete my-export | ||
| Delete the export my-export? [y/n]: y | ||
| Export my-export deleted | ||
| ``` | ||
|
|
||
| </div> | ||
|
|
||
| Use `-y` to skip the confirmation prompt. | ||
|
|
||
| ## Access imported fleets | ||
|
|
||
| From the importer project's perspective, exported fleets appear automatically in `dstack fleet list` | ||
| with a `<project>/<fleet>` prefix: | ||
|
|
||
| <div class="termy"> | ||
|
|
||
| ```shell | ||
| $ dstack fleet list | ||
| NAME NODES GPU SPOT BACKEND PRICE STATUS CREATED | ||
| my-local-fleet 1 - - ssh - active 3 days ago | ||
| team-a/my-fleet 2 A100:80GB:8 - ssh - active 1 week ago | ||
| team-a/another-fleet 1 H100:80GB:4 - ssh - active 2 days ago | ||
|
|
||
| ``` | ||
|
|
||
| </div> | ||
|
|
||
| Imported fleets can be used for runs just like the project's own fleets. | ||
|
|
||
| !!! info "Tenant isolation" | ||
| Exported fleets share the same access model as regular fleets. See [Tenant isolation](fleets.md#tenant-isolation) for details. | ||
|
|
||
| !!! info "What's next?" | ||
| 1. Check the [`dstack export` CLI reference](../reference/cli/dstack/export.md) | ||
| 2. Learn how to manage [fleets](fleets.md) | ||
| 3. Read about [projects](projects.md) and project roles |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| # dstack export | ||
|
|
||
| The `dstack export` commands manage [exports](../../../concepts/exports.md) of resources to other projects. | ||
|
|
||
| ## dstack export list | ||
|
|
||
| The `dstack export list` command lists all exports in the project. | ||
|
|
||
| ##### Usage | ||
|
|
||
| <div class="termy"> | ||
|
|
||
| ```shell | ||
| $ dstack export list --help | ||
| #GENERATE# | ||
| ``` | ||
|
|
||
| </div> | ||
|
|
||
| ## dstack export create | ||
|
|
||
| The `dstack export create` command creates a new export. | ||
|
|
||
| ##### Usage | ||
|
|
||
| <div class="termy"> | ||
|
|
||
| ```shell | ||
| $ dstack export create --help | ||
| #GENERATE# | ||
| ``` | ||
|
|
||
| </div> | ||
|
|
||
| ## dstack export update | ||
|
|
||
| The `dstack export update` command updates an existing export. | ||
|
|
||
| ##### Usage | ||
|
|
||
| <div class="termy"> | ||
|
|
||
| ```shell | ||
| $ dstack export update --help | ||
| #GENERATE# | ||
| ``` | ||
|
|
||
| </div> | ||
|
|
||
| ## dstack export delete | ||
|
|
||
| The `dstack export delete` command deletes the specified export. | ||
|
|
||
| ##### Usage | ||
|
|
||
| <div class="termy"> | ||
|
|
||
| ```shell | ||
| $ dstack export delete --help | ||
| #GENERATE# | ||
| ``` | ||
|
|
||
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.