Skip to content
Snippets Groups Projects
Commit 53882d05 authored by erbel's avatar erbel
Browse files

Added another scenario

parent aa115821
No related branches found
No related tags found
No related merge requests found
Pipeline #88370 passed
......@@ -39,6 +39,7 @@ To test MOCCI, we provide step-by-step instructions for two example scenarios.
1. [Vertical Scaling](doc/vertical.md): This scenario scales a VM up and down according to its CPU utilization.
2. [Horizontal Scaling](doc/horizontal.md): This scenario dynamically adds and releases worker nodes in a hadoop cluster.
3. [Sensor Creation](doc/own.md): This scenario shows how to add sensors to an OCCI model.
*Note:* Please note that the execution of the example scenarios in an distributed environment, e.g., requires access to it as well as connectors implementing how the differen requests should be handled.
Thus, the provided scenarios are based on monitoring data simulated by the [MOCCI connector dummy](https://gitlab.gwdg.de/rwm/de.ugoe.cs.rwm.mocci/tree/master/de.ugoe.cs.rwm.mocci.connector.dummy).
......
......@@ -20,12 +20,18 @@ If the VM is used: Open a terminal and navigate to the VM's desktop and execute
java -jar initialDeployment.jar
```
After the deployment has been performed you can investigate the deployed OCCI model by opening your browser and query for OCCI entitites:
After the deployment has been performed. The console running the MartServer puts out the simulated monitoring data in the following form:
```
INFO MonProp: CPU, set to: High(ba16f4ee-1601-4192-a259-eae4274aed72)
```
Moreover, you can investigate the deployed OCCI model by opening your browser and query for OCCI entitites:
```
http://localhost:8080/compute
http://localhost:8080/sensor
http://localhost:8080/monitorableproperty
```
The following figure visualized the initially deployed model:
![Init](./src/main/resources/de/ugoe/cs/rwm/mocci/occi/initial.jpg "Init")
## Starting the MAPE-K loop
To start the MAPE-K loop execute MAPE.java as a Java Application.
......
# Sensor Creation
In this scenario the hadoop cluster model gets enhanced to monitor Memory utilization in addition to CPU utilization of worker nodes.
## Enhancing the Model for Simulation Purposes
The following description shows how to adapt the initial deployment ot also monitor memory utilization of the hadoop worker node:
1. Start OCCIWare-Studio.
2. Create a new Sirius Modeling Project
3. Copy the src/main/resources/hadoopClusterCPU.occic file from the MOCCI project into the new project
4. Open the file with the OCCI Model Editor
5. Expand the first item, as well as the Configuration it contains
6. Right click on Configuration->New Child->Resource
1. Set the kind of the new resource to Sensor
2. Right click on the Sensor to add a new link
1. Set the kind of the link to monitorableproperty
2. Set the target of the link to the compute node it should monitor
3. Add a new Attribute to the monitorableproperty link
1. Name it monitoring.property with value Mem
7. Create a ResultProvider in the same way
8. Create a ComponentLink linking the Sensor to the ResultProvider
9. Save the model
Even though the model currently does not consist of all monitoring instruments, and placementlinks, required for an actual deployment, it is sufficient to execute first tests. To test the enhanced model follow the enumerated instructions:
1. Copy the enhanced model to the desktop
2. Open a terminal and navigate to the desktop
3. Start the Mart Server
4. Open another terminal and navigate to the desktop
5. Execute the following command
```
java -jar initialDeployment.jar hadoopClusterCPU.occic
```
Now your enhanced model got deployed.
Next start the added sensor by executing the following REST request.
For example, curl can be used by starting another terminal.
```
curl -v -X POST http://localhost:8080/sensor/sensorid/?action=undeploy -H 'Content-Type: text/occi' -H 'Category: undeploy; scheme="http://schemas.modmacao.org/occi/platform/application/action#"; class="action"'
```
Finally, the added Sensors monitorable property should be filled with simulated monitoring data.
## Adjusting the Model for an actual deployment.
To finish the model you can add DataProcessor and DataGatherer the same way as the ResultProvider was created.
## Visualizing the Model
1. Doubleclick on representations.aird
2. Choose configuration
3. Collapse all elements and reorder them
\ No newline at end of file
......@@ -5,7 +5,7 @@ If that is the case a request against the OCCI API is performed, increasing the
## Deploying the Cluster
First, the hadoop cluster has to be deployed. Therefore, first start the MartServer.
To execute the scenario the hadoop cluster has to be deployed. Therefore, first start the MartServer.
If the getting started VM is used the following script can be executed:
```
./startMART.sh
......@@ -18,12 +18,18 @@ If the VM is used: Open a terminal and navigate to the VM's desktop and execute
java -jar initialDeployment.jar
```
After the deployment has been performed you can investigate the deployed OCCI model by opening your browser and query for OCCI entitites:
After the deployment has been performed. The console running the MartServer puts out the simulated monitoring data in the following form:
```
INFO MonProp: CPU, set to: High(ba16f4ee-1601-4192-a259-eae4274aed72)
```
Moreover, you can investigate the deployed OCCI model by opening your browser and query for OCCI entitites:
```
http://localhost:8080/compute
http://localhost:8080/sensor
http://localhost:8080/monitorableproperty
```
The following figure visualized the initially deployed model:
![Init](./src/main/resources/de/ugoe/cs/rwm/mocci/occi/initial.jpg "Init")
## Starting the Adaptation Script
To start the script execute the vertical.sh script.
......
src/main/resources/de/ugoe/cs/rwm/mocci/occi/initial.jpg

130 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment