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
Commits on Source (109)
Showing
with 622 additions and 251 deletions
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/test/java"/>
<classpathentry kind="src" path="src/main/resources"/>
<classpathentry kind="src" path="src/test/java"/>
<classpathentry kind="src" path="src/test/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
......
image: gradle:alpine
image: gradle:4.10.3-alpine
stages:
- build
- test
- pages
- deploy
variables:
......@@ -14,7 +15,8 @@ before_script:
build:
stage: build
script:
- gradle build
- export VERSION=SNAPSHOT
- gradle assemble
- gradle updateSiteZip
artifacts:
paths:
......@@ -22,34 +24,28 @@ build:
- de.ugoe.cs.rwm.mocci.model.edit/build/libs/*.jar
- de.ugoe.cs.rwm.mocci.model/build/updatesite.zip
expire_in: 1 week
test:
stage: test
script:
- mv src/test/resources/martserver-plugins ~/martserver-plugins/
- gradle check
artifacts:
paths:
- build/reports/
- config/html/
javadoc:
stage: test
script:
gradle javadoc
- export VERSION=SNAPSHOT
- mv src/test/resources/martserver-plugins ~/martserver-plugins/
- gradle check
- gradle jacocoRootReport
- cat build/reports/jacoco/jacocoRootReport/html/index.html
artifacts:
paths:
- build/docs/
- build/reports/
- config/html/
pages:
stage: deploy
stage: pages
script:
- export VERSION=SNAPSHOT
- mkdir public
- mv config/html/* public
- mv de.ugoe.cs.rwm.mocci.model/build/libs/*.jar public/model
- mv de.ugoe.cs.rwm.mocci.model/build/updatesite.zip public/model
- mv de.ugoe.cs.rwm.mocci.model.edit/build/libs/*.jar public/edit
- mv de.ugoe.cs.rwm.mocci.model/build/libs/*.jar public
- mv de.ugoe.cs.rwm.mocci.model/build/updatesite.zip public
artifacts:
paths:
- public
......@@ -60,9 +56,13 @@ pages:
upload:
stage: deploy
script:
- gradle upload
- export VERSION=${CI_COMMIT_TAG}
- echo $VERSION
- gradle upload
only:
- master
- tags
except:
- branches
after_script:
- echo "End CI"
......
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>de.ugoe.cs.rwm.mocci</name>
<comment>Project de.ugoe.cs.rwm.mocci created by Buildship.</comment>
<comment></comment>
<projects>
</projects>
<buildSpec>
......
connection.project.dir=
connection.project.dir=de.ugoe.cs.rwm.mocci.connector.dummy
eclipse.preferences.version=1
Eclipse Public License - v 1.0
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
1. DEFINITIONS
"Contribution" means:
a) in the case of the initial Contributor, the initial code and documentation
distributed under this Agreement, and
b) in the case of each subsequent Contributor:
i) changes to the Program, and
ii) additions to the Program;
where such changes and/or additions to the Program originate from and are
distributed by that particular Contributor. A Contribution 'originates'
from a Contributor if it was added to the Program by such Contributor
itself or anyone acting on such Contributor's behalf. Contributions do not
include additions to the Program which: (i) are separate modules of
software distributed in conjunction with the Program under their own
license agreement, and (ii) are not derivative works of the Program.
"Contributor" means any person or entity that distributes the Program.
"Licensed Patents" mean patent claims licensable by a Contributor which are
necessarily infringed by the use or sale of its Contribution alone or when
combined with the Program.
"Program" means the Contributions distributed in accordance with this
Agreement.
"Recipient" means anyone who receives the Program under this Agreement,
including all Contributors.
2. GRANT OF RIGHTS
a) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free copyright license to
reproduce, prepare derivative works of, publicly display, publicly
perform, distribute and sublicense the Contribution of such Contributor,
if any, and such derivative works, in source code and object code form.
b) Subject to the terms of this Agreement, each Contributor hereby grants
Recipient a non-exclusive, worldwide, royalty-free patent license under
Licensed Patents to make, use, sell, offer to sell, import and otherwise
transfer the Contribution of such Contributor, if any, in source code and
object code form. This patent license shall apply to the combination of
the Contribution and the Program if, at the time the Contribution is
added by the Contributor, such addition of the Contribution causes such
combination to be covered by the Licensed Patents. The patent license
shall not apply to any other combinations which include the Contribution.
No hardware per se is licensed hereunder.
c) Recipient understands that although each Contributor grants the licenses
to its Contributions set forth herein, no assurances are provided by any
Contributor that the Program does not infringe the patent or other
intellectual property rights of any other entity. Each Contributor
disclaims any liability to Recipient for claims brought by any other
entity based on infringement of intellectual property rights or
otherwise. As a condition to exercising the rights and licenses granted
hereunder, each Recipient hereby assumes sole responsibility to secure
any other intellectual property rights needed, if any. For example, if a
third party patent license is required to allow Recipient to distribute
the Program, it is Recipient's responsibility to acquire that license
before distributing the Program.
d) Each Contributor represents that to its knowledge it has sufficient
copyright rights in its Contribution, if any, to grant the copyright
license set forth in this Agreement.
3. REQUIREMENTS
A Contributor may choose to distribute the Program in object code form under
its own license agreement, provided that:
a) it complies with the terms and conditions of this Agreement; and
b) its license agreement:
i) effectively disclaims on behalf of all Contributors all warranties
and conditions, express and implied, including warranties or
conditions of title and non-infringement, and implied warranties or
conditions of merchantability and fitness for a particular purpose;
ii) effectively excludes on behalf of all Contributors all liability for
damages, including direct, indirect, special, incidental and
consequential damages, such as lost profits;
iii) states that any provisions which differ from this Agreement are
offered by that Contributor alone and not by any other party; and
iv) states that source code for the Program is available from such
Contributor, and informs licensees how to obtain it in a reasonable
manner on or through a medium customarily used for software exchange.
When the Program is made available in source code form:
a) it must be made available under this Agreement; and
b) a copy of this Agreement must be included with each copy of the Program.
Contributors may not remove or alter any copyright notices contained
within the Program.
Each Contributor must identify itself as the originator of its Contribution,
if
any, in a manner that reasonably allows subsequent Recipients to identify the
originator of the Contribution.
4. COMMERCIAL DISTRIBUTION
Commercial distributors of software may accept certain responsibilities with
respect to end users, business partners and the like. While this license is
intended to facilitate the commercial use of the Program, the Contributor who
includes the Program in a commercial product offering should do so in a manner
which does not create potential liability for other Contributors. Therefore,
if a Contributor includes the Program in a commercial product offering, such
Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
every other Contributor ("Indemnified Contributor") against any losses,
damages and costs (collectively "Losses") arising from claims, lawsuits and
other legal actions brought by a third party against the Indemnified
Contributor to the extent caused by the acts or omissions of such Commercial
Contributor in connection with its distribution of the Program in a commercial
product offering. The obligations in this section do not apply to any claims
or Losses relating to any actual or alleged intellectual property
infringement. In order to qualify, an Indemnified Contributor must:
a) promptly notify the Commercial Contributor in writing of such claim, and
b) allow the Commercial Contributor to control, and cooperate with the
Commercial Contributor in, the defense and any related settlement
negotiations. The Indemnified Contributor may participate in any such claim at
its own expense.
For example, a Contributor might include the Program in a commercial product
offering, Product X. That Contributor is then a Commercial Contributor. If
that Commercial Contributor then makes performance claims, or offers
warranties related to Product X, those performance claims and warranties are
such Commercial Contributor's responsibility alone. Under this section, the
Commercial Contributor would have to defend claims against the other
Contributors related to those performance claims and warranties, and if a
court requires any other Contributor to pay any damages as a result, the
Commercial Contributor must pay those damages.
5. NO WARRANTY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
Recipient is solely responsible for determining the appropriateness of using
and distributing the Program and assumes all risks associated with its
exercise of rights under this Agreement , including but not limited to the
risks and costs of program errors, compliance with applicable laws, damage to
or loss of data, programs or equipment, and unavailability or interruption of
operations.
6. DISCLAIMER OF LIABILITY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION
LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGES.
7. GENERAL
If any provision of this Agreement is invalid or unenforceable under
applicable law, it shall not affect the validity or enforceability of the
remainder of the terms of this Agreement, and without further action by the
parties hereto, such provision shall be reformed to the minimum extent
necessary to make such provision valid and enforceable.
If Recipient institutes patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Program itself
(excluding combinations of the Program with other software or hardware)
infringes such Recipient's patent(s), then such Recipient's rights granted
under Section 2(b) shall terminate as of the date such litigation is filed.
All Recipient's rights under this Agreement shall terminate if it fails to
comply with any of the material terms or conditions of this Agreement and does
not cure such failure in a reasonable period of time after becoming aware of
such noncompliance. If all Recipient's rights under this Agreement terminate,
Recipient agrees to cease use and distribution of the Program as soon as
reasonably practicable. However, Recipient's obligations under this Agreement
and any licenses granted by Recipient relating to the Program shall continue
and survive.
Everyone is permitted to copy and distribute copies of this Agreement, but in
order to avoid inconsistency the Agreement is copyrighted and may only be
modified in the following manner. The Agreement Steward reserves the right to
publish new versions (including revisions) of this Agreement from time to
time. No one other than the Agreement Steward has the right to modify this
Agreement. The Eclipse Foundation is the initial Agreement Steward. The
Eclipse Foundation may assign the responsibility to serve as the Agreement
Steward to a suitable separate entity. Each new version of the Agreement will
be given a distinguishing version number. The Program (including
Contributions) may always be distributed subject to the version of the
Agreement under which it was received. In addition, after a new version of the
Agreement is published, Contributor may elect to distribute the Program
(including its Contributions) under the new version. Except as expressly
stated in Sections 2(a) and 2(b) above, Recipient receives no rights or
licenses to the intellectual property of any Contributor under this Agreement,
whether expressly, by implication, estoppel or otherwise. All rights in the
Program not expressly granted under this Agreement are reserved.
This Agreement is governed by the laws of the State of New York and the
intellectual property laws of the United States of America. No party to this
Agreement will bring a legal action under this Agreement more than one year
after the cause of action arose. Each party waives its rights to a jury trial in
any resulting litigation.
# MOCCI
[![build status](https://gitlab.gwdg.de/rwm/de.ugoe.cs.rwm.mocci/badges/master/pipeline.svg)](https://gitlab.gwdg.de/rwm/de.ugoe.cs.rwm.mocci/commits/master)
MOCCI is an extension for the [Open Cloud Computing Interface (OCCI)](http://occi-wg.org/about/specification/) to enable a model-driven management of monitoring devices in the cloud, as well as storing their results within an OCCI-compliant runtime model. Together with other tools from the OCCI ecosystem it provides a testing and execution environment for self-adaptive systems with an EMF-based architecture runtime model ([Snapshot in JSON format](./doc/browser.png)). In the following you will find a getting started guide in which a preconfigured VirtualBox image is downloaded to perform example scenarios and an tutorial on how to enrich existing OCCI models with monitoring functionality. Moreover, an introduction to MOCCI's components is provided, as well as links and description on how to integrate MOCCI with other pre-existing tooling from the OCCI ecosystem. The paper submitted to this artifact and the VirtualBox image can be found [here](https://owncloud.gwdg.de/index.php/s/5u2ddnyyNlzecM5) with the password being mocci.
## Getting Started
To get started with MOCCI we provide a hands on experience in form of a VirtualBox image in which everything required is already configured and ready to go.
Alternatively, to manually setup the single components instructions can be found at the end of this document.
### Download VirtualBox Image
To get a quick start into MOCCI download the VM image (Mocci.ova) located here:
```
https://owncloud.gwdg.de/index.php/s/5u2ddnyyNlzecM5
password: mocci
```
This image contains a version of OCCI-Studio with the MoDMaCAO and MOCCI plugins pre-installed.
Moreover, it contains a checked out version of MOCCI and a local version of the MARTserver using dummy connectors.
After the download has finished, open VirtualBox and import the virtual appliance:
1. Click on File->Import Appliance...
2. Choose the destination of the downloaded image.
3. Adjust the appliance settings according to your System.
1. For a smooth experience 8Gb Ram, and 2 CPUs are recommended.
4. Press Import.
Next start the Virtual Machine:
1. Choose the recently imported VM and press Start.
2. The username, and password are both: mocci
### Execute Step-by-step Example Scenarios and Tutorials
To learn the ropes of MOCCI, we provide step-by-step instructions for three example scenarios, which are based on the same initial deployment model.
It is recommended to execute the tutorials and examples in the following order:
1. [Initial Deployment](doc/initial.md): This tutorial demonstrates how to deploy an initial cloud application getting monitored by MOCCI.
2. [Vertical Scaling](doc/vertical.md): This scenario scales a VM in the initial deployment up and down according to its CPU utilization.
3. [Horizontal Scaling](doc/horizontal.md): This scenario dynamically adds and releases worker nodes in the hadoop cluster of the initial deployment.
4. [Sensor Creation](doc/own.md): This tutorial shows how to add sensors to an OCCI model.
## MOCCI Components, Documentation, and Related Artifacts
MOCCI itself is a monitoring extension that in combination with pre-existing software from the OCCI ecosystem allows for an easy development and testing of self-adaptation engines for cloud systems.
This section provides an overview of MOCCI's components, as well as other tools used to develop and perform the example scenarios.
### MOCCI (artifact)
MOCCI consists of three main components. The metamodel extension for OCCI, a connector responsible to deploy, configure, and manage arbitrary sensors and monitoring devices in the cloud using configuration management scripts, and a dummy connector simulating user defined monitoring results for test purposes. Descriptions of the single components can be found via the following links:
In addition to the getting started and the example scenarios discussed in this document, the main components of MOCCI are represented by the:
1. [Monitoring Extension](https://gitlab.gwdg.de/rwm/de.ugoe.cs.rwm.mocci/tree/master/de.ugoe.cs.rwm.mocci.model)
2. [Monitoring Connector](https://gitlab.gwdg.de/rwm/de.ugoe.cs.rwm.mocci/tree/master/de.ugoe.cs.rwm.mocci.connector)
3. [Monitoring Dummy Connector](https://gitlab.gwdg.de/rwm/de.ugoe.cs.rwm.mocci/tree/master/de.ugoe.cs.rwm.mocci.connector.dummy)
### OCCI-Studio and MoDMaCAO (pre-existing Software from the OCCI ecosystem)
[OCCI-Studio](https://github.com/occiware/OCCI-Studio) is an IDE providing many convenient tools to develop around OCCI. For example, it provides a model editor, graphically and textually. Moreover, it allows to design OCCI extensions and automatically generate code from it.
In addition to OCCI-Studio the [Model-Driven Configuration Management of Cloud Applications with OCCI (MoDMaCAO)](https://github.com/occiware/MoDMaCAO) extension suite is needed.
[Documentation on how to setup and configure OCCI-Studio with MOCCI](doc/studio.md)
### MartServer (pre-existing Software from the OCCI ecosystem)
The [MartServer](https://github.com/occiware/MartServer) represents the OCCI interface to which requests are send in order to build and monitor the cloud application.
This server is easy to extend by plugging in connectors created for modeled OCCI extensions.
[Documentation on how to setup and configure the MartServer](doc/openstack.md)
*Note:* Please note that the execution of the example scenarios in an distributed environment requires access and connectors to the cloud.
Thus, the provided scenarios in the getting started VM is only executed 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).
// Apply the java-library plugin to add support for Java Library
apply plugin: 'eclipse'
apply plugin: 'java'
apply plugin: 'checkstyle'
apply plugin: 'findbugs'
apply plugin: 'maven'
apply plugin: "com.github.psxpaul.execfork"
apply plugin: 'jacoco'
apply plugin: 'com.github.johnrengelman.shadow'
ext {
tocciVersion = '1.0.1'
docciVersion = '1.0.4'
cocciVersion = '1.0.0'
}
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.com.github.psxpaul:gradle-execfork-plugin:0.1.8"
classpath "com.github.jengelman.gradle.plugins:shadow:4.0.3"
}
}
subprojects {
allprojects {
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'maven'
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
repositories {
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.com.github.psxpaul:gradle-execfork-plugin:0.1.8"
}
}
mavenCentral()
maven {
url "https://nexus.informatik.uni-goettingen.de/content/repositories/thirdparty/"
}
maven {
url "https://nexus.informatik.uni-goettingen.de/content/repositories/rwm/"
}
}
sourceSets {
startMartServer {
resources {
srcDir 'src/test/resources'
javadoc {
source = sourceSets.main.allJava
classpath = configurations.compile
failOnError = true
}
test {
testLogging.showStandardStreams = true
testLogging {
exceptionFormat = 'full'
}
}
}
}
configure([project(':de.ugoe.cs.rwm.mocci.connector'), project(':de.ugoe.cs.rwm.mocci.connector.dummy'), rootProject]) {
apply plugin: 'checkstyle'
apply plugin: 'findbugs'
apply plugin: 'jacoco'
checkstyle {
toolVersion = '8.2'
configFile = rootProject.file('config/checkstyle/checkstyle.xml')
configProperties = [
'checkstyle.cache.file': "${buildDir}/checkstyle.cache",
]
ignoreFailures = true
showViolations = true
}
// In this section you declare where to find the dependencies of your project
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
//mavenLocal()
mavenCentral()
jcenter()
maven {
url "https://nexus.informatik.uni-goettingen.de/content/repositories/thirdparty/"
findbugs {
sourceSets = [sourceSets.main]
ignoreFailures = true
}
maven {
url "https://nexus.informatik.uni-goettingen.de/content/repositories/rwm/"
tasks.withType(FindBugs) {
reports {
xml.enabled false
html.enabled true
}
}
test.finalizedBy jacocoTestReport
jacoco {
toolVersion = "0.8.1"
}
flatDir {
dirs 'lib'
jacocoTestReport {
additionalSourceDirs = files(sourceSets.main.allSource.srcDirs)
sourceDirectories = files(sourceSets.main.allSource.srcDirs)
classDirectories = files(sourceSets.main.output)
reports {
xml.enabled false
csv.enabled false
}
}
}
dependencies {
//Nexus
compile "org.eclipse.uml2:org.eclipse.uml2.uml:4.1.2"
//runtime?
compile "org.eclipse.uml2:org.eclipse.uml2.types:1.1.0"
compile "org.eclipse.uml2:org.eclipse.uml2.common:1.8.2"
compile group: 'org.eclipse.ocl', name: 'pivot', version: '1.3.0'
//occiware
compile group: 'org.eclipse.cmf.occi', name: 'core', version: '1.0.0'
compile group: 'org.eclipse.cmf.occi', name: 'infrastructure', version: '1.0.0'
compile group: 'org.eclipse.cmf.occi', name: 'crtp', version: '1.0.0'
//own
compile group: 'de.ugoe.cs.rwm.pog', name: 'model', version: '1.0.0'
//compile group: 'de.ugoe.cs.rwm.pcg', name: 'model', version: '1.0.0'
compile group: 'de.ugoe.cs.rwm', name: 'tocci', version: '1.0.0'
compile group: 'de.ugoe.cs.rwm', name: 'cocci', version: '1.0.0'
compile group: 'de.ugoe.cs.rwm', name: 'docci', version: '1.0.0', changing: true
compile group: 'de.ugoe.cs.rwm.wocci', name: 'model', version: '1.0.0'
//modmacao
compile group: 'org.modmacao', name: 'core', version: '1.0.0'
compile group: 'org.modmacao', name: 'placement', version: '1.0.0'
compile group: 'org.modmacao.occi', name: 'platform', version: '1.0.0'
compile group: 'org.modmacao.openstack', name: 'runtime', version: '1.0.0'
compile group: 'org.modmacao.openstack.swe', name: 'runtime', version: '1.0.0'
compile group: 'org.modmacao', name: 'ansible', version:'1.0.0'
//maven
compile group: 'org.eclipse.epsilon', name: 'epsilon-core', version: '1.4.0'
compile group: 'org.eclipse.epsilon', name: 'epsilon-emf', version: '1.4.0'
compile group: 'log4j', name: 'log4j', version: '1.2.17'
compile group: 'com.google.guava', name: 'guava', version: '25.1-jre'
compile group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.11.0'
compile "org.eclipse.core:org.eclipse.core.runtime:3.7.0"
compile group: 'com.jcraft', name: 'jsch', version: '0.1.54'
compile group: 'org.json', name: 'json', version: '20180130'
compile group: 'commons-codec', name: 'commons-codec', version: '1.9'
testCompile group: 'junit', name: 'junit', version: '4.12'
//testImplementation 'junit:junit:4.12'
sourceSets {
startMartServer {
resources {
srcDir 'src/test/resources'
}
}
}
eclipse.classpath.file.beforeMerged { classpath -> classpath.entries.clear() }
project(':de.ugoe.cs.rwm.mocci.model.edit') {
dependencies {
dependencies {
//occiware
compile group: 'org.eclipse.cmf.occi', name: 'core', version: '1.0.0'
compile group: 'org.eclipse.cmf.occi', name: 'infrastructure', version: '1.0.0'
compile group: 'org.eclipse.cmf.occi', name: 'crtp', version: '1.0.0'
compile group: 'org.modmacao', name: 'core', version: '1.0.0'
compile group: 'org.modmacao', name: 'placement', version: '1.0.0'
compile group: 'org.modmacao.occi', name: 'platform', version: '1.0.0'
compile group: 'org.modmacao.openstack', name: 'runtime', version: '1.0.1'
compile group: 'org.modmacao.openstack.swe', name: 'runtime', version: '1.0.0'
compile group: 'org.modmacao', name: 'ansible', version: '1.0.1'
compile group: 'org.eclipse.cmf.occi', name: 'docker', version: '1.0.0'
//own
compile group: 'de.ugoe.cs.rwm.domain', name: 'workload', version: '1.0.1'
compile group: 'de.ugoe.cs.rwm', name: 'cocci', version: cocciVersion
compile group: 'de.ugoe.cs.rwm', name: 'docci', version: docciVersion
compile group: 'de.ugoe.cs.rwm', name: 'tocci', version: tocciVersion
compile group: 'de.ugoe.cs.rwm.pog', name: 'model', version: '1.0.0'
//compile group: 'de.ugoe.cs.rwm.mocci', name: 'model', version: '1.0.0'
compile project(':de.ugoe.cs.rwm.mocci.model')
}
}
configurations.all {
// Check for updates every build
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
//maven
compile group: 'log4j', name: 'log4j', version: '1.2.17'
compile group: 'com.google.guava', name: 'guava', version: '25.1-jre'
compile group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: '2.11.0'
compile "org.eclipse.core:org.eclipse.core.runtime:3.7.0"
compile group: 'com.googlecode.json-simple', name: 'json-simple', version: '1.1.1'
compile group: 'com.jcraft', name: 'jsch', version: '0.1.54'
javadoc {
source = sourceSets.main.allJava
classpath = configurations.compile
failOnError = true
//Nexus
compile "org.eclipse.uml2:org.eclipse.uml2.uml:4.1.2"
//runtime?
compile "org.eclipse.uml2:org.eclipse.uml2.types:1.1.0"
compile "org.eclipse.uml2:org.eclipse.uml2.common:1.8.2"
compile group: 'org.eclipse.ocl', name: 'pivot', version: '1.3.0'
testCompile group: 'junit', name: 'junit', version: '4.12'
}
test {
exclude 'de/ugoe/cs/rwm/mocci/live/**'
testLogging.showStandardStreams = true
testLogging {
exceptionFormat = 'full'
project(':de.ugoe.cs.rwm.mocci.model.edit') {
dependencies {
compile project(':de.ugoe.cs.rwm.mocci.model')
}
}
tasks.test.dependsOn("startMartServer")
test.finalizedBy jacocoTestReport
jacoco {
toolVersion = "0.8.1"
project(':de.ugoe.cs.rwm.mocci.connector') {
dependencies {
compile project(':de.ugoe.cs.rwm.mocci.model')
}
}
jacocoTestReport {
reports {
xml.enabled false
csv.enabled false
html.destination file("${buildDir}/reports/jacoco")
project(':de.ugoe.cs.rwm.mocci.connector.dummy') {
dependencies {
compile project(':de.ugoe.cs.rwm.mocci.model')
}
}
findbugs {
sourceSets = [sourceSets.main]
ignoreFailures = false
jar {
manifest {
attributes 'Main-Class': 'de.ugoe.cs.rwm.mocci.MAPE'
}
}
checkstyle {
toolVersion = "8.7"
sourceSets = [sourceSets.main]
tasks.shadowJar.dependsOn("build")
configurations.all {
resolutionStrategy.preferProjectModules()
}
checkstyleMain {
ignoreFailures = true
test {
exclude 'de/ugoe/cs/rwm/mocci/live/**'
//exclude 'de/ugoe/cs/rwm/mocci/**'
}
tasks.test.dependsOn("startMartServer")
tasks.withType(FindBugs) {
reports {
xml.enabled false
html.enabled true
}
}
task startMartServer(type: com.github.psxpaul.task.JavaExecFork) {
classpath = files("src/test/resources/org.occiware.mart.jetty.jar")
main = 'org.occiware.mart.jetty.MartServer'
standardOutput = "$buildDir/mart.log"
waitForPort = 8080
stopAfter = test
}
task jacocoRootReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
dependsOn = subprojects.test
additionalSourceDirs = files([project(':de.ugoe.cs.rwm.mocci.connector.dummy'), rootProject].sourceSets.main.allSource.srcDirs)
sourceDirectories = files([project(':de.ugoe.cs.rwm.mocci.connector.dummy'), rootProject].sourceSets.main.allSource.srcDirs)
classDirectories = files([project(':de.ugoe.cs.rwm.mocci.connector.dummy'), rootProject].sourceSets.main.output)
executionData = files([project(':de.ugoe.cs.rwm.mocci.connector.dummy'), rootProject].jacocoTestReport.executionData)
reports {
xml.enabled false
csv.enabled false
}
}
uploadArchives {
repositories {
mavenDeployer {
repository(url: "https://nexus.informatik.uni-goettingen.de/content/repositories/rwm/") {
authentication(userName: System.getenv('NEXUSUSER'), password: System.getenv('NEXUSPASSWORD'))
mavenDeployer {
repository(url: "https://nexus.informatik.uni-goettingen.de/content/repositories/rwm/") {
authentication(userName: System.getenv('NEXUSUSER'), password: System.getenv('NEXUSPASSWORD'))
}
if (System.getenv('VERSION') != null) {
pom.version = System.getenv('VERSION')
println "Version is set to: " + System.getenv('VERSION')
}
pom.version = "1.0.0"
pom.artifactId = "mocci"
pom.groupId = "de.ugoe.cs.rwm"
}
pom.version = "SNAPSHOT"
pom.artifactId = "mocci"
pom.groupId = "de.ugoe.cs.rwm"
}
}
}
......@@ -4,9 +4,6 @@
"http://checkstyle.sourceforge.net/dtds/configuration_1_3.dtd">
<module name="Checker">
<property name="charset" value="UTF-8"/>
<module name="JavadocPackage"/>
<module name="TreeWalker">
<module name="RegexpSinglelineJava">
<property name="format" value="^\t* "/>
......@@ -16,7 +13,8 @@
<module name="AvoidStarImport">
<property name="excludes" value="java.io,java.util,java.util.concurrent,com.google.common.graph,
org.apache.bcel.classfile,org.mongodb.morphia.annotations,de.ugoe.cs.comfort.data.models,
org.apache.bcel.generic,org.jacoco.core.data,com.github.javaparser.ast.stmt" />
org.apache.bcel.generic,org.jacoco.core.data,com.github.javaparser.ast.stmt,
org.eclipse.cmf.occi.core"/>
</module>
<module name="ConstantName"/>
<module name="EmptyBlock">
......@@ -32,10 +30,6 @@
<property name="allowByTailComment" value="true"/>
<property name="allowNonPrintableEscapes" value="true"/>
</module>
<module name="LineLength">
<property name="max" value="150"/>
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
</module>
<module name="OneTopLevelClass"/>
<module name="NeedBraces"/>
<module name="NoLineWrap"/>
......@@ -48,12 +42,14 @@
<module name="LeftCurly"/>
<module name="RightCurly">
<property name="id" value="RightCurlySame"/>
<property name="tokens" value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_DO"/>
<property name="tokens"
value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_DO"/>
</module>
<module name="RightCurly">
<property name="id" value="RightCurlyAlone"/>
<property name="option" value="alone"/>
<property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, STATIC_INIT, INSTANCE_INIT"/>
<property name="tokens"
value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, STATIC_INIT, INSTANCE_INIT"/>
</module>
<module name="OneStatementPerLine"/>
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="generator" content="GitLab Pages">
<title>MOCCI Model Edit</title>
<link rel="stylesheet" href="../../style.css">
</head>
<body>
<center>
<div class="navbar">
<a href="./findbugs/main.html/">Findbugs</a>
<a href="./checkstyle/main.html/">Checkstyle</a>
<a href="./tests/test/index.html">Test Reports</a>
<a href="./jacoco/index.html">JaCoCo</a>
<a href="./javadoc/index.html">Javadoc</a>
<b><a href="./de.ugoe.cs.rwm.mocci.model.edit.jar">Download Jar</a></b>
</div>
<h1>MOCCI Model Edit Report</h1>
<p>
This is a small report navigation page for the Mocci model edit project.
</p>
<p>
Other subprojects used by MOCCI:
<ul>
<li><a href="https://rwm.pages.gwdg.de/de.ugoe.cs.rwm.mocci/index.hmtl">MOCCI</a></li>
<li><a href="https://rwm.pages.gwdg.de/de.ugoe.cs.rwm.wocci/index.hmtl">WOCCI</a></li>
<li><a href="https://rwm.pages.gwdg.de/de.ugoe.cs.rwm.tocci/index.hmtl">TOCCI</a></li>
<li><a href="https://rwm.pages.gwdg.de/de.ugoe.cs.rwm.cocci/index.hmtl">COCCI</a></li>
<li><a href="https://rwm.pages.gwdg.de/de.ugoe.cs.rwm.docci/index.hmtl">DOCCI</a></li>
</ul>
</body>
</center>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="generator" content="GitLab Pages">
<title>MOCCI</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<center>
<div class="navbar">
<a href="./model/index.html/">Model</a>
<a href="./edit/index.html/">Edit</a>
</div>
<h1>MOCCI Report</h1>
<p>
This is a small report navigation page for the MOCCI project.
</p>
<p>
Other subprojects used by MOCCI:
<ul>
<li><a href="https://rwm.pages.gwdg.de/de.ugoe.cs.rwm.tocci/index.hmtl">TOCCI</a></li>
<li><a href="https://rwm.pages.gwdg.de/de.ugoe.cs.rwm.cocci/index.hmtl">COCCI</a></li>
<li><a href="https://rwm.pages.gwdg.de/de.ugoe.cs.rwm.docci/index.hmtl">DOCCI</a></li>
<li><a href="https://rwm.pages.gwdg.de/de.ugoe.cs.rwm.wocci/index.hmtl">WOCCI</a></li>
</ul>
</body>
</center>
</html>
......@@ -3,25 +3,20 @@
<head>
<meta charset="utf-8">
<meta name="generator" content="GitLab Pages">
<title>MOCCI Model</title>
<link rel="stylesheet" href="../../style.css">
<title>MOCCI Extension Model</title>
<link rel="stylesheet" href="./style.css">
</head>
<body>
<center>
<div class="navbar">
<a href="./findbugs/main.html/">Findbugs</a>
<a href="./checkstyle/main.html/">Checkstyle</a>
<a href="./tests/test/index.html">Test Reports</a>
<a href="./jacoco/index.html">JaCoCo</a>
<a href="./javadoc/index.html">Javadoc</a>
<b><a href="../de.ugoe.cs.rwm.mocci.model.jar">Download Jar</a></b>
<b><a href="../updatesite.zip">Download Eclipse Plugin Archive</a></b>
<b><a href="./de.ugoe.cs.rwm.mocci.model.jar">Download Jar</a></b>
<b><a href="./updatesite.zip">Download Eclipse Plugin Archive</a></b>
</div>
<h1>WOCCI Model Report</h1>
<h1>MOCCI Model Report</h1>
<p>
This is a small report navigation page for the Mocci model project.
This is a small report navigation page for the monitoring extension model project.
</p>
<p>
Other subprojects used by MOCCI:
......
/build/
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>de.ugoe.cs.rwm.mocci.model.examples</name>
<name>de.ugoe.cs.rwm.mocci.connector.dummy</name>
<comment></comment>
<projects>
</projects>
......@@ -15,11 +15,6 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
......@@ -32,9 +27,8 @@
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
</projectDescription>
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: de.ugoe.cs.rwm.mocci.connector.dummy
Bundle-SymbolicName: de.ugoe.cs.rwm.mocci.connector.dummy;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-ClassPath: .
Bundle-Vendor: OCCIware
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Require-Bundle: org.slf4j.api,
org.eclipse.cmf.occi.core,
de.ugoe.cs.rwm.mocci.model,
org.modmacao.core
Export-Package: de.ugoe.cs.rwm.mocci.connector
# Monitoring Dummy Connector
Each element in the monitoring extension has a single file in the connector implementing how to react on different REST requests addressing the corresponding OCCI element.
This dummy is especially useful for testing purposes. Compared to the [connector](https://gitlab.gwdg.de/rwm/de.ugoe.cs.rwm.mocci/tree/master/de.ugoe.cs.rwm.mocci.connector) for an actual deployment of sensors, a link to configuration management scripts is not necessary in order to get monitoring data.
As soon as a resultprovider is started monitoring results are simulated are passed to the monitorableproperty element of the sensor containing the resultprovider.
The simulated values are easy to adjust and does not require a recompilation of the connector, as only the resultprovider.properties file within the connector has to be modified.
The skeleton for the connector of the OCCI monitoring extension is generated using [OCCI-Studio](https://github.com/occiware/OCCI-Studio).
## Adjusting the Simulation
To configure the simulation of monitoring results the following steps have to be performed.
1. Navigate to ~/martserver-plugins
2. Open the de.ugoe.cs.rwm.mocci.connecter.dummy.jar with an archive manager.
3. Doubleclick on the resultprovider.properties file
4. Adjust the values to your liking
The adjustment of the file itself is best explained with a small example:
As default the file contains the following:
```
CPU = None,Low,Medium,High,Critical,5000
```
Hereby, the following information can be adjusted:
* The first string (CPU): represents the monitorable.property to be adjusted by the simulation.
* The last integer (5000): represents the interval in milliseconds in which a new monitoring.result is written.
* Every string between (None-Critical): represents the values to be filled into the monitoring.result property.
For example, to additionally generate monitoring results for MonitorableProperties having its monitoring.property set to Mem, the file could look like this:
```
CPU = None,Low,Medium,High,Critical,5000
Mem = Save,Alert,10000
```
dependencies {
//Nexus
compile group: 'org.eclipse.ocl', name: 'pivot', version: '1.3.0'
//occiware
compile group: 'org.eclipse.cmf.occi', name: 'core', version: '1.0.0'
compile group: 'org.modmacao.occi', name: 'platform', version: '1.0.0'
compile group: 'org.modmacao', name: 'cm', version: '1.0.0'
compile group: 'org.modmacao.core', name: 'connector', version : '1.0.0'
compile group: 'commons-io', name: 'commons-io', version: '2.6'
//maven
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
compile group: 'org.eclipse.emf', name: 'org.eclipse.emf.ecore', version: '2.15.0'
compile group: 'org.eclipse.emf', name: 'org.eclipse.emf.ecore.xmi', version: '2.15.0'
testCompile group: 'junit', name: 'junit', version: '4.12'
}
sourceSets {
main {
java {
srcDir 'src-gen'
}
//output.classesDir = "$workDir/client/program"
}
test {
java.srcDir 'src-test'
}
}
processResources {
from("."){
include("plugin.xml")
include("resultprovider.properties")
}
}
uploadArchives {
repositories {
mavenDeployer {
repository(url: "https://nexus.informatik.uni-goettingen.de/content/repositories/rwm/") {
authentication(userName: System.getenv('NEXUSUSER'), password: System.getenv('NEXUSPASSWORD'))
}
if (System.getenv('VERSION') != null) {
pom.version = System.getenv('VERSION')
println "Version is set to: " + System.getenv('VERSION')
}
pom.version = "SNAPSHOT"
pom.artifactId = "connector"
pom.groupId = "de.ugoe.cs.rwm.mocci"
}
}
}
# Copyright (c) 2016-2017 Inria
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# - Philippe Merle <philippe.merle@inria.fr>
# - Faiez Zalila <faiez.zalila@inria.fr>
#
source.. = src-gen/
output.. = bin/
bin.includes = META-INF/, plugin.xml, .
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<!--
Copyright (c) 2016-2017 Inria
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html
Contributors:
- Philippe Merle <philippe.merle@inria.fr>
- Faiez Zalila <faiez.zalila@inria.fr>
-->
<plugin>
<!-- Register the factory of this connector. -->
<extension point="org.eclipse.emf.ecore.factory_override">
<factory
uri="http://schemas.ugoe.cs.rwm/monitoring/ecore"
class="de.ugoe.cs.rwm.mocci.connector.ConnectorFactory"/>
</extension>
</plugin>