Skip to content

AmadeusITGroup/CDS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

22 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Containers Development Space (CDS)

License Go Version PRs Welcome

A powerful framework for building and managing development environment containers with consistent, reproducible workflows across teams and platforms.


πŸ“‹ Table of Contents


🎯 Overview

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.

Why CDS?

  • 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

✨ Features

  • 🐳 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

πŸ“¦ Prerequisites

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
    • Linux/macOS: Usually pre-installed
    • Windows: Use Git Bash or WSL
  • OpenSSL: For TLS certificate operations (usually pre-installed on Linux/macOS)

Optional Tools


πŸš€ Installation

From Source

  1. Clone the repository:

    git clone https://github.com/AmadeusITGroup/CDS.git
    cd CDS
  2. Install dependencies:

    go mod download
  3. 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
  4. Build the project:

    make install

⚑ Quick Start

Running the CDS Client

make run-client

Running the API Agent

make run-api-agent

Generate TLS Certificates

make gencert

Run Tests

make test

πŸ“– Usage

Client Commands

The 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 version

Configuration

CDS configuration is stored in ~/.cds/ directory. You can customize settings through:

  • Configuration files
  • Environment variables
  • Command-line flags

Working with Projects

# Create a new project scaffold
make scaffold

Certificate Management

Generate 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 -noout

πŸ—οΈ Project Structure

CDS/
β”œβ”€β”€ 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

Key Directories

  • 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.

πŸ› οΈ Development

Building from Source

# Build all binaries
make build

# Build specific components
make build-client
make build-api-agent

Generating Protocol Buffers

When modifying .proto files:

make build-pb

Or manually:

protoc --go_out=. --go_opt=paths=source_relative \
       --go-grpc_out=. --go-grpc_opt=paths=source_relative \
       internal/api/v1/*.proto

Code Quality

# Run linter
make lint

# Run linter with auto-fix
make lint-weak

# Run tests
make test

# Generate coverage report
make coverage

Dependency Management

# Tidy dependencies
make go-tidy

Platform-Specific Notes

Windows

  • Use Git Bash or Windows Subsystem for Linux (WSL) to run make commands
  • Ensure paths are properly escaped when working with Windows paths

Linux

  • Systemd integration is available for service management
  • Check systemd service files in internal/systemd/

macOS

  • Boot configuration available in internal/bootstrap/boot_darwin.go

🀝 Contributing

We welcome contributions from the community! Here's how you can help:

Getting Started

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes
  4. Run tests: make test
  5. Run linter: make lint
  6. Commit your changes: git commit -m 'Add amazing feature'
  7. Push to the branch: git push origin feature/amazing-feature
  8. Open a Pull Request

Development Guidelines

  • 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

Code Style

This project uses golangci-lint to enforce code quality. Run the linter before submitting:

make lint

Testing

  • Write unit tests for new functionality
  • Update integration tests when changing APIs
  • Aim for high test coverage

Reporting Issues

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.)

πŸ“„ License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.


πŸ™ Acknowledgments

Built with these excellent open-source projects:

References & Resources


πŸ“ž Support


Made with ❀️ by the CDS community

About

Framework for building and managing development environment containers with consistent, reproducible workflows across teams and platforms.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors