Support adding instances with `dstack apply`
The proposal is to allow adding instances to pools via dstack apply as a replacement for dstack pool add and dstack pool add-ssh. The instance configurations could look like:
type: instance
name:
pool:
resources:
retry:
spot_policy:
max_price:
termination_policy:
termination_idle_time:
profile:
...other profile params
type: ssh-instance
name:
pool:
ssh_key_path:
region:
port:
user:
network:
The implementation will probably require refactoring to make use of instance configurations.
type: instance or cluster? :)
I'd start with instance since it's what dstack pool currently works with. We can discuss how dstack supposed to work with clusters in a separate issue: we could expand instance configuration to be able to provision multiple cluster nodes (may be as simple as specifying nodes: 8) or introducing a separate cluster configuration.
I wouldn't rush and at least discuss this before implementing.
The description is updated to use fleet configuration type.