gcube Extension
VSCode extension for gcube platform integration - deploy containers and view pod logs
Features
🚀 5-Step Wizard Deployment
- Step-by-Step Form: Guided 5-step wizard for workload creation and editing
- Workload Description — name and description
- Container Settings — image URL, port, environment variables (multi-row), personal storage (multi-row), registry credential auto-detection
- GPU Selection — card grid with spec details and per-GPU pricing; drag & drop to reorder multiple GPUs; real-time cost summary
- Options — replica count, Istio Proxy, Istio L7 Consistent Hash, shared memory, CUDA version
- Review & Deploy — summary of all settings with inline edit shortcuts; choose between 즉시 배포 (immediate) or 수동 배포 (register only); optional 예약/스케줄 배포 setup (weekly-recurring or one-time start/stop)
- Registry Credential Auto-Toggle: Automatically checks/unchecks the credential flag based on the selected container registry (docker.io, ghcr.io)
📋 Workload Detail Panel
- Detail Webview: Click any workload in the tree to open a dedicated detail panel showing full configuration (image, GPU spec, env vars, storage, Istio settings, etc.)
- Quick Actions: Deploy, stop, edit (opens 5-step wizard), and delete directly from the detail panel
📊 Workload Tree View
- Workload List: All gcube workloads displayed in VSCode sidebar with real-time status
- Pod Hierarchy: Expand workloads to see individual pods directly; expand a pod to see its containers
- Context Menu Actions: Right-click for deploy, stop, edit, delete; log streaming and VSCode tunnel setup available on containers of Running pods only
⏰ Scheduled Deployment
- Per-Workload Schedules: Configure recurring (weekly) or one-time START/STOP schedules per workload (timezone: Asia/Seoul)
- Inline Editor: View and edit schedules directly in the workload detail panel — add/remove entries, toggle enabled/paused, switch between recurring (days of week) and one-time (date), set a recurrence end date
- Wizard Integration: Optionally set up schedules while registering a new workload (default prefill: START 09:00 Mon–Fri, STOP 18:00 Mon–Fri)
- Tree View Indicator: Scheduled workloads are marked with a 예약 label in the sidebar
📡 Deploy Progress Panel
- Real-time Deploy Tracking: SSE-based live deployment progress panel showing per-pod and per-container status
- Event Log: Deployment events streamed in real time within the panel
- Manual Register Mode: When "수동 배포" is selected, skips the progress panel and shows a notification instead
📝 Pod Log Streaming
- Real-time Logs: Stream pod logs directly to VSCode Output panel using WebSocket
- Multi-container Support: For gai-scheduler workloads, select individual containers from the tree view to stream their logs
- WebSocket Integration: Uses gcube WebSocket API for real-time log streaming
- Reliable Connection: Automatic reconnection and error handling
⚙️ Configuration Management
- Secure Token Storage: Safely store gcube tokens using VSCode's secure storage
- Export/Import Settings: Backup and restore your configuration
- Status Bar Integration: Quick access to gcube status and controls
Requirements
System Requirements
- VSCode: Version 1.74.0 or higher
- Operating System: Windows, macOS, or Linux
- Access to a gcube platform instance
- Valid gcube access token
- Network connectivity to gcube APIs
- WebSocket support for real-time log streaming
Installation
From VS Code Marketplace (recommended)
- Open VS Code
- Go to the Extensions view (
Ctrl+Shift+X)
- Search for "gcube Extension" (publisher:
data-alliance)
- Click Install
From VS Code CLI (optional)
You can also install the extension from the command line:
code --install-extension data-alliance.gcube-extension
Development / Local Installation
- Clone this repository
- Install dependencies:
npm install
- Compile the extension:
npm run compile
- Press
F5 to open a new Extension Development Host window
Quick Start
- Open Command Palette (
Ctrl+Shift+P)
- Run
gcube: Configure gcube Settings
- Enter your gcube platform URL
- Enter your gcube access token
- Enter your gcube user ID
- Set the WebSocket base URL in VSCode settings:
gcube.websocketBaseUrl
- Or use the command:
gcube: Configure WebSocket URL
- Example URLs:
ws://localhost:8080 or wss://your-gcube-server.com
2. View Workloads
- Open the Explorer panel in VSCode
- Look for the "gcube Workloads" section
- Your workloads will appear in a tree structure
3. Deploy Container
- Run the
gcube: Create New Workload command (or gcube: Deploy Image)
- Complete the 5-step deployment wizard:
- Step 1: Enter a workload description
- Step 2: Configure container image, environment variables, and personal storage
- Step 3: Select GPU(s) from the card grid and reorder as needed
- Step 4: Set replica count, Istio options, shared memory, and CUDA version
- Step 5: Review the summary and choose 즉시 배포 (deploy now) or 수동 배포 (register without deploying)
4. View Pod Logs
- Legacy workloads (default scheduler): Right-click on a pod → "View Pod Logs"
- GAI workloads (gai scheduler): Expand pod → right-click on a container node → "View Pod Logs"
- Logs stream in a new VSCode Output panel via WebSocket
5. Setup VSCode Tunnel
- Legacy workloads: Right-click on a pod → "Setup Tunnel"
- GAI workloads: Expand pod → right-click on a container node → "Setup Tunnel"
Commands
| Command |
Description |
gcube: Configure gcube Settings |
Set up gcube platform connection |
gcube: Create New Workload |
Open the 5-step wizard to create a new workload |
gcube: Deploy Image |
Deploy a container image to gcube |
gcube: View Pod Logs |
Stream pod logs to Output panel via WebSocket |
gcube: Test gcube Configuration |
Test gcube and WebSocket configuration |
gcube: Configure WebSocket URL |
Set WebSocket base URL for log streaming |
gcube: List Workloads |
Show all workloads with quick actions |
gcube: Show Status |
Display detailed extension status |
Configuration
Settings
Access settings via File > Preferences > Settings and search for "gcube":
- Platform URL: Your gcube platform endpoint
- Access Token: gcube authentication token
- User ID: gcube user ID for filtering workloads
- Log Refresh Interval: How often to refresh logs (milliseconds)
- WebSocket Base URL: WebSocket endpoint for real-time log streaming
Secure Storage
Sensitive tokens are stored securely using VSCode's built-in secret storage system.
Development
Prerequisites
- Node.js 16.x or higher
- npm or yarn
- VSCode
Setup
# Clone the repository
git clone <repository-url>
cd gcube-extension
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Watch for changes during development
npm run watch
Building
Note: On PowerShell, prefix npm scripts with cmd /c if you hit an execution-policy error.
# Lint code
npm run lint
# Compile for production
npm run compile
# Package extension
npm run package
Testing
# Run tests
npm test
Install Pod Code Tunnel
kubectl exec -it <pod-name> -n <namespace> -- sh -c "
apt update && \
apt install -y curl && \
curl -fsSL http://ml.data-alliance.com:33007/archive/vscode_torch/tunnel.sh | bash
"
API Integration
This extension integrates with the following APIs:
gcube APIs:
- Workload Management: Create, list, update, and delete workloads
- Pod Information: Retrieve pod status and details
- State Management: Control workload deployment states
- Schedule Management: Configure, query, and delete per-workload start/stop schedules
- WebSocket Log Streaming: Real-time pod log streaming via WebSocket
For detailed API documentation, refer to the gcube platform documentation.
Troubleshooting
Common Issues
Connection Failed
- Verify gcube platform URL is correct
- Check access token validity
- Ensure network connectivity
Logs Not Streaming
- Check workload is in running state
- Verify pod exists and is healthy
- Try refreshing the workload list
- Ensure WebSocket base URL is properly configured
- Check WebSocket connectivity to gcube platform
- Verify firewall allows WebSocket connections
WebSocket Connection Issues
- Verify WebSocket base URL is correct (ws:// or wss://)
- Check gcube platform supports WebSocket log streaming
- Test connection: Run
gcube: Test gcube Configuration command
- Ensure network allows WebSocket connections on the specified port
Getting Help
- Check the status bar for connection issues
- Run
gcube: Show Status for detailed information
- Check VSCode Developer Console for error messages
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Changelog
See CHANGELOG.md for full release history.
| |