Discuss hybrid development environment deployment options for cloud-enabled GDK
Overview
As part of the evaluation of cloud-enabled development environments with GDK (Epic gitlab-org#17447 (closed)), we need to discuss and evaluate different deployment options for running GitLab in development environments, with the flexibility to mix and match services between edit-mode and production-mode configurations.
Deployment Options
The following deployment options have been identified for consideration:
1. Source-based on bare metal (edit-mode) ✍️
- Traditional approach with source code directly on bare metal
- Allows for direct code editing and debugging
- Familiar workflow for current developers
- Full edit-mode capabilities across all services
2. Dockerized (edit-mode) ✍️
- Container-based deployment with development-friendly configuration
- Combines containerization benefits with edit-mode flexibility
-
Known challenges:
- Volume mounting performance issues for file watching
- Debugging complexity with containerized processes
- Port forwarding and networking complications
- Asset compilation and hot-reloading challenges
- IDE integration difficulties
3. Precompiled (production-mode) 🚄
- Uses precompiled assets and production-ready builds
- Faster startup times but less flexible for development
- Production-mode configuration for all services
4. Dockerized (production-mode) 🚄
- Container-based deployment using Docker
- Better isolation and consistency across environments
- Production-mode configuration
- Improved resource management and portability
5. CNG (production-mode) 🚄
- Cloud Native GitLab deployment using Kubernetes
- Helm chart-based deployment
- Production-mode configuration with cloud-native architecture
- Scalable and cloud-ready approach
Hybrid Service Configuration
A key consideration is the ability to mix and match services between edit-mode and production-mode within the same development environment:
Example Hybrid Scenarios:
- Rails application in edit-mode + PostgreSQL/Redis in production-mode containers
- Core GitLab services in edit-mode + Supporting services (Gitaly, Workhorse) in production-mode
Benefits of Hybrid Approach:
- Improve stability of and optimize performance for services that don't need frequent changes
- Maintain edit-mode flexibility for actively developed components
- Reduce resource usage by running stable services in production-mode
- Enable gradual migration between deployment strategies
Discussion Points
Performance & Resource Usage (#3056 (closed))
- How do these options compare in terms of startup time, memory usage, and CPU consumption?
- What are the performance implications of hybrid configurations?
Developer Experience
- Which combinations provide the best balance of productivity and ease of use?
- How do debugging workflows differ across these options?
- What are the learning curves for each approach?
Technical Challenges
-
Dockerized (edit-mode) specific issues:
- File system performance with volume mounts
- Hot-reloading and asset compilation reliability
- Container networking and service discovery
- Development tool integration (debuggers, profilers)
-
Hybrid configuration complexity:
- Service communication between different deployment modes
- Configuration management across mixed environments
- Dependency resolution and version compatibility
Maintenance & Operations
- What are the ongoing maintenance requirements for each approach?
- How do we handle updates and dependency management?
- What tooling is needed to support hybrid configurations?
Production Parity
- How closely does each option mirror our production environment?
- What are the trade-offs between development convenience and production similarity?
GDK Services Deployment Feasibility Matrix
Feasibility matrix based on analysis of the current GDK codebase and service configurations:
| Service | Edit Likelihood | Source-based (edit-mode) | Dockerized (edit-mode) | Precompiled (production-mode) | Dockerized (production-mode) | CNG (production-mode) | Notes |
|---|---|---|---|---|---|---|---|
| Rails Web |
|
|
|
|
|
|
Edit-mode Docker has volume mounting performance issues |
| GitLab Workhorse |
|
|
|
|
|
|
Go binary, minimal edit requirements |
| Webpack |
|
|
|
|
|
|
Third-party build tool, only config changes. Docker volume issues affect performance |
| Vite |
|
|
|
|
|
|
Third-party build tool, only config changes. HMR problematic in containers |
| Gitaly |
|
|
|
|
|
|
Go service, socket communication may need adjustment |
| Praefect |
|
|
|
|
|
|
Git proxy service, similar to Gitaly |
| GitLab Shell |
|
|
|
|
|
|
SSH access may require special container setup |
| GitLab AI Gateway |
|
|
|
|
|
|
Python/Go service, newer component |
| Duo Workflow Service |
|
|
|
|
|
|
AI workflow orchestration, newer component |
| GitLab Pages |
|
|
|
|
|
|
Static site serving |
| Container Registry |
|
|
|
|
|
|
Docker registry service |
| GitLab Runner |
|
|
|
|
|
|
CI/CD executor |
| Third-party dependencies | |||||||
| PostgreSQL |
|
n/a |
|
|
|
|
Database operations work well in all modes |
| Redis |
|
n/a |
|
|
|
|
In-memory store, no file watching needed |
| Prometheus |
|
n/a |
|
|
|
|
Metrics collection |
| Grafana |
|
n/a |
|
|
|
|
Metrics visualization |
| SSHD |
|
n/a |
|
|
|
|
SSH daemon needs privileged container access |
| Nginx |
|
n/a |
|
|
|
|
Reverse proxy, configuration-driven |
Legend:
-
✅ High: Excellent feasibility, minimal issues expected -
⚠️ Medium: Feasible with some challenges or limitations -
❌ Low: Significant challenges, not recommended
Edit Likelihood:
-
🔥 Very High: Core application code, frequently modified during development -
🔶 High: GitLab services actively developed and maintained by GitLab teams -
🟡 Medium: GitLab services with moderate development activity -
🟢 Low: Configuration changes only, source rarely modified -
⚪ Never: Third-party dependencies, never edited during GitLab development
Key Insights:
Optimal Hybrid Strategy by Edit Likelihood:
-
Very High Edit (
🔥 ): Keep in edit-mode for maximum development flexibility -
High Edit (
🔶 ): Edit-mode preferred when actively developing, production-mode acceptable otherwise -
Medium Edit (
🟡 ): Production-mode containers recommended, edit-mode when actively developing -
Never Edit (
⚪ ): Strong candidates for production-mode containers or CNG deployment
Dockerized edit-mode is not recommended (
Conclusion
After interviewing @andrewn, we gained consensus on a hybrid approach that prioritizes developer productivity over using CNG or Kubernetes for development.
Dockerized edit-mode is not recommended due to unresolved Developer Experience issues.
For now, we strongly recommend source-based development for edit-mode services and containerization for use-only services.
Using other approaches (Dockerized edit-mode or CNG) will still be possible after resolving their outstanding issues.
Next: Modularize services and start isolating them.