Skip to content

Commit da16b5a

Browse files
committed
[memory-bank] Document ide-proxy, ide and ws-manager-bridge
Tool: gitpod/catfood.gitpod.cloud
1 parent fcb89d4 commit da16b5a

File tree

5 files changed

+422
-2
lines changed

5 files changed

+422
-2
lines changed

memory-bank/activeContext.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ Key areas of focus include:
3131
- gitpod-cli: Command-line interface for interacting with Gitpod workspaces
3232
- gitpod-db: Database layer for the Gitpod platform
3333
- gitpod-protocol: Core type definitions and shared protocol library
34+
- ide: Packages and manages IDEs available in Gitpod workspaces
35+
- ide-proxy: Serves static IDE-related assets and proxies requests
36+
- ws-manager-bridge: Bridges between workspace managers and the rest of the platform
3437

3538
As work progresses, this section will continue to be updated to reflect:
3639
- Additional component documentation
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
# IDE Proxy Component
2+
3+
## Overview
4+
5+
The IDE Proxy is a lightweight component in Gitpod that serves static assets related to IDEs, including IDE logos, binaries, and configuration files. It acts as a centralized service for delivering IDE-related static content to other components of the Gitpod platform, particularly the dashboard and workspaces.
6+
7+
## Purpose
8+
9+
The primary purposes of the IDE Proxy component are:
10+
- Serve static IDE-related assets (logos, icons, etc.)
11+
- Provide a centralized location for IDE binaries and downloads
12+
- Serve the Gitpod Local Companion application binaries
13+
- Proxy requests to the blobserve component for IDE-related content
14+
- Provide metrics endpoints for IDE usage
15+
- Implement proper caching and security headers for static content
16+
- Serve VS Code marketplace extension information
17+
18+
## Architecture
19+
20+
The IDE Proxy is built on Caddy, a modern web server with automatic HTTPS capabilities. It consists of several key components:
21+
22+
1. **Static File Server**: Serves static files like IDE logos and binaries
23+
2. **Proxy Rules**: Routes specific requests to other services like blobserve
24+
3. **Security Headers**: Implements security policies for served content
25+
4. **Caching Configuration**: Optimizes content delivery with appropriate caching
26+
5. **Health Checks**: Provides endpoints for monitoring system health
27+
28+
## Key Files and Structure
29+
30+
- `Dockerfile`: Builds the IDE Proxy container image
31+
- `conf/Caddyfile`: Main configuration file for the Caddy server
32+
- `static/image/ide-logo/`: Contains SVG logos for various IDEs
33+
- `static/bin/`: Contains binaries for Gitpod Local Companion (added during build)
34+
- `static/code/`: Contains VS Code marketplace information (added during build)
35+
36+
## Static Assets
37+
38+
### IDE Logos
39+
The component serves SVG logos for various IDEs:
40+
- VS Code (standard and Insiders)
41+
- JetBrains IDEs:
42+
- IntelliJ IDEA
43+
- GoLand
44+
- PyCharm
45+
- PhpStorm
46+
- RubyMine
47+
- WebStorm
48+
- Rider
49+
- CLion
50+
- RustRover
51+
- Terminal
52+
53+
### Binaries
54+
The component serves binaries for:
55+
- Gitpod Local Companion for various platforms:
56+
- Linux (x86_64)
57+
- macOS (x86_64)
58+
- Windows (x86_64)
59+
60+
## Routing Rules
61+
62+
The IDE Proxy implements several routing rules:
63+
64+
1. **Static Content**: Serves files from the `/www` directory with appropriate headers
65+
2. **Blobserve Proxy**: Routes `/blobserve/*` requests to the blobserve service
66+
3. **Binary Assets**: Serves binary files with appropriate content-type and disposition headers
67+
4. **Metrics**: Routes metrics-related requests to the ide-metrics service
68+
5. **Health Checks**: Provides `/live` and `/ready` endpoints for health monitoring
69+
70+
## Configuration
71+
72+
The IDE Proxy is configured through the Caddyfile, which includes:
73+
74+
### Security Headers
75+
- HTTP Strict Transport Security (HSTS)
76+
- Content-Type Options
77+
- Content Security Policy
78+
- Referrer Policy
79+
- XSS Protection
80+
81+
### Caching Configuration
82+
- Long-term caching for static assets (1 year)
83+
- Short-term caching for binary assets (10 minutes)
84+
85+
### Compression
86+
- Supports gzip and zstd compression for efficient content delivery
87+
88+
## Dependencies
89+
90+
### Internal Dependencies
91+
- `blobserve`: For serving IDE-related blob content
92+
- `ide-metrics`: For metrics collection
93+
- `local-app`: For Gitpod Local Companion binaries
94+
95+
### External Dependencies
96+
- Caddy web server
97+
- OpenVSX marketplace data
98+
99+
## Integration Points
100+
101+
The IDE Proxy integrates with:
102+
1. **Dashboard**: Provides IDE logos and information for the UI
103+
2. **Blobserve**: Proxies requests to blobserve for IDE content
104+
3. **IDE Metrics**: Routes metrics requests to the metrics service
105+
4. **Local App**: Serves the Gitpod Local Companion binaries
106+
107+
## Security Considerations
108+
109+
- Implements comprehensive security headers
110+
- Ensures proper content-type for binary downloads
111+
- Configures appropriate CORS headers for cross-origin requests
112+
- Removes server identification headers
113+
114+
## Common Usage Patterns
115+
116+
The IDE Proxy is typically used to:
117+
1. Serve IDE logos for the dashboard UI
118+
2. Provide downloadable binaries for Gitpod Local Companion
119+
3. Proxy requests to blobserve for IDE-related content
120+
4. Serve VS Code marketplace extension information
121+
5. Collect and expose IDE usage metrics
122+
123+
## Related Components
124+
125+
- **IDE**: Provides the IDE binaries and assets
126+
- **IDE Service**: Resolves IDE requirements
127+
- **Blobserve**: Serves blob content that may be proxied through IDE Proxy
128+
- **Dashboard**: Consumes IDE logos and information
129+
- **IDE Metrics**: Collects and processes IDE usage metrics

