Commit Graph

10 Commits

Author SHA1 Message Date
Andrés Eduardo García Márquez 84e228fe3e ci: update deploy script and workflow for K3s deployment
CI/CD Pipeline / deploy (push) Failing after 31s Details
CI/CD Pipeline / smoke-tests (push) Has been skipped Details
CI/CD Pipeline / e2e-tests (push) Has been skipped Details
CI/CD Pipeline / rollback (push) Has been skipped Details
deploy.sh improvements:
- Updated namespace to 'academia'
- Added pull_code, run_tests, smoke_tests functions
- Smoke tests verify: health API, frontend, GraphQL, database
- Added rollback command
- Uses passwordless sudo

Workflow still configured but limited by runner memory.
Use deploy.sh directly on K3s server for reliable deployments.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 08:18:58 -05:00
Andrés Eduardo García Márquez 389c637152 chore(deploy): update deployment config and add utility scripts
Docker:
- docker-compose.yml: optimize resource allocation
- start.sh: improve startup sequence
- docker-mssql/: add standalone SQL Server config for local dev

Kubernetes (K3s):
- hpa.yaml: adjust autoscaling thresholds
- kustomization.yaml: add new resource references
- secrets.yaml: update secret structure

Utility scripts:
- start.backend.sh: fix environment variables
- start.db.sh: database initialization script
- start.db.simple.sh: simplified DB startup
- generate-docs.sh: PlantUML diagram generation

Misc:
- index.html: landing page redirect

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 07:44:43 -05:00
Andrés Eduardo García Márquez 1913e1d6b1 fix(k3s): increase SQL Server memory limits to prevent OOMKilled
Test and Deploy to k3s / test (push) Failing after 1m4s Details
Test and Deploy to k3s / deploy (push) Has been skipped Details
- Memory limit: 384Mi → 768Mi
- Memory request: 256Mi → 512Mi
- MSSQL_MEMORY_LIMIT_MB: 340 → 512

Previous limits caused OOMKilled restarts during SQL Server startup.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 07:19:42 -05:00
Andrés Eduardo García Márquez aeff93f7c6 refactor(k3s): rename namespace from student-enrollment to academia
Deploy to k3s / deploy (push) Failing after 25s Details
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 16:44:22 -05:00
Andrés Eduardo García Márquez fa607d3fc4 fix(k3s): update image names and deployment docs
Deploy to k3s / deploy (push) Failing after 25s Details
- Rename images from academia-* to student-* for consistency
- Update DEPLOYMENT.md with latest deployment procedures

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 16:40:57 -05:00
Andrés Eduardo García Márquez a9e4de63c9 ci: optimize deployment workflow for k3s
Deploy to k3s / deploy (push) Failing after 27s Details
- Single job instead of 3 (no artifact overhead)
- Build directly on k3s node (avoids image transfer)
- Parallel Docker builds with BuildKit
- Auto-create namespace if missing
- Automatic rollback on failure
- Health check via domain

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 13:34:38 -05:00
Andrés Eduardo García Márquez ff7f43b053 feat: add CI/CD pipeline, password recovery, and QA improvements
- Add Gitea Actions workflow for automated k3s deployment
- Implement password recovery with recovery codes (no email needed)
- Fix unenroll mutation (missing studentId parameter)
- Fix dashboard handling for expired sessions
- Add optimized Docker builds with caching
- Add k3s all-in-one deployment manifest
- Add QA test report and recommendations

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 10:49:32 -05:00
Andrés Eduardo García Márquez ca2edeca86 fix(k8s): optimize API and frontend resource configuration
API deployment:
- Add .NET GC optimization flags (gcServer=0, GCConserveMemory=9)
- Increase memory requests/limits for stability
- Add GCHeapCount and gcConcurrent settings

Frontend deployment:
- Adjust resource limits for better stability
- Update probe configurations

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 00:01:49 -05:00
Andrés Eduardo García Márquez 32f733f22e fix(k8s): increase SQL Server memory to prevent OOMKilled
- Increase memory limit from 1Gi to 1.5Gi
- Increase MSSQL_MEMORY_LIMIT_MB from 768 to 1024
- Increase liveness probe initialDelaySeconds to 120
- Increase failureThreshold to 5 for more tolerance
- Increase readiness probe timeouts

Fixes DEF-001: SQL Server was crashing with Exit Code 137 (OOMKilled)
due to insufficient memory allocation for SQL Server 2022 Express.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 00:01:39 -05:00
Andrés Eduardo García Márquez 9f11aab2a8 feat(deploy): add Docker and Kubernetes deployment
Docker:
- Multi-stage Dockerfile for API (.NET 10)
- Multi-stage Dockerfile for frontend (Angular + Nginx)
- docker-compose.yml with resource optimization
- Nginx reverse proxy configuration
- Health checks for all services

Kubernetes (k3s):
- Namespace and ConfigMap
- SQL Server StatefulSet with PVC
- API Deployment with HPA
- Frontend Deployment
- Services and Ingress
- Network policies for security
- Secrets management

Resource optimization:
- SQL Server Express with 1GB RAM limit
- API with 512MB limit
- Frontend with 128MB limit

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 23:00:41 -05:00