chore: fix commands

This commit is contained in:
Jesús Pérez 2026-02-18 00:03:05 +00:00
parent d2a48fb549
commit 49c09ff8fd
Signed by: jesus
GPG Key ID: 9F243E355E0BC939
5 changed files with 105 additions and 33 deletions

View File

@ -48,30 +48,8 @@ repos:
hooks:
- id: solid-boundary-check
name: SOLID Architecture Boundaries
entry: bash -c '
VIOLATIONS=$(git diff --cached --name-only --diff-filter=ACM |
grep -E "\.(nu|rs)$" |
grep -v "templates/" |
grep -v "extensions/providers/" |
grep -v "orchestrator/" |
xargs grep -lE "^\^hcloud|^\^aws |^\^doctl|hcloud server" 2>/dev/null |
grep -v "^$") ;
if [ -n "$VIOLATIONS" ]; then
echo "SOLID VIOLATION: Provider API calls outside orchestrator:";
echo "$VIOLATIONS";
exit 1;
fi ;
SSH_VIOLATIONS=$(git diff --cached --name-only --diff-filter=ACM |
grep -E "\.(rs)$" |
grep -E "control-center|vault-service" |
xargs grep -lE "ssh2?::|russh::" 2>/dev/null) ;
if [ -n "$SSH_VIOLATIONS" ]; then
echo "SOLID VIOLATION: SSH code outside orchestrator:";
echo "$SSH_VIOLATIONS";
exit 1;
fi
'
language: system
entry: .pre-commit-hooks/solid-boundary-check.sh
language: script
pass_filenames: false
stages: [pre-commit]

View File

@ -0,0 +1,27 @@
#!/usr/bin/env bash
set -euo pipefail
VIOLATIONS=$(git diff --cached --name-only --diff-filter=ACM |
grep -E "\.(nu|rs)$" |
grep -v "templates/" |
grep -v "extensions/providers/" |
grep -v "orchestrator/" |
xargs grep -lE "^\^hcloud|^\^aws |^\^doctl|hcloud server" 2>/dev/null |
grep -v "^$") || true
if [ -n "$VIOLATIONS" ]; then
echo "SOLID VIOLATION: Provider API calls outside orchestrator:"
echo "$VIOLATIONS"
exit 1
fi
SSH_VIOLATIONS=$(git diff --cached --name-only --diff-filter=ACM |
grep -E "\.(rs)$" |
grep -E "control-center|vault-service" |
xargs grep -lE "ssh2?::|russh::" 2>/dev/null) || true
if [ -n "$SSH_VIOLATIONS" ]; then
echo "SOLID VIOLATION: SSH code outside orchestrator:"
echo "$SSH_VIOLATIONS"
exit 1
fi

View File

@ -22,7 +22,7 @@ TypeDialog enables interactive form-based configuration from Nickel schemas.
├── templates/ # Jinja2 templates for schema rendering
│ └── service-form.template.j2
├── schemas/ # Symlink to Nickel schemas
│ └── platform/schemas/ → ../../../schemas/platform/schemas/
│ └── platform/schemas/ → ../../../schemas/platform/
└── constraints/ # Validation constraints
└── constraints.toml # Shared validation rules
```
@ -97,7 +97,7 @@ typedialog --version
```toml
# Batch generate all forms
for schema in provisioning/schemas/platform/schemas/*.ncl; do
for schema in provisioning/schemas/platform/*.ncl; do
service=$(basename $schema .ncl)
typedialog generate-form
--schema $schema

View File

@ -25,7 +25,7 @@ COPY src ./src
RUN cargo build --release --bin api-gateway
# Runtime stage
FROM debian:bookworm-slim
FROM debian:trixie-slim
# Install runtime dependencies
RUN apt-get update && apt-get install -y \

View File

@ -5,8 +5,8 @@ services:
# Orchestrator - Core workflow coordination
orchestrator:
build:
context: ../../crates/orchestrator
dockerfile: Dockerfile
context: ../..
dockerfile: crates/orchestrator/Dockerfile
container_name: provisioning-orchestrator
ports:
- "8080:8080"
@ -30,8 +30,8 @@ services:
# Control Center - Web UI
control-center:
build:
context: ../../crates/control-center
dockerfile: Dockerfile
context: ../..
dockerfile: crates/control-center/Dockerfile
container_name: provisioning-control-center
command: ["control-center", "--config", "/etc/provisioning/config.defaults.toml"]
ports:
@ -117,8 +117,8 @@ services:
# MCP Server - Model Context Protocol
mcp-server:
build:
context: ../../crates/mcp-server
dockerfile: Dockerfile
context: ../..
dockerfile: crates/mcp-server/Dockerfile
container_name: provisioning-mcp-server
ports:
- "8082:8082"
@ -168,6 +168,65 @@ services:
networks:
- provisioning-net
# Provisioning Daemon - Core provisioning service
provisioning-daemon:
build:
context: ../..
dockerfile: crates/provisioning-daemon/Dockerfile
container_name: provisioning-daemon
ports:
- "8079:8079"
volumes:
- daemon-data:/data
- daemon-config:/etc/provisioning
environment:
- RUST_LOG=info
- DATA_DIR=/data
- PROVISIONING_DAEMON_MODE=solo
- PROVISIONING_CONFIG_DIR=/etc/provisioning
depends_on:
orchestrator:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8079/api/v1/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
restart: unless-stopped
networks:
- provisioning-net
# RAG Service - Retrieval-Augmented Generation service
provisioning-rag:
build:
context: ../..
dockerfile: crates/rag/docker/Dockerfile
container_name: provisioning-rag
ports:
- "9090:9090"
volumes:
- rag-data:/app/data
- rag-cache:/app/cache
environment:
- PROVISIONING_LOG_LEVEL=info
- PROVISIONING_API_HOST=0.0.0.0
- PROVISIONING_API_PORT=9090
- PROVISIONING_CACHE_SIZE=1000
- PROVISIONING_CACHE_TTL_SECS=3600
depends_on:
orchestrator:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9090/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 5s
restart: unless-stopped
networks:
- provisioning-net
volumes:
orchestrator-data:
driver: local
@ -181,6 +240,14 @@ volumes:
driver: local
mcp-server-data:
driver: local
daemon-data:
driver: local
daemon-config:
driver: local
rag-data:
driver: local
rag-cache:
driver: local
networks:
provisioning-net: