git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/dataminer-pool-manager@147248 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
c8e9329164
commit
7d286d5326
|
@ -118,20 +118,22 @@ public class AnsibleWorker {
|
|||
|
||||
|
||||
|
||||
public void apply(AlgorithmSet as, PrintStream ps, boolean updateSVN) throws IOException, InterruptedException, SVNException {
|
||||
public void apply(AlgorithmSet as, PrintStream ps, boolean updateSVN)
|
||||
throws IOException, InterruptedException, SVNException {
|
||||
***REMOVED*** TODO execute the playbook and return output
|
||||
System.out.println(this.getWorkdir());
|
||||
try {
|
||||
Process p = Runtime.getRuntime().exec("ansible-playbook -v -i " + this.getInventoryFile().getAbsolutePath() + " " + this.getPlaybookFile().getAbsolutePath());
|
||||
Process p = Runtime.getRuntime().exec("ansible-playbook -v -i " + this.getInventoryFile().getAbsolutePath()
|
||||
+ " " + this.getPlaybookFile().getAbsolutePath());
|
||||
|
||||
inheritIO(p.getInputStream(), ps);
|
||||
inheritIO(p.getErrorStream(), ps);
|
||||
|
||||
if (updateSVN){
|
||||
if (updateSVN) {
|
||||
int exitValue = p.waitFor();
|
||||
if (exitValue == 0){
|
||||
if (exitValue == 0) {
|
||||
|
||||
for (Algorithm algo : as.getAlgorithms()){
|
||||
for (Algorithm algo : as.getAlgorithms()) {
|
||||
|
||||
for (Dependency d : algo.getDependencies()) {
|
||||
|
||||
|
@ -153,20 +155,17 @@ public class AnsibleWorker {
|
|||
***REMOVED***
|
||||
***REMOVED***
|
||||
|
||||
|
||||
***REMOVED***
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
***REMOVED***
|
||||
|
||||
***REMOVED*** catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
***REMOVED***
|
||||
***REMOVED***System.out.println("TODO: execute: ansible-playbook -v -i " + this.getInventoryFile().getName() + " " + this.getPlaybookFile().getName());
|
||||
***REMOVED***
|
||||
***REMOVED*** System.out.println("TODO: execute: ansible-playbook -v -i " +
|
||||
***REMOVED*** this.getInventoryFile().getName() + " " +
|
||||
***REMOVED*** this.getPlaybookFile().getName());
|
||||
***REMOVED***
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -283,7 +283,7 @@ public class RestPoolManager implements PoolManager {
|
|||
***REMOVED*** ProxySelector.setDefault(new
|
||||
***REMOVED*** PropertiesBasedProxySelector("/home/ngalante/.proxy-settings"));
|
||||
|
||||
ScopeProvider.instance.set("/gcube/preprod/preVRE");
|
||||
ScopeProvider.instance.set("/gcube/devNext/NextNext");
|
||||
|
||||
***REMOVED*** PoolManager aa = new DataminerPoolManager();
|
||||
***REMOVED*** System.out.println(aa.getAlgoById("ICHTHYOP_MODEL_ONE_BY_ONE@3141d3aa-5f93-409f-b6f8-9fae0a6c0ee3"));
|
||||
|
@ -291,21 +291,21 @@ public class RestPoolManager implements PoolManager {
|
|||
|
||||
|
||||
RestPoolManager a = new RestPoolManager();
|
||||
***REMOVED*** a.addAlgorithmToVRE(
|
||||
***REMOVED*** "http:***REMOVED***data.d4science.org/TVc0TW9Ud1FjYlppK0NHd2pvU0owNmRFWHE4OW4xSGNHbWJQNStIS0N6Yz0",
|
||||
***REMOVED*** "test",
|
||||
***REMOVED*** null,
|
||||
***REMOVED*** null,
|
||||
***REMOVED*** "N",
|
||||
***REMOVED*** "transducerers",
|
||||
***REMOVED*** true,
|
||||
***REMOVED*** false);
|
||||
a.addAlgorithmToVRE(
|
||||
"http:***REMOVED***data.d4science.org/TVc0TW9Ud1FjYlppK0NHd2pvU0owNmRFWHE4OW4xSGNHbWJQNStIS0N6Yz0",
|
||||
"test",
|
||||
null,
|
||||
null,
|
||||
"N",
|
||||
"transducerers",
|
||||
false,
|
||||
false);
|
||||
|
||||
a.addAlgorithmToHost(
|
||||
"http:***REMOVED***data.d4science.org/MnovRjZIdGV5WlB0WXE5NVNaZnRoRVg0SU8xZWpWQlFHbWJQNStIS0N6Yz0",
|
||||
"dataminer1-pre.d4science.org",
|
||||
"ICHTHYOP_MODEL_ONE_BY_ONE", null, "ICHTHYOP_MODEL", "transducerers",
|
||||
"N",false, false);
|
||||
***REMOVED*** a.addAlgorithmToHost(
|
||||
***REMOVED*** "http:***REMOVED***data.d4science.org/MnovRjZIdGV5WlB0WXE5NVNaZnRoRVg0SU8xZWpWQlFHbWJQNStIS0N6Yz0",
|
||||
***REMOVED*** "dataminer1-pre.d4science.org",
|
||||
***REMOVED*** "ICHTHYOP_MODEL_ONE_BY_ONE", null, "ICHTHYOP_MODEL", "transducerers",
|
||||
***REMOVED*** "N",false, false);
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue