Compare commits
6 Commits
Feature/24
...
master
Author | SHA1 | Date |
---|---|---|
Giancarlo Panichi | 8aebf0dc91 | |
Giancarlo Panichi | 579fc0fbd2 | |
Giancarlo Panichi | 257feb19fc | |
Giancarlo Panichi | fa5494a1d3 | |
Giancarlo Panichi | 166d8cca86 | |
Giancarlo Panichi | e1d88418be |
|
@ -15,11 +15,13 @@
|
|||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
<attribute name="test" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
<attribute name="test" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||
|
|
|
@ -3,6 +3,9 @@ org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
|||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
|
||||
org.eclipse.jdt.core.compiler.release=disabled
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
<wb-module deploy-name="dataminer-pool-manager-2.7.1-SNAPSHOT">
|
||||
<wb-module deploy-name="dataminer-pool-manager-2.8.0-SNAPSHOT">
|
||||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
|
||||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
|
||||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
|
||||
|
|
|
@ -3,8 +3,9 @@
|
|||
|
||||
## [v2.8.0-SNAPSHOT]
|
||||
|
||||
- Updated to gcube-smartgears-bom.2.5.0
|
||||
|
||||
- Updated jsch to 0.1.55
|
||||
- Updated to gcube-smartgears-bom: 2.5.1-SNAPSHOT
|
||||
- Updated pom.xml to include configuration resources [#26192]
|
||||
|
||||
## [v2.7.1] - 2022-04-06
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<ReleaseNotes>
|
||||
<Changeset component="org.gcube.dataanalysis.dataminer-pool-manager.2-8-0" date="2023-11-09">
|
||||
<Change>Updated to gcube-smartgears-bom.2.5.0</Change>
|
||||
<Changeset component="org.gcube.dataanalysis.dataminer-pool-manager.2-8-0" date="2024-09-16">
|
||||
<Change>Updated to gcube-smartgears-bom: 2.5.1-SNAPSHOT</Change>
|
||||
<Change>Updated pom.xml to include configuration resources [#26192]</Change>
|
||||
</Changeset>
|
||||
<Changeset component="org.gcube.dataanalysis.dataminer-pool-manager.2-7-1" date="2022-04-06">
|
||||
<Change>Updated to gcube-smartgears-bom.2.2.0 [#23133]</Change>
|
||||
|
|
23
pom.xml
23
pom.xml
|
@ -107,7 +107,7 @@
|
|||
<dependency>
|
||||
<groupId>com.jcraft</groupId>
|
||||
<artifactId>jsch</artifactId>
|
||||
<version>0.1.53</version>
|
||||
<version>0.1.55</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
@ -151,7 +151,7 @@
|
|||
<dependency>
|
||||
<groupId>org.gcube.distribution</groupId>
|
||||
<artifactId>gcube-smartgears-bom</artifactId>
|
||||
<version>2.5.0</version>
|
||||
<version>2.5.1-SNAPSHOT</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
@ -191,6 +191,25 @@
|
|||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>copy-config</id>
|
||||
<goals>
|
||||
<goal>copy-resources</goal>
|
||||
</goals>
|
||||
<phase>process-resources</phase>
|
||||
<configuration>
|
||||
<outputDirectory>${webappDirectory}/classes</outputDirectory>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${project.basedir}/src/main/resources/</directory>
|
||||
<filtering>true</filtering>
|
||||
<includes>
|
||||
<include>*/**</include>
|
||||
</includes>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
|
|
|
@ -97,16 +97,16 @@ public class ClientConfigurationCache
|
|||
|
||||
if (repositoryPassword != null && repositoryPassword.trim() == "") repositoryPassword = null;
|
||||
|
||||
this.logger.debug("Repository username "+repositoryUsername);
|
||||
this.logger.debug("Repository password "+repositoryPassword);
|
||||
logger.debug("Repository username "+repositoryUsername);
|
||||
logger.debug("Repository password "+repositoryPassword);
|
||||
|
||||
} catch (Exception e)
|
||||
{
|
||||
this.logger.debug("SVN Username and password not present");
|
||||
}
|
||||
|
||||
this.logger.debug("SVN Repository URL: "+repositoryURL);
|
||||
this.logger.debug("SVN Repository path: "+repositoryPath);
|
||||
logger.debug("SVN Repository URL: "+repositoryURL);
|
||||
logger.debug("SVN Repository path: "+repositoryPath);
|
||||
|
||||
response = new SVNRepository(repositoryURL, repositoryPath,repositoryUsername, repositoryPassword);
|
||||
|
||||
|
|
|
@ -30,23 +30,6 @@ public class ConfigurationImpl implements Configuration {
|
|||
}
|
||||
|
||||
|
||||
// enum REPOSITORIES {
|
||||
// REPO ("svn.repository"),
|
||||
// MAIN_ALGO ("svn.algo.main.repo");
|
||||
//
|
||||
// private String type;
|
||||
//
|
||||
// private REPOSITORIES(String type) {
|
||||
// this.type = type;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String toString() {
|
||||
// return this.type;
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
private CONFIGURATIONS type;
|
||||
private ClientConfigurationCache cache;
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ import org.slf4j.LoggerFactory;
|
|||
import org.tmatesoft.svn.core.SVNException;
|
||||
|
||||
public class DMPMClientConfiguratorManager {
|
||||
private final Logger logger;
|
||||
private final Logger logger=LoggerFactory.getLogger(DMPMClientConfiguratorManager.class);
|
||||
private Properties defaultAdmins;
|
||||
|
||||
static DMPMClientConfiguratorManager instance;
|
||||
|
@ -22,28 +22,27 @@ public class DMPMClientConfiguratorManager {
|
|||
private ScopedCacheMap cacheMap;
|
||||
|
||||
private DMPMClientConfiguratorManager() {
|
||||
this.cacheMap = new ScopedCacheMap();
|
||||
this.logger = LoggerFactory.getLogger(DMPMClientConfiguratorManager.class);
|
||||
this.defaultAdmins = new Properties();
|
||||
cacheMap = new ScopedCacheMap();
|
||||
defaultAdmins = new Properties();
|
||||
|
||||
try {
|
||||
this.defaultAdmins.load(this.getClass().getResourceAsStream("/default.admins"));
|
||||
this.logger.debug("Default users successfully loaded");
|
||||
defaultAdmins.load(this.getClass().getResourceAsStream("/default.admins"));
|
||||
logger.debug("Default users successfully loaded");
|
||||
} catch (Exception e) {
|
||||
this.logger.error("Unable to get default users", e);
|
||||
logger.error("Unable to get default users", e);
|
||||
}
|
||||
}
|
||||
|
||||
private ClientConfigurationCache getCurrentCache() {
|
||||
String currentScope = ScopeProvider.instance.get();
|
||||
this.logger.debug("Current scope = " + currentScope);
|
||||
this.logger.debug("Getting current configuration cache");
|
||||
ClientConfigurationCache cache = this.cacheMap.get(currentScope);
|
||||
logger.debug("Current scope = " + currentScope);
|
||||
logger.debug("Getting current configuration cache");
|
||||
ClientConfigurationCache cache = cacheMap.get(currentScope);
|
||||
|
||||
if (cache == null) {
|
||||
this.logger.debug("Cache not created yet, creating...");
|
||||
logger.debug("Cache not created yet, creating...");
|
||||
cache = new ClientConfigurationCache();
|
||||
this.cacheMap.put(currentScope, cache);
|
||||
cacheMap.put(currentScope, cache);
|
||||
|
||||
}
|
||||
|
||||
|
@ -88,8 +87,8 @@ public class DMPMClientConfiguratorManager {
|
|||
|
||||
public static void main(String[] args) throws IOException, SVNException {
|
||||
DMPMClientConfiguratorManager a = new DMPMClientConfiguratorManager();
|
||||
ScopeProvider.instance.set("/gcube/devNext/NextNext");
|
||||
// SecurityTokenProvider.instance.set("708e7eb8-11a7-4e9a-816b-c9ed7e7e99fe-98187548");
|
||||
ScopeProvider.instance.set("/gcube/devsec/devVRE");
|
||||
// SecurityTokenProvider.instance.set("xxx-xxx-xxx-xxx");
|
||||
|
||||
System.out.println("RESULT 1" + a.getStagingConfiguration().getSVNCRANDepsList());
|
||||
System.out.println("RESULT 2" + a.getProductionConfiguration().getRepository());
|
||||
|
|
|
@ -9,6 +9,7 @@ import java.util.ArrayList;
|
|||
import java.util.Arrays;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.gcube.dataanalysis.dataminer.poolmanager.clients.configuration.Configuration;
|
||||
|
@ -186,9 +187,18 @@ public abstract class CheckMethod {
|
|||
|
||||
|
||||
this.logger.debug("session created.");
|
||||
this.logger.debug("Session Config:");
|
||||
for (Object key: sshConfig.keySet()) {
|
||||
this.logger.debug("{} = {} ", key, sshConfig.get(key));
|
||||
}
|
||||
|
||||
|
||||
this.logger.debug("SSH Config: {}",sshConfig);
|
||||
session.setConfig(this.sshConfig);
|
||||
session.connect();
|
||||
|
||||
this.logger.debug("Open Channel SFTP");
|
||||
this.logger.debug("Protocol: "+SFTP_PROTOCOL);
|
||||
Channel channel = session.openChannel(SFTP_PROTOCOL);
|
||||
channel.connect();
|
||||
this.logger.debug("shell channel connected....");
|
||||
|
@ -207,6 +217,7 @@ public abstract class CheckMethod {
|
|||
session.disconnect();
|
||||
} catch (Exception e)
|
||||
{
|
||||
this.logger.error("Error in deleteFiles(): {} ",e.getLocalizedMessage(),e);
|
||||
throw new GenericException(e);
|
||||
}
|
||||
|
||||
|
|
|
@ -14,11 +14,10 @@ public class SVNRepositoryManager {
|
|||
|
||||
private SVNRepository svnRepository;
|
||||
private static SVNRepositoryManager instance;
|
||||
private Logger logger;
|
||||
private Logger logger=LoggerFactory.getLogger(SVNRepositoryManager.class);
|
||||
|
||||
private SVNRepositoryManager (Configuration configuration) throws SVNException
|
||||
{
|
||||
this.logger = LoggerFactory.getLogger(SVNRepositoryManager.class);
|
||||
org.gcube.dataanalysis.dataminer.poolmanager.clients.configuration.SVNRepository repository = configuration.getSVNRepository();
|
||||
this.svnRepository = SVNRepositoryFactory.create(SVNURL.parseURIEncoded(repository.getBaseUrl()));
|
||||
ISVNAuthenticationManager authManager = null;
|
||||
|
|
|
@ -45,12 +45,11 @@ public abstract class SVNUpdater {
|
|||
|
||||
private SVNRepository svnRepository;
|
||||
private Configuration configuration;
|
||||
private Logger logger;
|
||||
private Logger logger=LoggerFactory.getLogger(SVNUpdater.class);
|
||||
|
||||
public SVNUpdater(Configuration configuration) throws SVNException {
|
||||
this.configuration = configuration;
|
||||
this.svnRepository = SVNRepositoryManager.getInstance(configuration).getSvnRepository();
|
||||
this.logger = LoggerFactory.getLogger(SVNUpdater.class);
|
||||
}
|
||||
|
||||
// public void updateRPRotoDeps(Algorithm algorithm) {
|
||||
|
@ -72,7 +71,7 @@ public abstract class SVNUpdater {
|
|||
|
||||
private String getDependencyFile (Configuration configuration, String language)
|
||||
{
|
||||
this.logger.debug("Getting dependency file for language "+language);
|
||||
logger.debug("Getting dependency file for language "+language);
|
||||
|
||||
switch (language)
|
||||
{
|
||||
|
@ -123,7 +122,7 @@ public abstract class SVNUpdater {
|
|||
|
||||
private void updateAlgorithmList(String svnMainAlgoRepo, File algorithmsFile) throws SVNException, SVNCommitException
|
||||
{
|
||||
this.logger.debug("Adding .jar file: " + algorithmsFile + " to repository " + svnMainAlgoRepo);
|
||||
logger.debug("Adding .jar file: " + algorithmsFile + " to repository " + svnMainAlgoRepo);
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -137,7 +136,7 @@ public abstract class SVNUpdater {
|
|||
}
|
||||
catch (FileNotFoundException e)
|
||||
{
|
||||
this.logger.error("Temporary algorithm file not found: this exception should not happen",e);
|
||||
logger.error("Temporary algorithm file not found: this exception should not happen",e);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -149,7 +148,7 @@ public abstract class SVNUpdater {
|
|||
|
||||
public void putFile(FileInputStream fileInputSreeam, String destinationFolder, String fileName) throws SVNException, SVNCommitException
|
||||
{
|
||||
this.logger.debug("Putting new file on the SVN repository");
|
||||
logger.debug("Putting new file on the SVN repository");
|
||||
final ISVNEditor commitEditor = svnRepository.getCommitEditor("Add algorithm to list", null);
|
||||
commitEditor.openRoot(-1);
|
||||
commitEditor.openDir(destinationFolder, -1);
|
||||
|
@ -166,17 +165,17 @@ public abstract class SVNUpdater {
|
|||
|
||||
if (errorMessage != null)
|
||||
{
|
||||
this.logger.error("Operation failed: "+errorMessage.getFullMessage());
|
||||
logger.error("Operation failed: "+errorMessage.getFullMessage());
|
||||
throw new SVNCommitException(errorMessage,fileName);
|
||||
}
|
||||
|
||||
this.logger.debug("Operation completed");
|
||||
logger.debug("Operation completed");
|
||||
}
|
||||
|
||||
|
||||
public void updateFile(FileInputStream fileInputStream, String destinationFolder, String fileName) throws SVNException, SVNCommitException {
|
||||
|
||||
this.logger.debug("Updating existing file on the SVN repository");
|
||||
logger.debug("Updating existing file on the SVN repository");
|
||||
final ISVNEditor commitEditor = svnRepository.getCommitEditor("Updating algorithm", null);
|
||||
commitEditor.openRoot(-1);
|
||||
commitEditor.openDir(destinationFolder, -1);
|
||||
|
@ -197,12 +196,12 @@ public abstract class SVNUpdater {
|
|||
|
||||
if (errorMessage != null)
|
||||
{
|
||||
this.logger.error("Operation failed: "+errorMessage.getFullMessage());
|
||||
logger.error("Operation failed: "+errorMessage.getFullMessage());
|
||||
|
||||
throw new SVNCommitException(errorMessage,fileName+" to be updated");
|
||||
}
|
||||
|
||||
this.logger.debug("Operation completed");
|
||||
logger.debug("Operation completed");
|
||||
}
|
||||
|
||||
|
||||
|
@ -231,7 +230,7 @@ public abstract class SVNUpdater {
|
|||
boolean response = false;
|
||||
|
||||
try {
|
||||
this.logger.debug("Updating algorithm list: " + file);
|
||||
logger.debug("Updating algorithm list: " + file);
|
||||
final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
||||
svnRepository.getFile(file, SVNRepository.INVALID_REVISION, null, byteArrayOutputStream);
|
||||
String lines[] = byteArrayOutputStream.toString().split("\\r?\\n");
|
||||
|
@ -277,7 +276,7 @@ public abstract class SVNUpdater {
|
|||
|
||||
if (errorMessage != null)
|
||||
{
|
||||
this.logger.error("Operation failed: "+errorMessage.getFullMessage());
|
||||
logger.error("Operation failed: "+errorMessage.getFullMessage());
|
||||
response = false;
|
||||
}
|
||||
else response = true;
|
||||
|
@ -286,7 +285,7 @@ public abstract class SVNUpdater {
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
this.logger.error("Unable to commit algorithm list",ex);
|
||||
logger.error("Unable to commit algorithm list",ex);
|
||||
response = false;
|
||||
}
|
||||
|
||||
|
@ -314,7 +313,7 @@ public abstract class SVNUpdater {
|
|||
sb.append("none | ");
|
||||
sb.append(this.getTimeZone() + " | ");
|
||||
|
||||
this.logger.info("Algo details: "+sb.toString());
|
||||
logger.info("Algo details: "+sb.toString());
|
||||
|
||||
return sb.toString();
|
||||
}
|
||||
|
@ -337,7 +336,7 @@ public abstract class SVNUpdater {
|
|||
}
|
||||
|
||||
|
||||
this.logger.debug("Checking dependencies list: " + file);
|
||||
logger.debug("Checking dependencies list: " + file);
|
||||
|
||||
|
||||
List<String> validDependencies = new LinkedList<String>();
|
||||
|
@ -351,7 +350,7 @@ public abstract class SVNUpdater {
|
|||
validDependencies.add(l.trim());
|
||||
}}
|
||||
|
||||
this.logger.debug("Valid dependencies are: "+validDependencies);
|
||||
logger.debug("Valid dependencies are: "+validDependencies);
|
||||
for(Dependency d: deps){
|
||||
String depName = d.getName();
|
||||
if(!validDependencies.contains(depName)){
|
||||
|
@ -410,6 +409,7 @@ public abstract class SVNUpdater {
|
|||
// return check;
|
||||
} catch (SVNException e)
|
||||
{
|
||||
logger.error(e.getLocalizedMessage(),e);
|
||||
throw new GenericException(e);
|
||||
}
|
||||
|
||||
|
@ -423,7 +423,7 @@ public abstract class SVNUpdater {
|
|||
|
||||
boolean check = false;
|
||||
try {
|
||||
this.logger.info("Checking dependencies list: " + file);
|
||||
logger.info("Checking dependencies list: " + file);
|
||||
final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
||||
svnRepository.getFile(file, SVNRepository.INVALID_REVISION, null, byteArrayOutputStream);
|
||||
String lines[] = byteArrayOutputStream.toString().split("\\r?\\n");
|
||||
|
@ -454,7 +454,7 @@ public abstract class SVNUpdater {
|
|||
// }
|
||||
} catch (Exception a)
|
||||
{
|
||||
this.logger.error(a.getMessage(),a);
|
||||
logger.error(a.getMessage(),a);
|
||||
|
||||
}
|
||||
|
||||
|
@ -464,7 +464,7 @@ public abstract class SVNUpdater {
|
|||
|
||||
public void updateSVN(String file, Collection<Dependency> deps) {
|
||||
try {
|
||||
this.logger.info("Updating dependencies list: " + file);
|
||||
logger.info("Updating dependencies list: " + file);
|
||||
|
||||
final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
||||
svnRepository.getFile(file, SVNRepository.INVALID_REVISION, null, byteArrayOutputStream);
|
||||
|
@ -543,7 +543,7 @@ public abstract class SVNUpdater {
|
|||
Date fromDate = formatter.parse(cal.getTime().toString());
|
||||
TimeZone central = TimeZone.getTimeZone("UTC");
|
||||
formatter.setTimeZone(central);
|
||||
this.logger.info(formatter.format(fromDate));
|
||||
logger.info(formatter.format(fromDate));
|
||||
return formatter.format(fromDate);
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ svn.algo.main.repo = /trunk/data-analysis/DataMinerConfiguration/algorithms
|
|||
|
||||
|
||||
#STAGE
|
||||
STAGE_GHOST = dataminer-ghost-d.dev.d4science.org
|
||||
STAGE_GHOST = dataminer-ghost.cloud-dev.d4science.org
|
||||
svn.stage.algorithms-list = /trunk/data-analysis/DataMinerConfiguration/algorithms/dev/algorithms
|
||||
|
||||
svn.stage.deps-linux-compiled = /trunk/data-analysis/RConfiguration/RPackagesManagement/r_deb_pkgs.txt
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
dependencies:
|
||||
# - { role: gcube-dataminer }
|
||||
# - { role: os-unzip }
|
||||
# - { role: os-java-1.7.0 }
|
||||
# - { role: os-java-1.8.0 }
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
|
||||
- name: adding OS Package java-1.7.0
|
||||
- name: adding OS Package java-1.8.0
|
||||
package:
|
||||
name: java-1.7.0-openjdk
|
||||
name: java-1.8.0-openjdk
|
||||
state: "{{os_package_state}}"
|
||||
become: true
|
|
@ -3,3 +3,4 @@
|
|||
/changelog.xml
|
||||
/gcube-app.xml
|
||||
/profile.xml
|
||||
/classes/
|
||||
|
|
|
@ -24,7 +24,7 @@ public class SVNTests {
|
|||
//algo.setClazz(algo.getClazz() + "TEST");
|
||||
algo.setAlgorithmType("transducerers");
|
||||
algo.setCategory("NLP");
|
||||
algo.setFullname("Ondřej Košarko");
|
||||
algo.setFullname("Master Test");
|
||||
//System.out.println(algo.getCategory());
|
||||
//System.out.println(algo.getSkipJava());
|
||||
|
||||
|
|
Loading…
Reference in New Issue