Permalink
Browse files

open source release of CloudML

  • Loading branch information...
brice-morin committed May 15, 2013
1 parent 6016120 commit 39802ad3c237dbd9951d77a1078c70d116de782d
Showing with 10,955 additions and 0 deletions.
  1. +14 −0 .gitignore
  2. +10 −0 HOW_TO_RELEASE.txt
  3. +165 −0 LICENSE.txt
  4. +4 −0 codecs/README.md
  5. +32 −0 codecs/commons/pom.xml
  6. +60 −0 codecs/commons/src/main/java/org/cloudml/codecs/commons/Codec.java
  7. +40 −0 codecs/json/pom.xml
  8. +63 −0 codecs/json/src/main/java/org/cloudml/codecs/JsonCodec.java
  9. +45 −0 codecs/jung/pom.xml
  10. +80 −0 codecs/jung/src/main/java/org/cloudml/codecs/JungCodec.java
  11. +131 −0 codecs/kmf/metamodel/CloudML.ecore
  12. +181 −0 codecs/kmf/pom.xml
  13. +579 −0 codecs/kmf/src/main/java/org/cloudml/codecs/KMFBridge.java
  14. +24 −0 codecs/pom.xml
  15. +113 −0 codecs/xmi/metamodel/CloudML.ecore
  16. +37 −0 codecs/xmi/pom.xml
  17. +73 −0 codecs/xmi/src/main/java/org/cloudml/codecs/XmiCodec.java
  18. +4 −0 deployer/README.md
  19. +86 −0 deployer/pom.xml
  20. +210 −0 deployer/src/main/java/org/cloudml/deployer/CloudAppDeployer.java
  21. +321 −0 deployer/src/main/java/org/cloudml/deployer/JCloudsConnector.java
  22. +86 −0 deployer/src/main/java/org/cloudml/deployer/SSHConnector.java
  23. +58 −0 facade/pom.xml
  24. +65 −0 facade/src/main/java/org/cloudml/facade/CloudML.java
  25. +540 −0 facade/src/main/java/org/cloudml/facade/Facade.java
  26. +52 −0 facade/src/main/java/org/cloudml/facade/Factory.java
  27. +81 −0 facade/src/main/java/org/cloudml/facade/commands/Attach.java
  28. +71 −0 facade/src/main/java/org/cloudml/facade/commands/CloudMlCommand.java
  29. +246 −0 facade/src/main/java/org/cloudml/facade/commands/CommandFactory.java
  30. +71 −0 facade/src/main/java/org/cloudml/facade/commands/CommandHandler.java
  31. +44 −0 facade/src/main/java/org/cloudml/facade/commands/Deploy.java
  32. +61 −0 facade/src/main/java/org/cloudml/facade/commands/Destroy.java
  33. +79 −0 facade/src/main/java/org/cloudml/facade/commands/Detach.java
  34. +79 −0 facade/src/main/java/org/cloudml/facade/commands/Install.java
  35. +76 −0 facade/src/main/java/org/cloudml/facade/commands/Instantiate.java
  36. +46 −0 facade/src/main/java/org/cloudml/facade/commands/ListArtefactInstances.java
  37. +45 −0 facade/src/main/java/org/cloudml/facade/commands/ListArtefactTypes.java
  38. +62 −0 facade/src/main/java/org/cloudml/facade/commands/LoadCredentials.java
  39. +62 −0 facade/src/main/java/org/cloudml/facade/commands/LoadDeployment.java
  40. +37 −0 facade/src/main/java/org/cloudml/facade/commands/ManageableCommand.java
  41. +57 −0 facade/src/main/java/org/cloudml/facade/commands/StartArtifact.java
  42. +62 −0 facade/src/main/java/org/cloudml/facade/commands/StopArtifact.java
  43. +58 −0 facade/src/main/java/org/cloudml/facade/commands/StoreCredentials.java
  44. +66 −0 facade/src/main/java/org/cloudml/facade/commands/StoreDeployment.java
  45. +80 −0 facade/src/main/java/org/cloudml/facade/commands/Uninstall.java
  46. +90 −0 facade/src/main/java/org/cloudml/facade/commands/Upload.java
  47. +60 −0 facade/src/main/java/org/cloudml/facade/commands/ViewArtefactInstance.java
  48. +60 −0 facade/src/main/java/org/cloudml/facade/commands/ViewArtefactType.java
  49. +58 −0 facade/src/main/java/org/cloudml/facade/events/AbstractEventHandler.java
  50. +61 −0 facade/src/main/java/org/cloudml/facade/events/ArtefactInstanceData.java
  51. +69 −0 facade/src/main/java/org/cloudml/facade/events/ArtefactInstanceList.java
  52. +64 −0 facade/src/main/java/org/cloudml/facade/events/ArtefactTypeData.java
  53. +66 −0 facade/src/main/java/org/cloudml/facade/events/ArtefactTypeList.java
  54. +46 −0 facade/src/main/java/org/cloudml/facade/events/Data.java
  55. +83 −0 facade/src/main/java/org/cloudml/facade/events/Event.java
  56. +49 −0 facade/src/main/java/org/cloudml/facade/events/EventHandler.java
  57. +110 −0 facade/src/main/java/org/cloudml/facade/events/Message.java
  58. +20 −0 lgpl_header.txt
  59. +4 −0 model/README.md
  60. +26 −0 model/pom.xml
  61. +149 −0 model/src/main/java/org/cloudml/core/Artefact.java
  62. +145 −0 model/src/main/java/org/cloudml/core/ArtefactInstance.java
  63. +65 −0 model/src/main/java/org/cloudml/core/ArtefactPort.java
  64. +69 −0 model/src/main/java/org/cloudml/core/ArtefactPortInstance.java
  65. +101 −0 model/src/main/java/org/cloudml/core/Binding.java
  66. +85 −0 model/src/main/java/org/cloudml/core/BindingInstance.java
  67. +31 −0 model/src/main/java/org/cloudml/core/CloudMLElement.java
  68. +59 −0 model/src/main/java/org/cloudml/core/Composite.java
  69. +177 −0 model/src/main/java/org/cloudml/core/DeploymentModel.java
  70. +42 −0 model/src/main/java/org/cloudml/core/NamedElement.java
  71. +207 −0 model/src/main/java/org/cloudml/core/Node.java
  72. +99 −0 model/src/main/java/org/cloudml/core/NodeInstance.java
  73. +66 −0 model/src/main/java/org/cloudml/core/NodePort.java
  74. +72 −0 model/src/main/java/org/cloudml/core/NodePortInstance.java
  75. +51 −0 model/src/main/java/org/cloudml/core/Property.java
  76. +127 −0 model/src/main/java/org/cloudml/core/Provider.java
  77. +89 −0 model/src/main/java/org/cloudml/core/Resource.java
  78. +57 −0 model/src/main/java/org/cloudml/core/WithProperties.java
  79. +124 −0 pom.xml
  80. +4 −0 ui/README.md
  81. +114 −0 ui/graph/pom.xml
  82. +85 −0 ui/graph/src/main/java/org/clouml/ui/graph/CPIMTable.java
  83. +85 −0 ui/graph/src/main/java/org/clouml/ui/graph/CPSMTable.java
  84. +346 −0 ui/graph/src/main/java/org/clouml/ui/graph/DrawnIconVertexDemo.java
  85. +59 −0 ui/graph/src/main/java/org/clouml/ui/graph/GraphVisu.java
  86. +62 −0 ui/graph/src/main/java/org/clouml/ui/graph/Vertex.java
  87. BIN ui/graph/src/main/resources/dbms.png
  88. BIN ui/graph/src/main/resources/server.png
  89. BIN ui/graph/src/main/resources/soft.png
  90. +150 −0 ui/lightshell/pom.xml
  91. +235 −0 ui/lightshell/src/main/java/org/cloudml/ui/shell/Command.java
  92. +370 −0 ui/lightshell/src/main/java/org/cloudml/ui/shell/Shell.java
  93. +57 −0 ui/lightshell/src/main/java/org/cloudml/ui/shell/commands/Exit.java
  94. +90 −0 ui/lightshell/src/main/java/org/cloudml/ui/shell/commands/Load.java
  95. +23 −0 ui/pom.xml
  96. +250 −0 ui/shell/pom.xml
  97. +98 −0 ui/shell/src/main/java/org/cloudml/ui/shell/configuration/Command.java
  98. +148 −0 ui/shell/src/main/java/org/cloudml/ui/shell/configuration/Configuration.java
  99. +71 −0 ui/shell/src/main/java/org/cloudml/ui/shell/configuration/Loader.java
  100. +62 −0 ui/shell/src/main/java/org/cloudml/ui/shell/configuration/Usage.java
  101. +348 −0 ui/shell/src/main/resources/configuration.yaml
  102. +35 −0 ui/shell/src/main/resources/logging.properties
  103. +146 −0 ui/shell/src/main/scala/org/cloudml/ui/shell/CommandParser.scala
  104. +197 −0 ui/shell/src/main/scala/org/cloudml/ui/shell/CommandPrinter.scala
  105. +224 −0 ui/shell/src/main/scala/org/cloudml/ui/shell/Commands.scala
  106. +87 −0 ui/shell/src/main/scala/org/cloudml/ui/shell/EventManager.scala
  107. +101 −0 ui/shell/src/main/scala/org/cloudml/ui/shell/EventPrinters.scala
  108. +280 −0 ui/shell/src/main/scala/org/cloudml/ui/shell/Shell.scala
  109. +91 −0 ui/shell/src/main/scala/org/cloudml/ui/shell/Terminal.scala
