How to Use an Existing Public IP and Subnet for Ray Cluster on Azure

Hi everyone,

I’m setting up a Ray cluster on Azure, and I want to use an existing subnet, virtual network, and public IP instead of letting Ray create new ones.

Here’s what I’ve done so far in my YAML configuration:

yaml

CopyEdit

provider:
    type: azure
    location: Central India
    resource_group: BCS_Dev_RG
    subscription_id: <MY_SUBSCRIPTION_ID>

available_node_types:
    ray.head.default:
        node_config:
            azure_arm_parameters:
                vmName: ray-head-node  
                adminUsername: bcstest  
                publicKey: ~/.ssh/id_rsa.pub  
                imagePublisher: microsoft-dsvm  
                imageOffer: ubuntu-1804  
                imageSku: 1804-gen2  
                imageVersion: latest  
                vmSize: Standard_D2s_v3  
                provisionPublicIp: true  
                subnet: Ray_Sub01  # Using existing subnet

Issue:
Despite specifying provisionPublicIp: true and an existing subnet, Ray still creates a new public IP instead of attaching the existing one (e.g., ray_PubIP).

Questions:

  1. How can I ensure Ray uses an existing Public IP instead of creating a new one?
  2. Is there a way to explicitly define the virtual network and associate the head node with a pre-provisioned IP?
  3. Are there any limitations in Ray’s Azure provider that prevent attaching pre-existing network resources?

Any guidance would be really helpful! :rocket:

Thanks in advance! :blush:
@gramhagen