CloudInferOps

module
v1.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2026 License: MIT

README ΒΆ

πŸš€ CloudInferOps

CloudInferOps β€” One Command Kubernetes Observability Platform

CloudInferOps is a Go-based DevOps/SRE CLI that detects your environment, validates Kubernetes readiness, installs lightweight Kubernetes when needed, and deploys a production-style observability stack with metrics, logs, traces, dashboards, and alerts.


CI Release Codecov Go Report Card GitHub release GitHub stars GitHub forks License


Go Kubernetes Helm Prometheus Grafana Loki Tempo ArgoCD OpenTelemetry Alertmanager Slack PagerDuty AWS GCP Azure GitHub Actions Docker


Quick Start β€’ Features β€’ Architecture β€’ Commands β€’ Testing β€’ CI/CD β€’ Author


πŸŽ₯ Demo Video


πŸ“Œ What is CloudInferOps?

CloudInferOps turns any Kubernetes-compatible environment into a complete observability platform.

It works on:

  • πŸ’» Local Linux machines
  • ☁️ AWS EC2 instances
  • ☁️ GCP Compute Engine VMs
  • ☁️ Azure VMs
  • ☸️ Existing Kubernetes clusters
  • πŸ§ͺ Kubernetes clusters such as kubeadm and custom setups

CloudInferOps follows a simple workflow:

sudo curl -sSL https://raw.githubusercontent.com/shivamshashank/CloudInferOps/main/scripts/install.sh | sudo bash
sudo cloudinferops deploy all
sudo cloudinferops status

✨ Features

🧠 Smart Environment Detection
  • Detects OS and CPU architecture
  • Detects kubectl
  • Detects Kubernetes cluster availability
  • Detects Helm
  • Checks memory, CPU, ports, storage class, and namespace permissions
  • Warns about existing observability stack conflicts
☸️ Kubernetes First
  • Uses existing Kubernetes cluster if available
  • Installs kubeadm when Kubernetes is missing
  • Supports local and cloud VM environments
  • Works consistently across local Linux, AWS EC2, GCP VM, and Azure VM
πŸ“Š Full Observability Stack
Layer Component
Metrics Prometheus
Dashboards Grafana
Logs Loki
Traces Tempo
Continuous Delivery ArgoCD
Telemetry Pipeline OpenTelemetry Collector
Alerts Alertmanager
Node Metrics Node Exporter
Kubernetes Metrics kube-state-metrics
Log Collection Grafana Alloy / Promtail
Endpoint Monitors Blackbox Exporter
Continuous Profiler Pyroscope
HA Long-Retention Thanos (Optional HA)
Incident Routing Slack, PagerDuty
🚨 Incident & Alerting
  • Slack alert integration
  • PagerDuty alert integration
  • Alertmanager webhook support
  • Test alert command
  • Prebuilt SRE alert rules
πŸ“ˆ Dashboards Included
  • Kubernetes cluster overview
  • Node CPU, memory, disk
  • Pod health
  • Container metrics
  • Namespace usage
  • Loki logs dashboard
  • Tempo traces dashboard
  • Alertmanager overview
  • Resource usage dashboard

⚑ Quick Start

1. Install CloudInferOps
sudo curl -sSL https://raw.githubusercontent.com/shivamshashank/CloudInferOps/main/scripts/install.sh | sudo bash

Verify installation:

cloudinferops version

2. Check Your System

[!IMPORTANT] Sudo Privileges Required CloudInferOps requires administrative/root privileges (sudo) to manage system observability resources, check system metrics, and set up networking or local clusters.

sudo cloudinferops doctor

Example output:

CloudInferOps Doctor

[OK] OS: linux/amd64
[OK] Internet connection
[OK] kubectl found
[WARN] Kubernetes cluster not detected
[OK] Helm found
[OK] Minimum memory: 4GB+
[OK] Minimum CPU: 2 cores+

[INFO] Run: sudo cloudinferops deploy all

If Kubernetes already exists:

[OK] Kubernetes cluster detected
[OK] Current context: kind-dev
[OK] Nodes ready: 1
[OK] Helm found
[OK] StorageClass found

[READY] Run: sudo cloudinferops deploy all

3. Deploy All Components & Auto-bootstrap Kubernetes

To deploy all CloudInferOps components (observability, inference model gateway, self-hosted UI, and webhook handler), simply run:

sudo cloudinferops deploy all

[!TIP] No Kubernetes? No problem! If CloudInferOps does not detect an existing Kubernetes cluster, it will automatically ask to install and bootstrap a Kubernetes cluster via kubeadm on-the-fly, then deploy the complete platform onto it. If you already have a cluster running, it will deploy directly onto your active context.

CloudInferOps deploys:

  • Observability: Prometheus, Grafana, Loki, Tempo, ArgoCD, Alertmanager, OpenTelemetry Collector, Node Exporter, kube-state-metrics, Grafana Alloy/Promtail.
  • Inference Stack: Ollama backend and local gateway in the inference namespace.
  • Web Portal: Self-hosted UI dashboard exposed at /cloudinferops/.
  • Alert Gateway: Incident and webhook receiver.

4. Check Status
sudo cloudinferops status

Example:

🩺  CloudInferOps Status Dashboard
-----------------------------------------------------------------
🌐  Kubernetes Context:   kind-cloudinferops
πŸ“¦  Namespace:            observability

πŸ“‹  System Components Checklist:
    Prometheus Server:        🟒  Running
    Grafana Dashboard:        🟒  Running
    Loki Logging:             🟒  Running
    Tempo Tracing:            🟒  Running
    OTel Collector:           🟒  Running
    ArgoCD Delivery:          🟒  Running
    UI Portal:                🟒  Running

πŸ€–  Inference Services:
    Inference Gateway:        🟒  Running
    Model Backend:            🟒  Running (Ollama)

πŸ“¦  GitOps Overview:
    Mode:                     ArgoCD Managed
    Applications:             4
    Synced:                   4/4
    Healthy:                  4/4

πŸ“Š  Access Dashboards & APIs via Ingress:
    πŸ”—  Grafana Dashboard:   http://127.0.0.1/grafana/
    πŸ”—  Prometheus Server:   http://127.0.0.1/prometheus/
    πŸ”—  Alertmanager Panel:  http://127.0.0.1/alertmanager/
    πŸ”—  ArgoCD Dashboard:    http://127.0.0.1/argocd
    πŸ”—  UI Portal:           http://127.0.0.1/cloudinferops/
    πŸ”—  Inference Gateway:   http://127.0.0.1/v1

πŸ—οΈ Architecture

                           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                           β”‚      CloudInferOps CLI   β”‚
                           β”‚        Go Binary         β”‚
                           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                         β”‚
                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                 β”‚                       β”‚                       β”‚
          β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”        β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”        β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”
          β”‚   Doctor    β”‚        β”‚ Kubernetes    β”‚        β”‚    Helm     β”‚
          β”‚   Doctor    β”‚        β”‚  Detection    β”‚        β”‚ Deployment  β”‚
          β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜        β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜        β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
                 β”‚                       β”‚                       β”‚
                 β”‚              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”              β”‚
                 β”‚              β”‚ Existing K8s or β”‚              β”‚
                 β”‚              β”‚ kubeadm Install β”‚              β”‚
                 β”‚              β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β”‚
                 β”‚                       β”‚                       β”‚
                 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                         β”‚
                              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                              β”‚   observability ns  β”‚
                              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                         β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚                                β”‚                                β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”
β”‚   Prometheus   β”‚              β”‚     Grafana     β”‚              β”‚ Alertmanager   β”‚
β”‚    Metrics     β”‚              β”‚   Dashboards    β”‚              β”‚    Alerts      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
        β”‚                                β”‚                                β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”
β”‚ Node Exporter  β”‚              β”‚      Loki       β”‚              β”‚ Slack/PagerDutyβ”‚
β”‚ kube-state     β”‚              β”‚      Logs       β”‚              β”‚ Integrations   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                         β”‚
                              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                              β”‚       Tempo         β”‚
                              β”‚       Traces        β”‚
                              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                         β”‚
                              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                              β”‚ OpenTelemetry       β”‚
                              β”‚ Collector           β”‚
                              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🧰 CLI Commands

A complete reference of all CLI commands is available in commands.md.

Quick Reference
Action Command Description
Install CLI sudo curl -sSL https://raw.githubusercontent.com/shivamshashank/CloudInferOps/main/scripts/install.sh | sudo bash Downloads and installs the cloudinferops binary.
Check Environment sudo cloudinferops doctor Runs diagnostics to verify system requirements and Kubernetes.
Deploy All sudo cloudinferops deploy all Deploys the complete platform stack (observability, inference, UI portal, webhook).
Deploy Observability sudo cloudinferops deploy observability Deploys the observability stack only.
Deploy Inference sudo cloudinferops deploy inference Deploys Ollama and gateway in the inference namespace.
Deploy UI sudo cloudinferops deploy ui Deploys the self-hosted portal.
Check Status sudo cloudinferops status Shows a live dashboard with service states and Ingress URLs.
Interactive Uninstall sudo cloudinferops uninstall Launches the interactive uninstallation menu.

βš™οΈ Configuration

CloudInferOps stores local configuration at:

~/.cloudinferops/config.yaml

Example:

namespace: observability

kubernetes:
  type: auto
  kubeconfig: ~/.kube/config