memory-bank/components/ide.md

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
# IDE Component
2+
3+
## Overview
4+
5+
The IDE component in Gitpod is responsible for packaging and managing the various Integrated Development Environments (IDEs) that are available to users within Gitpod workspaces. It includes support for VS Code (both web and desktop versions) and JetBrains IDEs, providing the necessary files, configurations, and integration points for these IDEs to work seamlessly within the Gitpod environment.
6+
7+
## Purpose
8+
9+
The primary purposes of the IDE component are:
10+
- Package and distribute IDE binaries for use in Gitpod workspaces
11+
- Configure IDEs to work within the Gitpod environment
12+
- Provide integration between IDEs and the Gitpod platform
13+
- Support multiple IDE types (VS Code, JetBrains)
14+
- Enable both web-based and desktop IDE experiences
15+
- Manage IDE versions and updates
16+
- Provide IDE-specific extensions and plugins
17+
18+
## Architecture
19+
20+
The IDE component is organized into several sub-components, each responsible for a specific IDE or IDE family:
21+
22+
1. **Code**: Packages VS Code (OpenVSCode Server) for web-based usage
23+
2. **Code-Desktop**: Packages VS Code for desktop usage
24+
3. **JetBrains**: Packages various JetBrains IDEs (IntelliJ, GoLand, PyCharm, etc.)
25+
4. **Xterm**: Provides terminal functionality
26+
27+
Each IDE sub-component typically includes:
28+
- Dockerfiles for building IDE images
29+
- Configuration files for IDE integration
30+
- Scripts for downloading and setting up IDE binaries
31+
- Plugins or extensions for Gitpod integration
32+
33+
## Key Files and Structure
34+
35+
### VS Code (Code)
36+
- `code/BUILD.yaml`: Build configuration for VS Code
37+
- `code/leeway.Dockerfile`: Dockerfile for building VS Code image
38+
- `code/codehelper/`: Helper utilities for VS Code
39+
- `code/gitpod-web-extension/`: Gitpod-specific VS Code extension
40+
41+
### JetBrains
42+
- `jetbrains/image/`: JetBrains IDE image building
43+
- `jetbrains/image/BUILD.js`: Build script for JetBrains IDE images
44+
- `jetbrains/image/leeway.Dockerfile`: Dockerfile for JetBrains IDE images
45+
- `jetbrains/image/supervisor-ide-config_*.json`: IDE-specific configuration files
46+
- `jetbrains/backend-plugin/`: Backend plugin for JetBrains IDEs
47+
- `jetbrains/gateway-plugin/`: Gateway plugin for JetBrains remote development
48+
- `jetbrains/launcher/`: Launcher for JetBrains IDEs
49+
- `jetbrains/cli/`: Command-line interface for JetBrains IDEs
50+
51+
## Supported IDEs
52+
53+
### VS Code
54+
- Web-based VS Code (OpenVSCode Server)
55+
- Desktop VS Code
56+
57+
### JetBrains
58+
- IntelliJ IDEA
59+
- GoLand
60+
- PyCharm
61+
- PhpStorm
62+
- RubyMine
63+
- WebStorm
64+
- Rider
65+
- CLion
66+
- RustRover
67+
68+
Each JetBrains IDE is available in two versions:
69+
- Stable: Regular release version
70+
- Latest: Latest EAP (Early Access Program) or RC (Release Candidate) version
71+
72+
## Build Process
73+
74+
### VS Code
75+
1. Clones the OpenVSCode Server repository
76+
2. Builds the web and desktop versions
77+
3. Packages the built binaries into a Docker image
78+
4. Configures the image for use with Gitpod
79+
80+
### JetBrains
81+
1. Downloads the specified JetBrains IDE binary
82+
2. Creates a Docker image with the IDE binary
83+
3. Configures the IDE for use with Gitpod
84+
4. Sets up the necessary plugins and extensions
85+
86+
## Integration Points
87+
88+
The IDE component integrates with:
89+
1. **Supervisor**: For launching and managing IDEs within workspaces
90+
2. **Workspace**: For accessing workspace content
91+
3. **IDE Service**: For resolving IDE requirements
92+
4. **Blobserve**: For serving static IDE assets
93+
5. **Registry Facade**: For providing IDE images
94+
95+
## Configuration
96+
97+
Each IDE has specific configuration requirements:
98+
99+
### VS Code
100+
- Extensions to be pre-installed
101+
- Web configuration for browser-based usage
102+
- Desktop configuration for desktop usage
103+
104+
### JetBrains
105+
- IDE-specific configuration files
106+
- Backend plugin configuration
107+
- Gateway plugin configuration
108+
- CLI configuration
109+
110+
## Dependencies
111+
112+
### Internal Dependencies
113+
- `supervisor`: For IDE lifecycle management
114+
- `ide-service`: For IDE resolution
115+
- `blobserve`: For serving static assets
116+
- `registry-facade`: For image management
117+
118+
### External Dependencies
119+
- VS Code (OpenVSCode Server) source code
120+
- JetBrains IDE binaries
121+
- Various build tools (Node.js, npm, etc.)
122+
123+
## Common Usage Patterns
124+
125+
The IDE component is typically used to:
126+
1. Build and package IDE images for use in Gitpod workspaces
127+
2. Configure IDEs for optimal use within Gitpod
128+
3. Provide integration between IDEs and the Gitpod platform
129+
4. Support both web-based and desktop IDE experiences
130+
5. Manage IDE versions and updates
131+
132+
## Related Components
133+
134+
- **IDE Service**: Resolves IDE requirements and manages IDE configurations
135+
- **IDE Proxy**: Proxies requests to IDEs
136+
- **Supervisor**: Manages IDE lifecycle within workspaces
137+
- **Blobserve**: Serves static IDE assets
138+
- **Registry Facade**: Provides IDE images

0 commit comments

Comments
 (0)