Skip to content

aalvaropc/salkantay

Repository files navigation

Salkantay - AI-Powered Incident Management System

Salkantay es un sistema de gestión de incidentes basado en IA que utiliza Google ADK para automatizar la respuesta a incidentes en infraestructura cloud.

Arquitectura

El sistema está compuesto por cuatro servicios principales:

  • API: Recibe y normaliza incidentes de múltiples fuentes
  • Watcher: Detecta y publica eventos de incidentes
  • Analyst: Analiza incidentes y genera planes de remediación usando IA
  • Executor: Ejecuta planes de remediación de forma segura

Requisitos

  • Go 1.22+
  • Google Cloud Project con APIs habilitadas
  • Docker (para containerización)
  • kubectl (para despliegue en GKE)
  • gcloud CLI

Setup Inicial

1. Configurar variables de entorno

export GCP_PROJECT=your-gcp-project-id
export REGION=us-central1

2. Bootstrap de infraestructura GCP

make bootstrap PROJECT=$GCP_PROJECT

Esto habilitará APIs, creará service accounts, topics de Pub/Sub y configurará IAM.

3. Crear Artifact Registry

gcloud artifacts repositories create salkantay \
  --repository-format=docker \
  --location=$REGION \
  --description="Salkantay container images"

Desarrollo Local

Instalar dependencias

make init

Ejecutar tests

make test

Ejecutar linter

make lint

Ejecutar servicios localmente

En terminales separadas:

# API
make run-api

# Watcher
make run-watcher

# Analyst
make run-analyst

# Executor
make run-executor

Usar emulador de Pub/Sub local (opcional)

make local-pubsub
export PUBSUB_EMULATOR_HOST=localhost:8085

Build y Deploy

Build de imágenes

export SHA=$(git rev-parse --short HEAD)
make image-api image-watcher image-analyst image-executor

Push a Artifact Registry

gcloud auth configure-docker $REGION-docker.pkg.dev
make push

Deploy a Cloud Run

make cr-deploy-api
make cr-deploy-watcher
make cr-deploy-analyst
make cr-deploy-executor

Deploy a GKE con Helm

helm upgrade --install salkantay ./deploy/gke/helm \
  -n salkantay --create-namespace \
  --set image.project=$GCP_PROJECT \
  --set env.pubsubProject=$GCP_PROJECT

Seguridad

Generar SBOM

make sbom

Firmar imágenes

make sign

CI/CD

El proyecto incluye GitHub Actions workflows para:

  • Lint y tests automáticos
  • Build y push de imágenes
  • Generación de SBOM
  • Firma de imágenes con cosign
  • Deploy automático a Cloud Run

Configurar secrets en GitHub:

  • GCP_PROJECT: ID del proyecto GCP
  • GCP_SA_KEY: Service account key (JSON)
  • REGION: Región de GCP

Estructura del Proyecto

salkantay/
├── cmd/              # Puntos de entrada de servicios
├── internal/         # Código interno
│   ├── app/         # Lógica de aplicación
│   ├── config/      # Configuración
│   ├── events/      # Schemas y Pub/Sub
│   ├── otel/        # Observabilidad
│   └── adk/         # Integración con Google ADK
├── templates/        # Manifiestos Kubernetes
├── infra/           # Scripts de infraestructura
├── scripts/         # Herramientas de desarrollo
└── deploy/          # Charts de Helm

Licencia

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors