Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 10 additions & 98 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,115 +1,27 @@
{
"name": "Aether-V Server",
"image": "mcr.microsoft.com/devcontainers/python:1-3.11-bullseye",
"name": "Aether-V",

// Let Codespaces use its default cached image (fastest possible)
// This is equivalent to having no devcontainer.json at all

// Use 'forwardPorts' to make a list of ports inside the container available locally
"forwardPorts": [8000],
"portsAttributes": {
"8000": {
"label": "FastAPI Server",
"onAutoForward": "notify"
}
},

// Configure tool-specific properties
"customizations": {
"vscode": {
"settings": {
"python.defaultInterpreterPath": "/workspaces/Aether-V/.venv/bin/python",
"python.linting.enabled": true,
"python.linting.pylintEnabled": false,
"python.linting.flake8Enabled": true,
"python.formatting.provider": "black",
"python.formatting.blackPath": "/workspaces/Aether-V/.venv/bin/black",
"python.linting.flake8Path": "/workspaces/Aether-V/.venv/bin/flake8",
"python.testing.pytestEnabled": true,
"python.testing.pytestPath": "/workspaces/Aether-V/.venv/bin/pytest",
"editor.formatOnSave": true,
"files.exclude": {
"**/__pycache__": true,
"**/*.pyc": true,
"**/venv": true,
"**/.venv": true,
"**/.pytest_cache": true
}
"python.defaultInterpreterPath": "/usr/local/python/current/bin/python",
"editor.formatOnSave": true
},
"extensions": [
"ms-python.python",
"ms-python.flake8",
"ms-python.black-formatter",
"ms-python.pylint",
"ms-toolsai.jupyter",
"ms-vscode.makefile-tools",
"redhat.vscode-yaml",
"ms-kubernetes-tools.vscode-kubernetes-tools",
"ms-vscode.powershell",
"bradlc.vscode-tailwindcss",
"esbenp.prettier-vscode",
"ms-vscode.vscode-json",
"GitHub.copilot",
"GitHub.copilot-chat"
"GitHub.copilot"
]
}
},

// Features to add to the dev container. More info: https://containers.dev/features
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"moby": true,
"azureDnsAutoDetection": true,
"installDockerBuildx": true
},
"ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {
"version": "latest",
"helm": "latest",
"minikube": "none"
},
"ghcr.io/devcontainers/features/node:1": {
"version": "lts",
"nodeGypDependencies": true
},
"ghcr.io/devcontainers/features/powershell:1": {
"version": "latest"
},
"ghcr.io/devcontainers/features/github-cli:1": {
"installDirectlyFromGitHubRelease": true,
"version": "latest"
}
},

// Use 'onCreateCommand' to run commands when creating the container
"onCreateCommand": {
"install-iso-tools": "sudo apt-get update && sudo apt-get install -y xorriso genisoimage mkisofs",
"install-kerberos-deps": "sudo apt-get install -y krb5-user libkrb5-dev libsasl2-dev",
"create-venv": "python -m venv /workspaces/Aether-V/.venv",
"install-app-deps": "/workspaces/Aether-V/.venv/bin/pip install -r /workspaces/Aether-V/server/requirements.txt",
"install-dev-deps": "/workspaces/Aether-V/.venv/bin/pip install flake8 black pytest pytest-asyncio pytest-cov httpx",
"create-artifacts-dirs": "mkdir -p /workspaces/Aether-V/server/artifacts/{isos,scripts}",
"setup-git-safe": "git config --global --add safe.directory /workspaces/Aether-V"
},
"postCreateCommand": "bash .devcontainer/setup.sh",

// Use 'postCreateCommand' to run commands after the container is created
"postCreateCommand": {
"setup-git-safe": "git config --global --add safe.directory /workspaces/Aether-V",
"create-env": "cd /workspaces/Aether-V/server && [ ! -f .env ] && cp .env.example .env || echo '.env already exists'"
},

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root
"remoteUser": "vscode",

// Set environment variables
"remoteEnv": {
"PYTHONPATH": "/workspaces/Aether-V/server",
"PYTHONDONTWRITEBYTECODE": "1",
"PYTHONUNBUFFERED": "1"
},

// Configure mounts for better performance and persistence
"mounts": [
"source=Aether-V-pip-cache,target=/home/vscode/.cache/pip,type=volume"
],

// Lifecycle scripts - set proper working directory
"workspaceFolder": "/workspaces/Aether-V",
"postStartCommand": "cd /workspaces/Aether-V/server"
"PYTHONPATH": "${containerWorkspaceFolder}/server"
}
}
44 changes: 44 additions & 0 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash
# DevContainer setup - runs once on container creation (non-blocking)

set -e

echo "🚀 Setting up Aether-V development environment..."

# Create .env if it doesn't exist
if [ ! -f server/.env ]; then
if [ -f server/.env.example ]; then
cp server/.env.example server/.env
echo "✅ Created server/.env from example"
fi
fi

# Install PowerShell if not present (needed for ISO builds)
if ! command -v pwsh &> /dev/null; then
echo "📦 Installing PowerShell..."
sudo apt-get update -qq
sudo apt-get install -y -qq wget apt-transport-https software-properties-common > /dev/null 2>&1
wget -q "https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb"
sudo dpkg -i packages-microsoft-prod.deb > /dev/null 2>&1
rm packages-microsoft-prod.deb
sudo apt-get update -qq
sudo apt-get install -y -qq powershell > /dev/null 2>&1
echo "✅ PowerShell installed"
else
echo "✅ PowerShell already installed"
fi

