Compare commits
3 Commits
644cc340fb
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 487ea57579 | |||
| 8bc82f170f | |||
| 74ce349e04 |
@@ -1,23 +1,21 @@
|
||||
# UNT (NOVA) Pipeline
|
||||
# UNT (NOVA) — Build Workflow
|
||||
#
|
||||
# Two stages:
|
||||
# build-* → runs on dev-side agent (label: location=local) to avoid server OOM
|
||||
# pushes to the registry over WireGuard (10.8.0.1:5000 — plain HTTP,
|
||||
# trusted because of the WG perimeter)
|
||||
# deploy → runs on server-side agent (label: location=server)
|
||||
# pulls via the public HTTPS path (same registry, different edge)
|
||||
# and runs docker compose on the host daemon
|
||||
# Runs on the dev-side agent (label: location=local) to avoid server OOM.
|
||||
# Pushes images to the registry over WireGuard (10.8.0.1:5000, plain HTTP,
|
||||
# trusted because of the WG perimeter).
|
||||
#
|
||||
# Trigger: manual only. See ppl/def/ci-cd/local-agent-rollout.md.
|
||||
# Triggered together with deploy.yml; deploy depends on this one.
|
||||
# See ppl/def/ci-cd/local-agent-rollout.md for the full flow.
|
||||
|
||||
when:
|
||||
- event: manual
|
||||
|
||||
labels:
|
||||
location: local
|
||||
|
||||
steps:
|
||||
- name: build-api
|
||||
image: plugins/docker
|
||||
labels:
|
||||
location: local
|
||||
settings:
|
||||
repo: 10.8.0.1:5000/unt/api
|
||||
registry: 10.8.0.1:5000
|
||||
@@ -30,8 +28,6 @@ steps:
|
||||
|
||||
- name: build-ui
|
||||
image: plugins/docker
|
||||
labels:
|
||||
location: local
|
||||
settings:
|
||||
repo: 10.8.0.1:5000/unt/ui
|
||||
registry: 10.8.0.1:5000
|
||||
@@ -41,21 +37,3 @@ steps:
|
||||
- ${CI_COMMIT_SHA:0:7}
|
||||
dockerfile: ctrl/Dockerfile.ui
|
||||
context: .
|
||||
|
||||
- name: deploy
|
||||
image: docker:24-cli
|
||||
labels:
|
||||
location: server
|
||||
depends_on:
|
||||
- build-api
|
||||
- build-ui
|
||||
commands:
|
||||
- cd /edge
|
||||
- docker compose pull
|
||||
- docker compose up -d --remove-orphans
|
||||
- docker image prune -f
|
||||
- docker compose ps
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
# read-only so the deploy step structurally cannot stomp on .env
|
||||
- /home/mariano/unt/ctrl/edge:/edge:ro
|
||||
|
||||
38
.woodpecker/deploy.yml
Normal file
38
.woodpecker/deploy.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
# UNT (NOVA) — Deploy Workflow
|
||||
#
|
||||
# Runs on the server-side agent (label: location=server).
|
||||
# Depends on build.yml completing — pulls the just-pushed images via the
|
||||
# public HTTPS path and runs docker compose on the host daemon.
|
||||
#
|
||||
# The edge compose dir is mounted read-only so we structurally cannot stomp
|
||||
# the server's .env (see ppl/def/ci-cd/auth-tiers.md context).
|
||||
|
||||
when:
|
||||
- event: manual
|
||||
|
||||
labels:
|
||||
location: server
|
||||
|
||||
depends_on:
|
||||
- build
|
||||
|
||||
# deploy doesn't need the repo — it runs docker compose against a host-mounted
|
||||
# dir. Skip the default clone to keep the UI clean.
|
||||
clone:
|
||||
- name: skip-clone
|
||||
image: alpine
|
||||
commands:
|
||||
- ":"
|
||||
|
||||
steps:
|
||||
- name: deploy
|
||||
image: docker:24-cli
|
||||
commands:
|
||||
- cd /edge
|
||||
- docker compose pull
|
||||
- docker compose up -d --remove-orphans
|
||||
- docker image prune -f
|
||||
- docker compose ps
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /home/mariano/unt/ctrl/edge:/edge:ro
|
||||
18
README.md
Normal file
18
README.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# stellar-ops / NOVA
|
||||
|
||||
Airline operations platform built with MCP (Model Context Protocol). Connects AI agents to real-time flight data, crew duty status, weather, and airport conditions to assist with irregular ops — flight disruptions, crew rebooking, and passenger notifications.
|
||||
|
||||
Two agent clients share a common set of MCP servers:
|
||||
|
||||
- **EFH agent** — internal ops-facing, monitors disruptions and drives crew/rebooking decisions
|
||||
- **Handover agent** — passenger-facing, generates notifications and status updates
|
||||
|
||||
## Docs
|
||||
|
||||
Browse the architecture docs locally:
|
||||
|
||||
```bash
|
||||
python -m http.server 8000 --directory docs
|
||||
```
|
||||
|
||||
Then open `http://localhost:8000`.
|
||||
103
ctrl/deploy.sh
103
ctrl/deploy.sh
@@ -1,103 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Deploy UNT (NOVA) to server
|
||||
# Usage: ./ctrl/deploy.sh [push|rsync|sync|restart|edge]
|
||||
#
|
||||
# push — (default) build images locally, push to registry, deploy (avoids OOM on server)
|
||||
# rsync — sync source, rebuild images on server, restart (bypass CI)
|
||||
# sync — sync source only (no rebuild, no restart)
|
||||
# restart — restart containers (no sync, no rebuild)
|
||||
# edge — pull latest images from registry and restart
|
||||
#
|
||||
# Note: code is baked into the image (no volume mounts), so code changes
|
||||
# need a rebuild (rsync | edge). Config-only changes (docker-compose, .env
|
||||
# already on server) can use `restart`.
|
||||
|
||||
set -e
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
SERVER="mcrn.ar"
|
||||
REMOTE_DIR="~/unt"
|
||||
|
||||
do_sync() {
|
||||
echo "=== Syncing source to $SERVER ==="
|
||||
rsync -avz --exclude='.git' --exclude='node_modules' --exclude='.venv' \
|
||||
--exclude='ui/app/dist' --exclude='__pycache__' \
|
||||
--exclude='ctrl/edge/.env' \
|
||||
--filter=':- .gitignore' \
|
||||
. "$SERVER:$REMOTE_DIR/"
|
||||
}
|
||||
|
||||
do_rebuild_and_restart() {
|
||||
echo "=== Building and restarting on server ==="
|
||||
ssh "$SERVER" << 'EOF'
|
||||
cd ~/unt
|
||||
docker build -t registry.mcrn.ar/unt/api:latest -f ctrl/Dockerfile.api .
|
||||
docker build -t registry.mcrn.ar/unt/ui:latest -f ctrl/Dockerfile.ui .
|
||||
cd ctrl/edge
|
||||
[ -f .env ] || cp .env.example .env
|
||||
docker compose up -d --remove-orphans --force-recreate
|
||||
docker image prune -f
|
||||
docker compose ps
|
||||
EOF
|
||||
}
|
||||
|
||||
do_restart() {
|
||||
echo "=== Restarting containers on $SERVER ==="
|
||||
ssh "$SERVER" << 'EOF'
|
||||
cd ~/unt/ctrl/edge
|
||||
docker compose up -d --remove-orphans --force-recreate
|
||||
docker compose ps
|
||||
EOF
|
||||
}
|
||||
|
||||
case "${1:-push}" in
|
||||
rsync)
|
||||
do_sync
|
||||
do_rebuild_and_restart
|
||||
;;
|
||||
|
||||
sync)
|
||||
do_sync
|
||||
;;
|
||||
|
||||
restart)
|
||||
do_restart
|
||||
;;
|
||||
|
||||
push)
|
||||
echo "=== Building images locally ==="
|
||||
docker build -t unt/api:latest -f ctrl/Dockerfile.api .
|
||||
docker build -t unt/ui:latest -f ctrl/Dockerfile.ui .
|
||||
|
||||
echo "=== Pushing to registry ==="
|
||||
/home/mariano/wdir/ppl/ctrl/push-image.sh unt/api latest
|
||||
/home/mariano/wdir/ppl/ctrl/push-image.sh unt/ui latest
|
||||
|
||||
echo "=== Pulling and restarting on $SERVER ==="
|
||||
ssh "$SERVER" << 'EOF'
|
||||
cd ~/unt/ctrl/edge
|
||||
docker compose pull
|
||||
docker compose up -d --remove-orphans --force-recreate
|
||||
docker image prune -f
|
||||
docker compose ps
|
||||
EOF
|
||||
;;
|
||||
|
||||
edge)
|
||||
echo "=== Pulling latest images on $SERVER ==="
|
||||
ssh "$SERVER" << 'EOF'
|
||||
cd ~/unt/ctrl/edge
|
||||
docker compose pull
|
||||
docker compose up -d --remove-orphans --force-recreate
|
||||
docker image prune -f
|
||||
docker compose ps
|
||||
EOF
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Usage: $0 [rsync|sync|restart|push|edge]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "=== Done ==="
|
||||
14
ctrl/project.json
Normal file
14
ctrl/project.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"images": [
|
||||
{
|
||||
"name": "unt/api",
|
||||
"dockerfile": "ctrl/Dockerfile.api",
|
||||
"context": "."
|
||||
},
|
||||
{
|
||||
"name": "unt/ui",
|
||||
"dockerfile": "ctrl/Dockerfile.ui",
|
||||
"context": "."
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user