observability:
  prometheus: true
  grafana: true
  loki: true
  tempo: true
  alertmanager: true
  opentelemetry: true
  nodeExporter: true
  kubeStateMetrics: true
  logCollector: alloy
  blackboxExporter: true
  blackboxTargets:
    - https://api.github.com
    - https://github.com
  pyroscope: true
  thanos: false

alerts:
  slack:
    enabled: false
    webhookUrlSecret: cloudinferops-slack-webhook
  pagerduty:
    enabled: false
    integrationKeySecret: cloudinferops-pagerduty-key

🚨 Alert Rules

CloudInferOps includes SRE-focused alert rules:

Alert Description
NodeDown Kubernetes node is not ready
HighCPUUsage Node or pod CPU usage is high
HighMemoryUsage Node or pod memory usage is high
DiskPressure Node disk pressure detected
PodCrashLooping Pod is repeatedly crashing
PodRestartSpike Pod restart count increased
DeploymentUnavailable Deployment has unavailable replicas
HighAPILatency API latency is above threshold
HighErrorRate Application error rate increased
PersistentVolumeAlmostFull PVC usage is close to capacity

πŸ”” Slack & PagerDuty

Configure Slack
sudo cloudinferops alerts configure --slack
Configure PagerDuty
sudo cloudinferops alerts configure --pagerduty
Send Test Alert
sudo cloudinferops alerts test

Expected output:

Sending test alert...
[OK] Alert sent to Slack
[OK] Alert sent to PagerDuty

🧩 Go Webhook Handler

CloudInferOps includes a custom Go service for incident processing.

Endpoints
GET  /health
POST /webhook/alertmanager
GET  /incidents
Capabilities
  • Receives Alertmanager webhooks
  • Parses alert payloads
  • Formats incident messages
  • Sends notifications to Slack
  • Sends incidents to PagerDuty
  • Stores recent incidents
  • Exposes health and incident APIs

Deploy it with:

sudo cloudinferops deploy webhook-handler

πŸ§ͺ Testing

Run All Tests
sudo go test ./...
Run Tests with Coverage
go test ./... -cover
Generate Coverage Report
go test ./... -coverprofile=coverage.out
go tool cover -html=coverage.out
Run Vet
go vet ./...
Run Formatting Check
gofmt -w .
Run Linter
golangci-lint run
Integration Test with kind
kind create cluster --name cloudinferops-test
sudo cloudinferops doctor
sudo cloudinferops deploy observability --dry-run
sudo cloudinferops uninstall observability --dry-run
kind delete cluster --name cloudinferops-test

βœ… Test Coverage

Area Tests
CLI commands version, init, doctor, status
Config Load, validate, default values
Doctor checks OS, arch, kubectl, Helm, Kubernetes
Kubernetes Cluster detection, namespace creation
Helm Repo add, release detection, dry-run
Alerts Slack payload, PagerDuty payload, test alert
Webhook Alertmanager payload parsing
Status Component health formatting
Uninstall Dry-run and confirmation flow

πŸ” CI/CD & GitOps

CloudInferOps uses GitHub Actions for automated testing, builds, Docker images, and releases.

CI Workflow

Runs on every push and pull request:

go test ./...
go vet ./...
gofmt -w .
golangci-lint run
Release Workflow

Create a new release by pushing a tag:

git tag v1.0.0
git push origin v1.0.0

The release workflow builds binaries for:

  • Linux amd64
  • Linux arm64
  • macOS amd64
  • macOS arm64

Artifacts are uploaded to GitHub Releases.

Docker Workflow

Builds and publishes the webhook handler image:

ghcr.io/shivamshashank/cloudinferops-webhook-handler:latest

πŸ“¦ Installation Options

Curl Install
curl -sSL https://raw.githubusercontent.com/shivamshashank/CloudInferOps/main/scripts/install.sh | bash
Linux Manual Installation (via Curl)

You can download and install the latest compiled binary manually for Linux:

# 1. Download the latest binary for your architecture (e.g., AMD64 / x86_64)
curl -LO https://github.com/shivamshashank/CloudInferOps/releases/latest/download/cloudinferops-linux-amd64

# 2. Make the binary executable
chmod +x cloudinferops-linux-amd64

# 3. Move it to your local system's bin directory to make it globally available
sudo mv cloudinferops-linux-amd64 /usr/local/bin/cloudinferops

# 4. Verify the installation
cloudinferops version

(For ARM64 processors, replace cloudinferops-linux-amd64 with cloudinferops-linux-arm64)

Go Install
sudo go install github.com/shivamshashank/CloudInferOps/cmd/cloudinferops@latest
GitHub Releases

Alternatively, you can manually download precompiled binaries for all supported platforms (Linux & macOS) directly from GitHub Releases.


πŸ‘‘ Running with Sudo / Root Privileges

To install system prerequisites (such as Kubernetes clusters and core networking configurations) and bind services locally, you can run CloudInferOps fully under elevated privileges (sudo mode):

sudo cloudinferops deploy observability
sudo cloudinferops status

[!NOTE] CloudInferOps is built with smart environment-aware root fallback. When run as sudo, the CLI automatically detects the original invoking user ($SUDO_USER) and correctly references their standard home directory paths (such as ~/.kube/config and ~/.cloudinferops/config.yaml), preventing configuration directory pollution inside the /root path.


Since native Linux VMs are required for kubeadm, macOS developers can test CloudInferOps locally using a lightweight Multipass Ubuntu VM.

Follow this step-by-step pipeline to run globally inside a local VM:

1. Launch a Multipass VM

Provision an Ubuntu instance meeting minimum system requirements (2 CPUs, 4GB RAM):

multipass launch --name cloudinferops-vm --cpus 2 --memory 4G --disk 20G
2. Move Binary Globally inside the VM

Compile the Linux AMD64 binary locally on your host machine, transfer it to the VM, and move it to /usr/local/bin to make it globally available:

# Compile for Linux (from host machine)
env GOOS=linux GOARCH=amd64 go build -o cloudinferops cmd/cloudinferops/main.go

# Transfer to Multipass VM
multipass transfer cloudinferops cloudinferops-vm:/home/ubuntu/cloudinferops

# Shell into the VM
multipass shell cloudinferops-vm

# Inside the VM shell: Make it executable and move to global bin path
chmod +x /home/ubuntu/cloudinferops
sudo mv /home/ubuntu/cloudinferops /usr/local/bin/cloudinferops
3. Verify Global Run

Now you can execute the cloudinferops CLI globally from anywhere in the VM shell (just like standard system commands):

sudo cloudinferops doctor
4. Deploy Observability Stack
sudo cloudinferops deploy observability

When prompt options appear, select 1 to automatically install kubeadm or run directly on an existing cluster.

5. Access Dashboards from Host Browser

Once fully deployed, retrieve the service status:

sudo cloudinferops status

CloudInferOps will automatically resolve the active VM interface IP. Simply open the generated links (e.g. http://<VM_IP>/grafana) directly in your host machine's web browser!


🧹 Uninstall

Remove observability stack:

sudo cloudinferops uninstall observability

Remove everything managed by CloudInferOps:

sudo cloudinferops uninstall all

πŸ“Έ Screenshots

CloudInferOps Status ArgoCD Prometheus
CloudInferOps Status ArgoCD Prometheus
Grafana Node Exporter Alertmanager
Grafana Node Exporter Alertmanager

πŸ—‚οΈ Repository Structure

CloudInferOps/
β”œβ”€β”€ cmd/
β”‚   └── cloudinferops/
β”œβ”€β”€ internal/
β”‚   β”œβ”€β”€ alerts/
β”‚   β”œβ”€β”€ cli/
β”‚   β”œβ”€β”€ config/
β”‚   β”œβ”€β”€ doctor/
β”‚   β”œβ”€β”€ gitops/
β”‚   β”œβ”€β”€ helm/
β”‚   β”œβ”€β”€ installer/
β”‚   β”œβ”€β”€ kubernetes/
β”‚   β”œβ”€β”€ observability/
β”‚   β”œβ”€β”€ utils/
β”‚   └── webhook/
β”œβ”€β”€ charts/
β”‚   └── webhook-handler/
β”œβ”€β”€ configs/
β”œβ”€β”€ dashboards/
β”œβ”€β”€ docs/
β”œβ”€β”€ scripts/
β”‚   └── install.sh
β”œβ”€β”€ .github/
β”‚   └── workflows/
β”œβ”€β”€ Dockerfile.webhook
β”œβ”€β”€ go.mod
β”œβ”€β”€ go.sum
β”œβ”€β”€ README.md
β”œβ”€β”€ ROADMAP.md
└── LICENSE

πŸ› οΈ Built With


🀝 Contributing

Contributions are welcome.

sudo git clone https://github.com/shivamshashank/CloudInferOps.git
cd CloudInferOps
sudo go mod tidy
sudo go test ./...

Create a branch:

git checkout -b feature/my-feature

Commit and push:

git commit -m "feat: add my feature"
git push origin feature/my-feature

Open a pull request.


πŸ“„ License

This project is licensed under the MIT License.


πŸ‘€ Author

Shivam Shashank


⭐ If CloudInferOps helps you, please star the repository.

Directories ΒΆ

Path Synopsis
cmd
cloudinferops command
ui command
webhook command
internal
cli
ui

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL