Files
calypso/scripts/restart-api.sh
Warp Agent 3aa0169af0 Complete VTL implementation with SCST and mhVTL integration
- Installed and configured SCST with 7 handlers
- Installed and configured mhVTL with 2 Quantum libraries and 8 LTO-8 drives
- Implemented all VTL API endpoints (8/9 working)
- Fixed NULL device_path handling in drives endpoint
- Added comprehensive error handling and validation
- Implemented async tape load/unload operations
- Created SCST installation guide for Ubuntu 24.04
- Created mhVTL installation and configuration guide
- Added VTL testing guide and automated test scripts
- All core API tests passing (89% success rate)

Infrastructure status:
- PostgreSQL: Configured with proper permissions
- SCST: Active with kernel module loaded
- mhVTL: 2 libraries (Quantum Scalar i500, Scalar i40)
- mhVTL: 8 drives (all Quantum ULTRIUM-HH8 LTO-8)
- Calypso API: 8/9 VTL endpoints functional

Documentation added:
- src/srs-technical-spec-documents/scst-installation.md
- src/srs-technical-spec-documents/mhvtl-installation.md
- VTL-TESTING-GUIDE.md
- scripts/test-vtl.sh

Co-Authored-By: Warp <agent@warp.dev>
2025-12-24 19:01:29 +00:00

63 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
#
# AtlasOS - Calypso API Restart Script
# Rebuilds and restarts the API server
#
set -euo pipefail
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
NC='\033[0m'
log_info() {
echo -e "${GREEN}[INFO]${NC} $1"
}
log_warn() {
echo -e "${YELLOW}[WARN]${NC} $1"
}
log_error() {
echo -e "${RED}[ERROR]${NC} $1"
}
cd "$(dirname "$0")/../backend" || exit 1
log_info "Building Calypso API..."
# Build the application
if go build -o bin/calypso-api ./cmd/calypso-api; then
log_info "✓ Build successful"
else
log_error "✗ Build failed"
exit 1
fi
# Check if server is running
if pgrep -f "calypso-api" > /dev/null; then
log_warn "Stopping existing calypso-api process..."
pkill -f "calypso-api" || true
sleep 2
fi
log_info "Starting Calypso API..."
log_info "Server will start on http://localhost:8080"
log_info ""
log_info "To run in background:"
log_info " nohup ./bin/calypso-api -config config.yaml.example > /var/log/calypso-api.log 2>&1 &"
log_info ""
log_info "Or run in foreground:"
log_info " ./bin/calypso-api -config config.yaml.example"
log_info ""
# Check if environment variables are set
if [ -z "${CALYPSO_DB_PASSWORD:-}" ]; then
log_warn "CALYPSO_DB_PASSWORD not set"
fi
if [ -z "${CALYPSO_JWT_SECRET:-}" ]; then
log_warn "CALYPSO_JWT_SECRET not set"
fi