Compare commits
5 Commits
1ae1456502
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 487ea57579 | |||
| 8bc82f170f | |||
| 74ce349e04 | |||
| 644cc340fb | |||
| 1ed2ad06b8 |
@@ -1,15 +1,25 @@
|
||||
# UNT (NOVA) Pipeline
|
||||
# UNT (NOVA) — Build Workflow
|
||||
#
|
||||
# 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).
|
||||
#
|
||||
# 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: push
|
||||
- event: manual
|
||||
|
||||
labels:
|
||||
location: local
|
||||
|
||||
steps:
|
||||
- name: build-api
|
||||
image: plugins/docker
|
||||
settings:
|
||||
repo: registry.mcrn.ar/unt/api
|
||||
registry: registry.mcrn.ar
|
||||
repo: 10.8.0.1:5000/unt/api
|
||||
registry: 10.8.0.1:5000
|
||||
insecure: true
|
||||
tags:
|
||||
- latest
|
||||
- ${CI_COMMIT_SHA:0:7}
|
||||
@@ -19,8 +29,9 @@ steps:
|
||||
- name: build-ui
|
||||
image: plugins/docker
|
||||
settings:
|
||||
repo: registry.mcrn.ar/unt/ui
|
||||
registry: registry.mcrn.ar
|
||||
repo: 10.8.0.1:5000/unt/ui
|
||||
registry: 10.8.0.1:5000
|
||||
insecure: true
|
||||
tags:
|
||||
- latest
|
||||
- ${CI_COMMIT_SHA:0:7}
|
||||
|
||||
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`.
|
||||
@@ -5,8 +5,14 @@
|
||||
|
||||
allow_k8s_contexts('kind-unt')
|
||||
|
||||
# Create namespace first to avoid race conditions
|
||||
local('kubectl create namespace unt --dry-run=client -o yaml | kubectl apply -f -')
|
||||
# Hard guard: Tilt deploys to whatever the shell's current kubectl context is,
|
||||
# and allow_k8s_contexts auto-permits any local-looking (kind-*) cluster.
|
||||
# Fail early instead of silently landing the workload in the wrong cluster.
|
||||
if k8s_context() != 'kind-unt':
|
||||
fail("Wrong kubectl context: '%s'. Run: kubectl config use-context kind-unt" % k8s_context())
|
||||
|
||||
# Create namespace first to avoid race conditions (pin cluster explicitly)
|
||||
local('kubectl --context kind-unt create namespace unt --dry-run=client -o yaml | kubectl --context kind-unt apply -f -')
|
||||
|
||||
# Apply k8s manifests via kustomize (dev overlay)
|
||||
k8s_yaml(kustomize('k8s/overlays/dev'))
|
||||
@@ -42,7 +48,7 @@ docker_build(
|
||||
# --- Resources ---
|
||||
|
||||
k8s_resource('api')
|
||||
k8s_resource('ui', resource_deps=['api'], port_forwards=['8040:80'])
|
||||
k8s_resource('ui', resource_deps=['api'])
|
||||
|
||||
# Group infra resources
|
||||
k8s_resource(
|
||||
|
||||
103
ctrl/deploy.sh
103
ctrl/deploy.sh
@@ -1,103 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Deploy UNT (NOVA) to server
|
||||
# Usage: ./ctrl/deploy.sh [rsync|sync|restart|push|edge]
|
||||
#
|
||||
# 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)
|
||||
# push — build images locally, push to registry, deploy (avoids OOM on server)
|
||||
# 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:-rsync}" in
|
||||
rsync)
|
||||
do_sync
|
||||
do_rebuild_and_restart
|
||||
;;
|
||||
|
||||
sync)
|
||||
do_sync
|
||||
;;
|
||||
|
||||
restart)
|
||||
do_restart
|
||||
;;
|
||||
|
||||
push)
|
||||
echo "=== Building images locally ==="
|
||||
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 .
|
||||
|
||||
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": "."
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -228,6 +228,55 @@
|
||||
vertical-align: top;
|
||||
}
|
||||
.cmp-table tr:last-child td { border-bottom: none; }
|
||||
|
||||
/* Mobile menu toggle — hidden on desktop */
|
||||
.menu-toggle {
|
||||
display: none;
|
||||
background: transparent;
|
||||
border: 1px solid #1e2a4a;
|
||||
color: #e8eaf0;
|
||||
padding: 6px 10px;
|
||||
font-family: 'JetBrains Mono', monospace;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
line-height: 1;
|
||||
margin-left: auto;
|
||||
}
|
||||
.menu-toggle:hover { background: #1a2340; }
|
||||
|
||||
.nav-backdrop {
|
||||
display: none;
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
z-index: 10;
|
||||
}
|
||||
.layout.nav-open .nav-backdrop { display: block; }
|
||||
|
||||
@media (max-width: 720px) {
|
||||
header { padding: 10px 12px; gap: 8px; }
|
||||
header h1 { font-size: 16px; letter-spacing: 1px; }
|
||||
header .subtitle { display: none; }
|
||||
.menu-toggle { display: inline-block; }
|
||||
|
||||
.layout { position: relative; }
|
||||
nav {
|
||||
position: absolute;
|
||||
left: 0; top: 0; bottom: 0;
|
||||
width: 220px;
|
||||
z-index: 20;
|
||||
transform: translateX(-100%);
|
||||
transition: transform 0.2s ease;
|
||||
box-shadow: 2px 0 8px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.layout.nav-open nav { transform: translateX(0); }
|
||||
|
||||
main { padding: 16px; }
|
||||
.graph-section h2 { font-size: 13px; }
|
||||
.prose p, .prose ul { font-size: 13px; }
|
||||
.cmp-table { font-size: 12px; }
|
||||
.cmp-table th, .cmp-table td { padding: 6px 8px; }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
@@ -235,9 +284,11 @@
|
||||
<header>
|
||||
<h1>STELLAR AIR</h1>
|
||||
<span class="subtitle">NOVA Operations Platform — Architecture</span>
|
||||
<button class="menu-toggle" onclick="toggleNav()" aria-label="Toggle navigation">☰</button>
|
||||
</header>
|
||||
|
||||
<div class="layout">
|
||||
<div class="nav-backdrop" onclick="toggleNav()"></div>
|
||||
|
||||
<nav>
|
||||
<a class="active" onclick="show('walkthrough')">Walkthrough</a>
|
||||
@@ -485,8 +536,13 @@ function show(id) {
|
||||
document.getElementById(id).classList.add('active');
|
||||
var navLink = document.querySelector('nav a[onclick="show(\'' + id + '\')"]');
|
||||
if (navLink) navLink.classList.add('active');
|
||||
// auto-close the mobile drawer after selecting
|
||||
document.querySelector('.layout').classList.remove('nav-open');
|
||||
}
|
||||
|
||||
function toggleNav() {
|
||||
document.querySelector('.layout').classList.toggle('nav-open');
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
@@ -72,7 +72,9 @@ provide('showInternals', showInternals)
|
||||
.app-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 24px;
|
||||
row-gap: 8px;
|
||||
padding: 12px 24px;
|
||||
background: var(--surface-1);
|
||||
border-bottom: var(--panel-border);
|
||||
@@ -130,4 +132,31 @@ provide('showInternals', showInternals)
|
||||
overflow: auto;
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
.app-header {
|
||||
gap: 8px;
|
||||
padding: 8px 12px;
|
||||
}
|
||||
.app-title h1 {
|
||||
font-size: 15px;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
.app-subtitle {
|
||||
display: none;
|
||||
}
|
||||
.app-nav {
|
||||
flex-wrap: wrap;
|
||||
margin-left: 0;
|
||||
width: 100%;
|
||||
order: 2;
|
||||
}
|
||||
.app-nav a {
|
||||
padding: 4px 10px;
|
||||
font-size: 11px;
|
||||
}
|
||||
.app-main {
|
||||
padding: 12px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -67,4 +67,13 @@ select {
|
||||
select:focus {
|
||||
outline: 1px solid var(--accent);
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
.scenario-selector {
|
||||
gap: 4px;
|
||||
margin-left: auto;
|
||||
}
|
||||
.scenario-selector label { display: none; }
|
||||
.scenario-selector select { font-size: 11px; padding: 2px 6px; }
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -96,9 +96,17 @@ onMounted(loadFlights)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div :class="['ops-layout', { split: showOps && showInternals }]">
|
||||
<div :class="['ops-layout', { split: showOps && showInternals, 'ops-collapsed': !showOps && showInternals }]">
|
||||
<!-- Ops pane (left) -->
|
||||
<div v-show="showOps" class="ops-pane">
|
||||
<div class="ops-pane" :class="{ collapsed: !showOps && showInternals, solo: !showInternals }">
|
||||
<div v-if="showInternals" class="pane-controls">
|
||||
<button
|
||||
class="ops-collapse-btn"
|
||||
@click="showOps = false"
|
||||
aria-label="Collapse ops pane"
|
||||
title="Collapse"
|
||||
>‹</button>
|
||||
</div>
|
||||
<Panel title="FCE — Behind Every Departure" :status="fceStatus">
|
||||
<template #actions>
|
||||
<select v-model="selectedFlight" class="flight-select">
|
||||
@@ -125,6 +133,15 @@ onMounted(loadFlights)
|
||||
</Panel>
|
||||
</div>
|
||||
|
||||
<!-- Show-ops tab when ops is collapsed -->
|
||||
<button
|
||||
v-if="!showOps && showInternals"
|
||||
class="ops-expand-tab"
|
||||
@click="showOps = true"
|
||||
aria-label="Show ops pane"
|
||||
title="Show ops"
|
||||
>›</button>
|
||||
|
||||
<!-- Internals pane (right) -->
|
||||
<div v-show="showInternals" class="internals-pane">
|
||||
<Panel title="Agent Graph" :status="agentStatus">
|
||||
@@ -172,8 +189,60 @@ onMounted(loadFlights)
|
||||
overflow: auto;
|
||||
height: 100%;
|
||||
min-width: 0;
|
||||
transition: flex-grow 0.25s ease, max-width 0.25s ease, max-height 0.25s ease,
|
||||
padding 0.25s ease, opacity 0.2s ease, transform 0.25s ease;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* Collapsed state: slides off to the left, yields its flex space to internals. */
|
||||
.ops-layout.ops-collapsed > .ops-pane.collapsed {
|
||||
flex: 0 0 0;
|
||||
max-width: 0;
|
||||
opacity: 0;
|
||||
transform: translateX(-100%);
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.pane-controls {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
flex-shrink: 0;
|
||||
margin-bottom: -16px; /* absorb into gap so it doesn't add visual height */
|
||||
}
|
||||
|
||||
.ops-collapse-btn {
|
||||
background: var(--surface-2);
|
||||
color: var(--text-secondary);
|
||||
border: var(--panel-border);
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
font-family: var(--font-mono);
|
||||
font-size: 14px;
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
}
|
||||
.ops-collapse-btn:hover { color: var(--text-primary); background: var(--surface-3); }
|
||||
|
||||
.ops-expand-tab {
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
left: 0;
|
||||
z-index: 3;
|
||||
background: var(--surface-2);
|
||||
color: var(--text-secondary);
|
||||
border: var(--panel-border);
|
||||
width: 22px;
|
||||
height: 48px;
|
||||
font-family: var(--font-mono);
|
||||
font-size: 16px;
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
}
|
||||
.ops-expand-tab:hover { color: var(--accent); background: var(--surface-3); }
|
||||
|
||||
.internals-pane {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -282,4 +351,34 @@ onMounted(loadFlights)
|
||||
font-family: var(--font-mono);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
@media (max-width: 720px) {
|
||||
.ops-layout {
|
||||
flex-direction: column;
|
||||
height: calc(100vh - 130px); /* topbar wraps to ~2 rows on mobile */
|
||||
gap: 12px;
|
||||
}
|
||||
.ops-layout.split > .internals-pane {
|
||||
border-left: none;
|
||||
padding-left: 0;
|
||||
border-top: var(--panel-border);
|
||||
padding-top: 12px;
|
||||
}
|
||||
.ops-pane { gap: 12px; }
|
||||
|
||||
/* Collapse shrinks vertical space in a column flex, still slides horizontally. */
|
||||
.ops-layout.ops-collapsed > .ops-pane.collapsed {
|
||||
max-width: none;
|
||||
max-height: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.ops-expand-tab {
|
||||
/* On mobile keep the tab at top-left of the stacked layout */
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.flight-select { font-size: 11px; padding: 4px 6px; max-width: 60%; }
|
||||
.run-btn { font-size: 11px; padding: 4px 10px; }
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -42,6 +42,9 @@
|
||||
--panel-radius: 6px;
|
||||
--panel-border: 1px solid var(--border);
|
||||
--panel-header-height: 36px;
|
||||
|
||||
/* breakpoints — documentation anchor; write @media (max-width: 720px) directly */
|
||||
--bp-mobile: 720px;
|
||||
}
|
||||
|
||||
/* Animated gradient outline for buttons in a waiting state.
|
||||
|
||||
Reference in New Issue
Block a user