Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • lennart.thiesen/de.ugoe.cs.rwm.mocci
  • rwm/de.ugoe.cs.rwm.mocci
2 results
Show changes
Showing
with 401 additions and 32846 deletions
...@@ -10,7 +10,6 @@ import org.eclipse.emf.ecore.resource.Resource; ...@@ -10,7 +10,6 @@ import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.epsilon.emc.emf.CachedResourceSet; import org.eclipse.epsilon.emc.emf.CachedResourceSet;
import org.junit.Before; import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import de.ugoe.cs.rwm.docci.MartDeployer; import de.ugoe.cs.rwm.docci.MartDeployer;
...@@ -18,16 +17,14 @@ import de.ugoe.cs.rwm.docci.ModelUtility; ...@@ -18,16 +17,14 @@ import de.ugoe.cs.rwm.docci.ModelUtility;
import de.ugoe.cs.rwm.docci.connector.Connector; import de.ugoe.cs.rwm.docci.connector.Connector;
import de.ugoe.cs.rwm.docci.connector.LocalhostConnector; import de.ugoe.cs.rwm.docci.connector.LocalhostConnector;
public class MapeTest { public class MapeTest {
@BeforeClass @BeforeClass
public static void OCCIRegistrySetup() { public static void OCCIRegistrySetup() {
TestUtility.loggerSetup(); TestUtility.loggerSetup();
TestUtility.extensionRegistrySetup(); TestUtility.extensionRegistrySetup();
} }
@Before @Before
public void resetEverything() { public void resetEverything() {
CachedResourceSet.getCache().clear(); CachedResourceSet.getCache().clear();
...@@ -35,41 +32,41 @@ public class MapeTest { ...@@ -35,41 +32,41 @@ public class MapeTest {
Connector conn = new LocalhostConnector("localhost", 8080, "ubuntu"); Connector conn = new LocalhostConnector("localhost", 8080, "ubuntu");
MartDeployer deployer = new MartDeployer(conn); MartDeployer deployer = new MartDeployer(conn);
deployer.deploy(occiPath); deployer.deploy(occiPath);
InitialDeployment.main(new String[0]); InitialDeployment.main(new String[0]);
} }
@Test @Test
public void Monitor() { public void Monitor() {
Monitor monitor = MAPE.monitor(); Monitor monitor = MAPE.monitor();
assertTrue(monitor.getAllCPUs() == 1); assertTrue(monitor.getAllCPUs() == 1);
} }
@Test @Test
public void Analyze() { public void Analyze() {
Monitor monitor = MAPE.monitor(); Monitor monitor = MAPE.monitor();
String analysis = MAPE.analyze(monitor); String analysis = MAPE.analyze(monitor);
if(monitor.getCritCPUs() == 1) { if (monitor.getCritCPUs() == 1) {
assertTrue(analysis.equals("upScale")); assertTrue(analysis.equals("upScale"));
} }
if(monitor.getNoneCPUs() == 1) { if (monitor.getNoneCPUs() == 1) {
assertTrue(analysis.equals("downScale")); assertTrue(analysis.equals("downScale"));
} }
} }
@Test @Test
public void Plan() { public void Plan() {
Monitor monitor = MAPE.monitor(); Monitor monitor = MAPE.monitor();
String analysis = MAPE.analyze(monitor); String analysis = MAPE.analyze(monitor);
Resource res = MAPE.plan(analysis); Resource res = MAPE.plan(analysis);
if(analysis.equals("upScale")) { if (analysis.equals("upScale")) {
Configuration pre = (Configuration) MAPE.runtimeModel.getContents().get(0); Configuration pre = (Configuration) MAPE.runtimeModel.getContents().get(0);
Configuration post = (Configuration) res.getContents().get(0); Configuration post = (Configuration) res.getContents().get(0);
assertTrue(pre.getResources().size()<post.getResources().size()); assertTrue(pre.getResources().size() < post.getResources().size());
}
} }
}
@Test @Test
public void Execute() { public void Execute() {
Monitor monitor = MAPE.monitor(); Monitor monitor = MAPE.monitor();
...@@ -78,7 +75,28 @@ public class MapeTest { ...@@ -78,7 +75,28 @@ public class MapeTest {
MAPE.execute(MAPE.runtimeModel); MAPE.execute(MAPE.runtimeModel);
assertTrue(TestUtility.equalsRuntime(MAPE.runtimeModel, MAPE.conn)); assertTrue(TestUtility.equalsRuntime(MAPE.runtimeModel, MAPE.conn));
} }
}
@Test
\ No newline at end of file public void Iterations() {
int iterations = 20;
int count = 0;
int interval = 1000;
while (count < iterations) {
try {
System.out.println("\n--------------------Waiting for new MAPE-K Cycle: Sleeping " + interval
+ "--------------------");
Thread.sleep(interval);
Monitor monitor = MAPE.monitor();
String analysis = MAPE.analyze(monitor);
MAPE.runtimeModel = MAPE.plan(analysis);
MAPE.execute(MAPE.runtimeModel);
count++;
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}
...@@ -5,54 +5,34 @@ import static org.junit.Assert.assertTrue; ...@@ -5,54 +5,34 @@ import static org.junit.Assert.assertTrue;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.Paths; import java.nio.file.Paths;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.eclipse.cmf.occi.core.Configuration;
import org.eclipse.cmf.occi.core.Link; import org.eclipse.cmf.occi.core.Link;
import org.eclipse.cmf.occi.core.Mixin; import org.eclipse.cmf.occi.core.Mixin;
import org.eclipse.cmf.occi.core.OCCIPackage;
import org.eclipse.cmf.occi.core.util.OcciRegistry;
import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet; import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.epsilon.emc.emf.CachedResourceSet;
import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import org.modmacao.occi.platform.Componentlink;
import org.modmacao.occi.platform.impl.PlatformFactoryImpl;
import de.ugoe.cs.rwm.docci.MartDeployer;
import de.ugoe.cs.rwm.docci.ModelUtility;
import de.ugoe.cs.rwm.mocci.TestUtility;
import de.ugoe.cs.rwm.docci.connector.Connector;
import de.ugoe.cs.rwm.docci.connector.LocalhostConnector;
import de.ugoe.cs.rwm.tocci.Transformator;
import de.ugoe.cs.rwm.tocci.TransformatorFactory;
import de.ugoe.cs.rwm.tocci.occi2openstack.OCCI2OPENSTACKTransformator;
import monitoring.MonitoringPackage;
public class ResolveProxyTest { public class ResolveProxyTest {
@BeforeClass @BeforeClass
public static void OCCIRegistrySetup() { public static void OCCIRegistrySetup() {
TestUtility.loggerSetup(); TestUtility.loggerSetup();
TestUtility.extensionRegistrySetup(); TestUtility.extensionRegistrySetup();
} }
@Test @Test
public void resolveProxies() { public void resolveProxies() {
Path newOCCI = Paths.get(de.ugoe.cs.rwm.docci.ModelUtility.getPathToResource("occi/hadoopClusterNewExtWithMem.occic")); Path newOCCI = Paths
.get(de.ugoe.cs.rwm.docci.ModelUtility.getPathToResource("occi/hadoopClusterNewExtWithMem.occic"));
Resource ress = de.ugoe.cs.rwm.docci.ModelUtility.loadOCCIintoEMFResource(newOCCI); Resource ress = de.ugoe.cs.rwm.docci.ModelUtility.loadOCCIintoEMFResource(newOCCI);
@SuppressWarnings("unused")
ResourceSet resSet = ress.getResourceSet(); ResourceSet resSet = ress.getResourceSet();
EList<EObject> newModel = de.ugoe.cs.rwm.docci.ModelUtility.loadOCCI(newOCCI); EList<EObject> newModel = de.ugoe.cs.rwm.docci.ModelUtility.loadOCCI(newOCCI);
for (org.eclipse.cmf.occi.core.Resource res : de.ugoe.cs.rwm.docci.ModelUtility.getResources(newModel)) { for (org.eclipse.cmf.occi.core.Resource res : de.ugoe.cs.rwm.docci.ModelUtility.getResources(newModel)) {
System.out.println("Resource Title: " + res.getTitle()); System.out.println("Resource Title: " + res.getTitle());
System.out.println(" Kind: " + res.getKind()); System.out.println(" Kind: " + res.getKind());
......
package de.ugoe.cs.rwm.mocci; package de.ugoe.cs.rwm.mocci;
import java.io.File; import java.io.File;
import java.io.IOException;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.Paths; import java.nio.file.Paths;
import java.util.Map;
import org.apache.log4j.Level; import org.apache.log4j.Level;
import org.apache.log4j.Logger; import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator; import org.apache.log4j.PropertyConfigurator;
import org.eclipse.cmf.occi.core.OCCIPackage; import org.eclipse.cmf.occi.core.OCCIPackage;
import org.eclipse.cmf.occi.core.util.OcciRegistry; import org.eclipse.cmf.occi.core.util.OcciRegistry;
import org.eclipse.cmf.occi.crtp.CrtpPackage;
import org.eclipse.cmf.occi.docker.DockerPackage;
import org.eclipse.cmf.occi.infrastructure.InfrastructurePackage; import org.eclipse.cmf.occi.infrastructure.InfrastructurePackage;
import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.modmacao.ansibleconfiguration.AnsibleconfigurationPackage; import org.modmacao.ansibleconfiguration.AnsibleconfigurationPackage;
import org.modmacao.occi.platform.PlatformPackage; import org.modmacao.occi.platform.PlatformPackage;
import org.modmacao.occi.platform.impl.PlatformFactoryImpl;
import org.modmacao.placement.PlacementPackage; import org.modmacao.placement.PlacementPackage;
import de.ugoe.cs.rwm.cocci.Comparator; import de.ugoe.cs.rwm.cocci.Comparator;
import de.ugoe.cs.rwm.cocci.ComparatorFactory; import de.ugoe.cs.rwm.cocci.ComparatorFactory;
import de.ugoe.cs.rwm.docci.Deployer; import de.ugoe.cs.rwm.docci.Deployer;
import de.ugoe.cs.rwm.docci.ModelUtility; import de.ugoe.cs.rwm.docci.ModelUtility;
import de.ugoe.cs.rwm.docci.appdeployer.MartAppDeployerMaster;
import de.ugoe.cs.rwm.docci.appdeployer.MartAppDeployerSlave;
import de.ugoe.cs.rwm.docci.connector.Connector; import de.ugoe.cs.rwm.docci.connector.Connector;
import de.ugoe.cs.rwm.docci.deprovisioner.Deprovisioner;
import de.ugoe.cs.rwm.docci.executor.Executor; import de.ugoe.cs.rwm.docci.executor.Executor;
import de.ugoe.cs.rwm.docci.extractor.Extractor; import de.ugoe.cs.rwm.domain.workload.WorkloadPackage;
import de.ugoe.cs.rwm.docci.provisioner.Provisioner;
import de.ugoe.cs.rwm.tocci.Transformator;
import modmacao.ModmacaoPackage; import modmacao.ModmacaoPackage;
import monitoring.MonitoringPackage; import monitoring.MonitoringPackage;
import openstackruntime.OpenstackruntimePackage; import openstackruntime.OpenstackruntimePackage;
import ossweruntime.OssweruntimePackage; import ossweruntime.OssweruntimePackage;
import workflow.WorkflowPackage;
public class TestUtility { public class TestUtility {
public static void extensionRegistrySetup() { public static void extensionRegistrySetup() {
...@@ -44,22 +36,23 @@ public class TestUtility { ...@@ -44,22 +36,23 @@ public class TestUtility {
OCCIPackage.eINSTANCE.eClass(); OCCIPackage.eINSTANCE.eClass();
ModmacaoPackage.eINSTANCE.eClass(); ModmacaoPackage.eINSTANCE.eClass();
OpenstackruntimePackage.eINSTANCE.eClass(); OpenstackruntimePackage.eINSTANCE.eClass();
PlacementPackage.eINSTANCE.eClass(); PlacementPackage.eINSTANCE.eClass();
WorkflowPackage.eINSTANCE.eClass();
OssweruntimePackage.eINSTANCE.eClass(); OssweruntimePackage.eINSTANCE.eClass();
AnsibleconfigurationPackage.eINSTANCE.eClass(); AnsibleconfigurationPackage.eINSTANCE.eClass();
PlatformPackage.eINSTANCE.eClass();
MonitoringPackage.eINSTANCE.eClass(); MonitoringPackage.eINSTANCE.eClass();
CrtpPackage.eINSTANCE.eClass();
PlatformPackage.eINSTANCE.eClass();
WorkloadPackage.eINSTANCE.eClass();
DockerPackage.eINSTANCE.eClass();
OcciRegistry.getInstance().registerExtension("http://occiware.org/occi/docker#",
OCCIPackage.class.getClassLoader().getResource("model/docker.occie").toString());
OcciRegistry.getInstance().registerExtension("http://schemas.ugoe.cs.rwm/monitoring#", OcciRegistry.getInstance().registerExtension("http://schemas.ugoe.cs.rwm/domain/workload#",
MonitoringPackage.class.getClassLoader().getResource("model/monitoring.occie").toString()); OCCIPackage.class.getClassLoader().getResource("model/workload.occie").toString());
OcciRegistry.getInstance().registerExtension("http://schemas.modmacao.org/occi/platform#", OcciRegistry.getInstance().registerExtension("http://schemas.modmacao.org/occi/platform#",
PlatformPackage.class.getClassLoader().getResource("model/platform.occie").toString()); PlatformPackage.class.getClassLoader().getResource("model/platform.occie").toString());
OcciRegistry.getInstance().registerExtension("http://schemas.modmacao.org/modmacao#", OcciRegistry.getInstance().registerExtension("http://schemas.modmacao.org/modmacao#",
ModmacaoPackage.class.getClassLoader().getResource("model/modmacao.occie").toString()); ModmacaoPackage.class.getClassLoader().getResource("model/modmacao.occie").toString());
OcciRegistry.getInstance().registerExtension("http://schemas.modmacao.org/openstack/runtime#", OcciRegistry.getInstance().registerExtension("http://schemas.modmacao.org/openstack/runtime#",
...@@ -72,30 +65,31 @@ public class TestUtility { ...@@ -72,30 +65,31 @@ public class TestUtility {
InfrastructurePackage.class.getClassLoader().getResource("model/Infrastructure.occie").toString()); InfrastructurePackage.class.getClassLoader().getResource("model/Infrastructure.occie").toString());
OcciRegistry.getInstance().registerExtension("http://schemas.ogf.org/occi/core#", OcciRegistry.getInstance().registerExtension("http://schemas.ogf.org/occi/core#",
OCCIPackage.class.getClassLoader().getResource("model/Core.occie").toString()); OCCIPackage.class.getClassLoader().getResource("model/Core.occie").toString());
OcciRegistry.getInstance().registerExtension("http://schemas.ugoe.cs.rwm/workflow#",
OCCIPackage.class.getClassLoader().getResource("model/workflow.occie").toString());
OcciRegistry.getInstance().registerExtension("http://schemas.modmacao.org/openstack/swe#", OcciRegistry.getInstance().registerExtension("http://schemas.modmacao.org/openstack/swe#",
OCCIPackage.class.getClassLoader().getResource("model/ossweruntime.occie").toString()); OCCIPackage.class.getClassLoader().getResource("model/ossweruntime.occie").toString());
OcciRegistry.getInstance().registerExtension("http://schemas.modmacao.org/occi/ansible#", OcciRegistry.getInstance().registerExtension("http://schemas.modmacao.org/occi/ansible#",
OCCIPackage.class.getClassLoader().getResource("model/ansibleconfiguration.occie").toString()); OCCIPackage.class.getClassLoader().getResource("model/ansibleconfiguration.occie").toString());
OcciRegistry.getInstance().registerExtension("http://schemas.ugoe.cs.rwm/monitoring#",
MonitoringPackage.class.getClassLoader().getResource("model/monitoring.occie").toString());
OcciRegistry.getInstance().registerExtension("http://schemas.ogf.org/occi/infrastructure/compute/template/1.1#",
OCCIPackage.class.getClassLoader().getResource("model/crtp.occie").toString());
}
}
public static void loggerSetup() { public static void loggerSetup() {
File log4jfile = new File(ModelUtility.getPathToResource("log4j.properties")); File log4jfile = new File(ModelUtility.getPathToResource("log4j.properties"));
PropertyConfigurator.configure(log4jfile.getAbsolutePath()); PropertyConfigurator.configure(log4jfile.getAbsolutePath());
Logger.getLogger(Executor.class.getName()).setLevel(Level.DEBUG); Logger.getLogger(Executor.class.getName()).setLevel(Level.DEBUG);
//Logger.getLogger(Extractor.class.getName()).setLevel(Level.DEBUG); // Logger.getLogger(Extractor.class.getName()).setLevel(Level.DEBUG);
//Logger.getLogger(Provisioner.class.getName()).setLevel(Level.DEBUG); // Logger.getLogger(Provisioner.class.getName()).setLevel(Level.DEBUG);
Logger.getLogger(Comparator.class.getName()).setLevel(Level.DEBUG); // Logger.getLogger(Comparator.class.getName()).setLevel(Level.DEBUG);
Logger.getLogger(Deprovisioner.class.getName()).setLevel(Level.INFO); // Logger.getLogger(Deprovisioner.class.getName()).setLevel(Level.INFO);
//Logger.getLogger(Connector.class.getName()).setLevel(Level.DEBUG); // Logger.getLogger(Connector.class.getName()).setLevel(Level.DEBUG);
//Logger.getLogger(ElementAdapter.class.getName()).setLevel(Level.INFO); // Logger.getLogger(ElementAdapter.class.getName()).setLevel(Level.INFO);
Logger.getLogger(Deployer.class.getName()).setLevel(Level.INFO); Logger.getLogger(Deployer.class.getName()).setLevel(Level.INFO);
Logger.getLogger(MartAppDeployerMaster.class.getName()).setLevel(Level.DEBUG); // Logger.getLogger(MartAppDeployerMaster.class.getName()).setLevel(Level.DEBUG);
Logger.getLogger(MartAppDeployerSlave.class.getName()).setLevel(Level.DEBUG); // Logger.getLogger(MartAppDeployerSlave.class.getName()).setLevel(Level.DEBUG);
//Logger.getLogger(Transformator.class.getName()).setLevel(Level.DEBUG); // Logger.getLogger(Transformator.class.getName()).setLevel(Level.DEBUG);
} }
public static boolean equalsRuntime(Path desiredModelPath, Connector conn) { public static boolean equalsRuntime(Path desiredModelPath, Connector conn) {
...@@ -128,8 +122,7 @@ public class TestUtility { ...@@ -128,8 +122,7 @@ public class TestUtility {
} }
return assertion; return assertion;
} }
public static boolean equalsRuntime(Resource desiredModel, Connector conn) { public static boolean equalsRuntime(Resource desiredModel, Connector conn) {
Path deployedOCCI = Paths.get(System.getProperty("user.home") + "/.rwm/runtime.occic"); Path deployedOCCI = Paths.get(System.getProperty("user.home") + "/.rwm/runtime.occic");
conn.loadRuntimeModel(deployedOCCI); conn.loadRuntimeModel(deployedOCCI);
......
...@@ -6,6 +6,7 @@ import java.nio.file.Path; ...@@ -6,6 +6,7 @@ import java.nio.file.Path;
import java.nio.file.Paths; import java.nio.file.Paths;
import org.eclipse.epsilon.emc.emf.CachedResourceSet; import org.eclipse.epsilon.emc.emf.CachedResourceSet;
import org.eclipse.epsilon.eol.exceptions.EolRuntimeException;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
...@@ -24,13 +25,12 @@ public class DeployHadoopMonitoringTestLive { ...@@ -24,13 +25,12 @@ public class DeployHadoopMonitoringTestLive {
String sshKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6H7Ydi45BTHid4qNppGAi5mzjbnZgt7bi6xLGmZG9CiLmhMsxOuk3Z05Nn+pmoN98qS0eY8S240PPk5VOlYqBY0vdRAwrZSHHaLdMp6I7ARNrI2KraYduweqz7ZQxPXQfwIeYx2HKQxEF2r+4//Fo4WfgdBkLuulvl/Gw3TUzJNQHvgpaiNo9+PI5CZydHnZbjUkRikS12pT+CbNKj+0QKeQztbCd41aKxDv5H0DjltVRcpPppv4dmiU/zoCAIngWLO1PPgfYWyze8Z9IoyBT7Qdg30U91TYZBuxzXR5lq7Fh64y/IZ/SjdOdSIvIuDjtmJDULRdLJzrvubrKY+YH Generated-by-Nova"; String sshKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6H7Ydi45BTHid4qNppGAi5mzjbnZgt7bi6xLGmZG9CiLmhMsxOuk3Z05Nn+pmoN98qS0eY8S240PPk5VOlYqBY0vdRAwrZSHHaLdMp6I7ARNrI2KraYduweqz7ZQxPXQfwIeYx2HKQxEF2r+4//Fo4WfgdBkLuulvl/Gw3TUzJNQHvgpaiNo9+PI5CZydHnZbjUkRikS12pT+CbNKj+0QKeQztbCd41aKxDv5H0DjltVRcpPppv4dmiU/zoCAIngWLO1PPgfYWyze8Z9IoyBT7Qdg30U91TYZBuxzXR5lq7Fh64y/IZ/SjdOdSIvIuDjtmJDULRdLJzrvubrKY+YH Generated-by-Nova";
String userData = "I2Nsb3VkLWNvbmZpZwoKIyBVcGdyYWRlIHRoZSBpbnN0YW5jZSBvbiBmaXJzdCBib290CiMgKGllIHJ1biBhcHQtZ2V0IHVwZ3JhZGUpCiMKIyBEZWZhdWx0OiBmYWxzZQojIEFsaWFzZXM6IGFwdF91cGdyYWRlCnBhY2thZ2VfdXBncmFkZTogdHJ1ZQoKcGFja2FnZXM6CiAtIHB5dGhvbgoKd3JpdGVfZmlsZXM6CiAgLSBwYXRoOiAvZXRjL25ldHdvcmsvaW50ZXJmYWNlcy5kLzUwLWNsb3VkLWluaXQuY2ZnCiAgICBjb250ZW50OiB8CiAgICAgIGF1dG8gbG8KICAgICAgaWZhY2UgbG8gaW5ldCBsb29wYmFjawogICAgICAKICAgICAgYXV0byBlbnMwCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMAogICAgICBpZmFjZSBlbnMwIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMQogICAgICBpZmFjZSBlbnMxIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMyCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMgogICAgICBpZmFjZSBlbnMyIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMzCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMwogICAgICBpZmFjZSBlbnMzIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM0CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNAogICAgICBpZmFjZSBlbnM0IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM1CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNQogICAgICBpZmFjZSBlbnM1IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM2CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNgogICAgICBpZmFjZSBlbnM2IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM3CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNwogICAgICBpZmFjZSBlbnM3IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM4CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOAogICAgICBpZmFjZSBlbnM4IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM5CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOQogICAgICBpZmFjZSBlbnM5IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxMAogICAgICBhbGxvdy1ob3RwbHVnIGVuczEwCiAgICAgIGlmYWNlIGVuczEwIGluZXQgZGhjcAoKIyMj"; String userData = "I2Nsb3VkLWNvbmZpZwoKIyBVcGdyYWRlIHRoZSBpbnN0YW5jZSBvbiBmaXJzdCBib290CiMgKGllIHJ1biBhcHQtZ2V0IHVwZ3JhZGUpCiMKIyBEZWZhdWx0OiBmYWxzZQojIEFsaWFzZXM6IGFwdF91cGdyYWRlCnBhY2thZ2VfdXBncmFkZTogdHJ1ZQoKcGFja2FnZXM6CiAtIHB5dGhvbgoKd3JpdGVfZmlsZXM6CiAgLSBwYXRoOiAvZXRjL25ldHdvcmsvaW50ZXJmYWNlcy5kLzUwLWNsb3VkLWluaXQuY2ZnCiAgICBjb250ZW50OiB8CiAgICAgIGF1dG8gbG8KICAgICAgaWZhY2UgbG8gaW5ldCBsb29wYmFjawogICAgICAKICAgICAgYXV0byBlbnMwCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMAogICAgICBpZmFjZSBlbnMwIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMQogICAgICBpZmFjZSBlbnMxIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMyCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMgogICAgICBpZmFjZSBlbnMyIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMzCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMwogICAgICBpZmFjZSBlbnMzIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM0CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNAogICAgICBpZmFjZSBlbnM0IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM1CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNQogICAgICBpZmFjZSBlbnM1IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM2CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNgogICAgICBpZmFjZSBlbnM2IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM3CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNwogICAgICBpZmFjZSBlbnM3IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM4CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOAogICAgICBpZmFjZSBlbnM4IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM5CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOQogICAgICBpZmFjZSBlbnM5IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxMAogICAgICBhbGxvdy1ob3RwbHVnIGVuczEwCiAgICAgIGlmYWNlIGVuczEwIGluZXQgZGhjcAoKIyMj";
@BeforeClass @BeforeClass
public static void OCCIRegistrySetup() { public static void OCCIRegistrySetup() {
TestUtility.loggerSetup(); TestUtility.loggerSetup();
TestUtility.extensionRegistrySetup(); TestUtility.extensionRegistrySetup();
} }
public void deprovisionEverything() { public void deprovisionEverything() {
CachedResourceSet.getCache().clear(); CachedResourceSet.getCache().clear();
Path occiPath = Paths.get(ModelUtility.getPathToResource("occi/Empty.occic")); Path occiPath = Paths.get(ModelUtility.getPathToResource("occi/Empty.occic"));
...@@ -45,19 +45,28 @@ public class DeployHadoopMonitoringTestLive { ...@@ -45,19 +45,28 @@ public class DeployHadoopMonitoringTestLive {
Path occiPath = Paths.get(ModelUtility.getPathToResource("occi/hadoopClusterNewExtWithMem.occic")); Path occiPath = Paths.get(ModelUtility.getPathToResource("occi/hadoopClusterNewExtWithMem.occic"));
Transformator trans = TransformatorFactory.getTransformator("OCCI2OCCI"); Transformator trans = TransformatorFactory.getTransformator("OCCI2OCCI");
trans.transform(occiPath, occiPath); try {
trans.transform(occiPath, occiPath);
OCCI2OPENSTACKTransformator trans2 = OCCI2OPENSTACKTransformator.getInstance(); } catch (EolRuntimeException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
OCCI2OPENSTACKTransformator trans2 = new OCCI2OPENSTACKTransformator();
trans2.setTransformationProperties(manNWRuntimeId, sshKey, userData, manNWid); trans2.setTransformationProperties(manNWRuntimeId, sshKey, userData, manNWid);
trans2.transform(occiPath, occiPath); try {
trans2.transform(occiPath, occiPath);
} catch (EolRuntimeException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Connector conn = new MartConnector("192.168.35.45", 8080, "ubuntu", "~/key.pem"); Connector conn = new MartConnector("192.168.35.45", 8080, "ubuntu", "~/key.pem");
MartDeployer deployer = new MartDeployer(conn); MartDeployer deployer = new MartDeployer(conn);
deployer.deploy(occiPath); deployer.deploy(occiPath);
assertTrue(TestUtility.equalsRuntime(occiPath, conn)); assertTrue(TestUtility.equalsRuntime(occiPath, conn));
} }
......
package de.ugoe.cs.rwm.mocci.live; package de.ugoe.cs.rwm.mocci.live;
import static org.junit.Assert.assertTrue;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.Paths; import java.nio.file.Paths;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.eclipse.cmf.occi.core.Configuration;
import org.eclipse.cmf.occi.core.Link;
import org.eclipse.cmf.occi.core.Mixin;
import org.eclipse.cmf.occi.core.OCCIPackage;
import org.eclipse.cmf.occi.core.util.OcciRegistry;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.epsilon.emc.emf.CachedResourceSet; import org.eclipse.epsilon.emc.emf.CachedResourceSet;
import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import de.ugoe.cs.rwm.docci.MartDeployer; import de.ugoe.cs.rwm.docci.MartDeployer;
import de.ugoe.cs.rwm.docci.ModelUtility; import de.ugoe.cs.rwm.docci.ModelUtility;
import de.ugoe.cs.rwm.mocci.TestUtility;
import de.ugoe.cs.rwm.docci.connector.Connector; import de.ugoe.cs.rwm.docci.connector.Connector;
import de.ugoe.cs.rwm.docci.connector.LocalhostConnector;
import de.ugoe.cs.rwm.docci.connector.MartConnector; import de.ugoe.cs.rwm.docci.connector.MartConnector;
import de.ugoe.cs.rwm.tocci.Transformator; import de.ugoe.cs.rwm.mocci.TestUtility;
import de.ugoe.cs.rwm.tocci.TransformatorFactory;
import de.ugoe.cs.rwm.tocci.occi2openstack.OCCI2OPENSTACKTransformator;
import monitoring.MonitoringPackage;
public class EmptyTestLive { public class EmptyTestLive {
String manNWid = "urn:uuid:29d78078-fb4c-47aa-a9af-b8aaf3339590"; String manNWid = "urn:uuid:29d78078-fb4c-47aa-a9af-b8aaf3339590";
...@@ -40,13 +19,12 @@ public class EmptyTestLive { ...@@ -40,13 +19,12 @@ public class EmptyTestLive {
String sshKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6H7Ydi45BTHid4qNppGAi5mzjbnZgt7bi6xLGmZG9CiLmhMsxOuk3Z05Nn+pmoN98qS0eY8S240PPk5VOlYqBY0vdRAwrZSHHaLdMp6I7ARNrI2KraYduweqz7ZQxPXQfwIeYx2HKQxEF2r+4//Fo4WfgdBkLuulvl/Gw3TUzJNQHvgpaiNo9+PI5CZydHnZbjUkRikS12pT+CbNKj+0QKeQztbCd41aKxDv5H0DjltVRcpPppv4dmiU/zoCAIngWLO1PPgfYWyze8Z9IoyBT7Qdg30U91TYZBuxzXR5lq7Fh64y/IZ/SjdOdSIvIuDjtmJDULRdLJzrvubrKY+YH Generated-by-Nova"; String sshKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6H7Ydi45BTHid4qNppGAi5mzjbnZgt7bi6xLGmZG9CiLmhMsxOuk3Z05Nn+pmoN98qS0eY8S240PPk5VOlYqBY0vdRAwrZSHHaLdMp6I7ARNrI2KraYduweqz7ZQxPXQfwIeYx2HKQxEF2r+4//Fo4WfgdBkLuulvl/Gw3TUzJNQHvgpaiNo9+PI5CZydHnZbjUkRikS12pT+CbNKj+0QKeQztbCd41aKxDv5H0DjltVRcpPppv4dmiU/zoCAIngWLO1PPgfYWyze8Z9IoyBT7Qdg30U91TYZBuxzXR5lq7Fh64y/IZ/SjdOdSIvIuDjtmJDULRdLJzrvubrKY+YH Generated-by-Nova";
String userData = "I2Nsb3VkLWNvbmZpZwoKIyBVcGdyYWRlIHRoZSBpbnN0YW5jZSBvbiBmaXJzdCBib290CiMgKGllIHJ1biBhcHQtZ2V0IHVwZ3JhZGUpCiMKIyBEZWZhdWx0OiBmYWxzZQojIEFsaWFzZXM6IGFwdF91cGdyYWRlCnBhY2thZ2VfdXBncmFkZTogdHJ1ZQoKcGFja2FnZXM6CiAtIHB5dGhvbgoKd3JpdGVfZmlsZXM6CiAgLSBwYXRoOiAvZXRjL25ldHdvcmsvaW50ZXJmYWNlcy5kLzUwLWNsb3VkLWluaXQuY2ZnCiAgICBjb250ZW50OiB8CiAgICAgIGF1dG8gbG8KICAgICAgaWZhY2UgbG8gaW5ldCBsb29wYmFjawogICAgICAKICAgICAgYXV0byBlbnMwCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMAogICAgICBpZmFjZSBlbnMwIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMQogICAgICBpZmFjZSBlbnMxIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMyCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMgogICAgICBpZmFjZSBlbnMyIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMzCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMwogICAgICBpZmFjZSBlbnMzIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM0CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNAogICAgICBpZmFjZSBlbnM0IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM1CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNQogICAgICBpZmFjZSBlbnM1IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM2CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNgogICAgICBpZmFjZSBlbnM2IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM3CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNwogICAgICBpZmFjZSBlbnM3IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM4CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOAogICAgICBpZmFjZSBlbnM4IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM5CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOQogICAgICBpZmFjZSBlbnM5IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxMAogICAgICBhbGxvdy1ob3RwbHVnIGVuczEwCiAgICAgIGlmYWNlIGVuczEwIGluZXQgZGhjcAoKIyMj"; String userData = "I2Nsb3VkLWNvbmZpZwoKIyBVcGdyYWRlIHRoZSBpbnN0YW5jZSBvbiBmaXJzdCBib290CiMgKGllIHJ1biBhcHQtZ2V0IHVwZ3JhZGUpCiMKIyBEZWZhdWx0OiBmYWxzZQojIEFsaWFzZXM6IGFwdF91cGdyYWRlCnBhY2thZ2VfdXBncmFkZTogdHJ1ZQoKcGFja2FnZXM6CiAtIHB5dGhvbgoKd3JpdGVfZmlsZXM6CiAgLSBwYXRoOiAvZXRjL25ldHdvcmsvaW50ZXJmYWNlcy5kLzUwLWNsb3VkLWluaXQuY2ZnCiAgICBjb250ZW50OiB8CiAgICAgIGF1dG8gbG8KICAgICAgaWZhY2UgbG8gaW5ldCBsb29wYmFjawogICAgICAKICAgICAgYXV0byBlbnMwCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMAogICAgICBpZmFjZSBlbnMwIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMQogICAgICBpZmFjZSBlbnMxIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMyCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMgogICAgICBpZmFjZSBlbnMyIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMzCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMwogICAgICBpZmFjZSBlbnMzIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM0CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNAogICAgICBpZmFjZSBlbnM0IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM1CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNQogICAgICBpZmFjZSBlbnM1IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM2CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNgogICAgICBpZmFjZSBlbnM2IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM3CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNwogICAgICBpZmFjZSBlbnM3IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM4CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOAogICAgICBpZmFjZSBlbnM4IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM5CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOQogICAgICBpZmFjZSBlbnM5IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxMAogICAgICBhbGxvdy1ob3RwbHVnIGVuczEwCiAgICAgIGlmYWNlIGVuczEwIGluZXQgZGhjcAoKIyMj";
@BeforeClass @BeforeClass
public static void OCCIRegistrySetup() { public static void OCCIRegistrySetup() {
TestUtility.loggerSetup(); TestUtility.loggerSetup();
TestUtility.extensionRegistrySetup(); TestUtility.extensionRegistrySetup();
} }
@Test @Test
public void deprovisionEverything() { public void deprovisionEverything() {
CachedResourceSet.getCache().clear(); CachedResourceSet.getCache().clear();
......
/**
*
*/
/**
* Main package that includes MOCCI live tests.
*
* @author erbel
*
*/
package de.ugoe.cs.rwm.mocci.live;
No preview for this file type
<?xml version="1.0" encoding="ASCII"?> <?xml version="1.0" encoding="ASCII"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:occi="http://schemas.ogf.org/occi/core/ecore"> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:occi="http://schemas.ogf.org/occi/core/ecore">
<occi:Extension name="template" scheme="http://schemas.openstack.org/template#"> <occi:Configuration>
<mixins name="36637a26-fded-4635-b6c5-ec8ec0745eab" scheme="http://schemas.openstack.org/template/resource#" title="Flavor: m1.medium"/>
<mixins name="60ab5827-e8cd-44f3-a33a-ee2fb989f7a7" scheme="http://schemas.openstack.org/template/os#" title="Sahara_Spark1.6_Ubuntu"/>
<mixins name="cc5d21d7-fc0e-451d-884b-aba0efac9c33" scheme="http://schemas.openstack.org/template/resource#" title="Flavor: mongoscale_m8"/>
<mixins name="9961ccdf-2ee2-42d1-ac6d-b45318212cad" scheme="http://schemas.openstack.org/template/resource#" title="Flavor: mongoscale_m10"/>
<mixins name="32ef77d0-5d26-46f5-9ea3-f805a7a05af6" scheme="http://schemas.openstack.org/template/resource#" title="Flavor: mongoscale_m4"/>
<mixins name="2a665c12-e4c5-41fe-b16e-2aec31c799eb" scheme="http://schemas.openstack.org/template/resource#" title="Flavor: mongoscale_m2"/>
<mixins name="5437eae8-7c47-4834-929c-a314de77d291" scheme="http://schemas.openstack.org/template/os#" title="Ubuntu 16.04 Server"/>
<mixins name="e739cb33-4224-4829-8dcb-9b66a1b8ceb9" scheme="http://schemas.openstack.org/template/resource#" title="Flavor: m1.large"/>
<mixins name="d1f5a7a6-0fbe-4146-87fe-1e9441462833" scheme="http://schemas.openstack.org/template/resource#" title="Flavor: mongoscale_m6"/>
<mixins name="41598b12-2d7d-4ffe-b3c1-0f52e68fa1ea" scheme="http://schemas.openstack.org/template/resource#" title="Flavor: mongoscale_m1"/>
<mixins name="0" scheme="http://schemas.openstack.org/template/resource#" title="Flavor: m1.nano"/>
<mixins name="8dd25971-1bbd-47db-9d49-2fef02fa0bc8" scheme="http://schemas.openstack.org/template/resource#" title="Flavor: m1.small"/>
<mixins name="e7a211eb-d1dc-4e3a-8da6-f9daabdb81c8" scheme="http://schemas.openstack.org/template/os#" title="Centos 7"/>
<mixins name="adf63ddc-debe-4d7e-b899-b936e989439f" scheme="http://schemas.openstack.org/template/os#" title="Ubuntu 14.04 Server"/>
</occi:Extension>
<occi:Extension name="instance" scheme="http://schemas.openstack.org/instance#">
<mixins name="public_key" scheme="http://schemas.openstack.org/instance/credentials#" title="Contextualization extension - public_key"/>
</occi:Extension>
<occi:Extension name="occi" scheme="http://schemas.ogf.org/occi#">
<mixins name="resource_tpl" scheme="http://schemas.ogf.org/occi/infrastructure#" title="OCCI Resource Template"/>
<mixins name="os_tpl" scheme="http://schemas.ogf.org/occi/infrastructure#" title="OCCI OS Template"/>
</occi:Extension>
<occi:Extension name="compute" scheme="http://schemas.openstack.org/compute#">
<mixins name="user_data" scheme="http://schemas.openstack.org/compute/instance#" title="Contextualization extension - user_data"/>
</occi:Extension>
<occi:Extension name="infrastructure" scheme="http://schemas.ogf.org/occi/infrastructure#">
<kinds name="storage" scheme="http://schemas.ogf.org/occi/infrastructure#" title="storage resource" parent="/7/@kinds[term='resource']">
<actions name="snapshot" scheme="http://schemas.ogf.org/occi/infrastructure/storage/action#" title="snapshot storage instance"/>
<actions name="online" scheme="http://schemas.ogf.org/occi/infrastructure/storage/action#" title="online storage instance"/>
<actions name="resize" scheme="http://schemas.ogf.org/occi/infrastructure/storage/action#" title="resize storage instance"/>
<actions name="backup" scheme="http://schemas.ogf.org/occi/infrastructure/storage/action#" title="backup storage instance"/>
<actions name="offline" scheme="http://schemas.ogf.org/occi/infrastructure/storage/action#" title="offline storage instance"/>
</kinds>
<kinds name="network" scheme="http://schemas.ogf.org/occi/infrastructure#" title="network resource" parent="/7/@kinds[term='resource']">
<actions name="down" scheme="http://schemas.ogf.org/occi/infrastructure/network/action#" title="down network instance"/>
<actions name="up" scheme="http://schemas.ogf.org/occi/infrastructure/network/action#" title="up network instance"/>
</kinds>
<kinds name="ipreservation" scheme="http://schemas.ogf.org/occi/infrastructure#" title="IPReservation" parent="/4/@kinds[term='network']"/>
<kinds name="storagelink" scheme="http://schemas.ogf.org/occi/infrastructure#" title="storage link resource" parent="/7/@kinds[term='link']" source="/4/@kinds[term='compute']" target="/4/@kinds[term='storage']"/>
<kinds name="compute" scheme="http://schemas.ogf.org/occi/infrastructure#" title="compute resource" parent="/7/@kinds[term='resource']">
<actions name="start" scheme="http://schemas.ogf.org/occi/infrastructure/compute/action#" title="start compute instance"/>
<actions name="restart" scheme="http://schemas.ogf.org/occi/infrastructure/compute/action#" title="restart compute instance"/>
<actions name="suspend" scheme="http://schemas.ogf.org/occi/infrastructure/compute/action#" title="suspend compute instance"/>
<actions name="stop" scheme="http://schemas.ogf.org/occi/infrastructure/compute/action#" title="stop compute instance"/>
<actions name="save" scheme="http://schemas.ogf.org/occi/infrastructure/compute/action#" title="save compute instance"/>
</kinds>
<kinds name="networkinterface" scheme="http://schemas.ogf.org/occi/infrastructure#" title="network link resource" parent="/7/@kinds[term='link']" source="/4/@kinds[term='compute']" target="/4/@kinds[term='network']"/>
<mixins name="ssh_key" scheme="http://schemas.ogf.org/occi/infrastructure/credentials#" title="Credentials mixin"/>
<mixins name="ipnetwork" scheme="http://schemas.ogf.org/occi/infrastructure/network#" title="IP Networking Mixin"/>
<mixins name="user_data" scheme="http://schemas.ogf.org/occi/infrastructure/compute#" title="Contextualization mixin"/>
<mixins name="ipnetworkinterface" scheme="http://schemas.ogf.org/occi/infrastructure/networkinterface#" title="IP Network interface Mixin"/>
</occi:Extension>
<occi:Extension name="infrastructure" scheme="http://schemas.openstack.org/infrastructure#">
<mixins name="neutron" scheme="http://schemas.openstack.org/infrastructure/network#" title="Network component"/>
<mixins name="osnetwork" scheme="http://schemas.openstack.org/infrastructure/network#" title="openstack network"/>
</occi:Extension>
<occi:Extension name="network" scheme="http://schemas.openstack.org/network#">
<mixins name="provider" scheme="http://schemas.openstack.org/network/floatingippool#" title="provider"/>
</occi:Extension>
<occi:Extension scheme="http://schemas.ogf.org/occi/core#">
<kinds name="link" scheme="http://schemas.ogf.org/occi/core#" title="link"/>
<kinds name="entity" scheme="http://schemas.ogf.org/occi/core#" title="entity"/>
<kinds name="resource" scheme="http://schemas.ogf.org/occi/core#" title="resource" parent="/7/@kinds[term='entity']"/>
</occi:Extension>
<occi:Configuration description="Extracted Runtime Model" location="http://192.168.34.1:8787/occi1.1OCCIBasicAuthentication" use="/0 /4 /5">
<resources id="urn:uuid:29d78078-fb4c-47aa-a9af-b8aaf3339590" title="Management Network" kind="/4/@kinds[term='network']">
<parts>
<mixin href="http://schemas.modmacao.org/openstack/runtime#//@mixins[term='runtimeid']"/>
<attributes name="openstack.runtime.id" value="75a4639e-9ce7-4058-b859-8a711b0e2e7b"/>
</parts>
</resources>
</occi:Configuration> </occi:Configuration>
</xmi:XMI> </xmi:XMI>
<?xml version="1.0" encoding="ASCII"?>
<occi:Configuration xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:infrastructure="http://schemas.ogf.org/occi/infrastructure/ecore" xmlns:monitoring="http://schemas.ugoe.cs.rwm/monitoring/ecore" xmlns:occi="http://schemas.ogf.org/occi/core/ecore" xmlns:placement="http://schemas.modmacao.org/placement/ecore" xmlns:platform="http://schemas.modmacao.org/occi/platform/ecore">
<use href="http://schemas.ogf.org/occi/core#/"/>
<use href="http://schemas.ogf.org/occi/infrastructure#/"/>
<use href="http://schemas.modmacao.org/occi/platform#/"/>
<use href="http://schemas.ogf.org/occi/infrastructure/compute/template/1.1#/"/>
<use href="http://schemas.modmacao.org/placement#/"/>
<use href="http://schemas.modmacao.org/openstack/runtime#/"/>
<use href="http://schemas.modmacao.org/modmacao#/"/>
<use href="http://schemas.modmacao.org/openstack/swe#/"/>
<use href="http://schemas.ugoe.cs.rwm/monitoring#/"/>
<resources xsi:type="infrastructure:Compute" id="urn:uuid:2e6a73d0-faaa-476a-bd25-ca461dd166ce" title="Hadoop-master" location="/compute/urn:uuid:2e6a73d0-faaa-476a-bd25-ca461dd166ce/" rlinks="//@resources.2/@links.0 //@resources.1/@links.0" occiComputeCores="2" occiComputeHostname="vm2" occiComputeMemory="4096.0" occiComputeState="active">
<kind href="http://schemas.ogf.org/occi/infrastructure#//@kinds[term='compute']"/>
<attributes name="occi.core.id" value="urn:uuid:2e6a73d0-faaa-476a-bd25-ca461dd166ce"/>
<attributes name="occi.core.title" value="Hadoop-master"/>
<attributes name="occi.core.summary" value=""/>
<attributes name="occi.compute.architecture" value="x86"/>
<attributes name="occi.compute.cores" value="2"/>
<attributes name="occi.compute.hostname" value="hadoop-master"/>
<attributes name="occi.compute.share" value="0"/>
<attributes name="occi.compute.speed" value="0"/>
<attributes name="occi.compute.memory" value="4096"/>
<attributes name="occi.compute.state" value="active"/>
<attributes name="occi.compute.state.message" value=""/>
<parts xsi:type="infrastructure:Ssh_key" occiCredentialsSshPublickey="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6H7Ydi45BTHid4qNppGAi5mzjbnZgt7bi6xLGmZG9CiLmhMsxOuk3Z05Nn+pmoN98qS0eY8S240PPk5VOlYqBY0vdRAwrZSHHaLdMp6I7ARNrI2KraYduweqz7ZQxPXQfwIeYx2HKQxEF2r+4//Fo4WfgdBkLuulvl/Gw3TUzJNQHvgpaiNo9+PI5CZydHnZbjUkRikS12pT+CbNKj+0QKeQztbCd41aKxDv5H0DjltVRcpPppv4dmiU/zoCAIngWLO1PPgfYWyze8Z9IoyBT7Qdg30U91TYZBuxzXR5lq7Fh64y/IZ/SjdOdSIvIuDjtmJDULRdLJzrvubrKY+YH Generated-by-Nova">
<mixin href="http://schemas.ogf.org/occi/infrastructure#//@mixins[term='ssh_key']"/>
<attributes name="occi.credentials.ssh.publickey" value="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6H7Ydi45BTHid4qNppGAi5mzjbnZgt7bi6xLGmZG9CiLmhMsxOuk3Z05Nn+pmoN98qS0eY8S240PPk5VOlYqBY0vdRAwrZSHHaLdMp6I7ARNrI2KraYduweqz7ZQxPXQfwIeYx2HKQxEF2r+4//Fo4WfgdBkLuulvl/Gw3TUzJNQHvgpaiNo9+PI5CZydHnZbjUkRikS12pT+CbNKj+0QKeQztbCd41aKxDv5H0DjltVRcpPppv4dmiU/zoCAIngWLO1PPgfYWyze8Z9IoyBT7Qdg30U91TYZBuxzXR5lq7Fh64y/IZ/SjdOdSIvIuDjtmJDULRdLJzrvubrKY+YH Generated-by-Nova"/>
</parts>
<parts xsi:type="infrastructure:User_data" occiComputeUserdata="I2Nsb3VkLWNvbmZpZwoKIyBVcGdyYWRlIHRoZSBpbnN0YW5jZSBvbiBmaXJzdCBib290CiMgKGllIHJ1biBhcHQtZ2V0IHVwZ3JhZGUpCiMKIyBEZWZhdWx0OiBmYWxzZQojIEFsaWFzZXM6IGFwdF91cGdyYWRlCnBhY2thZ2VfdXBncmFkZTogdHJ1ZQoKcGFja2FnZXM6CiAtIHB5dGhvbgoKd3JpdGVfZmlsZXM6CiAgLSBwYXRoOiAvZXRjL25ldHdvcmsvaW50ZXJmYWNlcy5kLzUwLWNsb3VkLWluaXQuY2ZnCiAgICBjb250ZW50OiB8CiAgICAgIGF1dG8gbG8KICAgICAgaWZhY2UgbG8gaW5ldCBsb29wYmFjawogICAgICAKICAgICAgYXV0byBlbnMwCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMAogICAgICBpZmFjZSBlbnMwIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMQogICAgICBpZmFjZSBlbnMxIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMyCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMgogICAgICBpZmFjZSBlbnMyIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMzCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMwogICAgICBpZmFjZSBlbnMzIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM0CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNAogICAgICBpZmFjZSBlbnM0IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM1CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNQogICAgICBpZmFjZSBlbnM1IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM2CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNgogICAgICBpZmFjZSBlbnM2IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM3CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNwogICAgICBpZmFjZSBlbnM3IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM4CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOAogICAgICBpZmFjZSBlbnM4IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM5CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOQogICAgICBpZmFjZSBlbnM5IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxMAogICAgICBhbGxvdy1ob3RwbHVnIGVuczEwCiAgICAgIGlmYWNlIGVuczEwIGluZXQgZGhjcAoKIyMj">
<mixin href="http://schemas.ogf.org/occi/infrastructure#//@mixins[term='user_data']"/>
<attributes name="occi.compute.userdata" value="I2Nsb3VkLWNvbmZpZwoKIyBVcGdyYWRlIHRoZSBpbnN0YW5jZSBvbiBmaXJzdCBib290CiMgKGllIHJ1biBhcHQtZ2V0IHVwZ3JhZGUpCiMKIyBEZWZhdWx0OiBmYWxzZQojIEFsaWFzZXM6IGFwdF91cGdyYWRlCnBhY2thZ2VfdXBncmFkZTogdHJ1ZQoKcGFja2FnZXM6CiAtIHB5dGhvbgoKd3JpdGVfZmlsZXM6CiAgLSBwYXRoOiAvZXRjL25ldHdvcmsvaW50ZXJmYWNlcy5kLzUwLWNsb3VkLWluaXQuY2ZnCiAgICBjb250ZW50OiB8CiAgICAgIGF1dG8gbG8KICAgICAgaWZhY2UgbG8gaW5ldCBsb29wYmFjawogICAgICAKICAgICAgYXV0byBlbnMwCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMAogICAgICBpZmFjZSBlbnMwIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMQogICAgICBpZmFjZSBlbnMxIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMyCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMgogICAgICBpZmFjZSBlbnMyIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMzCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMwogICAgICBpZmFjZSBlbnMzIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM0CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNAogICAgICBpZmFjZSBlbnM0IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM1CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNQogICAgICBpZmFjZSBlbnM1IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM2CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNgogICAgICBpZmFjZSBlbnM2IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM3CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNwogICAgICBpZmFjZSBlbnM3IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM4CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOAogICAgICBpZmFjZSBlbnM4IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM5CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOQogICAgICBpZmFjZSBlbnM5IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxMAogICAgICBhbGxvdy1ob3RwbHVnIGVuczEwCiAgICAgIGlmYWNlIGVuczEwIGluZXQgZGhjcAoKIyMj"/>
</parts>
<parts>
<mixin href="http://schemas.modmacao.org/openstack/swe#//@mixins[term='ubuntu_xenialxerus']"/>
</parts>
<links xsi:type="infrastructure:Networkinterface" id="urn:uuid:ea482951-5c26-471d-aa1b-8e03b1e6096c" title="link3" location="/networkinterface/urn:uuid:ea482951-5c26-471d-aa1b-8e03b1e6096c" target="//@resources.6">
<kind href="http://schemas.ogf.org/occi/infrastructure#//@kinds[term='networkinterface']"/>
<attributes name="occi.core.id" value="urn:uuid:ea482951-5c26-471d-aa1b-8e03b1e6096c"/>
<attributes name="occi.core.title" value="link3"/>
<attributes name="occi.networkinterface.address" value="10.254.1.5"/>
<parts xsi:type="infrastructure:Ipnetworkinterface" occiNetworkinterfaceAddress="10.254.1.5" occiNetworkinterfaceGateway="10.254.1.254">
<mixin href="http://schemas.ogf.org/occi/infrastructure#//@mixins[term='ipnetworkinterface']"/>
</parts>
</links>
</resources>
<resources xsi:type="platform:Component" id="urn:uuid:f934d445-d0c8-4f2f-8086-d9f1a8255896" title="HJob" location="/component/urn:uuid:f934d445-d0c8-4f2f-8086-d9f1a8255896/" occiComponentStateMessage="">
<kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='component']"/>
<attributes name="occi.core.id" value="urn:uuid:f934d445-d0c8-4f2f-8086-d9f1a8255896"/>
<attributes name="occi.core.title" value="HJob"/>
<attributes name="occi.core.summary" value=""/>
<attributes name="occi.component.state" value="undeployed"/>
<attributes name="occi.component.state.message" value=""/>
<parts mixin="//@mixins.0"/>
<links xsi:type="placement:Placementlink" id="urn:uuid:ff292f08-d263-41b6-88c8-84d33783b929" title="link1" location="/placementlink/urn:uuid:ff292f08-d263-41b6-88c8-84d33783b929/" target="//@resources.0">
<kind href="http://schemas.modmacao.org/placement#//@kinds[term='placementlink']"/>
<attributes name="occi.core.id" value="urn:uuid:ff292f08-d263-41b6-88c8-84d33783b929"/>
<attributes name="occi.core.title" value="link1"/>
</links>
</resources>
<resources xsi:type="platform:Component" id="urn:uuid:f934d445-d0c8-4f2f-8086-d9f1a8255897" title="HMaster" location="/component/urn:uuid:f934d445-d0c8-4f2f-8086-d9f1a8255897/" rlinks="//@resources.3/@links.0" occiComponentStateMessage="">
<kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='component']"/>
<attributes name="occi.core.id" value="urn:uuid:f934d445-d0c8-4f2f-8086-d9f1a8255897"/>
<attributes name="occi.core.title" value="HMaster"/>
<attributes name="occi.core.summary" value=""/>
<attributes name="occi.component.state" value="undeployed"/>
<attributes name="occi.component.state.message" value=""/>
<parts mixin="//@mixins.1"/>
<links xsi:type="placement:Placementlink" id="urn:uuid:ff292f08-d263-41b6-88c8-84d33783b928" title="link1" location="/placementlink/urn:uuid:ff292f08-d263-41b6-88c8-84d33783b928/" target="//@resources.0">
<kind href="http://schemas.modmacao.org/placement#//@kinds[term='placementlink']"/>
<attributes name="occi.core.id" value="urn:uuid:ff292f08-d263-41b6-88c8-84d33783b928"/>
<attributes name="occi.core.title" value="link1"/>
<attributes name="occi.core.source" value="/component/urn:uuid:f934d445-d0c8-4f2f-8086-d9f1a8255897/"/>
<attributes name="occi.core.target" value="/compute/urn:uuid:2e6a73d0-faaa-476a-bd25-ca461dd166ce/"/>
</links>
</resources>
<resources xsi:type="platform:Application" id="urn:uuid:a4888ba9-a0ea-48f2-a29e-901c876ab42d" title="Hadoopcluster" location="/application/urn:uuid:a4888ba9-a0ea-48f2-a29e-901c876ab42d" occiAppName="" occiAppState="undeployed">
<kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='application']"/>
<attributes name="occi.core.id" value="urn:uuid:a4888ba9-a0ea-48f2-a29e-901c876ab42d"/>
<attributes name="occi.core.title" value="Hadoopcluster"/>
<links xsi:type="platform:Componentlink" id="urn:uuid:9aa31c50-c605-4370-aa60-2c7c461051ef" title="ComponentLink" location="/componentlink/urn:uuid:9aa31c50-c605-4370-aa60-2c7c461051ef" target="//@resources.2">
<kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='componentlink']"/>
<attributes name="occi.core.id" value="urn:uuid:9aa31c50-c605-4370-aa60-2c7c461051ef"/>
<attributes name="occi.core.title" value="ComponentLink"/>
</links>
<links xsi:type="platform:Componentlink" id="urn:uuid:7890f02b-6f56-4809-865f-d8c686fd9da1" title="link4" location="/componentlink/urn:uuid:7890f02b-6f56-4809-865f-d8c686fd9da1" target="//@resources.5">
<kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='componentlink']"/>
<attributes name="occi.core.id" value="urn:uuid:7890f02b-6f56-4809-865f-d8c686fd9da1"/>
<attributes name="occi.core.title" value="link4"/>
</links>
</resources>
<resources xsi:type="infrastructure:Compute" id="urn:uuid:2e6a73d0-faaa-476a-bd25-ca461dd166cf" title="Hadoop-worker-1" location="/compute/urn:uuid:2e6a73d0-faaa-476a-bd25-ca461dd166cf/" rlinks="//@resources.5/@links.0 //@resources.8/@links.0 //@resources.7/@links.3" occiComputeCores="2" occiComputeHostname="vm2" occiComputeMemory="4096.0" occiComputeState="active">
<kind href="http://schemas.ogf.org/occi/infrastructure#//@kinds[term='compute']"/>
<attributes name="occi.core.id" value="urn:uuid:2e6a73d0-faaa-476a-bd25-ca461dd166cf"/>
<attributes name="occi.core.title" value="Hadoop-worker-1"/>
<attributes name="occi.core.summary" value=""/>
<attributes name="occi.compute.architecture" value="x86"/>
<attributes name="occi.compute.cores" value="2"/>
<attributes name="occi.compute.hostname" value="hadoop-worker-1"/>
<attributes name="occi.compute.share" value="0"/>
<attributes name="occi.compute.speed" value="0"/>
<attributes name="occi.compute.memory" value="4096"/>
<attributes name="occi.compute.state" value="active"/>
<attributes name="occi.compute.state.message" value=""/>
<parts xsi:type="infrastructure:Ssh_key" occiCredentialsSshPublickey="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6H7Ydi45BTHid4qNppGAi5mzjbnZgt7bi6xLGmZG9CiLmhMsxOuk3Z05Nn+pmoN98qS0eY8S240PPk5VOlYqBY0vdRAwrZSHHaLdMp6I7ARNrI2KraYduweqz7ZQxPXQfwIeYx2HKQxEF2r+4//Fo4WfgdBkLuulvl/Gw3TUzJNQHvgpaiNo9+PI5CZydHnZbjUkRikS12pT+CbNKj+0QKeQztbCd41aKxDv5H0DjltVRcpPppv4dmiU/zoCAIngWLO1PPgfYWyze8Z9IoyBT7Qdg30U91TYZBuxzXR5lq7Fh64y/IZ/SjdOdSIvIuDjtmJDULRdLJzrvubrKY+YH Generated-by-Nova">
<mixin href="http://schemas.ogf.org/occi/infrastructure#//@mixins[term='ssh_key']"/>
<attributes name="occi.credentials.ssh.publickey" value="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6H7Ydi45BTHid4qNppGAi5mzjbnZgt7bi6xLGmZG9CiLmhMsxOuk3Z05Nn+pmoN98qS0eY8S240PPk5VOlYqBY0vdRAwrZSHHaLdMp6I7ARNrI2KraYduweqz7ZQxPXQfwIeYx2HKQxEF2r+4//Fo4WfgdBkLuulvl/Gw3TUzJNQHvgpaiNo9+PI5CZydHnZbjUkRikS12pT+CbNKj+0QKeQztbCd41aKxDv5H0DjltVRcpPppv4dmiU/zoCAIngWLO1PPgfYWyze8Z9IoyBT7Qdg30U91TYZBuxzXR5lq7Fh64y/IZ/SjdOdSIvIuDjtmJDULRdLJzrvubrKY+YH Generated-by-Nova"/>
</parts>
<parts xsi:type="infrastructure:User_data" occiComputeUserdata="I2Nsb3VkLWNvbmZpZwoKIyBVcGdyYWRlIHRoZSBpbnN0YW5jZSBvbiBmaXJzdCBib290CiMgKGllIHJ1biBhcHQtZ2V0IHVwZ3JhZGUpCiMKIyBEZWZhdWx0OiBmYWxzZQojIEFsaWFzZXM6IGFwdF91cGdyYWRlCnBhY2thZ2VfdXBncmFkZTogdHJ1ZQoKcGFja2FnZXM6CiAtIHB5dGhvbgoKd3JpdGVfZmlsZXM6CiAgLSBwYXRoOiAvZXRjL25ldHdvcmsvaW50ZXJmYWNlcy5kLzUwLWNsb3VkLWluaXQuY2ZnCiAgICBjb250ZW50OiB8CiAgICAgIGF1dG8gbG8KICAgICAgaWZhY2UgbG8gaW5ldCBsb29wYmFjawogICAgICAKICAgICAgYXV0byBlbnMwCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMAogICAgICBpZmFjZSBlbnMwIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMQogICAgICBpZmFjZSBlbnMxIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMyCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMgogICAgICBpZmFjZSBlbnMyIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMzCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMwogICAgICBpZmFjZSBlbnMzIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM0CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNAogICAgICBpZmFjZSBlbnM0IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM1CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNQogICAgICBpZmFjZSBlbnM1IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM2CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNgogICAgICBpZmFjZSBlbnM2IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM3CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNwogICAgICBpZmFjZSBlbnM3IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM4CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOAogICAgICBpZmFjZSBlbnM4IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM5CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOQogICAgICBpZmFjZSBlbnM5IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxMAogICAgICBhbGxvdy1ob3RwbHVnIGVuczEwCiAgICAgIGlmYWNlIGVuczEwIGluZXQgZGhjcAoKIyMj">
<mixin href="http://schemas.ogf.org/occi/infrastructure#//@mixins[term='user_data']"/>
<attributes name="occi.compute.userdata" value="I2Nsb3VkLWNvbmZpZwoKIyBVcGdyYWRlIHRoZSBpbnN0YW5jZSBvbiBmaXJzdCBib290CiMgKGllIHJ1biBhcHQtZ2V0IHVwZ3JhZGUpCiMKIyBEZWZhdWx0OiBmYWxzZQojIEFsaWFzZXM6IGFwdF91cGdyYWRlCnBhY2thZ2VfdXBncmFkZTogdHJ1ZQoKcGFja2FnZXM6CiAtIHB5dGhvbgoKd3JpdGVfZmlsZXM6CiAgLSBwYXRoOiAvZXRjL25ldHdvcmsvaW50ZXJmYWNlcy5kLzUwLWNsb3VkLWluaXQuY2ZnCiAgICBjb250ZW50OiB8CiAgICAgIGF1dG8gbG8KICAgICAgaWZhY2UgbG8gaW5ldCBsb29wYmFjawogICAgICAKICAgICAgYXV0byBlbnMwCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMAogICAgICBpZmFjZSBlbnMwIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMQogICAgICBpZmFjZSBlbnMxIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMyCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMgogICAgICBpZmFjZSBlbnMyIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMzCiAgICAgIGFsbG93LWhvdHBsdWcgZW5zMwogICAgICBpZmFjZSBlbnMzIGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM0CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNAogICAgICBpZmFjZSBlbnM0IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM1CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNQogICAgICBpZmFjZSBlbnM1IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM2CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNgogICAgICBpZmFjZSBlbnM2IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM3CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zNwogICAgICBpZmFjZSBlbnM3IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM4CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOAogICAgICBpZmFjZSBlbnM4IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnM5CiAgICAgIGFsbG93LWhvdHBsdWcgZW5zOQogICAgICBpZmFjZSBlbnM5IGluZXQgZGhjcAogICAgICAKICAgICAgYXV0byBlbnMxMAogICAgICBhbGxvdy1ob3RwbHVnIGVuczEwCiAgICAgIGlmYWNlIGVuczEwIGluZXQgZGhjcAoKIyMj"/>
</parts>
<parts>
<mixin href="http://schemas.modmacao.org/openstack/swe#//@mixins[term='ubuntu_xenialxerus']"/>
</parts>
<links xsi:type="infrastructure:Networkinterface" id="urn:uuid:c8c49905-3d5e-43b2-8d09-fabf92d29722" title="link2" location="/networkinterface/urn:uuid:c8c49905-3d5e-43b2-8d09-fabf92d29722" target="//@resources.6">
<kind href="http://schemas.ogf.org/occi/infrastructure#//@kinds[term='networkinterface']"/>
<attributes name="occi.core.id" value="urn:uuid:c8c49905-3d5e-43b2-8d09-fabf92d29722"/>
<attributes name="occi.core.title" value="link2"/>
<attributes name="occi.networkinterface.address" value="10.254.1.8"/>
<parts xsi:type="infrastructure:Ipnetworkinterface" occiNetworkinterfaceAddress="10.254.1.8" occiNetworkinterfaceGateway="10.254.1.254">
<mixin href="http://schemas.ogf.org/occi/infrastructure#//@mixins[term='ipnetworkinterface']"/>
</parts>
</links>
<links xsi:type="infrastructure:Networkinterface" id="urn:uuid:03f91178-136f-4023-876e-84509f8a5a2d" title="monNwLink" target="//@resources.12" occiNetworkinterfaceInterface="100.254.1.35" occiNetworkinterfaceMac="">
<kind href="http://schemas.ogf.org/occi/infrastructure#//@kinds[term='networkinterface']"/>
<attributes name="occi.core.id" value="urn:uuid:03f91178-136f-4023-876e-84509f8a5a2d"/>
<attributes name="occi.core.title" value="monNwLink"/>
<attributes name="occi.networkinterface.address" value="100.254.1.35"/>
<parts xsi:type="infrastructure:Ipnetworkinterface" occiNetworkinterfaceAddress="100.254.1.35" occiNetworkinterfaceGateway="">
<mixin href="http://schemas.ogf.org/occi/infrastructure#//@mixins[term='ipnetworkinterface']"/>
</parts>
</links>
</resources>
<resources xsi:type="platform:Component" id="urn:uuid:f934d445-d0c8-4f2f-8086-d9f1a8255898" title="HWorker" location="/component/urn:uuid:f934d445-d0c8-4f2f-8086-d9f1a8255898/" rlinks="//@resources.3/@links.1" occiComponentStateMessage="">
<kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='component']"/>
<attributes name="occi.core.id" value="urn:uuid:f934d445-d0c8-4f2f-8086-d9f1a8255898"/>
<attributes name="occi.core.title" value="HWorker"/>
<attributes name="occi.core.summary" value=""/>
<attributes name="occi.component.state" value="undeployed"/>
<attributes name="occi.component.state.message" value=""/>
<parts mixin="//@mixins.2"/>
<links xsi:type="placement:Placementlink" id="urn:uuid:ff292f08-d263-41b6-88c8-84d33783b917" title="link1" location="/placementlink/urn:uuid:ff292f08-d263-41b6-88c8-84d33783b917/" target="//@resources.4">
<kind href="http://schemas.modmacao.org/placement#//@kinds[term='placementlink']"/>
<attributes name="occi.core.id" value="urn:uuid:ff292f08-d263-41b6-88c8-84d33783b917"/>
<attributes name="occi.core.title" value="link1"/>
<attributes name="occi.core.target" value="/compute/urn:uuid:2e6a73d0-faaa-476a-bd25-ca461dd166ce/"/>
</links>
</resources>
<resources xsi:type="infrastructure:Network" id="urn:uuid:29d78078-fb4c-47aa-a9af-b8aaf3339591" title="HNetwork" location="/network/urn:uuid:29d78078-fb4c-47aa-a9af-b8aaf3339591/" rlinks="//@resources.0/@links.0 //@resources.4/@links.0" occiNetworkState="active">
<kind href="http://schemas.ogf.org/occi/infrastructure#//@kinds[term='network']"/>
<attributes name="occi.core.id" value="urn:uuid:29d78078-fb4c-47aa-a9af-b8aaf3339591"/>
<attributes name="occi.core.title" value="HNetwork"/>
<attributes name="occi.core.summary" value=""/>
<attributes name="occi.network.vlan" value="0"/>
<attributes name="occi.network.label" value=""/>
<attributes name="occi.network.state" value="active"/>
<attributes name="occi.network.state.message" value=""/>
<parts>
<mixin href="http://schemas.ogf.org/occi/infrastructure#//@mixins[term='ipnetwork']"/>
<attributes name="occi.network.address" value="10.254.1.1/24"/>
</parts>
</resources>
<resources xsi:type="monitoring:Sensor" id="urn:uuid:efb0f50a-7a7c-4153-b939-4846d6554dbb" title="CPUSensor">
<kind href="http://schemas.ugoe.cs.rwm/monitoring#//@kinds[term='sensor']"/>
<attributes name="occi.core.id" value="urn:uuid:efb0f50a-7a7c-4153-b939-4846d6554dbb"/>
<attributes name="occi.core.title" value="CPUSensor"/>
<attributes name="occi.core.summary" value=""/>
<attributes name="occi.app.state" value="undeployed"/>
<attributes name="occi.app.state.message" value=""/>
<links xsi:type="platform:Componentlink" id="urn:uuid:04cf6483-706d-4a2a-9114-9918ab2bb52a" title="link1" target="//@resources.8">
<kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='componentlink']"/>
<attributes name="occi.core.id" value="urn:uuid:04cf6483-706d-4a2a-9114-9918ab2bb52a"/>
<attributes name="occi.core.title" value="link1"/>
</links>
<links xsi:type="platform:Componentlink" id="urn:uuid:9c604867-3135-4fa1-af9e-2bb11018ff5a" title="link2" target="//@resources.9">
<kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='componentlink']"/>
<attributes name="occi.core.id" value="urn:uuid:9c604867-3135-4fa1-af9e-2bb11018ff5a"/>
<attributes name="occi.core.title" value="link2"/>
</links>
<links xsi:type="platform:Componentlink" id="urn:uuid:93f08e31-f350-42b7-a73b-c139eba4a8e3" title="link3" target="//@resources.10">
<kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='componentlink']"/>
<attributes name="occi.core.id" value="urn:uuid:93f08e31-f350-42b7-a73b-c139eba4a8e3"/>
<attributes name="occi.core.title" value="link3"/>
</links>
<links xsi:type="monitoring:Monitorableproperty" id="urn:uuid:ba16f4ee-1601-4192-a259-eae4274aed72" title="CPU" location="" target="//@resources.4" monitoringProperty="CPU" monitoringResult="">
<kind href="http://schemas.ugoe.cs.rwm/monitoring#//@kinds[term='monitorableproperty']"/>
<attributes name="occi.core.id" value="urn:uuid:ba16f4ee-1601-4192-a259-eae4274aed72"/>
<attributes name="occi.core.title" value="CPU"/>
<attributes name="monitoring.property" value="CPU"/>
</links>
</resources>
<resources xsi:type="monitoring:Datagatherer" id="urn:uuid:051affdc-d686-48f8-884c-83fe81718a48" title="Glances" rlinks="//@resources.7/@links.0 //@resources.9/@links.0">
<kind href="http://schemas.ugoe.cs.rwm/monitoring#//@kinds[term='datagatherer']"/>
<attributes name="occi.core.id" value="urn:uuid:051affdc-d686-48f8-884c-83fe81718a48"/>
<attributes name="occi.core.title" value="Glances"/>
<parts mixin="//@mixins.3"/>
<links xsi:type="placement:Placementlink" id="urn:uuid:60cc05ca-4fd7-465b-8fd0-945dcbf8867f" title="link1" target="//@resources.4">
<kind href="http://schemas.modmacao.org/placement#//@kinds[term='placementlink']"/>
<attributes name="occi.core.id" value="urn:uuid:60cc05ca-4fd7-465b-8fd0-945dcbf8867f"/>
<attributes name="occi.core.title" value="link1"/>
</links>
</resources>
<resources xsi:type="monitoring:Dataprocessor" id="urn:uuid:1bda25ab-723b-47e7-9704-5134db26ebdc" title="CPUAggregator" rlinks="//@resources.10/@links.0 //@resources.7/@links.1">
<kind href="http://schemas.ugoe.cs.rwm/monitoring#//@kinds[term='dataprocessor']"/>
<attributes name="occi.core.id" value="urn:uuid:1bda25ab-723b-47e7-9704-5134db26ebdc"/>
<attributes name="occi.core.title" value="CPUAggregator"/>
<parts mixin="//@mixins.4"/>
<links xsi:type="platform:Componentlink" id="urn:uuid:1a821776-7886-4cb4-8b80-46a8403acf40" title="link1" target="//@resources.8">
<kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='componentlink']"/>
<attributes name="occi.core.id" value="urn:uuid:1a821776-7886-4cb4-8b80-46a8403acf40"/>
<attributes name="occi.core.title" value="link1"/>
</links>
<links xsi:type="placement:Placementlink" id="urn:uuid:ff7019e4-a9dc-48dc-83c3-ab77714a25f4" title="link2" target="//@resources.11">
<kind href="http://schemas.modmacao.org/placement#//@kinds[term='placementlink']"/>
<attributes name="occi.core.id" value="urn:uuid:ff7019e4-a9dc-48dc-83c3-ab77714a25f4"/>
<attributes name="occi.core.title" value="link2"/>
</links>
</resources>
<resources xsi:type="monitoring:Resultprovider" id="urn:uuid:588f705e-5279-4847-9337-846af2c86972" title="CPUProvider" rlinks="//@resources.7/@links.2">
<kind href="http://schemas.ugoe.cs.rwm/monitoring#//@kinds[term='resultprovider']"/>
<attributes name="occi.core.id" value="urn:uuid:588f705e-5279-4847-9337-846af2c86972"/>
<attributes name="occi.core.title" value="CPUProvider"/>
<parts mixin="//@mixins.5"/>
<parts xsi:type="monitoring:Occiresultprovider">
<mixin href="http://schemas.ugoe.cs.rwm/monitoring#//@mixins[term='occiresultprovider']"/>
<attributes name="result.provider.endpoint" value="192.168.35.45:8080"/>
</parts>
<links xsi:type="platform:Componentlink" id="urn:uuid:9551c357-59f8-4ac1-8c85-0e886e206b80" title="link1" target="//@resources.9">
<kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='componentlink']"/>
<attributes name="occi.core.id" value="urn:uuid:9551c357-59f8-4ac1-8c85-0e886e206b80"/>
<attributes name="occi.core.title" value="link1"/>
</links>
<links xsi:type="placement:Placementlink" id="urn:uuid:275b5bce-084c-46f0-88bc-1f6f31bf3616" title="link2" target="//@resources.11">
<kind href="http://schemas.modmacao.org/placement#//@kinds[term='placementlink']"/>
<attributes name="occi.core.id" value="urn:uuid:275b5bce-084c-46f0-88bc-1f6f31bf3616"/>
<attributes name="occi.core.title" value="link2"/>
</links>
</resources>
<resources xsi:type="infrastructure:Compute" id="urn:uuid:37829092-c690-494a-98fa-335b2fd660ea" title="MonVm" rlinks="//@resources.9/@links.1 //@resources.10/@links.1" occiComputeState="active" occiComputeHostname="monVM">
<kind href="http://schemas.ogf.org/occi/infrastructure#//@kinds[term='compute']"/>
<attributes name="occi.core.id" value="urn:uuid:37829092-c690-494a-98fa-335b2fd660ea"/>
<attributes name="occi.core.title" value="MonVm"/>
<attributes name="occi.core.summary" value=""/>
<attributes name="occi.compute.architecture" value="x86"/>
<attributes name="occi.compute.cores" value="2"/>
<attributes name="occi.compute.hostname" value="monVM"/>
<attributes name="occi.compute.share" value="0"/>
<attributes name="occi.compute.speed" value="0"/>
<attributes name="occi.compute.memory" value="4096"/>
<attributes name="occi.compute.state" value="active"/>
<attributes name="occi.compute.state.message" value=""/>
<parts>
<mixin href="http://schemas.modmacao.org/openstack/swe#//@mixins[term='ubuntu_xenialxerus']"/>
</parts>
<links xsi:type="infrastructure:Networkinterface" id="urn:uuid:00d6889d-b644-44bf-af13-3fe350e926ed" title="link1" target="//@resources.12">
<kind href="http://schemas.ogf.org/occi/infrastructure#//@kinds[term='networkinterface']"/>
<attributes name="occi.core.id" value="urn:uuid:00d6889d-b644-44bf-af13-3fe350e926ed"/>
<attributes name="occi.core.title" value="link1"/>
<parts xsi:type="infrastructure:Ipnetworkinterface" occiNetworkinterfaceAddress="100.254.1.25">
<mixin href="http://schemas.ogf.org/occi/infrastructure#//@mixins[term='ipnetworkinterface']"/>
</parts>
</links>
</resources>
<resources xsi:type="infrastructure:Network" id="urn:uuid:7a9fca2c-24fb-473c-aa9c-8dc9e68a432a" title="MonitoringNetwork" occiNetworkState="active" rlinks="//@resources.11/@links.0 //@resources.4/@links.1">
<kind href="http://schemas.ogf.org/occi/infrastructure#//@kinds[term='network']"/>
<attributes name="occi.core.id" value="urn:uuid:7a9fca2c-24fb-473c-aa9c-8dc9e68a432a"/>
<attributes name="occi.core.title" value="MonitoringNetwork"/>
<attributes name="occi.core.summary" value=""/>
<attributes name="occi.network.vlan" value="0"/>
<attributes name="occi.network.label" value=""/>
<attributes name="occi.network.state" value="active"/>
<attributes name="occi.network.state.message" value=""/>
<parts>
<mixin href="http://schemas.ogf.org/occi/infrastructure#//@mixins[term='ipnetwork']"/>
<attributes name="occi.network.address" value="100.254.1.1/24"/>
</parts>
</resources>
<mixins name="hJob" scheme="http://schemas.modmacao.org/usermixins#" title="Hjob"/>
<mixins name="hMaster" scheme="http://schemas.modmacao.org/usermixins#" title="HMaster"/>
<mixins name="hWorker" scheme="http://schemas.modmacao.org/usermixins#" title="HWorker"/>
<mixins name="CPUGatherer" scheme="http://schemas.modmacao.org/usermixins#" title="CPUGatherer"/>
<mixins name="CPUProcessor" scheme="http://schemas.modmacao.org/usermixins#" title="CPUProcessor"/>
<mixins name="CPUPublisher" scheme="http://schemas.modmacao.org/usermixins#" title="CPUPublisher"/>
<mixins name="CPUProcessorLocal" scheme="http://schemas.modmacao.org/usermixins#" title="CPUProcessorLocal"/>
</occi:Configuration>
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
<attributes name="occi.core.target" value="/compute/urn:uuid:2e6a73d0-faaa-476a-bd25-ca461dd166ce/"/> <attributes name="occi.core.target" value="/compute/urn:uuid:2e6a73d0-faaa-476a-bd25-ca461dd166ce/"/>
</links> </links>
</resources> </resources>
<resources xsi:type="platform:Application" id="urn:uuid:a4888ba9-a0ea-48f2-a29e-901c876ab42d" title="Hadoopcluster" location="/application/urn:uuid:a4888ba9-a0ea-48f2-a29e-901c876ab42d" occiAppName="" occiAppState="deployed"> <resources xsi:type="platform:Application" id="urn:uuid:a4888ba9-a0ea-48f2-a29e-901c876ab42d" title="Hadoopcluster" location="/application/urn:uuid:a4888ba9-a0ea-48f2-a29e-901c876ab42d" occiAppName="" occiAppState="undeployed">
<kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='application']"/> <kind href="http://schemas.modmacao.org/occi/platform#//@kinds[term='application']"/>
<attributes name="occi.core.id" value="urn:uuid:a4888ba9-a0ea-48f2-a29e-901c876ab42d"/> <attributes name="occi.core.id" value="urn:uuid:a4888ba9-a0ea-48f2-a29e-901c876ab42d"/>
<attributes name="occi.core.title" value="hadoopcluster"/> <attributes name="occi.core.title" value="hadoopcluster"/>
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
<attributes name="occi.core.title" value="link2"/> <attributes name="occi.core.title" value="link2"/>
</links> </links>
</resources> </resources>
<resources xsi:type="infrastructure:Compute" id="urn:uuid:37829092-c690-494a-98fa-335b2fd660ea" title="MonVm" rlinks="//@resources.9/@links.1 //@resources.10/@links.1 //@resources.13/@links.1 //@resources.14/@links.1" occiComputeHostname="monVM" occiComputeState="inactive"> <resources xsi:type="infrastructure:Compute" id="urn:uuid:37829092-c690-494a-98fa-335b2fd660ea" title="MonVm" rlinks="//@resources.9/@links.1 //@resources.10/@links.1 //@resources.13/@links.1 //@resources.14/@links.1" occiComputeHostname="monVM" occiComputeState="active">
<kind href="http://schemas.ogf.org/occi/infrastructure#//@kinds[term='compute']"/> <kind href="http://schemas.ogf.org/occi/infrastructure#//@kinds[term='compute']"/>
<attributes name="occi.core.id" value="urn:uuid:37829092-c690-494a-98fa-335b2fd660ea"/> <attributes name="occi.core.id" value="urn:uuid:37829092-c690-494a-98fa-335b2fd660ea"/>
<attributes name="occi.core.title" value="MonVm"/> <attributes name="occi.core.title" value="MonVm"/>
...@@ -261,7 +261,7 @@ ...@@ -261,7 +261,7 @@
</parts> </parts>
</links> </links>
</resources> </resources>
<resources xsi:type="infrastructure:Network" id="urn:uuid:7a9fca2c-24fb-473c-aa9c-8dc9e68a432a" title="MonitoringNetwork" rlinks="//@resources.11/@links.0 //@resources.4/@links.1" occiNetworkState="inactive"> <resources xsi:type="infrastructure:Network" id="urn:uuid:7a9fca2c-24fb-473c-aa9c-8dc9e68a432a" title="MonitoringNetwork" rlinks="//@resources.11/@links.0 //@resources.4/@links.1" occiNetworkState="active">
<kind href="http://schemas.ogf.org/occi/infrastructure#//@kinds[term='network']"/> <kind href="http://schemas.ogf.org/occi/infrastructure#//@kinds[term='network']"/>
<attributes name="occi.core.id" value="urn:uuid:7a9fca2c-24fb-473c-aa9c-8dc9e68a432a"/> <attributes name="occi.core.id" value="urn:uuid:7a9fca2c-24fb-473c-aa9c-8dc9e68a432a"/>
<attributes name="occi.core.title" value="MonitoringNetwork"/> <attributes name="occi.core.title" value="MonitoringNetwork"/>
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
apt: pkg=openjdk-8-jre-headless state=installed update_cache=true force=yes apt: pkg=openjdk-8-jre-headless state=installed update_cache=true force=yes
- name: download hadoop - name: download hadoop
get_url: url=http://artfiles.org/apache.org/hadoop/common/stable/hadoop-2.9.2.tar.gz dest=/root/hadoop-2.9.2.tar.gz get_url: url=http://artfiles.org/apache.org/hadoop/common/hadoop-2.9.2/hadoop-2.9.2-src.tar.gz dest=/root/hadoop-2.9.2.tar.gz
register: downloaded register: downloaded
- name: unpack hadoop - name: unpack hadoop
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
state: absent state: absent
- name: download hadoop - name: download hadoop
get_url: url=http://artfiles.org/apache.org/hadoop/common/stable/hadoop-2.9.2.tar.gz dest=/root/hadoop-2.9.2.tar.gz get_url: url=http://artfiles.org/apache.org/hadoop/common/hadoop-2.9.2/hadoop-2.9.2.tar.gz dest=/root/hadoop-2.9.2.tar.gz
register: downloaded register: downloaded
- name: unpack hadoop - name: unpack hadoop
......
Role Name
=========
A brief description of the role goes here.
Requirements
------------
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
Role Variables
--------------
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
Dependencies
------------
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
Example Playbook
----------------
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: servers
roles:
- { role: username.rolename, x: 42 }
License
-------
BSD
Author Information
------------------
An optional section for the role authors to include contact information, or a website (HTML is not allowed).
Source diff could not be displayed: it is too large. Options to address this: view the blob.
File deleted
---
# tasks file for wordcount
- block:
- name: enable ubuntu group
group: name=ubuntu state=present
- name: enable ubuntu user
user: name=ubuntu state=present shell=/bin/bash
- name: copy wc.jar to home
copy: src=wc.jar dest=/home/ubuntu/wc.jar
- name: copy ulysses to home
copy: src=ulysses dest=/home/ubuntu/ulysses
when: task == "DEPLOY"
remote_user: ubuntu
- block:
- name: create input directory in hdfs
shell: /opt/hadoop/bin/hdfs dfs -mkdir /input
- name: upload ulysses into hdfs
shell: /opt/hadoop/bin/hdfs dfs -put /home/ubuntu/ulysses /input/ulysses
when: task == "CONFIGURE"
become_user: ubuntu
- block:
- name: Execute wordcount
shell: /opt/hadoop/bin/hadoop jar /home/ubuntu/wc.jar WordCount /input/ulysses output
- name: Download output
shell: /opt/hadoop/bin/hdfs dfs -get output
when: task == "START"
become_user: "ubuntu"
localhost
\ No newline at end of file