Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions .github/workflows/agent-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Build & Release Agent

on:
push:
tags:
- 'agent/v*' # tag like agent/v0.1.0 to trigger

defaults:
run:
working-directory: agent

jobs:
build:
name: Build Binaries
runs-on: ubuntu-latest

strategy:
matrix:
goos: [linux, darwin]
goarch: [amd64, arm64]

steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21

- name: Build binary
run: |
mkdir -p dist/
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o dist/ctrlb_collector-${{ matrix.goos }}-${{ matrix.goarch }} ./cmd/ctrlb_collector

- name: Upload binaries as artifacts
uses: actions/upload-artifact@v4
with:
name: ctrlb-collector-binaries
path: agent/dist/

docker:
name: Build & Push Docker Image
runs-on: ubuntu-latest
needs: build

steps:
- uses: actions/checkout@v4

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image to GHCR
uses: docker/build-push-action@v5
with:
context: agent
file: agent/Dockerfile
push: true
tags: ghcr.io/${{ github.repository_owner }}/ctrlb-agent:${{ github.ref_name }}

release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: build

steps:
- uses: actions/checkout@v4

- name: Download built artifacts
uses: actions/download-artifact@v4
with:
name: ctrlb-collector-binaries
path: agent/dist/

- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
files: agent/dist/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49 changes: 0 additions & 49 deletions .github/workflows/docker-agent-publish.yml

This file was deleted.

6 changes: 3 additions & 3 deletions CONTRIBUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ Welcome! 🚀 We're excited that you're interested in contributing to this proje
### 1. Fork the repo and clone it

```bash
git clone https://github.com/your-username/project-name.git
git clone https://github.com/your-username/ctrlb-control-plane.git
```

### 2. Create a new branch

```bash
git checkout -b feat/add-agent-labels
git checkout -b feat/<FEAT_NAME>
```

### Branch Naming Convention
Expand Down Expand Up @@ -80,7 +80,7 @@ golangci-lint run
### 5. Push and open a PR

```bash
git push origin feat/add-agent-labels
git push origin feat/<FEAT_NAME>
```

Then open a Pull Request with a clear explanation of the changes.
Expand Down
88 changes: 82 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,84 @@
# CTRLB Control Plane for Managing Agents
This repository provides a control plane system designed to manage various agents. Currently, the system supports the configuration and management of Fluent Bit agents. The repository is divided into three main components:
# 🛠️ CTRLB – Control Plane for Managing Agents

- **Frontend**: The user interface to interact with the control plane, built with React.
- **Backend**: The core logic and API, written in Go, to manage agents and configurations.
- **Agent**: The agent component that builds a wrapper on top of Fluent Bit to manage Fluent Bit instances on the target systems.
**CTRLB** is a control plane designed to manage telemetry agents across diverse environments. It currently supports the configuration and lifecycle management of **OpenTelemetry Collector** agents.

This monorepo is organized into three primary components:

- **Frontend**: A modern React-based UI to visualize and manage agents and their configurations.
- **Backend**: A Go-powered API and orchestration engine that communicates with agents, handles configuration state, and offers installation scripts that users can run manually to set up agents.
- **Agent**: A lightweight wrapper around the OpenTelemetry Collector, capable of dynamically receiving configurations and reporting status back to the control plane.

---

## ✨ Features

- Centralized management of distributed telemetry agents.
- Declarative, graph-based configuration interface for OpenTelemetry Collector (OTEL) only.
- Real-time agent status monitoring.

---

## 📆 Repository Structure

```
ctrlb/
├── frontend/ # React UI
├── backend/ # Go-based API server and logic
├── agent/ # OTel Collector wrapper with remote config support
└── docs/ # Architecture diagrams, usage guides, etc.
```

---

## 🚀 Getting Started

> 📘️ Prerequisites:
>
> - Go 1.23+
>
> - Node.js 18+
>
> - Docker (for local development)

Clone the repository:

```bash
git clone https://github.com/your-org/ctrlb.git
cd ctrlb
```

Start the dev environment (local setup guide coming soon).

---

## 🏗️ Architecture

CTRLB is built to support agent orchestration at scale. Key components include:

- **Agent Communication Layer**: Simple HTTP communication to and from registered agents. Token-based authentication is a work in progress.
- **Configuration Manager**: Handles creation, versioning, and delivery of agent configs.
- **Storage Backend**: Currently supports SQLite for storing configuration and telemetry metadata. Support for other SQL-based databases is coming soon.

\*More details are available in the \**[docs/architecture.md](docs/architecture.md)*

---

## 📖 Documentation

- [Agent Configuration](docs/agent-config.md)
- [API Reference](docs/api.md)
- [Deployment Guide](docs/deployment.md)
- [Troubleshooting](docs/troubleshooting.md)

---

## 🤝 Contributing

Please refer to the [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on how to get involved.

---

## 📜 License

AGPL License. See [LICENSE](LICENSE) for more details.

TODO: To be added
4 changes: 3 additions & 1 deletion agent/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.env
*.db
*.log
*.log

dist/
17 changes: 17 additions & 0 deletions agent/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
CTRLB Agent
Copyright (C) 2024 CTRLB-HQ

This software is distributed as a free and open-source project under the terms of the GNU Affero General Public License (AGPL), version 3, as published by the Free Software Foundation. You may redistribute and/or modify the source code in accordance with the stipulations of this license, including the option to adopt any subsequent version published by the Free Software Foundation.

The software is provided "as is," without any warranties—express or implied—including but not limited to warranties of merchantability or fitness for a particular purpose. Users assume full responsibility for the use and outcomes of this software. For comprehensive licensing terms, consult the GNU Affero General Public License.

In addition, any derivative works or modified deployments of this agent system—regardless of whether they are made available publicly or used internally—must include a clear and unambiguous declaration that the deployment is built upon the CTRLB Agent. This notice must be visibly embedded within the user-facing interface (such as an About page, footer, or system information section) or included in official system documentation. This requirement exists to preserve proper attribution and ensure epistemic transparency in the deployment and development of derivative works.

You should have received a copy of the GNU Affero General Public License alongside this software distribution. If not, the license is accessible at <https://www.gnu.org/licenses/>.

This software integrates the OpenTelemetry Collector and associated components, which are licensed under the Apache License, Version 2.0. Usage of these components is governed by their original license and is not subject to the AGPL terms of this wrapper.

For full licensing details of the OpenTelemetry Collector, see: https://github.com/open-telemetry/opentelemetry-collector/blob/main/LICENSE

The AGPL license herein applies only to the orchestration, configuration, and control logic developed by CTRLB-HQ.

Loading