Skip to content

Commit 90e752c

Browse files
Merge new documentation updates
2 parents 8fb3cea + ba8fb94 commit 90e752c

File tree

6 files changed

+102
-13
lines changed

6 files changed

+102
-13
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
!!! warning
2+
This part is work in progress

Doc/docs/cfcli/overview.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# CortexFlow CLI
2+
3+
CortexFlow provides a command-line interface to interact with the **CortexBrain** core components via a gRPC API.
4+
5+
The tool is called **`cfcli`**.
6+
7+
This document describes the available commands and provides a quick reference table.
8+
9+
10+
## 📦 Setup Commands
11+
12+
- **`cfcli install cortexflow`**
13+
Installs **all** CortexBrain core components.
14+
15+
- **`cfcli install simple-example`**
16+
Installs a demo example defined in [deploy-test-pod.yaml](https://github.com/CortexFlow/CortexBrain/blob/main/core/src/testing/deploy-test-pod.yaml).
17+
18+
- **`cfcli uninstall`**
19+
Uninstalls **all** CortexBrain components.
20+
21+
22+
## ⚙️ CLI Management Commands
23+
24+
- **`cfcli update`**
25+
Checks if the current `cfcli` version is up to date.
26+
27+
- **`cfcli info`**
28+
Displays CLI metadata, including:
29+
- version
30+
- authors
31+
- description
32+
- installation environment (Kubernetes, Docker, etc.)
33+
34+
35+
## 📝 Logging Commands
36+
37+
- **`cfcli logs`**
38+
Retrieves logs for a specified pod.
39+
40+
41+
## 📊 Monitoring and Status Commands
42+
43+
- **`cfcli status`**
44+
Performs a health check of the CortexBrain core:
45+
- Validates if the `cortexflow` namespace exists.
46+
- Returns the status of all core components.
47+
48+
- **`cfcli monitoring list`**
49+
Lists available CortexFlow agent endpoints.
50+
- Useful for checking supported agent API functionalities.
51+
- Returns an error if the agent is not running.
52+
53+
- **`cfcli monitoring connections`**
54+
Displays currently logged connections from the **Identity** service.
55+
- Reads data from `events_map`.
56+
- Shows the most recent detected events.
57+
58+
59+
## 📑 Command Reference Table
60+
61+
| Command | Category | Description |
62+
|--------------------------------|----------------------|-----------------------------------------------------------------------------|
63+
| `cfcli install cortexflow` | Installation | Installs all CortexBrain core components |
64+
| `cfcli install simple-example` | Installation | Installs a demo example from `deploy-test-pod.yaml` |
65+
| `cfcli uninstall` | Installation | Uninstalls all CortexBrain components |
66+
| `cfcli update` | CLI Management | Checks if the CLI version is up to date |
67+
| `cfcli info` | CLI Management | Displays version, authors, description, and environment metadata |
68+
| `cfcli logs` | Logging | Retrieves logs for a specified pod |
69+
| `cfcli status` | Monitoring / Status | Runs a health check and validates the `cortexflow` namespace |
70+
| `cfcli monitoring list` | Monitoring / Status | Lists CortexFlow agent endpoints |
71+
| `cfcli monitoring connections` | Monitoring / Status | Displays logged connections from the Identity service |
72+
73+
---
74+
75+
## Examples
76+
### How to interact with the cortexflow agent
77+
!!! warning
78+
This part is work in progress
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ CortexFlow CLI is hosted using cargo package manager. The current vesion is **0.
1717
### **Components Installation**
1818
Once you have installed the CLI you can run the following command to install **all** the CortexBrain components
1919
``` bash
20-
cfcli install
20+
cfcli install cortexflow
2121
```
2222
cfcli stores relevant information to interoperates with your cluster environment, up to now these information are limited to the cluster environment.
2323

Doc/docs/index.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,28 @@ You can see the development stage of every component here:
1717

1818
A **service mesh** is a specialized infrastructure layer embedded within a software application that manages communication between services. It handles critical functions such as traffic routing, security, observability, and resiliency, while shielding individual services from these complexities.
1919

20-
In modern applications, functionality is often divided into a network of specialized services, each performing a specific task. To fulfill its role, a service may need to request data from multiple other services. However, issues arise when certain services, like a retailer’s inventory database, become overwhelmed with requests. This is where a service mesh proves invaluable it orchestrates and optimizes communication between services, ensuring all components work seamlessly together.
20+
In modern applications, functionality is often divided into a network of specialized services, each performing a specific task. To fulfill its role, a service may need to request data from multiple other services. However, issues arise when certain services, like a retailer’s inventory database, become overwhelmed with requests. This is where a service mesh proves invaluable. It orchestrates and optimizes the communication between services, ensuring all components work seamlessly together.
21+
22+
## **Challenges of Traditional Service Mesh**
23+
While service meshes have proven beneficial for managing microservices, they come with inherent challenges. The traditional sidecar model introduces additional components and complexity, requiring teams to acquire new skills for effective management. A traditional "sidecar-based" service mesh has potential drawbacks that can impact directly the performances and the average costs of your clusters. Running sidecar containers alongside your containerized application directly impacts the CPU consumptions and the memory that your workloads consume. Due to its nature sidecar containers also have to work harder to collect data because they run in user space, and therefore don’t have direct access to kernel-level resources and the same reasoning can be applied to all the other service mesh features such as observability and security. The main drawbacks of a sidecar based service mesh can be resumed in the following chart:
24+
25+
| **Service mesh features** | **Drawbacks / Related issues** |
26+
|-----------------------------------|-----------------------------------------------------|
27+
| **Overhead** | Traditional sidecar approach introduce high overhead and resource consumption due to the attachment of a sidecar container. The sidecar is pretty expensive also in latency terms because every communication between pods are managed by the sidecar container|
28+
| **Granularity** | A sidecar approach is less customizable because has limited access to lower level insights |
29+
30+
31+
## **Service Mesh Optimization with eBPF**
32+
eBPF is a powerful technology that allows for high-performance networking and security enhancements by executing code directly in the Linux kernel without changing the kernel source code or requiring a reboot. By leveraging eBPF, developers can attach programs to various network events, enabling efficient management of communication between microservices, enhanced metrics and observability and enhanced security features.
2133

2234
# **Architecture**
2335
The CortexFlow architecture is designed to ensure a robust, scalable, and fault-tolerant system that can operate seamlessly without interruptions. It is composed of several key components that work together to provide a continuous and reliable infrastructure. These components are orchestrated within a Kubernetes cluster, ensuring efficient resource management, high availability, and scalability. Below is a GIF that visually represents the architecture and illustrates how the components interact within the cluster.
2436

2537
![Architecture](./cf_architecture.svg "Cortexflow architecture")
2638

39+
## What's eBPF?
40+
Extended Berkeley Packet Filter (eBPF) presents a transformative approach to building service meshes by eliminating the need for the traditional sidecar model, which often introduces significant complexity and overhead in microservices architecture. eBPF allows for the implementation of service mesh functionalities directly in the kernel, resulting in a more efficient and streamlined data plane. This native integration minimizes the number of proxies required, reduces additional network connections, and simplifies redirection logic for network traffic, thereby enhancing performance.
41+
2742
## **User space vs kernel space**
2843
In the Linux kernel the **user space** is the environment where user-facing applications run. This includes applications such as web servers, Chrome, text editors, and command utilities. User space applications are also known as userland applications.
2944

@@ -50,7 +65,7 @@ Cortexflow core components, also referred to as CortexBrain components, are comp
5065
## **CLI**
5166
The command line interface, also known as CLI, is an essential part of the CortexFlow User Experience. It allows users and developers to interact with all the core components without directly managing the manifests' YAML files. The CLI stores the relevant information, such as the underlying cluster environment (e.g., Kubernetes, Docker Swarm, etc), to support multiple environments without changing the user experience. Right now, the CLI only supports **Kubernetes** as an orchestrator.
5267

53-
The CLI is available to install with the cargo package manager; we have carefully documented the installation in this [page](./tools/tools.md).
68+
The CLI is available to install with the cargo package manager; we have carefully documented the installation in this [page](./cfcli/overview.md).
5469

5570
!!! warning
5671
Right now, the identity service, metrics, and dashboard are under development until 2026. We will release the first documentation snippet soon

Doc/docs/tools/tools.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

Doc/mkdocs.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,10 @@ plugins:
8989

9090
nav:
9191
- Home: index.md
92-
- Getting Started: installation/installation.md
93-
- Tools: tools/tools.md
92+
- Getting Started: getting-started/installation.md
93+
- CLI:
94+
- cfcli/overview.md
95+
- cfcli/Agent-API-Overview.md
9496
- Test Report:
9597
- test-report/test-report.md
9698
- Reports:

0 commit comments

Comments
 (0)