Skip to content

Latest commit

 

History

History
224 lines (165 loc) · 6.13 KB

File metadata and controls

224 lines (165 loc) · 6.13 KB

Devtron Central API

A centralized REST API service for Devtron metadata, release information, and auxiliary services.

📚 Table of Contents

🎯 Overview

Devtron Central API is a Go-based REST API that provides:

  • 📦 Release notes and version information
  • 🔧 Module metadata and configurations
  • 🏗️ CI/CD build templates and metadata
  • 💱 Currency exchange rates
  • 🔔 GitHub webhook handling

Port: 8080 Language: Go 1.19+ Framework: Gorilla Mux

For detailed information, see PROJECT_OVERVIEW.md

🚀 Services

1. Release Notes Service

Manages Devtron releases from GitHub with caching and blob storage.

Endpoints:

  • GET /release/notes - Get releases with pagination
  • POST /release/webhook - GitHub webhook handler

2. Module Management

Provides Devtron module information and metadata.

Endpoints:

  • GET /modules - List all modules
  • GET /v2/modules - Enhanced module list
  • GET /module?name={name} - Get module by name

3. CI/CD Metadata

Serves build templates and buildpack information.

Endpoints:

  • GET /dockerfileTemplate - Dockerfile templates
  • GET /buildpackMetadata - Buildpack metadata

4. Currency Exchange

Real-time currency conversion rates.

Endpoints:

  • GET /currency/rates?base={currency} - Exchange rates

5. Health Check

Service health monitoring.

Endpoints:

  • GET /health - Health status

🤖 MCP Documentation Server

NEW: A Model Context Protocol (MCP) server for semantic search over Devtron documentation.

Features

  • 🔍 Semantic search using AWS Bedrock Titan embeddings
  • 📦 ChromaDB vector storage
  • 🔄 Auto-sync with GitHub documentation
  • 💰 Free tier (AWS Bedrock)
  • ⚡ Fast (<500ms search)

Quick Start

cd mcp-docs-server
./setup.sh
python server.py

Documentation

🏃 Quick Start

Central API (Go)

# Build
make build

# Run
./central-api

With Docker

docker build -t central-api:latest .
docker run -p 8080:8080 central-api:latest

📡 API Endpoints

Health Check

curl http://localhost:8080/health

Get Releases

curl http://localhost:8080/release/notes?offset=0&size=10

Get Modules

curl http://localhost:8080/modules

Get Currency Rates

curl http://localhost:8080/currency/rates?base=USD

For complete API documentation, see PROJECT_OVERVIEW.md

📖 Documentation

Central API

MCP Documentation Server

Implementation

🏗️ Architecture

┌─────────────────────────────────────────────────────────┐
│                  Central API (Go)                        │
│  ┌──────────┐  ┌──────────┐  ┌──────────┐             │
│  │ Release  │  │ Modules  │  │ Currency │             │
│  │  Notes   │  │ Metadata │  │ Exchange │             │
│  └──────────┘  └──────────┘  └──────────┘             │
└─────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────┐
│           MCP Documentation Server (Python)              │
│  ┌──────────┐  ┌──────────┐  ┌──────────┐             │
│  │  GitHub  │  │ ChromaDB │  │ Bedrock  │             │
│  │   Sync   │  │  Vector  │  │  Titan   │             │
│  └──────────┘  └──────────┘  └──────────┘             │
└─────────────────────────────────────────────────────────┘

🛠️ Development

Prerequisites

  • Go 1.19+
  • Make
  • Wire (for dependency injection)

Build

make build

Run Tests

go test ./...

Generate Wire

make wire

🐳 Docker

Build Image

docker build -t central-api:latest .

Run Container

docker run -p 8080:8080 \
  -e BLOB_STORAGE_PROVIDER=S3 \
  -e AWS_ACCESS_KEY_ID=xxx \
  central-api:latest

📝 License

Apache License 2.0 - Copyright (c) 2024 Devtron Inc.

🤝 Contributing

Contributions are welcome! Please read the contributing guidelines before submitting PRs.

📞 Support


Maintained by: Devtron Labs Repository: https://github.com/devtron-labs/central-api