feat(db): unify all databases into single airavata DB with schema migrations#592
Merged
feat(db): unify all databases into single airavata DB with schema migrations#592
Conversation
…rations - Consolidate 7+ separate databases (app_catalog, experiment_catalog, replica_catalog, workflow_catalog, sharing_catalog, credential_store, profile_service) into a single 'airavata' database - Generate V1 baseline schema (146 tables) from JPA entity annotations across all modules: experiment catalog, application catalog, airavata workflow catalog, replica catalog, sharing registry, profile service, research service, and agent service - Rename duplicate table names for single-DB coexistence: profile GATEWAY -> TENANT_GATEWAY, research PROJECT -> RESEARCH_PROJECT - Remove legacy workflowcatalog tables (dead code, not in any persistence unit) - Remove legacy DatabaseCreator and make DBInitializer a no-op (schema creation now handled by migration SQL) - Restore persistence.xml (needed by OpenJPA enhancer) and dozer_mapping.xml - Standardize all hostnames to airavata.localhost (RFC 6761 .localhost TLD) - Simplify compose.yml: single file with all infrastructure services (MariaDB, RabbitMQ, ZooKeeper, Kafka, Keycloak) - Remove .devcontainer directory (Dockerfile kept, compose consolidated) - Remove portals, proxy, gateway-storage configs - DB init uses V1 flyway migration SQL directly via docker-entrypoint-initdb.d - Fix validation queries (SELECT 1 instead of SELECT 1 from CONFIGURATION) - Fix RabbitMQ credentials to match compose (airavata:airavata) Verified: all 9 services start and pass schema validation against the V1 baseline with zero errors.
109e011 to
3f22180
Compare
- Update spotless-maven-plugin 2.44.5 -> 3.4.0 - Update palantir-java-format 2.70.0 -> 2.89.0 (Java 25 compat) - Apply formatting fixes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Consolidates 7+ separate databases into a single
airavatadatabase and introduces a unified V1 baseline schema generated from the JPA entity annotations in the codebase.What changed
experiment_catalog,app_catalog,replica_catalog,workflow_catalog,sharing_catalog,credential_store,profile_service) now point to oneairavatadatabase@Entity/@Tableannotations across all modules, verified 1:1 against ORM create mode outputGATEWAY→TENANT_GATEWAY, ResearchPROJECT→RESEARCH_PROJECT(resolved collisions from merging separate DBs)workflowcatalogentities (not in any persistence unit),DatabaseCreator,DBMigrator, old migration delta scriptsairavata.localhost(RFC 6761.localhostTLD, auto-resolves to127.0.0.1)compose.yml: Single compose file with MariaDB, RabbitMQ, ZooKeeper, Kafka, Keycloak. DB auto-initializes from V1 schema viadocker-entrypoint-initdb.d.devcontainer/: Consolidated configs intoconf/and rootcompose.ymlFiles changed by category
@Table/@Entityname renames for deduplicationDBInitializer→ no-op (schema from SQL now)DatabaseCreator,MappingToolRunner,DBMigrator, etc.airavata.localhostcompose.yml, removed olddocker-compose.yml+.devcontainer/registry-db-migratormoduleNo business logic, API, or feature changes — purely DB/DevOps.
Verification
All 9 services tested from clean slate (
docker compose up+ V1 schema):Zero schema errors, zero RabbitMQ errors, all ports listening.
Test plan
mvn clean install -DskipTestsbuilds successfullydocker compose up -dstarts all infrastructureddl-auto: validate) pass🤖 Generated with Claude Code