# Install Python dependencies for IntelliSense
echo "📦 Installing Python packages for IntelliSense..."
pip install --no-cache-dir -r server/requirements.txt
pip install --no-cache-dir pytest pytest-asyncio pytest-cov httpx black flake8

echo ""
echo "✅ DevContainer ready!"
echo ""
echo "Quick start:"
echo " make build - Build production image"
echo " make run - Run the application"
echo " make test - Run all tests"
echo ""
echo "See 'make help' for all commands."
130 changes: 130 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# ============================================================================
# .dockerignore for Aether-V monorepo
# Build context: repository root
# Used by: docker build -t aetherv:latest .
# ============================================================================

# Version Control
# ============================================================================
.git/
.gitignore
.gitattributes
.github/

# Development Environment
# ============================================================================
.devcontainer/
.vscode/
.idea/
*.swp
*.swo
*~

# Python
# ============================================================================
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# Python Virtual Environments
.venv/
venv/
ENV/
env/

# Python Testing & Coverage
.pytest_cache/
.coverage
htmlcov/
.tox/
.hypothesis/
.mypy_cache/
.ruff_cache/

# Node.js & npm
# ============================================================================
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.npm
.yarn-integrity
package-lock.json

# Svelte / SvelteKit
# ============================================================================
.svelte-kit/
next-ui/.svelte-kit/
next-ui/node_modules/

# Logs
# ============================================================================
*.log
logs/

# Operating System
# ============================================================================
.DS_Store
Thumbs.db
Desktop.ini
*.tmp
*.bak
*.old

# Documentation (not needed in runtime container)
# ============================================================================
Docs/
*.md
!server/app/templates/*.md
LICENSE

# Build Tools (not needed in runtime container)
# ============================================================================
Makefile
build-tools/
Scripts/

# Testing (not needed in runtime container)
# ============================================================================
tests/
server/tests/
Powershell/tests/

# Development Scripts
# ============================================================================
server/dev.sh
server/setup-dev.sh
validate-setup.sh
vulture_whitelist.py

# Build Artifacts (copied explicitly via Dockerfile COPY)
# ============================================================================
# These are built by `make build-assets` and explicitly copied:
# - ISOs/ (WindowsProvisioning.iso, LinuxProvisioning.iso)
# - next-ui/build/ (built Svelte app)
# - server/app/static/icons/ (extracted Material Symbols)
# - server/app/static/swagger-ui/ (extracted Swagger UI)

# Cache directories
# ============================================================================
.cache/
*.cache

40 changes: 32 additions & 8 deletions .github/workflows/build-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Build all assets (ISOs and static files) in build-tools container
run: |
docker run --rm \
-v "${{ github.workspace }}:/github/workspace" \
-w /github/workspace \
ghcr.io/${{ github.repository_owner }}/aetherv-build-tools:latest \
Scripts/Build-All-Assets.ps1 -OutputPath ISOs
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Build all assets using Makefile
run: make build-assets

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -69,12 +69,30 @@ jobs:
type=ref,event=pr,prefix=pr-
type=sha,format=short,prefix=sha-

- name: Capture build metadata
id: buildmeta
run: |
echo "git_commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
echo "git_ref=$(git symbolic-ref -q --short HEAD || git rev-parse --abbrev-ref HEAD || echo unknown)" >> $GITHUB_OUTPUT
if git rev-parse --verify HEAD >/dev/null 2>&1; then
if git symbolic-ref -q HEAD >/dev/null 2>&1; then
echo "git_state=branch" >> $GITHUB_OUTPUT
else
echo "git_state=detached" >> $GITHUB_OUTPUT
fi
else
echo "git_state=unknown" >> $GITHUB_OUTPUT
fi
echo "version=$(cat version || echo unknown)" >> $GITHUB_OUTPUT
echo "build_time=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
echo "build_host=$(hostname)" >> $GITHUB_OUTPUT

- name: Build Docker image (single build for test + push)
id: build
uses: docker/build-push-action@v6
with:
context: .
file: ./server/Dockerfile
file: ./Dockerfile
push: false
load: true
tags: |
Expand All @@ -86,6 +104,12 @@ jobs:
provenance: false
sbom: false
build-args: |
GIT_COMMIT=${{ steps.buildmeta.outputs.git_commit }}
GIT_REF=${{ steps.buildmeta.outputs.git_ref }}
GIT_STATE=${{ steps.buildmeta.outputs.git_state }}
VERSION=${{ steps.buildmeta.outputs.version }}
BUILD_TIME=${{ steps.buildmeta.outputs.build_time }}
BUILD_HOST=${{ steps.buildmeta.outputs.build_host }}
GITHUB_REPOSITORY=${{ github.repository }}

- name: Run server smoke tests
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,28 @@ jobs:
PYTHONPATH: ${{ github.workspace }}/server
run: |
.venv/bin/pytest tests/test_noop_operations.py -v

svelte:
name: Svelte build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: next-ui/package-lock.json

- name: Build Svelte UI
run: make build-next-ui

- name: Check build output
run: |
if [ ! -d "next-ui/build" ]; then
echo "Build directory not found!"
exit 1
fi
echo "✅ Svelte build successful"
Loading