feat: Complete ATLAS system installation and API fixes
## Backend Changes - Add new API endpoints: combustible, pois, mantenimiento, video, configuracion - Fix vehiculos endpoint to return paginated response with items array - Add /vehiculos/all endpoint for non-paginated list - Add /geocercas/all endpoint - Add /alertas/configuracion GET/PUT endpoints - Add /viajes/activos and /viajes/iniciar endpoints - Add /reportes/stats, /reportes/templates, /reportes/preview endpoints - Add /conductores/all and /conductores/disponibles endpoints - Update router.py to include all new modules ## Frontend Changes - Fix authentication token handling (snake_case vs camelCase) - Update vehiculosApi.listAll to use /vehiculos/all - Fix FuelGauge component usage in Combustible page - Fix chart component exports (named + default exports) - Update API client for proper token refresh ## Infrastructure - Rename services from ADAN to ATLAS - Configure Cloudflare tunnel for atlas.consultoria-as.com - Update systemd service files - Configure PostgreSQL with TimescaleDB - Configure Redis, Mosquitto, Traccar, MediaMTX ## Documentation - Update installation guides - Update API reference - Rename all ADAN references to ATLAS Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
#!/bin/bash
|
||||
# ============================================
|
||||
# Sistema de ADAN - Crear VM en Proxmox
|
||||
# Sistema de ATLAS - Crear VM en Proxmox
|
||||
# ============================================
|
||||
# Este script crea una VM en Proxmox VE lista para
|
||||
# instalar el sistema de adan
|
||||
# instalar el sistema de atlas
|
||||
#
|
||||
# Ejecutar en el HOST de Proxmox (no en una VM)
|
||||
#
|
||||
@@ -33,7 +33,7 @@ NC='\033[0m'
|
||||
|
||||
# VM
|
||||
VMID="${VMID:-200}"
|
||||
VM_NAME="${VM_NAME:-adan}"
|
||||
VM_NAME="${VM_NAME:-atlas}"
|
||||
VM_MEMORY="${VM_MEMORY:-4096}" # MB
|
||||
VM_CORES="${VM_CORES:-4}"
|
||||
VM_DISK_SIZE="${VM_DISK_SIZE:-50}" # GB
|
||||
@@ -57,7 +57,7 @@ UBUNTU_URL="https://releases.ubuntu.com/22.04/${UBUNTU_ISO}"
|
||||
|
||||
# Cloud-init (para configuracion automatica)
|
||||
USE_CLOUD_INIT="${USE_CLOUD_INIT:-true}"
|
||||
CI_USER="${CI_USER:-adan}"
|
||||
CI_USER="${CI_USER:-atlas}"
|
||||
CI_PASSWORD="${CI_PASSWORD:-}" # Se genera si esta vacio
|
||||
CI_SSH_KEY="${CI_SSH_KEY:-}" # Ruta a archivo de clave publica
|
||||
|
||||
@@ -153,13 +153,13 @@ parse_args() {
|
||||
}
|
||||
|
||||
show_help() {
|
||||
echo "Sistema de ADAN - Crear VM en Proxmox"
|
||||
echo "Sistema de ATLAS - Crear VM en Proxmox"
|
||||
echo ""
|
||||
echo "Uso: $0 [opciones]"
|
||||
echo ""
|
||||
echo "Opciones:"
|
||||
echo " --vmid ID ID de la VM (default: 200)"
|
||||
echo " --name NOMBRE Nombre de la VM (default: adan)"
|
||||
echo " --name NOMBRE Nombre de la VM (default: atlas)"
|
||||
echo " --memory MB Memoria RAM en MB (default: 4096)"
|
||||
echo " --cores N Numero de cores (default: 4)"
|
||||
echo " --disk GB Tamanio de disco en GB (default: 50)"
|
||||
@@ -171,7 +171,7 @@ show_help() {
|
||||
echo " --no-cloud-init No usar cloud-init"
|
||||
echo ""
|
||||
echo "Ejemplos:"
|
||||
echo " $0 --vmid 200 --name adan --memory 8192 --cores 4"
|
||||
echo " $0 --vmid 200 --name atlas --memory 8192 --cores 4"
|
||||
echo " $0 --ip 192.168.1.100/24 --gateway 192.168.1.1"
|
||||
}
|
||||
|
||||
@@ -281,7 +281,7 @@ create_vm() {
|
||||
# Crear VM base
|
||||
qm create $VMID \
|
||||
--name "$VM_NAME" \
|
||||
--description "Sistema de ADAN GPS" \
|
||||
--description "Sistema de ATLAS GPS" \
|
||||
--ostype l26 \
|
||||
--machine q35 \
|
||||
--bios ovmf \
|
||||
@@ -405,7 +405,7 @@ configure_vm_options() {
|
||||
# qm set $VMID --protection 1
|
||||
|
||||
# Tags para organizacion
|
||||
qm set $VMID --tags "adan,gps,produccion"
|
||||
qm set $VMID --tags "atlas,gps,produccion"
|
||||
|
||||
log_success "Opciones configuradas"
|
||||
}
|
||||
@@ -419,9 +419,9 @@ create_post_install_script() {
|
||||
POST_INSTALL_DIR="/var/lib/vz/snippets"
|
||||
mkdir -p "$POST_INSTALL_DIR"
|
||||
|
||||
cat > "${POST_INSTALL_DIR}/adan-postinstall.sh" <<'SCRIPT'
|
||||
cat > "${POST_INSTALL_DIR}/atlas-postinstall.sh" <<'SCRIPT'
|
||||
#!/bin/bash
|
||||
# Script de post-instalacion para Sistema de ADAN
|
||||
# Script de post-instalacion para Sistema de ATLAS
|
||||
# Ejecutar despues de instalar Ubuntu
|
||||
|
||||
set -e
|
||||
@@ -452,14 +452,14 @@ ufw --force enable
|
||||
|
||||
echo "=== Listo! ==="
|
||||
echo "Ahora ejecuta el script de instalacion:"
|
||||
echo " cd /opt && git clone REPO_URL adan"
|
||||
echo " cd adan/deploy/scripts"
|
||||
echo " cd /opt && git clone REPO_URL atlas"
|
||||
echo " cd atlas/deploy/scripts"
|
||||
echo " sudo ./install.sh"
|
||||
SCRIPT
|
||||
|
||||
chmod +x "${POST_INSTALL_DIR}/adan-postinstall.sh"
|
||||
chmod +x "${POST_INSTALL_DIR}/atlas-postinstall.sh"
|
||||
|
||||
log_success "Script creado en: ${POST_INSTALL_DIR}/adan-postinstall.sh"
|
||||
log_success "Script creado en: ${POST_INSTALL_DIR}/atlas-postinstall.sh"
|
||||
}
|
||||
|
||||
# ---------------------------------------------
|
||||
@@ -470,7 +470,7 @@ save_credentials() {
|
||||
|
||||
cat > "$CREDS_FILE" <<EOF
|
||||
# ============================================
|
||||
# Credenciales VM Sistema de ADAN
|
||||
# Credenciales VM Sistema de ATLAS
|
||||
# ============================================
|
||||
# Generadas: $(date)
|
||||
|
||||
@@ -540,8 +540,8 @@ show_summary() {
|
||||
fi
|
||||
|
||||
echo " 3. Ejecutar script de instalacion del sistema:"
|
||||
echo " git clone <REPO_URL> /opt/adan"
|
||||
echo " cd /opt/adan/deploy/scripts"
|
||||
echo " git clone <REPO_URL> /opt/atlas"
|
||||
echo " cd /opt/atlas/deploy/scripts"
|
||||
echo " sudo ./install.sh"
|
||||
echo ""
|
||||
echo -e "${GREEN}============================================${NC}"
|
||||
@@ -555,7 +555,7 @@ main() {
|
||||
|
||||
echo ""
|
||||
echo -e "${BLUE}============================================${NC}"
|
||||
echo -e "${BLUE} CREAR VM PARA SISTEMA DE ADAN${NC}"
|
||||
echo -e "${BLUE} CREAR VM PARA SISTEMA DE ATLAS${NC}"
|
||||
echo -e "${BLUE}============================================${NC}"
|
||||
echo ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user