Files
chorus-services/build-and-push.sh
tony b45c9c537e feat: correct SLURP/HCFS architecture and complete Docker integration
Major architectural correction based on user clarification:

ARCHITECTURE CHANGES:
- SLURP: Context curator service that processes Hypercore logs, filters by role/triggers, serves via SQL
- HCFS: FUSE filesystem overlay embedded in sandbox Docker images, not a separate service
- Agents access context transparently through filesystem operations via HCFS → SLURP

DOCKER CONFIGURATION:
- Renamed slurp-api → slurp-curator throughout all configurations
- Created proper Dockerfiles for SLURP curator and COOEE RL tuner services
- Updated environment variables to reflect curator service role
- Fixed missing slurp_data volume in docker-compose.yml

UPDATED FILES:
- README.md: Corrected SLURP description from "Context Management" to "Context Curator Service"
- docker-compose.yml: Service rename, environment updates, added missing volume
- docker-compose.swarm.yml: Production deployment with correct service names
- build-and-push.sh: Updated to build slurp-curator service
- chorus.sh: Updated service references and endpoints
- init-db.sql: Database initialization for curator service
- modules/slurp/Dockerfile: New curator service container
- modules/slurp/Dockerfile.rl-tuner: New COOEE RL tuner container

VALIDATION:
- WHOOSH submodule validated: proper Dockerfiles and dependencies present
- BZZZ submodule integrated: build issues identified in original repo (requires separate fix)
- All Docker configurations updated to reflect correct architecture

MEMORY UPDATES:
- project_overview: Updated with correct SLURP/HCFS roles and current project status
- Removed references to deprecated HMMM component

This commit ensures all configuration reflects the correct architectural understanding
where SLURP curates context from logs and HCFS provides transparent filesystem access
to that curated context within agent sandbox environments.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-01 10:01:34 +10:00

179 lines
5.0 KiB
Bash
Executable File

#!/bin/bash
# CHORUS Services - Build and Push Script
# Builds all Docker images and pushes them to the local registry
set -e
REGISTRY="registry.home.deepblack.cloud"
REGISTRY_USER="tony"
REGISTRY_PASS="silverfrond[1392]"
TAG="latest"
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
# Print colored output
print_info() {
echo -e "${BLUE}[INFO]${NC} $1"
}
print_success() {
echo -e "${GREEN}[SUCCESS]${NC} $1"
}
print_warning() {
echo -e "${YELLOW}[WARNING]${NC} $1"
}
print_error() {
echo -e "${RED}[ERROR]${NC} $1"
}
# Docker registry login
docker_login() {
print_info "Logging into Docker registry: $REGISTRY"
echo "$REGISTRY_PASS" | docker login "$REGISTRY" --username "$REGISTRY_USER" --password-stdin
print_success "Successfully logged into registry"
}
# Build and push a single image
build_and_push() {
local name=$1
local context=$2
local dockerfile=${3:-"Dockerfile"}
local image_name="$REGISTRY/tony/chorus-${name}:$TAG"
print_info "Building $name from $context"
if [ -f "$context/$dockerfile" ]; then
docker build -t "$image_name" -f "$context/$dockerfile" "$context"
print_success "Built $image_name"
print_info "Pushing $image_name to registry"
docker push "$image_name"
print_success "Pushed $image_name"
else
print_error "Dockerfile not found: $context/$dockerfile"
return 1
fi
}
# Main build process
main() {
print_info "Starting CHORUS Services build and push process"
# Login to registry
docker_login
# Build and push all images
print_info "Building all CHORUS Services components..."
# WHOOSH Backend
if [ -d "modules/whoosh/backend" ]; then
build_and_push "whoosh-backend" "modules/whoosh/backend"
else
print_warning "WHOOSH backend directory not found - skipping"
fi
# WHOOSH Frontend
if [ -d "modules/whoosh/frontend" ]; then
build_and_push "whoosh-frontend" "modules/whoosh/frontend"
else
print_warning "WHOOSH frontend directory not found - skipping"
fi
# BZZZ Coordinator
if [ -d "modules/bzzz" ]; then
build_and_push "bzzz-coordinator" "modules/bzzz"
else
print_warning "BZZZ directory not found - skipping"
fi
# SLURP Curator
if [ -d "modules/slurp" ]; then
build_and_push "slurp-curator" "modules/slurp"
else
print_warning "SLURP Curator directory not found - skipping"
fi
# SLURP RL Tuner
if [ -d "modules/slurp" ] && [ -f "modules/slurp/Dockerfile.rl-tuner" ]; then
build_and_push "slurp-rl-tuner" "modules/slurp" "Dockerfile.rl-tuner"
else
print_warning "SLURP RL Tuner dockerfile not found - skipping"
fi
# Marketing Website
if [ -d "modules/website" ]; then
build_and_push "website" "modules/website"
else
print_warning "Website directory not found - skipping"
fi
print_success "All CHORUS Services images built and pushed successfully!"
# List pushed images
print_info "Pushed images:"
echo " - $REGISTRY/tony/chorus-whoosh-backend:$TAG"
echo " - $REGISTRY/tony/chorus-whoosh-frontend:$TAG"
echo " - $REGISTRY/tony/chorus-bzzz-coordinator:$TAG"
echo " - $REGISTRY/tony/chorus-slurp-curator:$TAG"
echo " - $REGISTRY/tony/chorus-slurp-rl-tuner:$TAG"
echo " - $REGISTRY/tony/chorus-website:$TAG"
}
# Handle command line arguments
case "${1:-}" in
"login")
docker_login
;;
"whoosh-backend")
docker_login
build_and_push "whoosh-backend" "modules/whoosh/backend"
;;
"whoosh-frontend")
docker_login
build_and_push "whoosh-frontend" "modules/whoosh/frontend"
;;
"bzzz")
docker_login
build_and_push "bzzz-coordinator" "modules/bzzz"
;;
"slurp-curator")
docker_login
build_and_push "slurp-curator" "modules/slurp"
;;
"slurp-rl-tuner")
docker_login
build_and_push "slurp-rl-tuner" "modules/slurp" "Dockerfile.rl-tuner"
;;
"website")
docker_login
build_and_push "website" "modules/website"
;;
"help"|"-h"|"--help")
echo "CHORUS Services Build and Push Script"
echo ""
echo "Usage: $0 [COMMAND]"
echo ""
echo "Commands:"
echo " (no args) Build and push all images"
echo " login Login to Docker registry only"
echo " whoosh-backend Build and push WHOOSH backend only"
echo " whoosh-frontend Build and push WHOOSH frontend only"
echo " bzzz Build and push BZZZ coordinator only"
echo " slurp-curator Build and push SLURP Curator only"
echo " slurp-rl-tuner Build and push SLURP RL Tuner only"
echo " website Build and push marketing website only"
echo " help Show this help message"
;;
*)
main
;;
esac