This is an automated email from the ASF dual-hosted git repository. yasith pushed a commit to branch feat/single-jvm in repository https://gitbox.apache.org/repos/asf/airavata.git
commit ddee63173e5838c90cb190fdbd5dacd95aa37ed1 Author: yasithdev <[email protected]> AuthorDate: Wed Mar 25 23:56:35 2026 -0500 feat: update DevOps configs for single unified server deployment - docker-startup.sh: Start single AiravataUnifiedServer instead of separate services - airavata-server.properties: Remove per-service host/port configs, keep unified DB config - Ansible start_services.yml: Start unified-server.sh instead of orchestrator/controller/etc - Ansible stop_services.yml: Stop unified-server and simplify port/log directory configs - Ansible defaults/main.yml: Replace service class configs with unified_server_class - services_up.sh: Start unified-server instead of separate services - services_down.sh: Stop unified-server instead of separate services - deploy_api_server.yml: Make unified-server.sh executable All services now multiplexed on port 8930 via AiravataUnifiedServer. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> --- .../roles/airavata_services/defaults/main.yml | 29 +------ .../airavata_services/tasks/deploy_api_server.yml | 10 +-- .../airavata_services/tasks/start_services.yml | 65 ++------------ .../airavata_services/tasks/stop_services.yml | 80 ++---------------- .../deployment-scripts/airavata-server.properties | 65 +------------- dev-tools/deployment-scripts/docker-startup.sh | 98 ++++++++-------------- dev-tools/deployment-scripts/services_down.sh | 22 ++--- dev-tools/deployment-scripts/services_up.sh | 22 ++--- 8 files changed, 68 insertions(+), 323 deletions(-) diff --git a/dev-tools/ansible/roles/airavata_services/defaults/main.yml b/dev-tools/ansible/roles/airavata_services/defaults/main.yml index 06eecc7f87..08fb811237 100644 --- a/dev-tools/ansible/roles/airavata_services/defaults/main.yml +++ b/dev-tools/ansible/roles/airavata_services/defaults/main.yml @@ -38,11 +38,6 @@ restproxy_dir: "{{ deployment_dir }}/{{ restproxy_dist_name }}" # Service ports api_server_port: 8930 -profile_service_port: 8962 -registry_port: 8970 -registry_server_port: 8970 -sharing_registry_port: 7878 -cred_store_port: 8960 agent_service_port: 18880 agent_service_server_port: 18880 research_service_port: 18899 @@ -52,7 +47,6 @@ restproxy_port: 8082 # Service hosts api_server_host: "airavata.localhost" -profile_service_host: "airavata.localhost" agent_service_server_address: "airavata.localhost" research_service_server_address: "airavata.localhost" @@ -68,25 +62,10 @@ participant_monitoring_host: "airavata.localhost" pre_workflow_manager_monitoring_host: "airavata.localhost" post_workflow_manager_monitoring_host: "airavata.localhost" -# Server hosts -orchestrator_server_host: "airavata.localhost" -regserver_server_host: "airavata.localhost" -sharing_registry_server_host: "airavata.localhost" -cred_store_server_host: "airavata.localhost" - -# Orchestrator configuration -orchestrator_class: "org.apache.airavata.orchestrator.server.OrchestratorServer" -orchestrator_server_port: 8940 -orchestrator_server_min_threads: 50 -job_validators: "org.apache.airavata.orchestrator.core.validator.impl.BatchQueueValidator,org.apache.airavata.orchestrator.core.validator.impl.ExperimentStatusValidator" -enable_validation: true -host_scheduler: "org.apache.airavata.orchestrator.core.schedule.DefaultHostScheduler" - -# Registry server configuration -regserver_class: "org.apache.airavata.registry.api.service.RegistryAPIServer" - -# Sharing registry configuration -sharing_server_class: "org.apache.airavata.sharing.registry.server.SharingRegistryServer" +# All services run on unified server (no separate server hosts needed) + +# Unified Server (replaces separate service configurations) +unified_server_class: "org.apache.airavata.api.server.AiravataUnifiedServer" enable_sharing: true # Default registry user diff --git a/dev-tools/ansible/roles/airavata_services/tasks/deploy_api_server.yml b/dev-tools/ansible/roles/airavata_services/tasks/deploy_api_server.yml index 9307f09550..24096c3ca0 100644 --- a/dev-tools/ansible/roles/airavata_services/tasks/deploy_api_server.yml +++ b/dev-tools/ansible/roles/airavata_services/tasks/deploy_api_server.yml @@ -118,18 +118,12 @@ - deploy - api-server -- name: Set executable permissions on API Server scripts +- name: Set executable permissions on Unified Server script file: path: "{{ api_server_dir }}/bin/{{ item }}" mode: "0755" loop: - - orchestrator.sh - - controller.sh - - participant.sh - - pre-wm.sh - - post-wm.sh - - email-monitor.sh - - realtime-monitor.sh + - unified-server.sh tags: - deploy - api-server diff --git a/dev-tools/ansible/roles/airavata_services/tasks/start_services.yml b/dev-tools/ansible/roles/airavata_services/tasks/start_services.yml index 3f2f1c9ab4..97ce3fa294 100644 --- a/dev-tools/ansible/roles/airavata_services/tasks/start_services.yml +++ b/dev-tools/ansible/roles/airavata_services/tasks/start_services.yml @@ -18,79 +18,24 @@ # under the License. # -- name: Start API Server orchestrator - shell: '{{ api_server_dir }}/bin/orchestrator.sh -d start api-orch' +- name: Start Airavata Unified Server + shell: '{{ api_server_dir }}/bin/unified-server.sh -d start' args: chdir: '{{ api_server_dir }}' tags: - start - api-server -- name: Wait for API Server orchestrator to be ready +- name: Wait for Airavata Unified Server to be ready wait_for: - port: '{{ orchestrator_server_port }}' - host: airavata.localhost + port: '{{ api_server_port }}' + host: '{{ api_server_host }}' delay: 5 timeout: 60 tags: - start - api-server -- name: Start API Server controller - shell: '{{ api_server_dir }}/bin/controller.sh -d start' - args: - chdir: '{{ api_server_dir }}' - tags: - - start - - api-server - -- name: Start API Server participant - shell: '{{ api_server_dir }}/bin/participant.sh -d start' - args: - chdir: '{{ api_server_dir }}' - tags: - - start - - api-server - -- name: Start API Server email-monitor - shell: '{{ api_server_dir }}/bin/email-monitor.sh -d start' - args: - chdir: '{{ api_server_dir }}' - tags: - - start - - api-server - -- name: Start API Server realtime-monitor - shell: '{{ api_server_dir }}/bin/realtime-monitor.sh -d start' - args: - chdir: '{{ api_server_dir }}' - tags: - - start - - api-server - -- name: Start API Server pre-wm - shell: '{{ api_server_dir }}/bin/pre-wm.sh -d start' - args: - chdir: '{{ api_server_dir }}' - tags: - - start - - api-server - -- name: Start API Server post-wm - shell: '{{ api_server_dir }}/bin/post-wm.sh -d start' - args: - chdir: '{{ api_server_dir }}' - tags: - - start - - api-server - -- name: Wait for API Server to start - wait_for: - timeout: 30 - tags: - - start - - api-server - - name: Start Agent Service shell: '{{ agent_service_dir }}/bin/agent-service.sh -d start' args: diff --git a/dev-tools/ansible/roles/airavata_services/tasks/stop_services.yml b/dev-tools/ansible/roles/airavata_services/tasks/stop_services.yml index c8a8c0a9b7..791481ca26 100644 --- a/dev-tools/ansible/roles/airavata_services/tasks/stop_services.yml +++ b/dev-tools/ansible/roles/airavata_services/tasks/stop_services.yml @@ -19,58 +19,16 @@ # --- -- name: Check if API Server binary exists +- name: Check if Unified Server binary exists stat: - path: "{{ api_server_dir }}/bin/orchestrator.sh" - register: api_server_exists + path: "{{ api_server_dir }}/bin/unified-server.sh" + register: unified_server_exists tags: - stop -- name: Stop API Server orchestrator if exists - shell: "{{ api_server_dir }}/bin/orchestrator.sh -d stop api-orch" - when: api_server_exists.stat.exists - tags: - - stop - ignore_errors: yes - -- name: Stop API Server controller if exists - shell: "{{ api_server_dir }}/bin/controller.sh -d stop" - when: api_server_exists.stat.exists - tags: - - stop - ignore_errors: yes - -- name: Stop API Server participant if exists - shell: "{{ api_server_dir }}/bin/participant.sh -d stop" - when: api_server_exists.stat.exists - tags: - - stop - ignore_errors: yes - -- name: Stop API Server pre-wm if exists - shell: "{{ api_server_dir }}/bin/pre-wm.sh -d stop" - when: api_server_exists.stat.exists - tags: - - stop - ignore_errors: yes - -- name: Stop API Server post-wm if exists - shell: "{{ api_server_dir }}/bin/post-wm.sh -d stop" - when: api_server_exists.stat.exists - tags: - - stop - ignore_errors: yes - -- name: Stop API Server email-monitor if exists - shell: "{{ api_server_dir }}/bin/email-monitor.sh -d stop" - when: api_server_exists.stat.exists - tags: - - stop - ignore_errors: yes - -- name: Stop API Server realtime-monitor if exists - shell: "{{ api_server_dir }}/bin/realtime-monitor.sh -d stop" - when: api_server_exists.stat.exists +- name: Stop Airavata Unified Server if exists + shell: "{{ api_server_dir }}/bin/unified-server.sh -d stop" + when: unified_server_exists.stat.exists tags: - stop ignore_errors: yes @@ -141,25 +99,7 @@ set_fact: airavata_ports: - port: "{{ api_server_port }}" - service: "API Server" - - port: "{{ orchestrator_server_port }}" - service: "Orchestrator" - - port: "{{ registry_server_port }}" - service: "Registry" - - port: "{{ sharing_registry_port }}" - service: "Sharing Registry" - - port: "{{ cred_store_port }}" - service: "Credential Store" - - port: "{{ profile_service_port }}" - service: "Profile Service" - - port: "{{ agent_service_server_port }}" - service: "Agent Service" - - port: "{{ research_service_server_port }}" - service: "Research Service" - - port: "{{ file_server_port }}" - service: "File Server" - - port: "{{ restproxy_port }}" - service: "REST Proxy" + service: "Unified Server" - port: "{{ participant_monitoring_port }}" service: "Participant Monitoring" - port: "{{ api_server_monitoring_port }}" @@ -258,11 +198,7 @@ - name: Define Airavata service log directories set_fact: airavata_log_dirs: - - { service: "API Server", path: "{{ api_server_dir }}/logs" } - - { service: "Agent Service", path: "{{ agent_service_dir }}/logs" } - - { service: "Research Service", path: "{{ research_service_dir }}/logs" } - - { service: "File Server", path: "{{ file_server_dir }}/logs" } - - { service: "REST Proxy", path: "{{ restproxy_dir }}/logs" } + - { service: "Unified Server", path: "{{ api_server_dir }}/logs" } when: archive_logs_on_stop | bool - name: Check log directories diff --git a/dev-tools/deployment-scripts/airavata-server.properties b/dev-tools/deployment-scripts/airavata-server.properties index fc8cc3bd90..1ea44cdedd 100644 --- a/dev-tools/deployment-scripts/airavata-server.properties +++ b/dev-tools/deployment-scripts/airavata-server.properties @@ -229,12 +229,12 @@ enable.application.catalog=true application.deployment.directory=/opt/airavata/applications ############################ -# Orchestrator Configuration +# Unified Server Configuration ############################ +# All Thrift services are multiplexed on the unified server port (8930) +# No separate per-service host/port configurations needed enable.orchestrator=true -orchestrator.server.host=airavata.localhost -orchestrator.server.port=8940 -orchestrator.server.name=Airavata_Orchestrator +enable.gfac=true ############################ # Helix Controller & Participant Settings @@ -254,60 +254,3 @@ post.workflow.manager.monitoring.host=airavata.localhost # Helix Participant Settings ############################ helix.participant.name=AiravataParticipant - -############################ -# GFAC Configuration -############################ -enable.gfac=true -gfac.server.host=airavata.localhost -gfac.server.port=8950 -gfac.server.name=Airavata_GFAC - -############################ -# Registry Configuration -############################ -registry.server.host=airavata.localhost -registry.server.port=8960 -registry.server.name=Airavata_Registry - -############################ -# Credential Store Configuration -############################ -credential.store.server.host=airavata.localhost -credential.store.server.port=8961 -credential.store.server.name=Airavata_CredentialStore - -############################ -# User Profile Configuration -############################ -profile.service.server.host=airavata.localhost -profile.service.server.port=8962 -profile.service.server.name=Airavata_ProfileService - -############################ -# Tenant Profile Configuration -############################ -tenant.profile.service.server.host=airavata.localhost -tenant.profile.service.server.port=8963 -tenant.profile.service.server.name=Airavata_TenantProfileService - -############################ -# IAM Admin Services Configuration -############################ -iam.admin.services.server.host=airavata.localhost -iam.admin.services.server.port=8964 -iam.admin.services.server.name=Airavata_IamAdminServices - -############################ -# Group Manager Configuration -############################ -group.manager.service.server.host=airavata.localhost -group.manager.service.server.port=8965 -group.manager.service.server.name=Airavata_GroupManagerService - -############################ -# Sharing Registry Configuration -############################ -sharing.registry.server.host=airavata.localhost -sharing.registry.server.port=8966 -sharing.registry.server.name=Airavata_SharingRegistryService diff --git a/dev-tools/deployment-scripts/docker-startup.sh b/dev-tools/deployment-scripts/docker-startup.sh index 0e2b5a5d6c..71d2f9b65a 100644 --- a/dev-tools/deployment-scripts/docker-startup.sh +++ b/dev-tools/deployment-scripts/docker-startup.sh @@ -5,8 +5,8 @@ set -e # Set Airavata configuration directory export AIRAVATA_CONFIG_DIR=/opt/airavata/vault -echo "🚀 Starting Apache Airavata Monolithic Server..." -echo "📋 All services included: API Server, Agent Service, Research Service, File Server" +echo "🚀 Starting Apache Airavata Unified Server..." +echo "📋 Single JVM server with all Thrift services multiplexed on port 8930" echo "📁 Properties file location: /opt/airavata/vault/airavata-server.properties" echo "📁 Configuration directory: $AIRAVATA_CONFIG_DIR" echo "📊 All logs will be captured and visible via 'docker logs'" @@ -66,25 +66,14 @@ start_service() { } # ================================ -# Start the API Server Components +# Start the Unified Server # ================================ -log "🔧 Starting the API Services..." +log "🔧 Starting Airavata Unified Server..." cd ${AIRAVATA_HOME} -# Start all API services -start_service "Orchestrator" "./bin/orchestrator.sh" "${AIRAVATA_HOME}/logs/orchestrator.log" -start_service "Controller" "./bin/controller.sh" "${AIRAVATA_HOME}/logs/controller.log" -start_service "Participant" "./bin/participant.sh" "${AIRAVATA_HOME}/logs/participant.log" -# Email Monitor (disabled by default due to config requirements) -log "📧 Email Monitor disabled (requires email config)" -echo "$(date '+%Y-%m-%d %H:%M:%S') - Email Monitor disabled (requires email config)" | sed "s/^/[Email Monitor] /" - -# Realtime Monitor (disabled due to API connection dependency) -log "⏱️ Realtime Monitor disabled (requires API server running)" -echo "$(date '+%Y-%m-%d %H:%M:%S') - Realtime Monitor disabled (requires API server running)" | sed "s/^/[Realtime Monitor] /" -start_service "Pre-WM" "./bin/pre-wm.sh" "${AIRAVATA_HOME}/logs/pre-wm.log" -start_service "Post-WM" "./bin/post-wm.sh" "${AIRAVATA_HOME}/logs/post-wm.log" +# Start unified server - single JVM with all services multiplexed on port 8930 +start_service "Airavata Unified" "./bin/unified-server.sh" "${AIRAVATA_HOME}/logs/unified-server.log" # ================================ # Start the Agent Service (Optional) @@ -123,21 +112,22 @@ else fi # ================================ -# Monitor all logs and keep container running +# Monitor logs and keep container running # ================================ -log "🎉 All Airavata services started successfully!" -log "📊 Starting comprehensive log monitoring..." - -# Wait a moment for all services to initialize -sleep 10 - -# Stream all service logs to docker logs and keep container running -echo "🚀 All Airavata services are running!" -echo "📋 Service status:" -echo " - ZooKeeper: Connected (no more 'airavata.localhost' errors)" -echo " - All components started successfully" +log "🎉 Airavata Unified Server started successfully!" +log "📊 Starting log monitoring..." + +# Wait a moment for server to initialize +sleep 5 + +# Stream server logs to docker logs and keep container running +echo "🚀 Airavata Unified Server is running on port 8930!" +echo "📋 Server status:" +echo " - Single JVM with all Thrift services multiplexed" +echo " - Services: Airavata, RegistryService, SharingRegistry, CredentialStore" +echo " - Additional: UserProfile, TenantProfile, IamAdminServices, GroupManager" echo "" -echo "🔍 Streaming all logs to 'docker logs -f airavata-monolithic'" +echo "🔍 Streaming logs to 'docker logs -f airavata-monolithic'" echo "" # Function to monitor log file and stream to stdout with prefix @@ -166,48 +156,30 @@ monitor_log() { fi } -# Wait a moment for log files to be created -echo "📊 Waiting for log files to be created..." -sleep 15 +# Wait a moment for log file to be created +echo "📊 Waiting for unified server log file to be created..." +sleep 5 -# Start monitoring all service logs -echo "📊 Starting log monitoring for all services..." +# Start monitoring unified server logs +echo "📊 Starting log monitoring for unified server..." cd ${AIRAVATA_HOME} -# Monitor core service logs -monitor_log "${AIRAVATA_HOME}/logs/controller.log" "Controller" -monitor_log "${AIRAVATA_HOME}/logs/participant.log" "Participant" - -# Monitor workflow manager logs if they exist -monitor_log "${AIRAVATA_HOME}/logs/pre-wm.log" "Pre-WM" -monitor_log "${AIRAVATA_HOME}/logs/post-wm.log" "Post-WM" - -# Monitor additional service logs if they exist -monitor_log "${AIRAVATA_HOME}/logs/orchestrator.log" "Orchestrator" -monitor_log "${AIRAVATA_HOME}/logs/email-monitor.log" "Email-Monitor" -monitor_log "${AIRAVATA_HOME}/logs/realtime-monitor.log" "Realtime-Monitor" - -# Monitor optional service logs -monitor_log "${AIRAVATA_HOME}/logs/agent-service.log" "Agent" -monitor_log "${AIRAVATA_HOME}/logs/research-service.log" "Research" -monitor_log "${AIRAVATA_HOME}/logs/file-service.log" "File" +# Monitor unified server logs +monitor_log "${AIRAVATA_HOME}/logs/unified-server.log" "Unified-Server" -echo "📊 All log monitoring started!" -echo "🔍 Use 'docker logs -f airavata-monolithic' to view all service logs" +echo "📊 Log monitoring started!" +echo "🔍 Use 'docker logs -f airavata-monolithic' to view server logs" # Keep container running and show periodic status while true; do sleep 300 # Check every 5 minutes - echo "[Status] $(date): Container active, monitoring logs from all services" - - # Check if critical processes are still running - if ! pgrep -f "controller" > /dev/null; then - echo "[WARNING] Controller process not found" - fi - if ! pgrep -f "participant" > /dev/null; then - echo "[WARNING] Participant process not found" + echo "[Status] $(date): Container active, monitoring unified server logs" + + # Check if unified server process is still running + if ! pgrep -f "AiravataUnifiedServer" > /dev/null; then + echo "[WARNING] Unified server process not found" fi - + # Show number of running tail processes tail_count=$(pgrep -f "tail -F" | wc -l) echo "[Status] Currently monitoring $tail_count log files" diff --git a/dev-tools/deployment-scripts/services_down.sh b/dev-tools/deployment-scripts/services_down.sh index e626972f47..e933bf3561 100644 --- a/dev-tools/deployment-scripts/services_down.sh +++ b/dev-tools/deployment-scripts/services_down.sh @@ -5,23 +5,11 @@ log() { } # ================================ -# Shutdown the API Server -# ================================ -log "Stopping the API Services..." -./apache-airavata-api-server-0.21-SNAPSHOT/bin/orchestrator.sh -d stop api-orch -log "Orchestrator stopped." -./apache-airavata-api-server-0.21-SNAPSHOT/bin/controller.sh -d stop -log "Controller stopped." -./apache-airavata-api-server-0.21-SNAPSHOT/bin/participant.sh -d stop -log "Participant stopped." -./apache-airavata-api-server-0.21-SNAPSHOT/bin/pre-wm.sh -d stop -log "Pre-Workflow Manager stopped." -./apache-airavata-api-server-0.21-SNAPSHOT/bin/post-wm.sh -d stop -log "Post-Workflow Manager stopped." -./apache-airavata-api-server-0.21-SNAPSHOT/bin/email-monitor.sh -d stop -log "Email Monitor stopped." -./apache-airavata-api-server-0.21-SNAPSHOT/bin/realtime-monitor.sh -d stop -log "Realtime Monitor stopped." +# Shutdown the Unified Server +# ================================ +log "Stopping the Airavata Unified Server..." +./apache-airavata-api-server-0.21-SNAPSHOT/bin/unified-server.sh -d stop +log "Unified Server stopped." # ================================ # Shutdown the Agent Service diff --git a/dev-tools/deployment-scripts/services_up.sh b/dev-tools/deployment-scripts/services_up.sh index 508637e362..de35716973 100644 --- a/dev-tools/deployment-scripts/services_up.sh +++ b/dev-tools/deployment-scripts/services_up.sh @@ -6,23 +6,11 @@ log() { } # ================================ -# Start the API Server -# ================================ -log "Starting the API Services..." -./apache-airavata-api-server-0.21-SNAPSHOT/bin/orchestrator.sh -d start api-orch -log "Orchestrator started." -./apache-airavata-api-server-0.21-SNAPSHOT/bin/controller.sh -d start -log "Controller started." -./apache-airavata-api-server-0.21-SNAPSHOT/bin/participant.sh -d start -log "Participant started." -./apache-airavata-api-server-0.21-SNAPSHOT/bin/email-monitor.sh -d start -log "Email Monitor started." -./apache-airavata-api-server-0.21-SNAPSHOT/bin/realtime-monitor.sh -d start -log "Realtime Monitor started." -./apache-airavata-api-server-0.21-SNAPSHOT/bin/pre-wm.sh -d start -log "Pre-Workflow Manager started." -./apache-airavata-api-server-0.21-SNAPSHOT/bin/post-wm.sh -d start -log "Post-Workflow Manager started." +# Start the Unified Server +# ================================ +log "Starting the Airavata Unified Server..." +./apache-airavata-api-server-0.21-SNAPSHOT/bin/unified-server.sh -d start +log "Unified Server started." # ================================ # Start the Agent Service
