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: hooks:
- id: solid-boundary-check - id: solid-boundary-check
name: SOLID Architecture Boundaries name: SOLID Architecture Boundaries
entry: bash -c ' entry: .pre-commit-hooks/solid-boundary-check.sh
VIOLATIONS=$(git diff --cached --name-only --diff-filter=ACM | language: script
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
pass_filenames: false pass_filenames: false
stages: [pre-commit] 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 ├── templates/ # Jinja2 templates for schema rendering
│ └── service-form.template.j2 │ └── service-form.template.j2
├── schemas/ # Symlink to Nickel schemas ├── schemas/ # Symlink to Nickel schemas
│ └── platform/schemas/ → ../../../schemas/platform/schemas/ │ └── platform/schemas/ → ../../../schemas/platform/
└── constraints/ # Validation constraints └── constraints/ # Validation constraints
└── constraints.toml # Shared validation rules └── constraints.toml # Shared validation rules
``` ```
@ -97,7 +97,7 @@ typedialog --version
```toml ```toml
# Batch generate all forms # 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) service=$(basename $schema .ncl)
typedialog generate-form typedialog generate-form
--schema $schema --schema $schema

View File

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

View File

@ -5,8 +5,8 @@ services:
# Orchestrator - Core workflow coordination # Orchestrator - Core workflow coordination
orchestrator: orchestrator:
build: build:
context: ../../crates/orchestrator context: ../..
dockerfile: Dockerfile dockerfile: crates/orchestrator/Dockerfile
container_name: provisioning-orchestrator container_name: provisioning-orchestrator
ports: ports:
- "8080:8080" - "8080:8080"
@ -30,8 +30,8 @@ services:
# Control Center - Web UI # Control Center - Web UI
control-center: control-center:
build: build:
context: ../../crates/control-center context: ../..
dockerfile: Dockerfile dockerfile: crates/control-center/Dockerfile
container_name: provisioning-control-center container_name: provisioning-control-center
command: ["control-center", "--config", "/etc/provisioning/config.defaults.toml"] command: ["control-center", "--config", "/etc/provisioning/config.defaults.toml"]
ports: ports:
@ -117,8 +117,8 @@ services:
# MCP Server - Model Context Protocol # MCP Server - Model Context Protocol
mcp-server: mcp-server:
build: build:
context: ../../crates/mcp-server context: ../..
dockerfile: Dockerfile dockerfile: crates/mcp-server/Dockerfile
container_name: provisioning-mcp-server container_name: provisioning-mcp-server
ports: ports:
- "8082:8082" - "8082:8082"
@ -168,6 +168,65 @@ services:
networks: networks:
- provisioning-net - 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: volumes:
orchestrator-data: orchestrator-data:
driver: local driver: local
@ -181,6 +240,14 @@ volumes:
driver: local driver: local
mcp-server-data: mcp-server-data:
driver: local driver: local
daemon-data:
driver: local
daemon-config:
driver: local
rag-data:
driver: local
rag-cache:
driver: local
networks: networks:
provisioning-net: provisioning-net: