This commit is contained in:
Nunzio Andrea Galante 2017-07-26 19:21:07 +00:00
parent 1142c87af6
commit b225caa2a4
12 changed files with 329 additions and 84 deletions

View File

@ -289,4 +289,31 @@ public class AlgorithmPackageParser ***REMOVED***
***REMOVED***
***REMOVED***
public static void main(String[] args) ***REMOVED***
AlgorithmPackageParser ap = new AlgorithmPackageParser();
String txt =
"Username: giancarlo.panichi\n"+
"Full Name: Giancarlo Panichi\n"+
"Email: g.panichi@isti.cnr.it\n"+
"Language: R\n"+
"Algorithm Name: RBLACKBOX\n"+
"Class Name: org.gcube.dataanalysis.executor.rscripts.RBlackBox\n"+
"Algorithm Description: RBlackBox\n"+
"Algorithm Category: BLACK_BOX\n"+
"Interpreter Version: 3.2.1\n"+
"Packages:\n"+
"Package Name: DBI\n"+
"Package Name: RPostgreSQL\n"+
"Package Name: raster\n"+
"Package Name: maptools\n"+
"Package Name: sqldf\n"+
"Package Name: RJSONIO\n"+
"Package Name: httr \n"+
"Package Name: data.table";
ap.parseMetadata(txt);
***REMOVED***
***REMOVED***

View File

@ -28,21 +28,23 @@ public class DataminerPoolManager ***REMOVED***
***REMOVED***
***REMOVED***Algorithm algo) throws IOException, InterruptedException ***REMOVED***
***REMOVED***Algorithm algo, String env) throws IOException, InterruptedException ***REMOVED***
Cluster stagingCluster = ClusterBuilder.getStagingDataminerCluster(env);
Cluster stagingCluster = ClusterBuilder.getStagingDataminerCluster();
***REMOVED***Cluster rProtoCluster = ClusterBuilder.getRProtoCluster();
DMPMJob job = new StagingJob(this.svnUpdater, algo, stagingCluster, /*rProtoCluster,*/ ScopeProvider.instance.get());
DMPMJob job = new StagingJob(this.svnUpdater, algo, stagingCluster, /*rProtoCluster,*/ ScopeProvider.instance.get(), env);
String id = job.start();
return id;
***REMOVED***
***REMOVED***Algorithm algo, String targetVREToken, String targetVRE) throws IOException, InterruptedException ***REMOVED***
***REMOVED***Algorithm algo, String targetVREToken, String targetVRE, String env) throws IOException, InterruptedException ***REMOVED***
***REMOVED***Cluster prodCluster = ClusterBuilder.getVRECluster(targetVREToken, targetVRE);
DMPMJob job = new ProductionPublishingJob(this.svnUpdater, algo, /*prodCluster,*/ targetVRE, targetVREToken);
DMPMJob job = new ProductionPublishingJob(this.svnUpdater, algo, /*prodCluster,*/ targetVRE, targetVREToken,env);
String id = job.start();
return id;
***REMOVED***

View File

@ -20,13 +20,16 @@ public class ProductionPublishingJob extends DMPMJob ***REMOVED***
***REMOVED***private Cluster prodCluster;
private String targetVREName;
private String targetVREToken;
private String env;
public ProductionPublishingJob(SVNUpdater svnUpdater, Algorithm algorithm, /*Cluster prodCluster,*/ String targetVREName, String targetVREToken) throws FileNotFoundException, UnsupportedEncodingException ***REMOVED***
public ProductionPublishingJob(SVNUpdater svnUpdater, Algorithm algorithm, /*Cluster prodCluster,*/ String targetVREName, String targetVREToken, String env) throws FileNotFoundException, UnsupportedEncodingException ***REMOVED***
super(svnUpdater);
this.algorithm = algorithm;
***REMOVED***this.prodCluster = prodCluster;
this.targetVREName = targetVREName;
this.targetVREToken = targetVREToken;
this.env= env;
this.jobLogs = new File(System.getProperty("user.home") + File.separator + "dataminer-pool-manager" + File.separator + "jobs");
@ -42,7 +45,7 @@ public class ProductionPublishingJob extends DMPMJob ***REMOVED***
if (CheckPermission.apply(targetVREToken,targetVREName))***REMOVED***
***REMOVED***this.svnUpdater.updateProdDeps(this.algorithm);
this.svnUpdater.updateSVNProdAlgorithmList(this.algorithm, this.targetVREName, this.algorithm.getFullname(), "Prod");
this.svnUpdater.updateSVNAlgorithmList(this.algorithm, this.targetVREName, this.algorithm.getFullname(), env);
this.getStatus(9);
sm.sendNotification(nh.getSuccessSubjectRelease() + " for "+this.algorithm.getName()+ " algorithm", nh.getSuccessBodyRelease(this.buildInfo()));
return;

View File

@ -27,10 +27,12 @@ public class StagingJob extends DMPMJob ***REMOVED***
private Cluster stagingCluster;
***REMOVED*** private Cluster rProtoCluster;
private String rProtoVREName;
private String env;
public StagingJob(SVNUpdater svnUpdater, Algorithm algorithm,
Cluster stagingCluster, /* Cluster rProtoCluster, */
String rProtoVREName) throws FileNotFoundException, UnsupportedEncodingException ***REMOVED***
String rProtoVREName, String env) throws FileNotFoundException, UnsupportedEncodingException ***REMOVED***
super(svnUpdater);
this.jobLogs = new File(
System.getProperty("user.home") + File.separator + "dataminer-pool-manager" + File.separator + "jobs");
@ -40,6 +42,8 @@ public class StagingJob extends DMPMJob ***REMOVED***
this.stagingCluster = stagingCluster;
***REMOVED*** this.rProtoCluster = rProtoCluster;
this.rProtoVREName = rProtoVREName;
this.env = env;
***REMOVED***File m = new File(this.jobLogs + File.separator + this.id + "_exitStatus");
***REMOVED***PrintWriter writer = new PrintWriter(m, "UTF-8");
@ -58,17 +62,18 @@ public class StagingJob extends DMPMJob ***REMOVED***
try ***REMOVED***
Collection<String> undefinedDependencies = this.svnUpdater.getUndefinedDependencies(
this.svnUpdater.getRProtoDependencyFile(this.algorithm.getLanguage()),
this.svnUpdater.getDependencyFile(this.algorithm.getLanguage(),env),
this.algorithm.getDependencies());
if (!undefinedDependencies.isEmpty()) ***REMOVED***
String message = "Following dependencies are not defined:\n";
for (String n : undefinedDependencies) ***REMOVED***
message += "\n" + n;
message += "\n" + n +"\n";
***REMOVED***
this.getStatus(2);
sm.sendNotification(nh.getFailedSubject() +" for "+this.algorithm.getName()+ " algorithm", nh.getFailedBody(this.buildInfo()+message));
sm.sendNotification(nh.getFailedSubject() +" for "+this.algorithm.getName()+ " algorithm", nh.getFailedBody(message+this.buildInfo()));
return;
***REMOVED***
@ -84,14 +89,14 @@ public class StagingJob extends DMPMJob ***REMOVED***
if (ret == 0) ***REMOVED***
this.getStatus(0);
if (b.checkMethod(a.getStagingHost(), SecurityTokenProvider.instance.get())
&& (b.algoExists(this.algorithm))) ***REMOVED***
if (b.checkMethod(a.getHost(this.env), SecurityTokenProvider.instance.get())
&& (b.algoExists(this.algorithm, this.env))) ***REMOVED***
System.out.println("Interface check ok!");
System.out.println("Both the files exist at the correct path!");
this.svnUpdater.updateSVNRProtoAlgorithmList(this.algorithm, this.rProtoVREName,
this.algorithm.getFullname(), "Proto");
this.svnUpdater.updateSVNAlgorithmList(this.algorithm, this.rProtoVREName,
this.algorithm.getFullname(), env);
this.getStatus(9);
sm.sendNotification(nh.getSuccessSubject() + " for "+this.algorithm.getName()+ " algorithm", nh.getSuccessBody(this.buildInfo()));
@ -148,7 +153,7 @@ public class StagingJob extends DMPMJob ***REMOVED***
"Algorithm details:\n"+"\n"+
"User: "+this.algorithm.getFullname()+"\n"+
"Algorithm name: "+this.algorithm.getName()+"\n"+
"Staging DataMiner Host: "+ a.getStagingHost()+"\n"+
"Staging DataMiner Host: "+ a.getHost(this.env)+"\n"+
"Caller VRE: "+rProtoVREName+"\n"+
"Target VRE: "+rProtoVREName+"\n";
***REMOVED***

View File

@ -85,7 +85,7 @@ public class CheckMethod ***REMOVED***
public boolean algoExists(Algorithm a) throws Exception***REMOVED***
public boolean algoExists(Algorithm a, String env) throws Exception***REMOVED***
File file = new File("/home/gcube/wps_algorithms/algorithms/"+a.getName()+".jar");
@ -96,9 +96,9 @@ public class CheckMethod ***REMOVED***
System.out.println("Second file is located to: "+file2.getPath());
if ((this.doesExist(file.getPath())) && (this.doesExist(file2.getPath())))***REMOVED***
this.copyFromDmToSVN(file);
this.copyFromDmToSVN(file2);
if ((this.doesExist(file.getPath(),env)) && (this.doesExist(file2.getPath(),env)))***REMOVED***
this.copyFromDmToSVN(file,env);
this.copyFromDmToSVN(file2,env);
return true;
@ -109,7 +109,7 @@ public class CheckMethod ***REMOVED***
***REMOVED***
public boolean doesExist(String path) throws Exception ***REMOVED***
public boolean doesExist(String path, String env) throws Exception ***REMOVED***
JSch jsch = new JSch();
Session session = null;
Channel channel = null;
@ -124,7 +124,7 @@ public class CheckMethod ***REMOVED***
jsch.addIdentity(privateKey);
System.out.println("Private Key Added.");
session = jsch.getSession("root", p.getStagingHost());
session = jsch.getSession("root", p.getHost(env));
System.out.println("session created.");
java.util.Properties config = new java.util.Properties();
@ -163,7 +163,7 @@ public class CheckMethod ***REMOVED***
public void copyFromDmToSVN(File a) throws Exception ***REMOVED***
public void copyFromDmToSVN(File a,String env) throws Exception ***REMOVED***
JSch jsch = new JSch();
Session session = null;
ServiceConfiguration sc = new ServiceConfiguration();
@ -177,7 +177,7 @@ public class CheckMethod ***REMOVED***
jsch.addIdentity(privateKey);
System.out.println("Private Key Added.");
session = jsch.getSession("root", p.getStagingHost());
session = jsch.getSession("root", p.getHost(env));
System.out.println("session created.");
java.util.Properties config = new java.util.Properties();
@ -223,21 +223,22 @@ public class CheckMethod ***REMOVED***
***REMOVED*** System.out.println(a.getStagingHost());
CheckMethod a = new CheckMethod();
File aa = new File("OCTAVEBLACKBOX.jar");
System.out.println(aa.getName());
System.out.println(aa.getPath());
***REMOVED*** File aa = new File("OCTAVEBLACKBOX.jar");
***REMOVED*** System.out.println(aa.getName());
***REMOVED*** System.out.println(aa.getPath());
a.copyFromDmToSVN(aa);
***REMOVED*** if (a.checkMethod("dataminer1-devnext.d4science.org", "***REMOVED***"))***REMOVED***
***REMOVED*** System.out.println("ciao");***REMOVED***
***REMOVED***a.copyFromDmToSVN(aa);
if (a.checkMethod("dataminer1-devnext.d4science.org", "***REMOVED***"))***REMOVED***
System.out.println("ciaocia");***REMOVED***
***REMOVED******REMOVED***
***REMOVED*** if (a.doesExist("/home/gcube/wps_algorithms/algorithms/XMEANS_interface.jar"))***REMOVED***
***REMOVED*** System.out.println("ciao");
if (a.doesExist("/home/gcube/wps_algorithms/algorithms/RBLACKBOX.jar","Dev"))***REMOVED***
System.out.println("ciao");
***REMOVED******REMOVED***
***REMOVED***
***REMOVED***
***REMOVED******REMOVED***
***REMOVED***
***REMOVED******REMOVED***
***REMOVED***

View File

@ -13,13 +13,21 @@ public class ClusterBuilder ***REMOVED***
***REMOVED***1. to complete
public static Cluster getStagingDataminerCluster() throws FileNotFoundException***REMOVED***
public static Cluster getStagingDataminerCluster(String env) throws FileNotFoundException***REMOVED***
Cluster cluster = new Cluster();
ServiceConfiguration p = new ServiceConfiguration();
Host h = new Host(p.getStagingHost());
***REMOVED***TODO: read this from configuration or IS?
h.setName(p.getStagingHost());
cluster.addHost(h);
Host h = new Host();
if (env.equals("Dev"))***REMOVED***
h.setName(p.getDevStagingHost());
cluster.addHost(h);
***REMOVED***
if ((env.equals("Prod")||(env.equals("Proto"))))***REMOVED***
h.setName(p.getProtoProdStagingHost());
cluster.addHost(h);
***REMOVED***
return cluster;
***REMOVED***

View File

@ -44,6 +44,27 @@ public class SVNUpdater ***REMOVED***
***REMOVED*** this.updateSVN(this.configuration.getSVNRProtoGitHubDepsList(), algorithm.getGitHubDependencies());
***REMOVED******REMOVED***
public String getDependencyFile(String language, String env)***REMOVED***
String a = "";
if (env.equals("Dev"))***REMOVED***
a= this.getDevDependencyFile(language);
***REMOVED***
if (env.equals("Prod"))***REMOVED***
a= this.getProdDependencyFile(language);
***REMOVED***
if (env.equals("Proto"))***REMOVED***
a= this.getRProtoDependencyFile(language);
***REMOVED***
return a;
***REMOVED***
public String getRProtoDependencyFile(String language) ***REMOVED***
switch (language) ***REMOVED***
case "R":
@ -97,6 +118,35 @@ public class SVNUpdater ***REMOVED***
***REMOVED***
public String getDevDependencyFile(String language) ***REMOVED***
switch (language) ***REMOVED***
case "R":
return this.configuration.getSVNRDevCRANDepsList();
case "R-blackbox":
return this.configuration.getSVNRDevRBDepsList();
case "Java":
return this.configuration.getSVNRDevJavaDepsList();
case "Knime-Workflow":
return this.configuration.getSVNRDevKWDepsList();
case "Linux-compiled":
return this.configuration.getSVNRDevLinuxCompiledDepsList();
case "Octave":
return this.configuration.getSVNRDevOctaveDepsList();
case "Python":
return this.configuration.getSVNRDevPythonDepsList();
case "Pre-Installed":
return this.configuration.getSVNRDevPreInstalledDepsList();
case "Windows-compiled":
return this.configuration.getSVNRDevWCDepsList();
default:
***REMOVED***
***REMOVED***
***REMOVED***
public void readRPRotoDeps(Algorithm algorithm) throws SVNException ***REMOVED***
if (algorithm.getLanguage().equals("R")) ***REMOVED***
@ -157,6 +207,43 @@ public class SVNUpdater ***REMOVED***
this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED***
***REMOVED***
public void readRDevDeps(Algorithm algorithm) throws SVNException ***REMOVED***
if (algorithm.getLanguage().equals("R")) ***REMOVED***
this.checkIfAvaialable(this.configuration.getSVNRProtoCRANDepsList(), algorithm.getDependencies());
***REMOVED***
if (algorithm.getLanguage().equals("R-blackbox")) ***REMOVED***
this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED***
if (algorithm.getLanguage().equals("Java")) ***REMOVED***
this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED***
if (algorithm.getLanguage().equals("Knime-Workflow")) ***REMOVED***
this.checkIfAvaialable(this.configuration.getSVNRProtoCRANDepsList(), algorithm.getDependencies());
***REMOVED***
if (algorithm.getLanguage().equals("Linux-compiled")) ***REMOVED***
this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED***
if (algorithm.getLanguage().equals("Octave")) ***REMOVED***
this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED***
if (algorithm.getLanguage().equals("Python")) ***REMOVED***
this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED***
if (algorithm.getLanguage().equals("Windows-compiled")) ***REMOVED***
this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED***
if (algorithm.getLanguage().equals("Pre-Installed")) ***REMOVED***
this.checkIfAvaialable("", algorithm.getDependencies());
***REMOVED***
***REMOVED***
***REMOVED*** public void updateProdDeps(Algorithm algorithm) ***REMOVED***
***REMOVED*** this.updateSVN(this.configuration.getSVNProdOSDepsList(), algorithm.getOSDependencies());
@ -164,8 +251,19 @@ public class SVNUpdater ***REMOVED***
***REMOVED*** this.updateSVN(this.configuration.getSVNRProdGitHubDepsList(), algorithm.getGitHubDependencies());
***REMOVED******REMOVED***
public void updateSVNRProtoAlgorithmList(Algorithm algorithm, String targetVRE, String user, String env) ***REMOVED***
public void updateSVNAlgorithmList(Algorithm algorithm, String targetVRE, String user, String env) ***REMOVED***
if (env.equals("Dev"))***REMOVED***
this.updateSVNAlgorithmList(this.configuration.getSVNDevAlgorithmsList(), algorithm, targetVRE, user, env);
***REMOVED***
if (env.equals("Prod"))***REMOVED***
this.updateSVNAlgorithmList(this.configuration.getSVNProdAlgorithmsList(), algorithm, targetVRE, user, env);
***REMOVED***
if (env.equals("Proto"))***REMOVED***
this.updateSVNAlgorithmList(this.configuration.getSVNRProtoAlgorithmsList(), algorithm, targetVRE, user, env);
***REMOVED***
***REMOVED***
public void updateSVNProdAlgorithmList(Algorithm algorithm, String targetVRE, String user, String env) ***REMOVED***
@ -350,11 +448,12 @@ public class SVNUpdater ***REMOVED***
System.out.println("Checking dependencies list: " + file);
final ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
svnRepository.getFile(file, SVNRepository.INVALID_REVISION, null, byteArrayOutputStream);
String lines[] = byteArrayOutputStream.toString().split("\\r?\\n");
List<String> validDependencies = Arrays.asList(lines);
List<String> validDependencies = new LinkedList<String>();
for(String l: byteArrayOutputStream.toString().split("\\r?\\n"))***REMOVED***
validDependencies.add(l.trim());
***REMOVED***
List<String> undefined = new LinkedList<String>();

View File

@ -133,6 +133,49 @@ public class ServiceConfiguration ***REMOVED***
***REMOVED***dev
public String getSVNDevAlgorithmsList()***REMOVED***
return props.getProperty("svn.dev.algorithms-list");
***REMOVED***
public String getSVNRDevLinuxCompiledDepsList()***REMOVED***
return props.getProperty("svn.dev.deps-linux-compiled");
***REMOVED***
public String getSVNRDevCRANDepsList()***REMOVED***
return props.getProperty("svn.dev.deps-r");
***REMOVED***
public String getSVNRDevPreInstalledDepsList()***REMOVED***
return props.getProperty("svn.dev.deps-pre-installed");
***REMOVED***
public String getSVNRDevRBDepsList()***REMOVED***
return props.getProperty("svn.dev.deps-r-blackbox");
***REMOVED***
public String getSVNRDevJavaDepsList()***REMOVED***
return props.getProperty("svn.dev.deps-java");
***REMOVED***
public String getSVNRDevKWDepsList()***REMOVED***
return props.getProperty("svn.dev.deps-knime-workflow");
***REMOVED***
public String getSVNRDevOctaveDepsList()***REMOVED***
return props.getProperty("svn.dev.deps-octave");
***REMOVED***
public String getSVNRDevPythonDepsList()***REMOVED***
return props.getProperty("svn.dev.deps-python");
***REMOVED***
public String getSVNRDevWCDepsList()***REMOVED***
return props.getProperty("svn.dev.deps-windows-compiled");
***REMOVED***
public String getCSVUrl() ***REMOVED***
@ -140,15 +183,42 @@ public class ServiceConfiguration ***REMOVED***
***REMOVED***
public String getStagingHost() ***REMOVED***
return props.getProperty("STAGING_HOST");
public String getHost(String env)***REMOVED***
String a = "";
if (env.equals("Dev"))***REMOVED***
a = this.getDevStagingHost();
***REMOVED***
if (env.equals("Prod")||(env.equals("Prod")))***REMOVED***
a = this.getProtoProdStagingHost();
***REMOVED***
return a;
***REMOVED***
public String getDevStagingHost() ***REMOVED***
return props.getProperty("DEV_STAGING_HOST");
***REMOVED***
public String getProtoProdStagingHost() ***REMOVED***
return props.getProperty("PROTO_PROD_STAGING_HOST");
***REMOVED***
public static void main(String[] args) throws FileNotFoundException ***REMOVED***
ServiceConfiguration a = new ServiceConfiguration();
System.out.println(a.getStagingHost());
***REMOVED***System.out.println(a.getStagingHost());
System.out.println(a.getDevStagingHost());
System.out.println(a.getProtoProdStagingHost());
System.out.println(a.getCSVUrl());
System.out.println(a.getSVNMainAlgoRepo());
System.out.println(a.getSVNRProtoCRANDepsList());
***REMOVED***

View File

