diff --git a/modules/ray-dashboard/.DS_Store b/modules/ray-dashboard/.DS_Store new file mode 100644 index 000000000..2dcf930e7 Binary files /dev/null and b/modules/ray-dashboard/.DS_Store differ diff --git a/modules/ray-dashboard/coder/.DS_Store b/modules/ray-dashboard/coder/.DS_Store new file mode 100644 index 000000000..5008ddfcf Binary files /dev/null and b/modules/ray-dashboard/coder/.DS_Store differ diff --git a/modules/ray-dashboard/coder/README.md b/modules/ray-dashboard/coder/README.md new file mode 100644 index 000000000..d9991dca3 --- /dev/null +++ b/modules/ray-dashboard/coder/README.md @@ -0,0 +1,24 @@ +# Ray Coder Module + +This Coder module provides easy integration of Ray.io distributed computing framework into your Coder workspaces. It automatically sets up Ray with a dashboard interface and creates a dedicated Python virtual environment. + +## Features + +- 🚀 **Ray Dashboard**: Web-based interface for monitoring Ray clusters +- 🐍 **Python Virtual Environment**: Isolated environment with Ray and dependencies +- 📊 **Jupyter Integration**: Optional Jupyter kernel with Ray support +- ⚙️ **Customizable**: Configurable Ray extras, packages, and settings +- 🔧 **Auto-setup**: Automatic Ray installation and dashboard startup + +## Usage + +### Basic Usage + +```hcl +module "ray" { + source = "registry.coder.com/modules/ray-dashboard/coder" + version = "1.0.0" + agent_id = coder_agent.main.id +} + +``` diff --git a/modules/ray-dashboard/coder/main.tf b/modules/ray-dashboard/coder/main.tf new file mode 100644 index 000000000..51ca02ae2 --- /dev/null +++ b/modules/ray-dashboard/coder/main.tf @@ -0,0 +1,15 @@ +resource "coder_app" "ray-dashboard" { + agent_id = var.agent_id + slug = var.slug + display_name = var.display_name + icon = var.icon + url = "http://localhost:${var.port}" + subdomain = var.subdomain + share = var.share + + healthcheck { + url = "http://localhost:${var.port}" + interval = var.healthcheck_interval + threshold = var.healthcheck_threshold + } +} diff --git a/modules/ray-dashboard/coder/metadata.json b/modules/ray-dashboard/coder/metadata.json new file mode 100644 index 000000000..6ac2f1c25 --- /dev/null +++ b/modules/ray-dashboard/coder/metadata.json @@ -0,0 +1,21 @@ +{ + "display_name": "Ray.io", + "description": "Adds Ray distributed computing framework with dashboard integration to Coder workspaces", + "icon_url": "https://raw.githubusercontent.com/ray-project/ray/master/doc/source/images/ray_logo.png", + "maintainer": { + "name": "Ray Coder Module Contributors", + "email": "", + "url": "" + }, + "tags": [ + "ray", + "distributed-computing", + "machine-learning", + "python", + "jupyter", + "dashboard" + ], + "readme_url": "README.md", + "url": "", + "verified": false +} diff --git a/modules/ray-dashboard/coder/metadata.yaml b/modules/ray-dashboard/coder/metadata.yaml new file mode 100644 index 000000000..485957cb1 --- /dev/null +++ b/modules/ray-dashboard/coder/metadata.yaml @@ -0,0 +1,11 @@ +display_name: "Ray.io" +description: "Ray.io is a fast and simple framework for building and running distributed applications. This integration provides a dashboard for monitoring and managing Ray clusters within Coder workspaces." +icon_url: "https://raw.githubusercontent.com/ray-project/ray/master/doc/source/images/ray_logo.png" +maintainers: + - github: "michaelvp411" + name: "Michael Vincent Patterson" +tags: + - "ray" + - "dashboard" + - "distributed-computing" +verified: false diff --git a/modules/ray-dashboard/coder/outputs.tf b/modules/ray-dashboard/coder/outputs.tf new file mode 100644 index 000000000..3ff09e5f0 --- /dev/null +++ b/modules/ray-dashboard/coder/outputs.tf @@ -0,0 +1,14 @@ +output "ray_dashboard_url" { + description = "The URL for accessing the Ray Dashboard" + value = coder_app.ray-dashboard.url +} + +output "ray_dashboard_app_id" { + description = "The ID of the Ray Dashboard app resource" + value = coder_app.ray-dashboard.id +} + +output "ray_port" { + description = "The port number used by Ray Dashboard" + value = var.port +} diff --git a/modules/ray-dashboard/coder/variables.tf b/modules/ray-dashboard/coder/variables.tf new file mode 100644 index 000000000..dcefc11df --- /dev/null +++ b/modules/ray-dashboard/coder/variables.tf @@ -0,0 +1,52 @@ +variable "agent_id" { + description = "The ID of the Coder agent to install Ray on" + type = string +} + +variable "slug" { + description = "The slug for the Ray Dashboard app" + type = string + default = "ray-dashboard" +} + +variable "display_name" { + description = "The display name for the Ray Dashboard app" + type = string + default = "Ray Dashboard" +} + +variable "icon" { + description = "The icon URL for the Ray Dashboard app" + type = string + default = "https://raw.githubusercontent.com/ray-project/ray/master/doc/source/images/ray_logo.png" +} + +variable "port" { + description = "The port number for the Ray Dashboard" + type = number + default = 8265 +} + +variable "subdomain" { + description = "Whether to use a subdomain for the Ray Dashboard" + type = bool + default = true +} + +variable "share" { + description = "The sharing level for the Ray Dashboard app" + type = string + default = "owner" +} + +variable "healthcheck_interval" { + description = "Health check interval in seconds" + type = number + default = 5 +} + +variable "healthcheck_threshold" { + description = "Health check threshold" + type = number + default = 10 +} diff --git a/modules/ray-dashboard/coder/versions.tf b/modules/ray-dashboard/coder/versions.tf new file mode 100644 index 000000000..55a15808d --- /dev/null +++ b/modules/ray-dashboard/coder/versions.tf @@ -0,0 +1,11 @@ +terraform { + required_version = ">= 1.0" + + required_providers { + coder = { + source = "coder/coder" + version = ">= 0.21.0" + } + } +} + diff --git a/modules/ray-dashboard/coder/versions.yaml b/modules/ray-dashboard/coder/versions.yaml new file mode 100644 index 000000000..bfe83a592 --- /dev/null +++ b/modules/ray-dashboard/coder/versions.yaml @@ -0,0 +1,3 @@ +versions: + - ref: "v1.0.0" + published_at: "2025-09-18"