A powerful framework for building and managing development environment containers with consistent, reproducible workflows across teams and platforms.
- Containers Development Space (CDS)
Containers Development Space (CDS) is a Go-based framework designed to streamline the creation, management, and orchestration of development environment containers (devcontainers). CDS provides a structured approach to building consistent development environments that work seamlessly across different machines, operating systems, and team configurations.
- Consistency: Ensure all developers work in identical environments
- Portability: Development environments that work on Linux, macOS, and Windows
- Security: Built-in TLS/SSL support with certificate management
- Integration: Native support for Git, Artifactory, and Bitbucket
- Extensibility: Modular architecture with gRPC-based APIs
- π³ Container Orchestration: Build and manage development containers with ease
- π Secure Communication: Built-in TLS/SSL certificate generation and management
- π gRPC API: High-performance API for agent-based communication
- π SCM Integration: Native support for Git, Bitbucket, and other version control systems
- π¦ Artifact Management: Integration with JFrog Artifactory
- π₯οΈ Cross-Platform: Support for Linux, macOS, and Windows
- π§ Systemd Integration: Native systemd support for Linux environments
- π Structured Logging: Advanced logging with Go's log/slog
- π§ͺ Testing Framework: Comprehensive test suite using Ginkgo and Gomega
- π¨ Rich CLI: Beautiful terminal output with pterm
Before installing CDS, ensure you have the following dependencies:
- Go: Version 1.24.0 or higher (Download)
- Protocol Buffers Compiler: protoc for gRPC code generation (Installation Guide)
- Make: Build automation tool
- OpenSSL: For TLS certificate operations (usually pre-installed on Linux/macOS)
- golangci-lint: For code quality checks (Installation)
-
Clone the repository:
git clone https://github.com/AmadeusITGroup/CDS.git cd CDS -
Install dependencies:
go mod download
-
Install Protocol Buffer tools:
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
-
Build the project:
make install
make run-clientmake run-api-agentmake gencertmake testThe CDS client provides several commands for managing your development spaces:
# Initialize a new project
cds project init
# Initialize a new space
cds space init
# Check version
cds versionCDS configuration is stored in ~/.cds/ directory. You can customize settings through:
- Configuration files
- Environment variables
- Command-line flags
# Create a new project scaffold
make scaffoldGenerate and manage TLS certificates for secure communication:
# Verify certificates
openssl verify -CAfile ca_cert.pem server_cert.pem
# Inspect certificate details
openssl x509 -in server_cert.pem -text -nooutCDS/
βββ cmd/ # Application entry points
β βββ api-agent/ # API agent service
β βββ client/ # CDS CLI client
βββ internal/ # Private application code
β βββ agent/ # Agent implementation
β βββ api/ # gRPC API definitions
β βββ ar/ # Artifactory integration
β βββ authmgr/ # Authentication management
β βββ bo/ # Business objects
β βββ bootstrap/ # Application bootstrapping
β βββ cenv/ # Environment management
β βββ cerr/ # Error handling
β βββ clog/ # Logging framework
β βββ command/ # CLI commands
β βββ config/ # Configuration management
β βββ db/ # Database/storage layer
β βββ host/ # Host management
β βββ profile/ # Profile management
β βββ scm/ # Source control management
β βββ shexec/ # Shell execution utilities
β βββ systemd/ # Systemd integration
β βββ term/ # Terminal utilities
β βββ tls/ # TLS/certificate management
βββ test/ # Test resources
βββ go.mod # Go module definition
βββ makefile # Build automation
βββ LICENSE # Apache 2.0 License
- cmd/: Contains the main applications. Each subdirectory is a separate executable.
- internal/: Private packages not intended for external import. Contains the core business logic.
- test/: Test fixtures, resources, and integration tests.
# Build all binaries
make build
# Build specific components
make build-client
make build-api-agentWhen modifying .proto files:
make build-pbOr manually:
protoc --go_out=. --go_opt=paths=source_relative \
--go-grpc_out=. --go-grpc_opt=paths=source_relative \
internal/api/v1/*.proto# Run linter
make lint
# Run linter with auto-fix
make lint-weak
# Run tests
make test
# Generate coverage report
make coverage# Tidy dependencies
make go-tidy- Use Git Bash or Windows Subsystem for Linux (WSL) to run make commands
- Ensure paths are properly escaped when working with Windows paths
- Systemd integration is available for service management
- Check systemd service files in internal/systemd/
- Boot configuration available in internal/bootstrap/boot_darwin.go
We welcome contributions from the community! Here's how you can help:
- Fork the repository
- Create a feature branch: git checkout -b feature/amazing-feature
- Make your changes
- Run tests: make test
- Run linter: make lint
- Commit your changes: git commit -m 'Add amazing feature'
- Push to the branch: git push origin feature/amazing-feature
- Open a Pull Request
- Follow Go best practices and idioms
- Write comprehensive tests for new features
- Update documentation for API changes
- Ensure all tests pass before submitting PR
- Keep commits atomic and well-described
This project uses golangci-lint to enforce code quality. Run the linter before submitting:
make lint- Write unit tests for new functionality
- Update integration tests when changing APIs
- Aim for high test coverage
Found a bug? Have a feature request? Please open an issue with:
- Clear description of the problem
- Steps to reproduce (for bugs)
- Expected vs actual behavior
- Environment details (OS, Go version, etc.)
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Built with these excellent open-source projects:
- Go - The Go Programming Language
- gRPC - High-performance RPC framework
- Protocol Buffers - Data serialization
- Cobra - CLI framework
- Viper - Configuration management
- Ginkgo & Gomega - Testing framework
- pterm - Beautiful terminal output
- go-git - Git implementation in Go
- TLS/Certificate Management: Inspired by Cloudflare CFSSL
- Logging: Built with Go's log/slog - Guide
- Observability: OpenTelemetry for Go
- gRPC Instrumentation: OpenTelemetry gRPC
- Issues: GitHub Issues
- Discussions: GitHub Discussions