View
@@ -0,0 +1,14 @@
**.settings/
**.project
**.classpath
**target/
**bin/
**.jar
**.war
**.class
**.ear
**~
**.idea
**.iml
**nbactions.xml
**.cache
View
@@ -0,0 +1,10 @@
Prerequistes:
*************
* RW access to the git repository
* Credential to the deploy server in settings.xml
* The parent POM should be at the root of the repository (otherwise git add does not work)
mvn --batch-mode release:prepare -DreleaseVersion=1.0.0 -DdevelopmentVersion=1.1.0-SNAPSHOT
mvn release:perform
View
@@ -0,0 +1,165 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
View
@@ -0,0 +1,4 @@
cloudml.codecs
==============
Codecs to serialize the CloudML model into Cloud-app template file or to transform a template file into a CloudML model
View
@@ -0,0 +1,32 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>codecs.commons</artifactId>
<packaging>jar</packaging>
<parent>
<groupId>org.cloudml</groupId>
<artifactId>codecs</artifactId>
<version>1.3-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<name>CloudML :: Codecs :: Commons</name>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.cloudml</groupId>
<artifactId>model</artifactId>
<version>1.3-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
@@ -0,0 +1,60 @@
/**
* This file is part of CloudML [ http://cloudml.org ]
*
* Copyright (C) 2012 - SINTEF ICT
* Contact: Franck Chauvel <franck.chauvel@sintef.no>
*
* Module: root
*
* CloudML is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
*
* CloudML is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
* Public License along with CloudML. If not, see
* <http://www.gnu.org/licenses/>.
*/
package org.cloudml.codecs.commons;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.Map;
import org.cloudml.core.CloudMLElement;
/**
* Codec provides service to serialize/deserialize models into/from streams,
* which define the content of serialized models (and not locations where to
* access them)
*
* IMPORTANT: Storing serialized versions of the models is the responsibility of
* the client calling these services
*
* @author Franck CHAUVEL, Brice MORIN
*/
public interface Codec {
/**
* Lists of extension supported by codecs
*/
static final Map<String, Codec> extensions = new HashMap<String, Codec>();
/**
* @param content, the stream from which we can read the serialized version
* of the model
* @return the in-memory version of the model
*/
public CloudMLElement load(InputStream content);
/**
* @param model, the in-memory version of the model
* @param content, the stream where the serialized model will be pushed
*/
public void save(CloudMLElement model, OutputStream content);
}
View
@@ -0,0 +1,40 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>codecs.json</artifactId>
<packaging>jar</packaging>
<parent>
<groupId>org.cloudml</groupId>
<artifactId>codecs</artifactId>
<version>1.3-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<name>CloudML :: Codecs :: JSON</name>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.cloudml</groupId>
<artifactId>codecs.commons</artifactId>
<version>1.3-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.cloudml</groupId>
<artifactId>codecs.kmf</artifactId>
<version>1.3-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
@@ -0,0 +1,63 @@
/**
* This file is part of CloudML [ http://cloudml.org ]
*
* Copyright (C) 2012 - SINTEF ICT
* Contact: Franck Chauvel <franck.chauvel@sintef.no>
*
* Module: root
*
* CloudML is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
*
* CloudML is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
* Public License along with CloudML. If not, see
* <http://www.gnu.org/licenses/>.
*/
package org.cloudml.codecs;
import java.io.InputStream;
import java.io.OutputStream;
import net.cloudml.loader.JSONModelLoader;
import net.cloudml.serializer.JSONModelSerializer;
import net.cloudml.loader.ModelLoader;
import net.cloudml.serializer.ModelSerializer;
import org.cloudml.codecs.commons.Codec;
import org.cloudml.core.CloudMLElement;
import org.cloudml.core.DeploymentModel;
/*
* A JSON codec, as its name might suggest...
* @author Brice MORIN
*/
public class JsonCodec implements Codec {
KMFBridge bridge = new KMFBridge();
static {
extensions.put("json", new JsonCodec());
}
public JsonCodec() {
}
public static void init(){};
public CloudMLElement load(InputStream content) {
ModelLoader loader = new JSONModelLoader();
net.cloudml.core.DeploymentModel kDeploy = (net.cloudml.core.DeploymentModel) loader.loadModelFromStream(content).get(0);//beware of this cast...
return bridge.toPOJO(kDeploy);
}
public void save(CloudMLElement model, OutputStream content) {
ModelSerializer serializer = new JSONModelSerializer();
serializer.serialize(bridge.toKMF((DeploymentModel)model), content);
}
}
Oops, something went wrong.

0 comments on commit 39802ad

Please sign in to comment.