This is an automated email from the ASF dual-hosted git repository. lahirujayathilake pushed a commit to branch cybershuttle-staging in repository https://gitbox.apache.org/repos/asf/airavata.git
commit 12435359d0e1d9bca8b53a7aa94a51a97421fac8 Author: lahiruj <[email protected]> AuthorDate: Sun Mar 30 01:31:29 2025 -0400 initial research framework --- modules/research-framework/pom.xml | 24 +++ .../research-framework/research-service/pom.xml | 193 +++++++++++++++++++++ .../assembly/research-service-bin-assembly.xml | 91 ++++++++++ .../service/ResearchServiceApplication.java | 13 ++ .../src/main/proto/research-service.proto | 11 ++ .../src/main/resources/application.yml | 25 +++ .../distribution/bin/research-service-daemon.sh | 112 ++++++++++++ .../resources/distribution/bin/research-service.sh | 70 ++++++++ .../src/main/resources/distribution/bin/setenv.sh | 46 +++++ .../resources/distribution/conf/application.yml | 25 +++ .../main/resources/distribution/conf/log4j2.xml | 53 ++++++ pom.xml | 1 + 12 files changed, 664 insertions(+) diff --git a/modules/research-framework/pom.xml b/modules/research-framework/pom.xml new file mode 100644 index 0000000000..e6fe929a36 --- /dev/null +++ b/modules/research-framework/pom.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.airavata</groupId> + <artifactId>airavata</artifactId> + <version>0.21-SNAPSHOT</version> + <relativePath>../../pom.xml</relativePath> + </parent> + + <artifactId>research-framework</artifactId> + <packaging>pom</packaging> + <modules> + <module>research-service</module> + </modules> + + <properties> + <maven.compiler.source>11</maven.compiler.source> + <maven.compiler.target>11</maven.compiler.target> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> +</project> \ No newline at end of file diff --git a/modules/research-framework/research-service/pom.xml b/modules/research-framework/research-service/pom.xml new file mode 100644 index 0000000000..e0c8792743 --- /dev/null +++ b/modules/research-framework/research-service/pom.xml @@ -0,0 +1,193 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.airavata</groupId> + <artifactId>research-framework</artifactId> + <version>0.21-SNAPSHOT</version> + </parent> + + <artifactId>research-service</artifactId> + + <properties> + <maven.compiler.source>11</maven.compiler.source> + <maven.compiler.target>11</maven.compiler.target> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <jul-to-slf4j.version>1.7.0</jul-to-slf4j.version> + <json.version>20240303</json.version> + <javax.version>2.0.1.Final</javax.version> + <apache.commons.lang3.version>3.14.0</apache.commons.lang3.version> + <mysql.connector.java>8.0.31</mysql.connector.java> + <protobuf.version>3.23.4</protobuf.version> + <protobuf-plugin.version>0.6.1</protobuf-plugin.version> + <grpc.version>1.63.0</grpc.version> + <research.service.dist.name>research-service-0.01</research.service.dist.name> + </properties> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-dependencies</artifactId> + <version>${spring.boot.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + </dependencies> + </dependencyManagement> + + <dependencies> + <dependency> + <groupId>org.mariadb.jdbc</groupId> + <artifactId>mariadb-java-client</artifactId> + <version>1.5.7</version> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-web</artifactId> + <exclusions> + <exclusion> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-to-slf4j</artifactId> + </exclusion> + <exclusion> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + </exclusion> + <exclusion> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-core</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-data-jpa</artifactId> + <exclusions> + <exclusion> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-to-slf4j</artifactId> + </exclusion> + <exclusion> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + </exclusion> + <exclusion> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-core</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>io.grpc</groupId> + <artifactId>grpc-stub</artifactId> + <version>${grpc.version}</version> + </dependency> + <dependency> + <groupId>io.grpc</groupId> + <artifactId>grpc-protobuf</artifactId> + <version>${grpc.version}</version> + </dependency> + <dependency> + <groupId>net.devh</groupId> + <artifactId>grpc-server-spring-boot-starter</artifactId> + <version>3.0.0.RELEASE</version> + </dependency> + <dependency> + <groupId>javax.validation</groupId> + <artifactId>validation-api</artifactId> + <version>${javax.version}</version> + </dependency> + <dependency> + <groupId>javax.annotation</groupId> + <artifactId>javax.annotation-api</artifactId> + <version>1.3.2</version> + </dependency> + <dependency> + <groupId>org.apache.airavata</groupId> + <artifactId>airavata-api-stubs</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + + <build> + <extensions> + <extension> + <groupId>kr.motd.maven</groupId> + <artifactId>os-maven-plugin</artifactId> + <version>1.7.0</version> + </extension> + </extensions> + + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-assembly-plugin</artifactId> + <version>${maven.assembly.plugin}</version> + <executions> + <execution> + <id>research-service-distribution-package</id> + <phase>package</phase> + <goals> + <goal>single</goal> + </goals> + <configuration> + <tarLongFileMode>posix</tarLongFileMode> + <finalName>${research.service.dist.name}</finalName> + <descriptors> + <descriptor>src/main/assembly/research-service-bin-assembly.xml</descriptor> + </descriptors> + <attach>false</attach> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.xolstice.maven.plugins</groupId> + <artifactId>protobuf-maven-plugin</artifactId> + <version>${protobuf-plugin.version}</version> + <configuration> + <protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier} + </protocArtifact> + <pluginId>grpc-java</pluginId> + <pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier} + </pluginArtifact> + </configuration> + <executions> + <execution> + <goals> + <goal>compile</goal> + <goal>compile-custom</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>14</source> + <target>14</target> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-remote-resources-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>bundle</goal> + </goals> + </execution> + </executions> + <configuration> + <includes> + <include>**/*.*</include> + </includes> + </configuration> + </plugin> + </plugins> + </build> +</project> \ No newline at end of file diff --git a/modules/research-framework/research-service/src/main/assembly/research-service-bin-assembly.xml b/modules/research-framework/research-service/src/main/assembly/research-service-bin-assembly.xml new file mode 100644 index 0000000000..00291df69b --- /dev/null +++ b/modules/research-framework/research-service/src/main/assembly/research-service-bin-assembly.xml @@ -0,0 +1,91 @@ + +<!-- + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<!DOCTYPE assembly [ + <!ELEMENT assembly (id|includeBaseDirectory|baseDirectory|formats|fileSets|dependencySets)*> + <!ELEMENT id (#PCDATA)> + <!ELEMENT includeBaseDirectory (#PCDATA)> + <!ELEMENT baseDirectory (#PCDATA)> + <!ELEMENT formats (format)*> + <!ELEMENT format (#PCDATA)> + <!ELEMENT fileSets (fileSet)*> + <!ELEMENT fileSet (directory|outputDirectory|fileMode|includes)*> + <!ELEMENT directory (#PCDATA)> + <!ELEMENT outputDirectory (#PCDATA)> + <!ELEMENT includes (include)*> + <!ELEMENT include (#PCDATA)> + <!ELEMENT dependencySets (dependencySet)*> + <!ELEMENT dependencySet (outputDirectory|outputFileNameMapping|includes)*> + ]> +<assembly> + <id>bin</id> + <includeBaseDirectory>true</includeBaseDirectory> + <baseDirectory>${research.service.dist.name}</baseDirectory> + <formats> + <format>tar.gz</format> + <format>zip</format> + </formats> + + <fileSets> + <fileSet> + <directory>src/main/resources/distribution/bin</directory> + <outputDirectory>bin</outputDirectory> + <fileMode>777</fileMode> + <includes> + <include>*.sh</include> + </includes> + </fileSet> + <fileSet> + <directory>src/main/resources/distribution/conf</directory> + <outputDirectory>conf</outputDirectory> + <includes> + <include>application.yml</include> + <include>truststore.jks</include> + <include>log4j2.xml</include> + </includes> + </fileSet> + <fileSet> + <directory>./</directory> + <outputDirectory>logs</outputDirectory> + <excludes> + <exclude>*/**</exclude> + </excludes> + </fileSet> + <fileSet> + <directory>target</directory> + <outputDirectory>lib</outputDirectory> + <includes> + <include>*.jar</include> + </includes> + </fileSet> + </fileSets> + + <dependencySets> + <dependencySet> + <useProjectArtifact>false</useProjectArtifact> + <outputDirectory>lib</outputDirectory> + <includes> + <include>*</include> + </includes> + </dependencySet> + </dependencySets> + +</assembly> diff --git a/modules/research-framework/research-service/src/main/java/org/apache/airavata/research/service/ResearchServiceApplication.java b/modules/research-framework/research-service/src/main/java/org/apache/airavata/research/service/ResearchServiceApplication.java new file mode 100644 index 0000000000..4e1bf20e8b --- /dev/null +++ b/modules/research-framework/research-service/src/main/java/org/apache/airavata/research/service/ResearchServiceApplication.java @@ -0,0 +1,13 @@ +package org.apache.airavata.research.service; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.data.jpa.repository.config.EnableJpaRepositories; + +@SpringBootApplication +@EnableJpaRepositories() +public class ResearchServiceApplication { + public static void main(String[] args) { + SpringApplication.run(ResearchServiceApplication.class, args); + } +} diff --git a/modules/research-framework/research-service/src/main/proto/research-service.proto b/modules/research-framework/research-service/src/main/proto/research-service.proto new file mode 100644 index 0000000000..688ad4a9bc --- /dev/null +++ b/modules/research-framework/research-service/src/main/proto/research-service.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + +package org.apache.airavata.agent; + +option java_multiple_files = true; +option java_package = "org.apache.airavata.research"; +option java_outer_classname = "ResearchServiceProto"; +option go_package = "protos/"; + +service ResearchService { +} \ No newline at end of file diff --git a/modules/research-framework/research-service/src/main/resources/application.yml b/modules/research-framework/research-service/src/main/resources/application.yml new file mode 100644 index 0000000000..63f612c08f --- /dev/null +++ b/modules/research-framework/research-service/src/main/resources/application.yml @@ -0,0 +1,25 @@ +grpc: + server: + port: 19908 + +server: + port: 18889 + address: 0.0.0.0 + +spring: + servlet: + multipart: + max-file-size: 200MB + max-request-size: 200MB + datasource: + url: "jdbc:mariadb://airavata.host:13306/research_catalog" + username: "root" + password: "123456" + driver-class-name: org.mariadb.jdbc.Driver + hikari: + pool-name: ResearchCatalogPool + leak-detection-threshold: 20000 + jpa: + hibernate: + ddl-auto: create + open-in-view: false diff --git a/modules/research-framework/research-service/src/main/resources/distribution/bin/research-service-daemon.sh b/modules/research-framework/research-service/src/main/resources/distribution/bin/research-service-daemon.sh new file mode 100755 index 0000000000..104bc87033 --- /dev/null +++ b/modules/research-framework/research-service/src/main/resources/distribution/bin/research-service-daemon.sh @@ -0,0 +1,112 @@ +#!/usr/bin/env bash + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +. `dirname $0`/setenv.sh +# Capture user's working dir before changing directory +CWD="$PWD" +cd ${AIRAVATA_HOME}/bin +LOGO_FILE="logo.txt" + +JAVA_OPTS="-Dairavata.server.truststore.path=${AIRAVATA_HOME}/conf/truststore.jks -Dspring.config.location=${AIRAVATA_HOME}/conf/ -Dairavata.home=${AIRAVATA_HOME} -Dlog4j.configurationFile=file:${AIRAVATA_HOME}/conf/log4j2.xml" +AIRAVATA_COMMAND="" +EXTRA_ARGS="" +SERVERS="" +LOGO=true +IS_SUBSET=false +SUBSET="" +DEFAULT_LOG_FILE="${AIRAVATA_HOME}/logs/airavata-daemon.out" +LOG_FILE=$DEFAULT_LOG_FILE + +SERVICE_NAME="Research Service" +PID_PATH_NAME="${AIRAVATA_HOME}/bin/service-pid" + +case $1 in + start) + echo "Starting $SERVICE_NAME ..." + if [ ! -f $PID_PATH_NAME ]; then + nohup java ${JAVA_OPTS} -classpath "${AIRAVATA_CLASSPATH}" \ + org.apache.airavata.research.service.ResearchServiceApplication ${AIRAVATA_COMMAND} $* > $LOG_FILE 2>&1 & + echo $! > $PID_PATH_NAME + echo "$SERVICE_NAME started ..." + else + echo "$SERVICE_NAME is already running ..." + fi + ;; + stop) + if [ -f $PID_PATH_NAME ]; then + PID=$(cat $PID_PATH_NAME); + echo "$SERVICE_NAME stopping ..." + kill $PID; + RETRY=0 + while kill -0 $PID 2> /dev/null; do + echo "Waiting for the process $PID to be stopped" + RETRY=`expr ${RETRY} + 1` + if [ "${RETRY}" -gt "20" ] + then + echo "Forcefully killing the process as it is not responding ..." + kill -9 $PID + fi + sleep 1 + done + echo "$SERVICE_NAME stopped ..." + rm $PID_PATH_NAME + else + echo "$SERVICE_NAME is not running ..." + fi + ;; + restart) + if [ -f $PID_PATH_NAME ]; then + PID=$(cat $PID_PATH_NAME); + echo "$SERVICE_NAME stopping ..."; + kill $PID; + RETRY=0 + while kill -0 $PID 2> /dev/null; do + echo "Waiting for the process $PID to be stopped" + RETRY=`expr ${RETRY} + 1` + if [ "${RETRY}" -gt "20" ] + then + echo "Forcefully killing the process as it is not responding ..." + kill -9 $PID + fi + sleep 1 + done + echo "$SERVICE_NAME stopped ..."; + rm $PID_PATH_NAME + echo "$SERVICE_NAME starting ..." + nohup java ${JAVA_OPTS} -classpath "${AIRAVATA_CLASSPATH}" \ + org.apache.airavata.research.service.ResearchServiceApplication ${AIRAVATA_COMMAND} $* > $LOG_FILE 2>&1 & + echo $! > $PID_PATH_NAME + echo "$SERVICE_NAME started ..." + else + echo "$SERVICE_NAME is not running ..." + fi + ;; + -h) + echo "Usage: research-service-daemon.sh" + + echo "command options:" + echo " start Start server in daemon mode" + echo " stop Stop server running in daemon mode" + echo " restart Restart server in daemon mode" + echo " -log <LOG_FILE> Where to redirect stdout/stderr (defaults to $DEFAULT_LOG_FILE)" + echo " -h Display this help and exit" + shift + exit 0 + ;; +esac \ No newline at end of file diff --git a/modules/research-framework/research-service/src/main/resources/distribution/bin/research-service.sh b/modules/research-framework/research-service/src/main/resources/distribution/bin/research-service.sh new file mode 100755 index 0000000000..357eaa6d09 --- /dev/null +++ b/modules/research-framework/research-service/src/main/resources/distribution/bin/research-service.sh @@ -0,0 +1,70 @@ +#!/usr/bin/env bash + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +. `dirname $0`/setenv.sh +# Capture user's working dir before changing directory +CWD="$PWD" +cd ${AIRAVATA_HOME}/bin +LOGO_FILE="logo.txt" + +JAVA_OPTS="-Dairavata.server.truststore.path=${AIRAVATA_HOME}/conf/truststore.jks -Dspring.config.location=${AIRAVATA_HOME}/conf/ -Dairavata.home=${AIRAVATA_HOME} -Dlog4j.configurationFile=file:${AIRAVATA_HOME}/conf/log4j2.xml" +AIRAVATA_COMMAND="" +EXTRA_ARGS="" +SERVERS="" +IS_SUBSET=false +SUBSET="" +DEFAULT_LOG_FILE="${AIRAVATA_HOME}/logs/airavata.out" +LOG_FILE=$DEFAULT_LOG_FILE + +# parse command arguments +for var in "$@" +do + case ${var} in + -xdebug) + AIRAVATA_COMMAND="${AIRAVATA_COMMAND}" + JAVA_OPTS="$JAVA_OPTS -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=*:8000" + shift + ;; + -log) + shift + LOG_FILE="$1" + shift + # If relative path, expand to absolute path using the user's $CWD + if [ -z "`echo "$LOG_FILE" | egrep "^/"`" ]; then + LOG_FILE="${CWD}/${LOG_FILE}" + fi + ;; + -h) + echo "Usage: research-service.sh" + + echo "command options:" + echo " -xdebug Start Research Service under JPDA debugger" + echo " -h Display this help and exit" + shift + exit 0 + ;; + *) + EXTRA_ARGS="${EXTRA_ARGS} ${var}" + shift + ;; + esac +done + +java ${JAVA_OPTS} -classpath "${AIRAVATA_CLASSPATH}" \ + org.apache.airavata.research.service.ResearchServiceApplication ${AIRAVATA_COMMAND} $* \ No newline at end of file diff --git a/modules/research-framework/research-service/src/main/resources/distribution/bin/setenv.sh b/modules/research-framework/research-service/src/main/resources/distribution/bin/setenv.sh new file mode 100755 index 0000000000..3f1d7632bf --- /dev/null +++ b/modules/research-framework/research-service/src/main/resources/distribution/bin/setenv.sh @@ -0,0 +1,46 @@ +#!/bin/sh + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# resolve links - $0 may be a softlink +PRG="$0" + +while [ -h "$PRG" ]; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '.*/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`/"$link" + fi +done + +PRGDIR=`dirname "$PRG"` + +# Only set AIRAVATA_HOME if not already set +[ -z "$AIRAVATA_HOME" ] && AIRAVATA_HOME=`cd "$PRGDIR/.." ; pwd` + +AIRAVATA_CLASSPATH="" + +for f in "$AIRAVATA_HOME"/lib/*.jar +do + AIRAVATA_CLASSPATH="$AIRAVATA_CLASSPATH":$f +done + +export AIRAVATA_HOME +export AIRAVATA_CLASSPATH \ No newline at end of file diff --git a/modules/research-framework/research-service/src/main/resources/distribution/conf/application.yml b/modules/research-framework/research-service/src/main/resources/distribution/conf/application.yml new file mode 100644 index 0000000000..63f612c08f --- /dev/null +++ b/modules/research-framework/research-service/src/main/resources/distribution/conf/application.yml @@ -0,0 +1,25 @@ +grpc: + server: + port: 19908 + +server: + port: 18889 + address: 0.0.0.0 + +spring: + servlet: + multipart: + max-file-size: 200MB + max-request-size: 200MB + datasource: + url: "jdbc:mariadb://airavata.host:13306/research_catalog" + username: "root" + password: "123456" + driver-class-name: org.mariadb.jdbc.Driver + hikari: + pool-name: ResearchCatalogPool + leak-detection-threshold: 20000 + jpa: + hibernate: + ddl-auto: create + open-in-view: false diff --git a/modules/research-framework/research-service/src/main/resources/distribution/conf/log4j2.xml b/modules/research-framework/research-service/src/main/resources/distribution/conf/log4j2.xml new file mode 100644 index 0000000000..ceb8fec7b8 --- /dev/null +++ b/modules/research-framework/research-service/src/main/resources/distribution/conf/log4j2.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + + + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + +--> +<Configuration status="WARN"> + + <Appenders> + <Console name="Console" target="SYSTEM_OUT"> + <PatternLayout pattern="%d [%t] %-5p %c{30} %X - %m%n"/> + </Console> + <RollingFile name="RollingFileAppender" fileName="../logs/research-service.log" + filePattern="logs/${date:yyyy-MM}/research-service-log-%d{MM-dd-yyyy}-%i.log.gz"> + <PatternLayout> + <Pattern>%d [%t] %-5p %c{30} %X - %m%n</Pattern> + </PatternLayout> + <Policies> + <OnStartupTriggeringPolicy /> + <TimeBasedTriggeringPolicy /> + <SizeBasedTriggeringPolicy size="50 MB" /> + </Policies> + <DefaultRolloverStrategy max="20" /> + </RollingFile> + </Appenders> + <Loggers> + <logger name="ch.qos.logback" level="WARN"/> + <logger name="org.apache.helix" level="WARN"/> + <logger name="org.apache.zookeeper" level="ERROR"/> + <logger name="org.apache.airavata" level="INFO"/> + <logger name="org.hibernate" level="ERROR"/> + <Root level="INFO"> + <AppenderRef ref="Console"/> + <AppenderRef ref="RollingFileAppender"/> + </Root> + </Loggers> +</Configuration> \ No newline at end of file diff --git a/pom.xml b/pom.xml index 73e725c583..4004e975e7 100644 --- a/pom.xml +++ b/pom.xml @@ -100,6 +100,7 @@ <module>modules/computer-resource-monitoring-service</module> <module>modules/airavata-metascheduler/metadata-analyzer</module> <module>modules/agent-framework</module> + <module>modules/research-framework</module> <module>tools</module> <module>modules/ide-integration</module> <module>modules/file-server</module>
