git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/dataminer-pool-manager@148491 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
c919d6b0d0
commit
49e78c3d51
|
@ -73,10 +73,9 @@ public class RestPoolManager implements PoolManager {
|
|||
***REMOVED***SecurityTokenProvider.instance.set("3a23bfa4-4dfe-44fc-988f-194b91071dd2-843339462");
|
||||
RestPoolManager a = new RestPoolManager();
|
||||
***REMOVED***a.stageAlgorithm("http:***REMOVED***data.d4science.org/MnovRjZIdGV5WlB0WXE5NVNaZnRoRVg0SU8xZWpWQlFHbWJQNStIS0N6Yz0");
|
||||
a.publishAlgorithm("http:***REMOVED***data.d4science.org/MnovRjZIdGV5WlB0WXE5NVNaZnRoRVg0SU8xZWpWQlFHbWJQNStIS0N6Yz0", "3a23bfa4-4dfe-44fc-988f-194b91071dd2-843339462");
|
||||
a.publishAlgorithm("http:***REMOVED***data.d4science.org/MnovRjZIdGV5WlB0WXE5NVNaZnRoRVg0SU8xZWpWQlFHbWJQNStIS0N6Yz0", "708e7eb8-11a7-4e9a-816b-c9ed7e7e99fe-98187548");
|
||||
***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.getAlgoFromIs());
|
||||
|
||||
|
||||
***REMOVED***
|
||||
|
||||
|
|
|
@ -39,9 +39,8 @@ public class DataminerPoolManager {
|
|||
|
||||
public DataminerPoolManager(){
|
||||
try {
|
||||
***REMOVED***TODO: read this from configuration
|
||||
this.svnUpdater = new SVNUpdater(
|
||||
"https:***REMOVED***svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/RConfiguration/RPackagesManagement/");
|
||||
***REMOVED***TODO: read this from configuration - fatto
|
||||
this.svnUpdater = new SVNUpdater(new Props().getSVNrepo());
|
||||
***REMOVED*** catch (SVNException e) {
|
||||
e.printStackTrace();
|
||||
***REMOVED***
|
||||
|
@ -62,6 +61,7 @@ public class DataminerPoolManager {
|
|||
|
||||
public String publishAlgorithm(Algorithm algo, String targetVREToken) throws IOException, InterruptedException {
|
||||
Cluster cluster = new Cluster();
|
||||
***REMOVED***
|
||||
for (Host h : new HAProxy().listDataMinersByCluster()) {
|
||||
cluster.addHost(h);
|
||||
***REMOVED***
|
||||
|
|
|
@ -27,6 +27,28 @@ public class Props {
|
|||
|
||||
***REMOVED***
|
||||
|
||||
|
||||
public String getSVNrepo() {
|
||||
Properties props = new Properties();
|
||||
java.io.InputStream input = Props.class.getClassLoader().getResourceAsStream("service.properties");
|
||||
|
||||
***REMOVED*** loading properites from properties file
|
||||
try {
|
||||
props.load(input);
|
||||
***REMOVED*** catch (IOException e) {
|
||||
***REMOVED*** TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
***REMOVED***
|
||||
|
||||
***REMOVED*** reading proeprty
|
||||
String path = props.getProperty("SVN_REPO");
|
||||
return path;
|
||||
|
||||
***REMOVED***
|
||||
|
||||
|
||||
|
||||
|
||||
public String getStagingHost() {
|
||||
Properties props = new Properties();
|
||||
java.io.InputStream input = Props.class.getClassLoader().getResourceAsStream("service.properties");
|
||||
|
@ -46,7 +68,8 @@ public class Props {
|
|||
***REMOVED***
|
||||
|
||||
public static void main(String[] args) {
|
||||
Props a = new Props();
|
||||
System.out.println(a.getStagingHost());
|
||||
***REMOVED***Props a = new Props();
|
||||
System.out.println(new Props().getSVNrepo());
|
||||
***REMOVED***System.out.println(a.getStagingHost());
|
||||
***REMOVED***
|
||||
***REMOVED***
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
#YML node file
|
||||
STAGING_HOST: dataminer1-devnext.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
|
||||
|
|
Loading…
Reference in New Issue