Skip to content

Commit 2897f02

Browse files
Ansible Scripts to deploy/update the new Airavata Services (#565)
* Initial implementation of ansible scripts to deploy and update airavata services * Improve Ansible deployment automation and fix service startup issues - Add Ubuntu/Debian support across all infrastructure roles (Java, Maven, Zookeeper, Kafka, RabbitMQ, MariaDB, Keycloak, Certbot) - Add dynamic keystore generation from Let's Encrypt certificates - Add reverse proxy role for Apache2 configuration - Fix Zookeeper AdminServer port conflict - Fix Gateway ID NULL error in database initialization - Fix Java home detection for keystore generation during updates - Update database schema to include cloud execution support migrations - Maven build process with proper PATH configuration - Add Thrift installation for Ubuntu systems - Enhance Keycloak 24.0.0+ configuration with SSL setup * Fix Ansible roles, Keycloak Quarkus config, template defaults, and remove redundant stops * Switch RabbitMQ role to use distro packages instead of packagecloud repos * Fix Keycloak database tasks to authenticate via root socket credentials * updated the deploy_user's shell * start/stop services ansible scripts and conditional archiving logs when stopping airavata services * Fix Keycloak DB connectivity, rely on env vars, drop optimized mode, and grant localhost access * dev server encrypted configurations * include realm import when running keycloak via ansibles * Parameterize Keycloak realm template for PGA, JupyterLab, and CILogon * Updated ansible dev server vault configurations * included dev guides and updated documentation * Fix service binding and HAProxy backend forwarding * Support mariadb db server deployment for RH using ansibles * Ansible scripts for staging environment * Updated the ansible branch
1 parent 452fc69 commit 2897f02

File tree

82 files changed

+9348
-339
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+9348
-339
lines changed

airavata-api/src/main/java/org/apache/airavata/registry/core/repositories/appcatalog/GwyResourceProfileRepository.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ public String updateGatewayResourceProfile(GatewayResourceProfile gatewayResourc
6363
String gatewayId = gatewayResourceProfile.getGatewayID();
6464
Mapper mapper = ObjectMapperSingleton.getInstance();
6565
GatewayProfileEntity gatewayProfileEntity = mapper.map(gatewayResourceProfile, GatewayProfileEntity.class);
66+
// Explicitly set gatewayId since Dozer mapping does not handle gatewayID -> gatewayId conversion
67+
gatewayProfileEntity.setGatewayId(gatewayId);
6668
if (get(gatewayId) != null) {
6769
gatewayProfileEntity.setUpdateTime(AiravataUtils.getCurrentTimestamp());
6870
} else {

airavata-api/src/main/resources/database_scripts/appcatalog-mysql.sql

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -593,26 +593,50 @@ CREATE TABLE GROUP_COMPUTE_RESOURCE_PREFERENCE
593593
(
594594
RESOURCE_ID VARCHAR(255) NOT NULL,
595595
GROUP_RESOURCE_PROFILE_ID varchar(255) NOT NULL,
596+
RESOURCE_TYPE VARCHAR(255) NOT NULL,
596597
OVERRIDE_BY_AIRAVATA SMALLINT,
597598
PREFERED_JOB_SUB_PROTOCOL VARCHAR(255),
598599
PREFERED_DATA_MOVE_PROTOCOL VARCHAR(255),
599-
PREFERED_BATCH_QUEUE VARCHAR(255),
600600
SCRATCH_LOCATION VARCHAR(255),
601-
ALLOCATION_PROJECT_NUMBER VARCHAR(255),
602601
LOGIN_USERNAME VARCHAR(255),
603602
RESOURCE_CS_TOKEN VARCHAR(255),
604-
USAGE_REPORTING_GATEWAY_ID VARCHAR(255),
605-
QUALITY_OF_SERVICE VARCHAR(255),
606-
RESERVATION VARCHAR (255),
607-
RESERVATION_START_TIME timestamp,
608-
RESERVATION_END_TIME timestamp,
609-
SSH_ACCOUNT_PROVISIONER VARCHAR(255),
610-
SSH_ACCOUNT_PROVISIONER_ADDITIONAL_INFO VARCHAR(1000),
611603
PRIMARY KEY(RESOURCE_ID,GROUP_RESOURCE_PROFILE_ID),
612604
FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE,
613605
FOREIGN KEY (GROUP_RESOURCE_PROFILE_ID) REFERENCES GROUP_RESOURCE_PROFILE(GROUP_RESOURCE_PROFILE_ID) ON DELETE CASCADE
614606
)ENGINE=InnoDB DEFAULT CHARSET=latin1;
615607

608+
CREATE TABLE SLURM_GROUP_COMPUTE_RESOURCE_PREFERENCE
609+
(
610+
RESOURCE_ID VARCHAR(255) NOT NULL,
611+
GROUP_RESOURCE_PROFILE_ID VARCHAR(255) NOT NULL,
612+
PREFERED_BATCH_QUEUE VARCHAR(255) DEFAULT NULL,
613+
ALLOCATION_PROJECT_NUMBER VARCHAR(255) DEFAULT NULL,
614+
USAGE_REPORTING_GATEWAY_ID VARCHAR(255) DEFAULT NULL,
615+
QUALITY_OF_SERVICE VARCHAR(255) DEFAULT NULL,
616+
RESERVATION VARCHAR(255) DEFAULT NULL,
617+
RESERVATION_START_TIME TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
618+
RESERVATION_END_TIME TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
619+
SSH_ACCOUNT_PROVISIONER VARCHAR(255) DEFAULT NULL,
620+
SSH_ACCOUNT_PROVISIONER_ADDITIONAL_INFO TEXT DEFAULT NULL,
621+
PRIMARY KEY (RESOURCE_ID, GROUP_RESOURCE_PROFILE_ID),
622+
CONSTRAINT FK_SLURM_PREF_TO_BASE FOREIGN KEY (RESOURCE_ID, GROUP_RESOURCE_PROFILE_ID)
623+
REFERENCES GROUP_COMPUTE_RESOURCE_PREFERENCE (RESOURCE_ID, GROUP_RESOURCE_PROFILE_ID)
624+
ON DELETE CASCADE
625+
)ENGINE=InnoDB DEFAULT CHARSET=latin1;
626+
627+
CREATE TABLE AWS_GROUP_COMPUTE_RESOURCE_PREFERENCE
628+
(
629+
RESOURCE_ID VARCHAR(255) NOT NULL,
630+
GROUP_RESOURCE_PROFILE_ID VARCHAR(255) NOT NULL,
631+
AWS_REGION VARCHAR(255) NOT NULL,
632+
PREFERRED_AMI_ID VARCHAR(255) NOT NULL,
633+
PREFERRED_INSTANCE_TYPE VARCHAR(255) NOT NULL,
634+
PRIMARY KEY (RESOURCE_ID, GROUP_RESOURCE_PROFILE_ID),
635+
CONSTRAINT FK_AWS_PREF_TO_BASE FOREIGN KEY (RESOURCE_ID, GROUP_RESOURCE_PROFILE_ID)
636+
REFERENCES GROUP_COMPUTE_RESOURCE_PREFERENCE (RESOURCE_ID, GROUP_RESOURCE_PROFILE_ID)
637+
ON DELETE CASCADE
638+
)ENGINE=InnoDB DEFAULT CHARSET=latin1;
639+
616640
CREATE TABLE COMPUTE_RESOURCE_RESERVATION -- ComputeResourceReservationEntity
617641
(RESERVATION_ID VARCHAR(255) NOT NULL, END_TIME TIMESTAMP NOT NULL, RESERVATION_NAME VARCHAR(255) NOT NULL, START_TIME TIMESTAMP NOT NULL, RESOURCE_ID VARCHAR(255) NOT NULL, GROUP_RESOURCE_PROFILE_ID VARCHAR(255) NOT NULL, PRIMARY KEY (RESERVATION_ID)
618642
)ENGINE=InnoDB DEFAULT CHARSET=latin1;

0 commit comments

Comments
 (0)