Skip to content

Allow specifying internal IPs for SSH fleet instances #2052

@r4victor

Description

@r4victor

Currently, dstack automatically detects internal IPs of SSH fleet instances to use for communication between hosts, i.e. the IPs are exposed to runs via env variables like DSTACK_MASTER_NODE_IP. The detection mechanism chooses an IP from the first internal subnet. The network fleet parameter can be specified to choose IPs from a particular subnet. If subnets are not overlapping, it may not be possible to automatically detect IPs or select them from network. For such setups, users should be able to specify internal IPs per host:

type: fleet
name: my-ssh-fleet
ssh_config:
  user: ubuntu
  identity_file: ~/.ssh/dstack/key.pem
  hosts:
    - hostname: "3.79.203.200"
      internal_ip: "172.17.0.1"
    - hostname: "18.184.67.100"
      internal_ip: "172.17.0.2"

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions