git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/dataminer-pool-manager@147247 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
34b1d254a4
commit
c8e9329164
|
@ -197,33 +197,10 @@ public class RestPoolManager implements PoolManager {
|
||||||
@DefaultValue("false") @QueryParam("updateSVN") boolean updateSVN)
|
@DefaultValue("false") @QueryParam("updateSVN") boolean updateSVN)
|
||||||
throws IOException, InterruptedException, SVNException {
|
throws IOException, InterruptedException, SVNException {
|
||||||
Algorithm algo = this.getAlgorithm(algorithm, /*vre*/null, null, name, description, category, algorithmType, skipJava);
|
Algorithm algo = this.getAlgorithm(algorithm, /*vre*/null, null, name, description, category, algorithmType, skipJava);
|
||||||
|
|
||||||
***REMOVED*** publish algo
|
***REMOVED*** publish algo
|
||||||
if (publish) {
|
if (publish) {
|
||||||
service.addAlgToIs(algo);
|
service.addAlgToIs(algo);
|
||||||
***REMOVED***
|
***REMOVED***
|
||||||
***REMOVED*** update svn
|
|
||||||
***REMOVED*** if (updateSVN){
|
|
||||||
***REMOVED*** for (Dependency d : algo.getDependencies()) {
|
|
||||||
***REMOVED***
|
|
||||||
***REMOVED*** if (d.getType().equals("os")) {
|
|
||||||
***REMOVED*** List<String> ls = new LinkedList<String>();
|
|
||||||
***REMOVED*** ls.add(d.getName());
|
|
||||||
***REMOVED*** service.updateSVN("r_deb_pkgs.txt", ls);
|
|
||||||
***REMOVED*** ***REMOVED***
|
|
||||||
***REMOVED*** if (d.getType().equals("cran")) {
|
|
||||||
***REMOVED*** List<String> ls = new LinkedList<String>();
|
|
||||||
***REMOVED*** ls.add(d.getName());
|
|
||||||
***REMOVED*** service.updateSVN("r_cran_pkgs.txt", ls);
|
|
||||||
***REMOVED*** ***REMOVED***
|
|
||||||
***REMOVED*** if (d.getType().equals("github")) {
|
|
||||||
***REMOVED*** List<String> ls = new LinkedList<String>();
|
|
||||||
***REMOVED*** ls.add(d.getName());
|
|
||||||
***REMOVED*** service.updateSVN("r_github_pkgs.txt", ls);
|
|
||||||
***REMOVED*** ***REMOVED***
|
|
||||||
***REMOVED*** ***REMOVED***
|
|
||||||
***REMOVED******REMOVED***
|
|
||||||
|
|
||||||
return service.addAlgorithmToVRE(algo, ScopeProvider.instance.get(),updateSVN);
|
return service.addAlgorithmToVRE(algo, ScopeProvider.instance.get(),updateSVN);
|
||||||
***REMOVED***
|
***REMOVED***
|
||||||
|
|
||||||
|
@ -246,32 +223,9 @@ public class RestPoolManager implements PoolManager {
|
||||||
Algorithm algo = this.getAlgorithm(algorithm, null, hostname, name, description, category, algorithmType,
|
Algorithm algo = this.getAlgorithm(algorithm, null, hostname, name, description, category, algorithmType,
|
||||||
skipJava);
|
skipJava);
|
||||||
***REMOVED*** publish algo
|
***REMOVED*** publish algo
|
||||||
|
|
||||||
if (publish) {
|
if (publish) {
|
||||||
service.addAlgToIs(algo);
|
service.addAlgToIs(algo);
|
||||||
***REMOVED***
|
***REMOVED***
|
||||||
|
|
||||||
***REMOVED*** update svn
|
|
||||||
***REMOVED*** if (updateSVN){
|
|
||||||
***REMOVED*** for (Dependency d : algo.getDependencies()) {
|
|
||||||
***REMOVED***
|
|
||||||
***REMOVED*** if (d.getType().equals("os")) {
|
|
||||||
***REMOVED*** List<String> ls = new LinkedList<String>();
|
|
||||||
***REMOVED*** ls.add(d.getName());
|
|
||||||
***REMOVED*** service.updateSVN("r_deb_pkgs.txt", ls);
|
|
||||||
***REMOVED*** ***REMOVED***
|
|
||||||
***REMOVED*** if (d.getType().equals("cran")) {
|
|
||||||
***REMOVED*** List<String> ls = new LinkedList<String>();
|
|
||||||
***REMOVED*** ls.add(d.getName());
|
|
||||||
***REMOVED*** service.updateSVN("r_cran_pkgs.txt", ls);
|
|
||||||
***REMOVED*** ***REMOVED***
|
|
||||||
***REMOVED*** if (d.getType().equals("github")) {
|
|
||||||
***REMOVED*** List<String> ls = new LinkedList<String>();
|
|
||||||
***REMOVED*** ls.add(d.getName());
|
|
||||||
***REMOVED*** service.updateSVN("r_github_pkgs.txt", ls);
|
|
||||||
***REMOVED*** ***REMOVED***
|
|
||||||
***REMOVED*** ***REMOVED***
|
|
||||||
***REMOVED******REMOVED***
|
|
||||||
return service.addAlgorithmToHost(algo, hostname,updateSVN);
|
return service.addAlgorithmToHost(algo, hostname,updateSVN);
|
||||||
***REMOVED***
|
***REMOVED***
|
||||||
|
|
||||||
|
@ -329,7 +283,7 @@ public class RestPoolManager implements PoolManager {
|
||||||
***REMOVED*** ProxySelector.setDefault(new
|
***REMOVED*** ProxySelector.setDefault(new
|
||||||
***REMOVED*** PropertiesBasedProxySelector("/home/ngalante/.proxy-settings"));
|
***REMOVED*** PropertiesBasedProxySelector("/home/ngalante/.proxy-settings"));
|
||||||
|
|
||||||
ScopeProvider.instance.set("/gcube/devNext/NextNext");
|
ScopeProvider.instance.set("/gcube/preprod/preVRE");
|
||||||
|
|
||||||
***REMOVED*** PoolManager aa = new DataminerPoolManager();
|
***REMOVED*** PoolManager aa = new DataminerPoolManager();
|
||||||
***REMOVED*** System.out.println(aa.getAlgoById("ICHTHYOP_MODEL_ONE_BY_ONE@3141d3aa-5f93-409f-b6f8-9fae0a6c0ee3"));
|
***REMOVED*** System.out.println(aa.getAlgoById("ICHTHYOP_MODEL_ONE_BY_ONE@3141d3aa-5f93-409f-b6f8-9fae0a6c0ee3"));
|
||||||
|
@ -349,9 +303,9 @@ public class RestPoolManager implements PoolManager {
|
||||||
|
|
||||||
a.addAlgorithmToHost(
|
a.addAlgorithmToHost(
|
||||||
"http:***REMOVED***data.d4science.org/MnovRjZIdGV5WlB0WXE5NVNaZnRoRVg0SU8xZWpWQlFHbWJQNStIS0N6Yz0",
|
"http:***REMOVED***data.d4science.org/MnovRjZIdGV5WlB0WXE5NVNaZnRoRVg0SU8xZWpWQlFHbWJQNStIS0N6Yz0",
|
||||||
"dataminer1-devnext.d4science.org",
|
"dataminer1-pre.d4science.org",
|
||||||
"ICHTHYOP_MODEL_ONE_BY_ONE", null, "ICHTHYOP_MODEL", "transducerers",
|
"ICHTHYOP_MODEL_ONE_BY_ONE", null, "ICHTHYOP_MODEL", "transducerers",
|
||||||
"N",false, true);
|
"N",false, false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -566,15 +566,19 @@ public class DataminerPoolManager implements PoolManager {
|
||||||
|
|
||||||
***REMOVED***
|
***REMOVED***
|
||||||
|
|
||||||
public String addAlgorithmsToHost(AlgorithmSet algorithms, String hostname, String uuid, boolean updateSVN) throws IOException, InterruptedException, SVNException {
|
public String addAlgorithmsToHost(AlgorithmSet algorithms, String hostname, String uuid, boolean updateSVN)
|
||||||
|
throws IOException, InterruptedException, SVNException {
|
||||||
|
|
||||||
***REMOVED*** create the cluster (dataminers in the vre)
|
***REMOVED*** create the cluster (dataminers in the vre)
|
||||||
Cluster cluster = new Cluster();
|
Cluster cluster = new Cluster();
|
||||||
cluster.addHost(new ISClient().getDataminer(hostname));
|
for (Host h : new HAProxy().listDataMinersByCluster()) {
|
||||||
***REMOVED*** for(Host h:new ISClient().listDataminersInVRE()) {
|
if (h.getName().equals(hostname)) {
|
||||||
***REMOVED*** cluster.addHost(h);
|
cluster.addHost(h);
|
||||||
|
***REMOVED***
|
||||||
|
***REMOVED***
|
||||||
|
***REMOVED*** if(ISClient.getHProxy().equals(hostname)){
|
||||||
|
***REMOVED*** cluster.addHost(new ISClient().getDataminer(hostname));
|
||||||
***REMOVED*** ***REMOVED***
|
***REMOVED*** ***REMOVED***
|
||||||
|
|
||||||
***REMOVED*** apply the changes
|
***REMOVED*** apply the changes
|
||||||
AnsibleBridge a = new AnsibleBridge();
|
AnsibleBridge a = new AnsibleBridge();
|
||||||
return a.applyAlgorithmSetToCluster(algorithms, cluster, uuid, updateSVN).getWorkerId();
|
return a.applyAlgorithmSetToCluster(algorithms, cluster, uuid, updateSVN).getWorkerId();
|
||||||
|
@ -583,13 +587,6 @@ public class DataminerPoolManager implements PoolManager {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public Algorithm extractAlgorithm(String url) throws IOException {
|
public Algorithm extractAlgorithm(String url) throws IOException {
|
||||||
return new AlgorithmPackageParser().parsePackage(url);
|
return new AlgorithmPackageParser().parsePackage(url);
|
||||||
***REMOVED***
|
***REMOVED***
|
||||||
|
|
Loading…
Reference in New Issue