This commit is contained in:
Paolo Fabriani 2016-11-17 16:16:35 +00:00
parent caec5bdf5d
commit 9ccb883cb6
4 changed files with 6 additions and 6 deletions

View File

@ -36,6 +36,8 @@ public class AnsibleSerializeHelper {
for(String r:playbook.getRoles()) { for(String r:playbook.getRoles()) {
out+=" - " + r+"\n"; out+=" - " + r+"\n";
} }
out+=" vars:\n";
out+=" os_package_state: present\n";
out = out.trim(); out = out.trim();
serialize(out, playbookFile); serialize(out, playbookFile);
} }

View File

@ -38,10 +38,10 @@ public class AlgorithmPackage {
public Collection<Role> getRoles(TemplateManager tm) { public Collection<Role> getRoles(TemplateManager tm) {
Collection<Role> out = new Vector<>(); Collection<Role> out = new Vector<>();
for(String mode:new String[]{"add", "remove", "update"}) { for(String mode:new String[]{"add", "remove", "update"}) {
String roleName = "algorithm-"+this.getAlgorithm().getName()+("add".equals(mode) ? "" : "-"+mode); String roleName = "gcube-algorithm-"+this.getAlgorithm().getName()+("add".equals(mode) ? "" : "-"+mode);
try { try {
// find template // find template
Role template = tm.getRoleTemplate("algorithm-" + mode); Role template = tm.getRoleTemplate("gcube-algorithm-" + mode);
// //
if(template!=null) { if(template!=null) {
Map<String, String> dictionary = this.getDictionary(this.getAlgorithm()); Map<String, String> dictionary = this.getDictionary(this.getAlgorithm());

View File

@ -22,7 +22,7 @@ public class ISClient {
* @param vreName * @param vreName
* @return * @return
*/ */
public Collection<Host> listDataminersInVRE(String scope) { public Collection<Host> listDataminersInVRE() {
boolean remote = false; boolean remote = false;
@ -34,8 +34,6 @@ public class ISClient {
return out; return out;
} else { } else {
ScopeProvider.instance.set(scope);
SimpleQuery query = queryFor(ServiceEndpoint.class); SimpleQuery query = queryFor(ServiceEndpoint.class);
query.addCondition("$resource/Profile/Category/text() eq 'DataAnalysis'") query.addCondition("$resource/Profile/Category/text() eq 'DataAnalysis'")

View File

@ -110,7 +110,7 @@ public class DataminerPoolManager {
// create the cluster (dataminers in the vre) // create the cluster (dataminers in the vre)
Cluster cluster = new Cluster(); Cluster cluster = new Cluster();
for(Host h:new ISClient().listDataminersInVRE(vre)) { for(Host h:new ISClient().listDataminersInVRE()) {
cluster.addHost(h); cluster.addHost(h);
} }