bmc_hub/MDfile/QUICK_UPDATE.md
Christian a604a3cc44 Add comprehensive test suite for vTiger integration and ticket module
- Implemented test scripts for vTiger account retrieval, contact data, and modules.
- Created a detailed test suite for the ticket module, covering database schema validation, ticket number generation, prepaid card constraints, and service logic.
- Added tests for vTiger field inspection and various queries related to accounts and sales orders.
- Introduced SQL migration scripts for the ALSO Cloud Billing foundation, including import jobs, lines, and mapping tables with necessary constraints and indices.
- Enhanced workflow columns in the import lines table to support matching and validation timestamps.
2026-06-20 03:29:51 +02:00

1.8 KiB

Quick Update Guide - BMC Hub Production

Første gang (installer updateto.sh script)

ssh bmcadmin@172.16.31.183
cd /srv/podman/bmc_hub_v1.0

# Download deployment script fra Gitea
curl -O https://g.bmcnetworks.dk/ct/bmc_hub/raw/branch/main/updateto.sh
chmod +x updateto.sh

# Nu kan du bruge scriptet
./updateto.sh v1.3.16

Næste gang (når scriptet allerede er installeret)

ssh bmcadmin@172.16.31.183
cd /srv/podman/bmc_hub_v1.0
./updateto.sh v1.3.16

Fast small update (kode-only, uden ny release tag)

Brug denne metode til meget små ændringer i app/* eller main.py, hvor du ikke vil lave en fuld release-pakke.

ssh bmcadmin@172.16.31.183
cd /srv/podman/bmc_hub_v1.0

# Download/refresh fast update script
curl -O https://g.bmcnetworks.dk/ct/bmc_hub/raw/branch/main/update_fast.sh
chmod +x update_fast.sh

# Tjek først hvad der ændres (anbefalet)
./update_fast.sh --ref main --dry-run --allow-prod

# Kør fast update (eksempel: specifik commit)
./update_fast.sh --ref 08f4097 --allow-prod

Vigtigt:

  • update_fast.sh er kun til kode/templates/static ændringer i fast scope.
  • Hvis der er ændringer i migrationer, dependencies, docker/compose eller env: brug ./updateto.sh.
  • Rollback kan køres med backup-id:
./update_fast.sh --rollback 20260517-142155 --allow-prod

Manuel deployment (hvis scriptet ikke virker)

cd /srv/podman/bmc_hub_v1.0

# Opdater .env
nano .env  # Sæt RELEASE_VERSION=v1.3.16

# Deploy
podman-compose down
podman-compose up -d --build
podman logs -f bmc-hub-api-prod

Sync efter deployment

# 1. Sync e-conomic (PRIMARY SOURCE - opretter alle kunder)
curl -X POST http://localhost:8000/api/v1/system/sync/economic

# 2. Sync vTiger (linker vTiger IDs til eksisterende kunder)
curl -X POST http://localhost:8000/api/v1/system/sync/vtiger