@ -1,6 +1,6 @@
#YML node file
#STAGING_HOST: dataminer-proto-ghost.d4science.org
STAGING_HOST: dataminer1-devnext.d4science.org
DEV_STAGING_HOST: dataminer1-devnext.d4science.org
PROTO_PROD_STAGING_HOST: dataminer-proto-ghost.d4science.org
SVN_REPO: https:***REMOVED***svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/RConfiguration/RPackagesManagement/
#HAPROXY_CSV: http:***REMOVED***data.d4science.org/Yk4zSFF6V3JOSytNd3JkRDlnRFpDUUR5TnRJZEw2QjRHbWJQNStIS0N6Yz0
@ -34,3 +34,17 @@ svn.prod.deps-octave =
svn.prod.deps-python =
svn.prod.deps-windows-compiled =
svn.dev.algorithms-list = /trunk/data-analysis/DataMinerConfiguration/algorithms/dev/algorithms
svn.dev.deps-linux-compiled =
svn.dev.deps-pre-installed =
svn.dev.deps-r-blackbox =
svn.dev.deps-r = /trunk/data-analysis/RConfiguration/RPackagesManagement/r_cran_pkgs.txt
svn.dev.deps-java =
svn.dev.deps-knime-workflow =
svn.dev.deps-octave =
svn.dev.deps-python =
svn.dev.deps-windows-compiled =

View File

@ -1,7 +1,7 @@
<application mode="online">
<name>dataminer-pool-manager</name>
<group>dataanalysis</group>
<group>DataAnalysis</group>
<version>0.0.1</version>
<!--<description>Lorem ipsum dolor sit amet...</description>-->

View File

@ -3,40 +3,56 @@
"http:***REMOVED***java.sun.com/dtd/web-app_2_3.dtd" >
<web-app>
<display-name>Archetype Created Web Application</display-name>
<display-name>Archetype Created Web Application</display-name>
<context-param>
<param-name>Environment</param-name>
<param-value>Dev</param-value>
<!-- Possible Values: Dev, Proto, Prod -->
<description>This is a context parameter example</description>
</context-param>
<servlet>
<servlet-name>REST-API</servlet-name>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>jersey.config.server.provider.packages</param-name>
<param-value>
io.swagger.jaxrs.listing,
org.gcube.dataanalysis.dataminer.poolmanager.rest</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>REST-API</servlet-name>
<url-pattern>/api/*</url-pattern>
</servlet-mapping>
<!-- <servlet> <servlet-name>Jersey2Config</servlet-name> <servlet-class>io.swagger.jersey.config.JerseyJaxrsConfig</servlet-class>
<init-param> <param-name>api.version</param-name> <param-value>1.0.0</param-value>
</init-param> <init-param> <param-name>swagger.api.basepath</param-name>
<param-value>http:***REMOVED***localhost:8080/api</param-value> </init-param> <load-on-startup>2</load-on-startup>
</servlet> -->
<!-- <security-constraint> <web-resource-collection> <web-resource-name>Viewpoint
Secure URLs</web-resource-name> <url-pattern>/api/*</url-pattern> </web-resource-collection>
<user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint> </security-constraint> -->
<servlet>
<servlet-name>REST-API</servlet-name>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>jersey.config.server.provider.packages</param-name>
<param-value>
io.swagger.jaxrs.listing,
org.gcube.dataanalysis.dataminer.poolmanager.rest</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>REST-API</servlet-name>
<url-pattern>/api/*</url-pattern>
</servlet-mapping>
<!--
<servlet>
<servlet-name>Jersey2Config</servlet-name>
<servlet-class>io.swagger.jersey.config.JerseyJaxrsConfig</servlet-class>
<init-param>
<param-name>api.version</param-name>
<param-value>1.0.0</param-value>
</init-param>
<init-param>
<param-name>swagger.api.basepath</param-name>
<param-value>http:***REMOVED***localhost:8080/api</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
-->
</web-app>

View File

@ -24,10 +24,10 @@ public class JobTest ***REMOVED***
Algorithm algo = AlgorithmBuilder.create("http:***REMOVED***data.d4science.org/dENQTTMxdjNZcGRpK0NHd2pvU0owMFFzN0VWemw3Zy9HbWJQNStIS0N6Yz0");
***REMOVED***test phase
Cluster stagingCluster = ClusterBuilder.getStagingDataminerCluster();
***REMOVED***Cluster stagingCluster = ClusterBuilder.getStagingDataminerCluster();
***REMOVED***Cluster rProtoCluster = ClusterBuilder.getRProtoCluster();
DMPMJob job = new StagingJob(svnUpdater, algo, stagingCluster, /*rProtoCluster,*/ ScopeProvider.instance.get());
job.start();
***REMOVED***DMPMJob job = new StagingJob(svnUpdater, algo, stagingCluster, /*rProtoCluster,*/ ScopeProvider.instance.get());
***REMOVED***job.start();
***REMOVED***release phase
***REMOVED***Cluster prodCluster = ClusterBuilder.getVRECluster(targetVREToken, targetVRE);