dstack icon indicating copy to clipboard operation
dstack copied to clipboard

Implement `dstack apply` command for creating and updating gateways

Open r4victor opened this issue 9 months ago • 0 comments

Currently, dstack gateways can be created and updated only via CLI arguments. As gateway configuration becomes more complex (e.g. #1171), we need a better interface to configure all the gateway parameters. The proposal is to allow users configure gateway via yaml similar to run configurations, e.g.:

type: gateway
name: my-gateway
backend: aws
region: eu-west-1
domain: '*.example.com'

To create/update gateways via yaml configuration, we introduce dstack apply command. Potentially, this command can be used to create all types of dstack resources using declarative approach. For gateways specifically, dstack apply will create a new gateway if the gateway name is not specified. If the name is specified, it will try to update the gateway if possible (e.g. domain changed) or suggest to re-create the gateway (e.g. backend changed).

r4victor avatar May 14 '24 10:05 r4victor