Development Scripts
Relevant source files
The following files were used as context for generating this wiki page:
The development scripts in the Aether-X Ultimate project provide a standardized automated workflow for environment provisioning, database initialization, testing, and multi-environment deployment. These scripts are designed to manage the lifecycle of a microservices-based architecture, ensuring consistency between local development and production Kubernetes environments.
Sources: README.md:46-56, IMPLEMENTATION_COMPLETE.md:104-120
Environment Initialization
The setup-dev.sh script automates the initial creation of the project structure and development configurations. It handles the generation of ignore files, directory structures, and a centralized development.yaml configuration that maps service ports and database connection strings.
Configuration Generation
The script creates a config/development.yaml file that defines the networking and debugging parameters for all microservices, including:
- Service Ports: Assignments ranging from 8000 (Text Generation) to 8006 (Data Processing).
- Database Hosts: Connection details for MySQL, PostgreSQL, MongoDB, and Redis.
- Infrastructure: Kafka bootstrap servers and monitoring ports for Prometheus/Grafana.
Sources: setup-dev.sh:6-140
Provisioning Flow
The following diagram illustrates the environment setup process:
The script ensures that the environment is ready for Docker-based orchestration by defining standard exclusion patterns for Python, IDEs, and binary artifacts.
Sources: setup-dev.sh:15-64
Database Initialization
The init-databases.sh script is responsible for bootstrapping the multi-database infrastructure. It generates initialization SQL and JavaScript files for four distinct database engines: MySQL, PostgreSQL, MongoDB, and Cassandra.
| Database | Primary Purpose | Initialization File |
|---|---|---|
| MySQL | User management & App data | mysql-init/01-create-tables.sql |
| PostgreSQL | Workflow definitions | postgres-init/01-create-tables.sql |
| MongoDB | Unstructured content storage | mongodb-init/01-create-collections.js |
| Cassandra | High-availability data | cassandra-init/01-create-keyspace.cql |
Sources: infrastructure/databases/init-databases.sh:5-150
Schema Architecture
The scripts establish a shared schema across relational and non-relational engines, primarily focusing on users, apps, workflows, and content_generated. For example, the MySQL and PostgreSQL scripts implement Foreign Key constraints to maintain referential integrity between users and their generated apps.
Sources: infrastructure/databases/init-databases.sh:10-50
Automated Testing Suite
The test.sh script provides a comprehensive testing framework that supports health checks, integration testing, and load testing. It targets the microservices via their exposed ports and verifies the JSON responses from specific endpoints.
Integration Test Logic
The script executes a sequence of functional tests against live services:
- Health Checks: Verifies the
/healthendpoint of all 7 core services. - Functional Verification: POSTs real data to services like
text-generationandimage-generationto verify content creation. - Security Integration: Tests the user registration and login flow, extracts JWT tokens, and attempts to access protected
/security-logsendpoints.
Sources: test.sh:14-135
Sources: test.sh:76-130
Load Testing
The script includes a run_load_tests function that simulates high-frequency traffic to the API Gateway. It measures:
- Success Count: The number of 200 OK responses.
- Duration: Total time for the request burst.
- Rate: Calculated requests per second (req/s).
Sources: test.sh:220-250
Deployment Orchestration
The deploy.sh script manages the transition to production-like environments using Kubernetes. It follows a strictly ordered execution path to ensure infrastructure readiness before microservices are deployed.
Deployment Phases
- Prerequisites Check: Validates the presence of
kubectlanddocker. - Infrastructure Provisioning: Applies K8s manifests for databases, Kafka, and the monitoring stack.
- Image Construction: Uses
docker buildto create images for all 8 microservices. - Service Deployment: Applies
deployment.yamlandapi-gateway.yamlto theaether-xnamespace. - Verification: Uses
kubectl waitto ensure all deployments reach anavailablestate before testing API connectivity viacurl.
Sources: deploy.sh:31-135
Kubernetes Operations
The script supports different command arguments:
./deploy.sh deploy: Full setup and build../deploy.sh status: Summarizes the status of pods and services../deploy.sh cleanup: Deletes the namespace and associated resources.
Sources: deploy.sh:160-185
Summary
The Aether-X Ultimate development scripts provide a robust automation layer that minimizes manual configuration. By linking environment setup (setup-dev.sh), data layer readiness (init-databases.sh), and deployment management (deploy.sh), the project maintains a reliable CI/CD-ready structure for microservice development.
Sources: IMPLEMENTATION_COMPLETE.md:12-40