[ 
https://issues.apache.org/jira/browse/AIRAVATA-2659?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16364838#comment-16364838
 ] 

ASF GitHub Bot commented on AIRAVATA-2659:
------------------------------------------

machristie commented on a change in pull request #169: [AIRAVATA-2659] 
GroupResourceProfile for modeling resource sharing with specific groups of users
URL: https://github.com/apache/airavata/pull/169#discussion_r168322620
 
 

 ##########
 File path: modules/registry-refactoring/src/main/resources/appcatalog-mysql.sql
 ##########
 @@ -568,6 +568,85 @@ CREATE TABLE USER_COMPUTE_RESOURCE_PREFERENCE (
   PRIMARY KEY (RESOURCE_ID,USER_ID,GATEWAY_ID)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
+CREATE TABLE GROUP_RESOURCE_PROFILE (
+  GATEWAY_ID varchar(255) NOT NULL,
+  GROUP_RESOURCE_PROFILE_ID varchar(255) NOT NULL,
+  GROUP_RESOURCE_PROFILE_NAME varchar(255) DEFAULT NULL,
+  CREATION_TIME BIGINT NOT NULL,
+  UPDATE_TIME BIGINT NOT NULL,
+  PRIMARY KEY (GATEWAY_ID,GROUP_RESOURCE_PROFILE_ID)
+)ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE TABLE BATCH_QUEUE_RESOURCE_POLICY (
+  RESOURCE_POLICY_ID varchar(255) NOT NULL,
+  COMPUTE_RESOURCE_ID varchar(255) NOT NULL,
+  GROUP_RESOURCE_PROFILE_ID varchar(255) NOT NULL,
+  GATEWAY_ID varchar(255) NOT NULL,
+  QUEUE_NAME varchar(255) NOT NULL,
+  MAX_ALLOWED_NODES INTEGER,
+  MAX_ALLOWED_CORES INTEGER,
+  MAX_ALLOWED_WALLTIME INTEGER,
+  PRIMARY KEY 
(RESOURCE_POLICY_ID,COMPUTE_RESOURCE_ID,GROUP_RESOURCE_PROFILE_ID,GATEWAY_ID,QUEUE_NAME),
+  FOREIGN KEY (COMPUTE_RESOURCE_ID,QUEUE_NAME) REFERENCES 
BATCH_QUEUE(COMPUTE_RESOURCE_ID,QUEUE_NAME) ON DELETE CASCADE,
+  FOREIGN KEY (GATEWAY_ID,GROUP_RESOURCE_PROFILE_ID) REFERENCES 
GROUP_RESOURCE_PROFILE(GATEWAY_ID,GROUP_RESOURCE_PROFILE_ID) ON DELETE CASCADE
+)ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE TABLE COMPUTE_RESOURCE_POLICY (
+    RESOURCE_POLICY_ID varchar(255) NOT NULL,
+    COMPUTE_RESOURCE_ID varchar(255) NOT NULL,
+    GROUP_RESOURCE_PROFILE_ID varchar(255) NOT NULL,
+    GATEWAY_ID varchar(255) NOT NULL,
+    PRIMARY KEY 
(GATEWAY_ID,RESOURCE_POLICY_ID,COMPUTE_RESOURCE_ID,GROUP_RESOURCE_PROFILE_ID),
+    FOREIGN KEY (COMPUTE_RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) 
ON DELETE CASCADE,
+    FOREIGN KEY (GATEWAY_ID,GROUP_RESOURCE_PROFILE_ID) REFERENCES 
GROUP_RESOURCE_PROFILE(GATEWAY_ID,GROUP_RESOURCE_PROFILE_ID) ON DELETE CASCADE
+)ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE TABLE COMPUTE_RESOURCE_POLICY_QUEUES (
+    RESOURCE_POLICY_ID varchar(255) NOT NULL,
+    COMPUTE_RESOURCE_ID varchar(255) NOT NULL,
+    GROUP_RESOURCE_PROFILE_ID varchar(255) NOT NULL,
+    GATEWAY_ID varchar(255) NOT NULL,
+    QUEUE_NAME varchar(255),
+    PRIMARY KEY 
(GATEWAY_ID,RESOURCE_POLICY_ID,COMPUTE_RESOURCE_ID,GROUP_RESOURCE_PROFILE_ID),
+    FOREIGN KEY 
(GATEWAY_ID,RESOURCE_POLICY_ID,COMPUTE_RESOURCE_ID,GROUP_RESOURCE_PROFILE_ID) 
REFERENCES 
COMPUTE_RESOURCE_POLICY(GATEWAY_ID,RESOURCE_POLICY_ID,COMPUTE_RESOURCE_ID,GROUP_RESOURCE_PROFILE_ID)
 ON DELETE CASCADE
+)ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE TABLE GROUP_COMPUTE_RESOURCE_PREFERENCE
+(
+        RESOURCE_ID VARCHAR(255) NOT NULL,
+        GROUP_RESOURCE_PROFILE_ID varchar(255) NOT NULL,
+        GATEWAY_ID varchar(255) NOT NULL,
+        OVERRIDE_BY_AIRAVATA SMALLINT,
+        PREFERED_JOB_SUB_PROTOCOL VARCHAR(255),
+        PREFERED_DATA_MOVE_PROTOCOL VARCHAR(255),
+        PREFERED_BATCH_QUEUE VARCHAR(255),
+        SCRATCH_LOCATION VARCHAR(255),
+        ALLOCATION_PROJECT_NUMBER VARCHAR(255),
+        LOGIN_USERNAME VARCHAR(255),
+        RESOURCE_CS_TOKEN VARCHAR(255),
+        USAGE_REPORTING_GATEWAY_ID VARCHAR(255),
+        QUALITY_OF_SERVICE VARCHAR(255),
+        RESERVATION VARCHAR (255),
+        RESERVATION_START_TIME timestamp,
+        RESERVATION_END_TIME timestamp,
+        SSH_ACCOUNT_PROVISIONER VARCHAR(255),
+        SSH_ACCOUNT_PROVISIONER_ADDITIONAL_INFO VARCHAR(1000),
+        PRIMARY KEY(RESOURCE_ID,GROUP_RESOURCE_PROFILE_ID,GATEWAY_ID),
+        FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON 
DELETE CASCADE,
+        FOREIGN KEY (GATEWAY_ID,GROUP_RESOURCE_PROFILE_ID) REFERENCES 
GROUP_RESOURCE_PROFILE(GATEWAY_ID,GROUP_RESOURCE_PROFILE_ID)
+)ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE TABLE GRP_SSH_ACC_PROV_CONFIG
 
 Review comment:
   Let's make the PK here (GROUP_RESOURCE_PROFILE_ID , RESOURCE_ID, CONFIG_NAME)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> GroupResourceProfile for modeling resource sharing with specific groups of 
> users
> --------------------------------------------------------------------------------
>
>                 Key: AIRAVATA-2659
>                 URL: https://issues.apache.org/jira/browse/AIRAVATA-2659
>             Project: Airavata
>          Issue Type: Improvement
>            Reporter: Sachin Kariyattin
>            Assignee: Sachin Kariyattin
>            Priority: Major
>
> The first step in implementing the Group Resource Profile backend is to 
> create the required models and add methods to store the details in the 
> registry. The GroupResourceProfile implementation will be added to the 
> app_catalog and the following changes have been made as part of it.
>  * Created the following thrift models for the GroupResourceProfile
> {{       struct GroupResourceProfile}}
>  {{       struct GroupComputeResourcePreference}}
>  {{       struct ComputeResourcePolicy}}
>  {{       struct BatchQueueResourcePolicy}}
>  * Created new tables in the app_catalog schema.
>  * Implemented GroupResourceProfileRepository.
>  * Added GroupResourceProfileRepositoryTest.
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to