Commit b03aaac5 authored by Spiros Koulouzis's avatar Spiros Koulouzis

composer works

parent 7843a1ed
# http://github.com/yeasy/docker-compose-files
# This compose file will start spark master node and the worker node.
# All nodes will become a cluster automatically.
# You can run: docker-compose scale worker=2
# After startup, try submit a pi calculation application.
# /urs/local/spark/bin/spark-submit --master spark://master:7077 --class org.apache.spark.examples.SparkPi /usr/local/spark/lib/spark-examples-1.4.0-hadoop2.6.0.jar 1000
master:
image: sequenceiq/spark:1.4.0
hostname: master
ports:
- "4040:4040"
- "8042:8042"
- "7077:7077"
- "8088:8088"
- "8080:8080"
restart: always
#mem_limit: 1024m
command: bash /usr/local/spark/sbin/start-master.sh && ping localhost > /dev/null
worker:
image: sequenceiq/spark:1.4.0
links:
- master:master
expose:
- "8081"
restart: always
command: bash /usr/local/spark/sbin/start-slave.sh spark://master:7077 && ping localhost >/dev/null
......@@ -72,7 +72,7 @@
<h1 class="page-header">Files and Libraries</h1>
<h3 id="artifact_gwt_json_overlay">GWT JSON Overlay</h3>
<p class="lead">Created July 6, 2017</p>
<p class="lead">Created July 7, 2017</p>
<p> <p>
The <a href="http://code.google.com/webtoolkit/">Google Web Toolkit</a> JSON Overlay library provides the JSON Overlays that
can be used to access the Web service API for this application.
......@@ -97,7 +97,7 @@
</tbody>
</table>
<h3 id="artifact_java_json_client_library">Java JSON Client Library</h3>
<p class="lead">Created July 6, 2017</p>
<p class="lead">Created July 7, 2017</p>
<p><p>
The Java client-side library is used to provide the set of Java objects that can be serialized
to/from JSON using <a href="http://jackson.codehaus.org/">Jackson</a>. This is useful for accessing the
......@@ -127,7 +127,7 @@
</tbody>
</table>
<h3 id="artifact_java_xml_client_library">Java XML Client Library</h3>
<p class="lead">Created July 6, 2017</p>
<p class="lead">Created July 7, 2017</p>
<p><p>
The Java client-side library is used to access the Web service API for this application using Java.
</p>
......@@ -149,13 +149,13 @@
</tr>
<tr class="clickable-row" data-href="drip-api-xml-client-xml-sources.jar">
<td><span class="downloadfile-name">drip-api-xml-client-xml-sources.jar</span></td>
<td><span class="downloadfile-size">21.37K</span></td>
<td><span class="downloadfile-size">21.38K</span></td>
<td><span class="downloadfile-description">The sources for the Java XML client library.</span></td>
</tr>
</tbody>
</table>
<h3 id="artifact_js_client_library">JavaScript Client Library</h3>
<p class="lead">Created July 6, 2017</p>
<p class="lead">Created July 7, 2017</p>
<p><p>
The JavaScript client-side library defines classes that can be (de)serialized to/from JSON.
This is useful for accessing the resources that are published by this application, but only
......@@ -190,7 +190,7 @@
</tbody>
</table>
<h3 id="artifact_php_json_client_library">PHP JSON Client Library</h3>
<p class="lead">Created July 6, 2017</p>
<p class="lead">Created July 7, 2017</p>
<p><p>
The PHP JSON client-side library defines the PHP classes that can be (de)serialized to/from JSON.
This is useful for accessing the resources that are published by this application, but only
......@@ -213,13 +213,13 @@
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-php.zip">
<td><span class="downloadfile-name">drip-api-php.zip</span></td>
<td><span class="downloadfile-size">5.43K</span></td>
<td><span class="downloadfile-size">5.44K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td>
</tr>
</tbody>
</table>
<h3 id="artifact_php_xml_client_library">PHP XML Client Library</h3>
<p class="lead">Created July 6, 2017</p>
<p class="lead">Created July 7, 2017</p>
<p><p>
The PHP client-side library defines the PHP classes that can be (de)serialized to/from XML.
This is useful for accessing the resources that are published by this application, but only
......@@ -251,7 +251,7 @@
</tbody>
</table>
<h3 id="artifact_ruby_json_client_library">Ruby JSON Client Library</h3>
<p class="lead">Created July 6, 2017</p>
<p class="lead">Created July 7, 2017</p>
<p><p>
The Ruby JSON client-side library defines the Ruby classes that can be (de)serialized to/from JSON.
This is useful for accessing the REST endpoints that are published by this application, but only
......
This diff is collapsed.
......@@ -272,7 +272,7 @@ provisopned based on a TOSCA description.</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/provision</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/sample</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/{id}</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/post/provision/</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/post/provision</span>
</samp></li></ul></td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="label label-default resource-method">DELETE</span>
</samp></li><li><samp> <span class="label label-default resource-method">GET</span>
......
......@@ -81,9 +81,9 @@ class</p>
</thead>
<tbody>
<tr>
<td> <span class="property-name">start</span>
<td> <span class="property-name">cloudDeploymentDomain</span>
</td>
<td> <span class="datatype-reference">number
<td> <span class="datatype-reference">string
</span>
</td>
<td> <span class="property-description"></span>
......@@ -99,16 +99,16 @@ class</p>
</td>
</tr>
<tr>
<td> <span class="property-name">host</span>
<td> <span class="property-name">end</span>
</td>
<td> <span class="datatype-reference">string
<td> <span class="datatype-reference">number
</span>
</td>
<td> <span class="property-description"></span>
</td>
</tr>
<tr>
<td> <span class="property-name">end</span>
<td> <span class="property-name">delta</span>
</td>
<td> <span class="datatype-reference">number
</span>
......@@ -117,18 +117,18 @@ class</p>
</td>
</tr>
<tr>
<td> <span class="property-name">cloudDeploymentDomain</span>
<td> <span class="property-name">start</span>
</td>
<td> <span class="datatype-reference">string
<td> <span class="datatype-reference">number
</span>
</td>
<td> <span class="property-description"></span>
</td>
</tr>
<tr>
<td> <span class="property-name">delta</span>
<td> <span class="property-name">host</span>
</td>
<td> <span class="datatype-reference">number
<td> <span class="datatype-reference">string
</span>
</td>
<td> <span class="property-description"></span>
......@@ -165,12 +165,12 @@ object is saved.</span></td>
<p class="lead">Example</p>
<pre class="prettyprint language-js example">{
&quot;start&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;vmType&quot; : &quot;...&quot;,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;end&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;delta&quot; : 12345,
&quot;start&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 12345
......
......@@ -755,15 +755,15 @@ class]]>
<xs:sequence>
<xs:element name="delta" type="xs:dateTime" minOccurs="0">
</xs:element>
<xs:element name="end" type="xs:dateTime" minOccurs="0">
<xs:element name="cloudDeploymentDomain" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="host" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="vmType" type="xs:string" minOccurs="0">
<xs:element name="start" type="xs:dateTime" minOccurs="0">
</xs:element>
<xs:element name="cloudDeploymentDomain" type="xs:string" minOccurs="0">
<xs:element name="end" type="xs:dateTime" minOccurs="0">
</xs:element>
<xs:element name="start" type="xs:dateTime" minOccurs="0">
<xs:element name="vmType" type="xs:string" minOccurs="0">
</xs:element>
</xs:sequence>
</xs:extension>
......
......@@ -144,12 +144,12 @@ Content-Type: application/json
<code class="prettyprint language-js">
[ {
&quot;start&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;vmType&quot; : &quot;...&quot;,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;end&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;delta&quot; : 12345,
&quot;start&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 12345
......@@ -514,12 +514,12 @@ Content-Type: application/json
<code class="prettyprint language-js">
{
&quot;start&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;vmType&quot; : &quot;...&quot;,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;end&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;delta&quot; : 12345,
&quot;start&quot; : 12345,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 12345
......
......@@ -57,7 +57,7 @@
<li><a href="#resource_ProvisionController_sample_GET"><abbr title="GET /user/v1.0/provisioner/sample">GET /user/v1.0/provisioner/sam...</abbr></a></li>
<li><a href="#resource_ProvisionController_delete_DELETE"><abbr title="DELETE /user/v1.0/provisioner/{id}">DELETE /user/v1.0/provisioner/...</abbr></a></li>
<li><a href="#resource_ProvisionController_get_GET"><abbr title="GET /user/v1.0/provisioner/{id}">GET /user/v1.0/provisioner/{id...</abbr></a></li>
<li><a href="#resource_ProvisionController_postProvisionResponse_POST"><abbr title="POST /user/v1.0/provisioner/post/provision/">POST /user/v1.0/provisioner/po...</abbr></a></li>
<li><a href="#resource_ProvisionController_postProvisionResponse_POST"><abbr title="POST /user/v1.0/provisioner/post/provision">POST /user/v1.0/provisioner/po...</abbr></a></li>
<li class="divider"></li>
<li class="text-right"><a href="#top"><small>Back to Top</small></a></li>
</ul>
......@@ -648,7 +648,7 @@ Content-Type: application/json
</div>
<div id="resource_ProvisionController_postProvisionResponse_POST">
<h3><span class="label label-default resource-method">POST</span> <span class="resource-path">/user/v1.0/provisioner/post/provision/ <a href="../user/v1.0/provisioner/post/provision/" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<h3><span class="label label-default resource-method">POST</span> <span class="resource-path">/user/v1.0/provisioner/post/provision <a href="../user/v1.0/provisioner/post/provision" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<p>Updates or creates a new ProvisionResponse.</p>
......@@ -731,7 +731,7 @@ Content-Type: application/json
<div class="col-md-6">
<h5>Request</h5>
<pre>
POST /user/v1.0/provisioner/post/provision/
POST /user/v1.0/provisioner/post/provision
Content-Type: application/json
Accept: application/json
......
......@@ -264,7 +264,7 @@ provisopned based on a TOSCA description.</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/provision</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/sample</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/{id}</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/post/provision/</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/post/provision</span>
</samp></li></ul></td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="label label-default resource-method">DELETE</span>
</samp></li><li><samp> <span class="label label-default resource-method">GET</span>
......
......@@ -232,11 +232,11 @@ the DAO saves the object based on the principal how made the call</span></td>
<pre class="prettyprint language-xml example">&lt;b-----&gt;
&lt;delta&gt;...&lt;/delta&gt;
&lt;end&gt;...&lt;/end&gt;
&lt;host&gt;147.228.242.58&lt;/host&gt;
&lt;vmType&gt;...&lt;/vmType&gt;
&lt;cloudDeploymentDomain&gt;us-east-1&lt;/cloudDeploymentDomain&gt;
&lt;host&gt;147.228.242.58&lt;/host&gt;
&lt;start&gt;...&lt;/start&gt;
&lt;end&gt;...&lt;/end&gt;
&lt;vmType&gt;...&lt;/vmType&gt;
&lt;owner&gt;user1&lt;/owner&gt;
&lt;timestamp&gt;...&lt;/timestamp&gt;
&lt;/b-----&gt;
......
......@@ -72,7 +72,7 @@
<h1 class="page-header">Files and Libraries</h1>
<h3 id="artifact_gwt_json_overlay">GWT JSON Overlay</h3>
<p class="lead">Created July 6, 2017</p>
<p class="lead">Created July 7, 2017</p>
<p> <p>
The <a href="http://code.google.com/webtoolkit/">Google Web Toolkit</a> JSON Overlay library provides the JSON Overlays that
can be used to access the Web service API for this application.
......@@ -97,7 +97,7 @@
</tbody>
</table>
<h3 id="artifact_java_json_client_library">Java JSON Client Library</h3>
<p class="lead">Created July 6, 2017</p>
<p class="lead">Created July 7, 2017</p>
<p><p>
The Java client-side library is used to provide the set of Java objects that can be serialized
to/from JSON using <a href="http://jackson.codehaus.org/">Jackson</a>. This is useful for accessing the
......@@ -127,7 +127,7 @@
</tbody>
</table>
<h3 id="artifact_java_xml_client_library">Java XML Client Library</h3>
<p class="lead">Created July 6, 2017</p>
<p class="lead">Created July 7, 2017</p>
<p><p>
The Java client-side library is used to access the Web service API for this application using Java.
</p>
......@@ -149,13 +149,13 @@
</tr>
<tr class="clickable-row" data-href="drip-api-xml-client-xml-sources.jar">
<td><span class="downloadfile-name">drip-api-xml-client-xml-sources.jar</span></td>
<td><span class="downloadfile-size">21.37K</span></td>
<td><span class="downloadfile-size">21.38K</span></td>
<td><span class="downloadfile-description">The sources for the Java XML client library.</span></td>
</tr>
</tbody>
</table>
<h3 id="artifact_js_client_library">JavaScript Client Library</h3>
<p class="lead">Created July 6, 2017</p>
<p class="lead">Created July 7, 2017</p>
<p><p>
The JavaScript client-side library defines classes that can be (de)serialized to/from JSON.
This is useful for accessing the resources that are published by this application, but only
......@@ -190,7 +190,7 @@
</tbody>
</table>
<h3 id="artifact_php_json_client_library">PHP JSON Client Library</h3>
<p class="lead">Created July 6, 2017</p>
<p class="lead">Created July 7, 2017</p>
<p><p>
The PHP JSON client-side library defines the PHP classes that can be (de)serialized to/from JSON.
This is useful for accessing the resources that are published by this application, but only
......@@ -213,13 +213,13 @@
<tbody data-link="row" class="rowlink">
<tr class="clickable-row" data-href="drip-api-php.zip">
<td><span class="downloadfile-name">drip-api-php.zip</span></td>
<td><span class="downloadfile-size">5.43K</span></td>
<td><span class="downloadfile-size">5.44K</span></td>
<td><span class="downloadfile-description">&nbsp;</span></td>
</tr>
</tbody>
</table>
<h3 id="artifact_php_xml_client_library">PHP XML Client Library</h3>
<p class="lead">Created July 6, 2017</p>
<p class="lead">Created July 7, 2017</p>
<p><p>
The PHP client-side library defines the PHP classes that can be (de)serialized to/from XML.
This is useful for accessing the resources that are published by this application, but only
......@@ -251,7 +251,7 @@
</tbody>
</table>
<h3 id="artifact_ruby_json_client_library">Ruby JSON Client Library</h3>
<p class="lead">Created July 6, 2017</p>
<p class="lead">Created July 7, 2017</p>
<p><p>
The Ruby JSON client-side library defines the Ruby classes that can be (de)serialized to/from JSON.
This is useful for accessing the REST endpoints that are published by this application, but only
......
This diff is collapsed.
......@@ -272,7 +272,7 @@ provisopned based on a TOSCA description.</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/provision</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/sample</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/{id}</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/post/provision/</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/post/provision</span>
</samp></li></ul></td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="label label-default resource-method">DELETE</span>
</samp></li><li><samp> <span class="label label-default resource-method">GET</span>
......
......@@ -81,54 +81,54 @@ class</p>
</thead>
<tbody>
<tr>
<td> <span class="property-name">delta</span>
<td> <span class="property-name">cloudDeploymentDomain</span>
</td>
<td> <span class="datatype-reference">number
<td> <span class="datatype-reference">string
</span>
</td>
<td> <span class="property-description"></span>
</td>
</tr>
<tr>
<td> <span class="property-name">cloudDeploymentDomain</span>
<td> <span class="property-name">start</span>
</td>
<td> <span class="datatype-reference">string
<td> <span class="datatype-reference">number
</span>
</td>
<td> <span class="property-description"></span>
</td>
</tr>
<tr>
<td> <span class="property-name">vmType</span>
<td> <span class="property-name">delta</span>
</td>
<td> <span class="datatype-reference">string
<td> <span class="datatype-reference">number
</span>
</td>
<td> <span class="property-description"></span>
</td>
</tr>
<tr>
<td> <span class="property-name">end</span>
<td> <span class="property-name">vmType</span>
</td>
<td> <span class="datatype-reference">number
<td> <span class="datatype-reference">string
</span>
</td>
<td> <span class="property-description"></span>
</td>
</tr>
<tr>
<td> <span class="property-name">start</span>
<td> <span class="property-name">host</span>
</td>
<td> <span class="datatype-reference">number
<td> <span class="datatype-reference">string
</span>
</td>
<td> <span class="property-description"></span>
</td>
</tr>
<tr>
<td> <span class="property-name">host</span>
<td> <span class="property-name">end</span>
</td>
<td> <span class="datatype-reference">string
<td> <span class="datatype-reference">number
</span>
</td>
<td> <span class="property-description"></span>
......@@ -165,12 +165,12 @@ object is saved.</span></td>
<p class="lead">Example</p>
<pre class="prettyprint language-js example">{
&quot;delta&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;vmType&quot; : &quot;...&quot;,
&quot;end&quot; : 12345,
&quot;start&quot; : 12345,
&quot;delta&quot; : 12345,
&quot;vmType&quot; : &quot;...&quot;,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;end&quot; : 12345,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 12345
......
......@@ -69,7 +69,7 @@ class</p>
<dl class="dl-horizontal">
<dt>Subtypes</dt>
<dd><a href="json_KeyPair.html">KeyPair</a>, <a href="json_AnsibleOutput.html">AnsibleOutput</a>, <a href="json_CloudCredentials.html">CloudCredentials</a>, <a href="json_BenchmarkResult.html">BenchmarkResult</a>, <a href="json_DeployResponse.html">DeployResponse</a>, <a href="json_ProvisionRequest.html">ProvisionRequest</a>, <a href="json_Script.html">Script</a>, <a href="json_KeyValueHolder.html">KeyValueHolder</a>, <a href="json_DeployRequest.html">DeployRequest</a>, <a href="json_ProvisionResponse.html">ProvisionResponse</a></dd>
<dd><a href="json_KeyPair.html">KeyPair</a>, <a href="json_AnsibleOutput.html">AnsibleOutput</a>, <a href="json_BenchmarkResult.html">BenchmarkResult</a>, <a href="json_CloudCredentials.html">CloudCredentials</a>, <a href="json_DeployResponse.html">DeployResponse</a>, <a href="json_ProvisionRequest.html">ProvisionRequest</a>, <a href="json_Script.html">Script</a>, <a href="json_KeyValueHolder.html">KeyValueHolder</a>, <a href="json_DeployRequest.html">DeployRequest</a>, <a href="json_ProvisionResponse.html">ProvisionResponse</a></dd>
</dl>
<table class="table datatype-properties">
......
......@@ -753,17 +753,17 @@ class]]>
<xs:complexContent>
<xs:extension base="ownedObject">
<xs:sequence>
<xs:element name="host" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="vmType" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="end" type="xs:dateTime" minOccurs="0">
</xs:element>
<xs:element name="delta" type="xs:dateTime" minOccurs="0">
<xs:element name="cloudDeploymentDomain" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="start" type="xs:dateTime" minOccurs="0">
</xs:element>
<xs:element name="cloudDeploymentDomain" type="xs:string" minOccurs="0">
<xs:element name="host" type="xs:string" minOccurs="0">
</xs:element>
<xs:element name="delta" type="xs:dateTime" minOccurs="0">
</xs:element>
</xs:sequence>
</xs:extension>
......
......@@ -144,12 +144,12 @@ Content-Type: application/json
<code class="prettyprint language-js">
[ {
&quot;delta&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;vmType&quot; : &quot;...&quot;,
&quot;end&quot; : 12345,
&quot;start&quot; : 12345,
&quot;delta&quot; : 12345,
&quot;vmType&quot; : &quot;...&quot;,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;end&quot; : 12345,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 12345
......@@ -514,12 +514,12 @@ Content-Type: application/json
<code class="prettyprint language-js">
{
&quot;delta&quot; : 12345,
&quot;cloudDeploymentDomain&quot; : &quot;us-east-1&quot;,
&quot;vmType&quot; : &quot;...&quot;,
&quot;end&quot; : 12345,
&quot;start&quot; : 12345,
&quot;delta&quot; : 12345,
&quot;vmType&quot; : &quot;...&quot;,
&quot;host&quot; : &quot;147.228.242.58&quot;,
&quot;end&quot; : 12345,
&quot;owner&quot; : &quot;user1&quot;,
&quot;id&quot; : &quot;58e3946e0fb4f562d84ba1ad&quot;,
&quot;timestamp&quot; : 12345
......
......@@ -57,7 +57,7 @@
<li><a href="#resource_ProvisionController_sample_GET"><abbr title="GET /user/v1.0/provisioner/sample">GET /user/v1.0/provisioner/sam...</abbr></a></li>
<li><a href="#resource_ProvisionController_delete_DELETE"><abbr title="DELETE /user/v1.0/provisioner/{id}">DELETE /user/v1.0/provisioner/...</abbr></a></li>
<li><a href="#resource_ProvisionController_get_GET"><abbr title="GET /user/v1.0/provisioner/{id}">GET /user/v1.0/provisioner/{id...</abbr></a></li>
<li><a href="#resource_ProvisionController_postProvisionResponse_POST"><abbr title="POST /user/v1.0/provisioner/post/provision/">POST /user/v1.0/provisioner/po...</abbr></a></li>
<li><a href="#resource_ProvisionController_postProvisionResponse_POST"><abbr title="POST /user/v1.0/provisioner/post/provision">POST /user/v1.0/provisioner/po...</abbr></a></li>
<li class="divider"></li>
<li class="text-right"><a href="#top"><small>Back to Top</small></a></li>
</ul>
......@@ -648,7 +648,7 @@ Content-Type: application/json
</div>
<div id="resource_ProvisionController_postProvisionResponse_POST">
<h3><span class="label label-default resource-method">POST</span> <span class="resource-path">/user/v1.0/provisioner/post/provision/ <a href="./user/v1.0/provisioner/post/provision/" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<h3><span class="label label-default resource-method">POST</span> <span class="resource-path">/user/v1.0/provisioner/post/provision <a href="./user/v1.0/provisioner/post/provision" class="glyphicon glyphicon-new-window" target="_blank"></a></span></h3>
<p>Updates or creates a new ProvisionResponse.</p>
......@@ -731,7 +731,7 @@ Content-Type: application/json
<div class="col-md-6">
<h5>Request</h5>
<pre>
POST /user/v1.0/provisioner/post/provision/
POST /user/v1.0/provisioner/post/provision
Content-Type: application/json
Accept: application/json
......
......@@ -264,7 +264,7 @@ provisopned based on a TOSCA description.</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/provision</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/sample</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/{id}</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/post/provision/</span>
</samp></li><li><samp> <span class="resource-path">/user/v1.0/provisioner/post/provision</span>
</samp></li></ul></td>
<td class="text-nowrap"><ul class="list-unstyled"><li><samp> <span class="label label-default resource-method">DELETE</span>
</samp></li><li><samp> <span class="label label-default resource-method">GET</span>
......
......@@ -231,12 +231,12 @@ the DAO saves the object based on the principal how made the call</span></td>
<p class="lead">Example</p>
<pre class="prettyprint language-xml example">&lt;b-----&gt;
&lt;host&gt;147.228.242.58&lt;/host&gt;
&lt;vmType&gt;...&lt;/vmType&gt;
&lt;end&gt;...&lt;/end&gt;
&lt;delta&gt;...&lt;/delta&gt;
&lt;start&gt;...&lt;/start&gt;
&lt;cloudDeploymentDomain&gt;us-east-1&lt;/cloudDeploymentDomain&gt;
&lt;start&gt;...&lt;/start&gt;
&lt;host&gt;147.228.242.58&lt;/host&gt;
&lt;delta&gt;...&lt;/delta&gt;
&lt;owner&gt;user1&lt;/owner&gt;
&lt;timestamp&gt;...&lt;/timestamp&gt;
&lt;/b-----&gt;
......
......@@ -15,13 +15,13 @@
*/
package nl.uva.sne.drip.api.dao;
import nl.uva.sne.drip.drip.commons.data.v1.external.PlaybookRepresentation;
import nl.uva.sne.drip.drip.commons.data.v1.external.ConfigurationRepresentation;
import org.springframework.data.mongodb.repository.MongoRepository;
/**
*
* @author S. Koulouzis
*/
public interface PlaybookDao extends MongoRepository<PlaybookRepresentation, String> {
public interface ConfigurationDao extends MongoRepository<ConfigurationRepresentation, String> {
}
......@@ -20,7 +20,7 @@ import java.util.List;
import java.util.Map;
import nl.uva.sne.drip.api.exception.NotFoundException;
import nl.uva.sne.drip.commons.utils.Constants;
import nl.uva.sne.drip.drip.commons.data.v1.external.PlaybookRepresentation;
import nl.uva.sne.drip.drip.commons.data.v1.external.ConfigurationRepresentation;
import nl.uva.sne.drip.commons.utils.Converter;
import nl.uva.sne.drip.drip.commons.data.v1.external.User;
import org.json.JSONException;
......@@ -31,7 +31,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import nl.uva.sne.drip.api.dao.PlaybookDao;
import nl.uva.sne.drip.api.dao.ConfigurationDao;
/**
*
......@@ -39,18 +39,18 @@ import nl.uva.sne.drip.api.dao.PlaybookDao;
*/
@Service
@PreAuthorize("isAuthenticated()")
public class PlaybookService {
public class ConfigurationService {
@Autowired
private PlaybookDao dao;
private ConfigurationDao dao;
public String get(String id, String fromat) throws JSONException, NotFoundException {
PlaybookRepresentation playbook = findOne(id);
if (playbook == null) {
ConfigurationRepresentation configuration = findOne(id);
if (configuration == null) {
throw new NotFoundException();
}
Map<String, Object> map = playbook.getKeyValue();
Map<String, Object> map = configuration.getKeyValue();
if (fromat != null && fromat.toLowerCase().equals("yml")) {
String ymlStr = Converter.map2YmlString(map);
......@@ -80,30 +80,30 @@ public class PlaybookService {
public String saveYamlString(String yamlString, String name) throws IOException {
yamlString = yamlString.replaceAll("\\.", "\uff0E");
Map<String, Object> map = Converter.ymlString2Map(yamlString);
PlaybookRepresentation t = new PlaybookRepresentation();
ConfigurationRepresentation t = new ConfigurationRepresentation();
t.setKvMap(map);
save(t);
return t.getId();
}
@PostAuthorize("(returnObject.owner == authentication.name) or (hasRole('ROLE_ADMIN'))")
public PlaybookRepresentation delete(String id) {
PlaybookRepresentation tr = dao.findOne(id);
public ConfigurationRepresentation delete(String id) {
ConfigurationRepresentation tr = dao.findOne(id);
dao.delete(tr);
return tr;
}
@PostFilter("(filterObject.owner == authentication.name) or (hasRole('ROLE_ADMIN'))")
public List<PlaybookRepresentation> findAll() {
public List<ConfigurationRepresentation> findAll() {
return dao.findAll();
}
@PostAuthorize("(returnObject.owner == authentication.name) or (hasRole('ROLE_ADMIN'))")
public PlaybookRepresentation findOne(String id) {
public ConfigurationRepresentation findOne(String id) {
return dao.findOne(id);
}
private PlaybookRepresentation save(PlaybookRepresentation t) {
private ConfigurationRepresentation save(ConfigurationRepresentation t) {
User user = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
String owner = user.getUsername();
t.setOwner(owner);
......@@ -115,9 +115,9 @@ public class PlaybookService {
dao.deleteAll();
}
public String saveStringContents(String playbookContents) throws IOException {
Map<String, Object> map = Converter.cleanStringContents(playbookContents, false);
PlaybookRepresentation t = new PlaybookRepresentation();
public String saveStringContents(String yamlContents) throws IOException {
Map<String, Object> map = Converter.cleanStringContents(yamlContents, false);
ConfigurationRepresentation t = new ConfigurationRepresentation();
t.setKvMap(map);
save(t);
return t.getId();
......
......@@ -78,14 +78,13 @@ public class DeployService {
@Value("${message.broker.host}")
private String messageBrokerHost;
@Autowired
private CloudCredentialsService cloudCredentialsService;
// @Autowired
// private CloudCredentialsService cloudCredentialsService;
@Autowired
private ProvisionService provisionService;
@Autowired
private PlaybookService playbookService;
private ConfigurationService configurationService;
@Autowired
private BenchmarkResultService benchmarkResultService;
......@@ -186,6 +185,11 @@ public class DeployService {
parameters.add(ansibleParameter);
}
if (managerType.toLowerCase().equals("swarm") && configurationID != null) {
MessageParameter composerParameter = createComposerParameter(configurationID);
parameters.add(composerParameter);
}
Message deployInvokationMessage = new Message();
deployInvokationMessage.setParameters(parameters);
deployInvokationMessage.setCreationDate(System.currentTimeMillis());
......@@ -228,12 +232,24 @@ public class DeployService {
}
private MessageParameter createAnsibleParameter(String configurationID) throws JSONException {
String playbook = playbookService.get(configurationID, "yml");
MessageParameter ansibleParameter = new MessageParameter();
ansibleParameter.setName("playbook");
ansibleParameter.setEncoding("UTF-8");
ansibleParameter.setValue(playbook);
return ansibleParameter;
return createConfigurationParameter(configurationID, "ansible");
}
private MessageParameter createComposerParameter(String configurationID) throws JSONException {
MessageParameter configurationParameter = createConfigurationParameter(configurationID, "composer");
Map<String, String> attributes = new HashMap<>();
attributes.put("name", configurationID);
configurationParameter.setAttributes(attributes);
return configurationParameter;
}
private MessageParameter createConfigurationParameter(String configurationID, String confType) throws JSONException {
String configuration = configurationService.get(configurationID, "yml");
MessageParameter configurationParameter = new MessageParameter();
configurationParameter.setName(confType);
configurationParameter.setEncoding("UTF-8");
configurationParameter.setValue(configuration);
return configurationParameter;
}
private DeployResponse handleResponse(List<MessageParameter> params, DeployRequest deployInfo) throws KeyException, IOException, Exception {
......
......@@ -17,7 +17,7 @@ package nl.uva.sne.drip.api.v1.rest;
import com.webcohesion.enunciate.metadata.rs.ResponseCode;
import com.webcohesion.enunciate.metadata.rs.StatusCodes;
import nl.uva.sne.drip.drip.commons.data.v1.external.PlaybookRepresentation;
import nl.uva.sne.drip.drip.commons.data.v1.external.ConfigurationRepresentation;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
......@@ -36,7 +36,7 @@ import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.bind.annotation.PathVariable;
import nl.uva.sne.drip.api.exception.BadRequestException;
import nl.uva.sne.drip.api.exception.NotFoundException;
import nl.uva.sne.drip.api.service.PlaybookService;
import nl.uva.sne.drip.api.service.ConfigurationService;
import nl.uva.sne.drip.api.service.UserService;
import org.springframework.web.bind.annotation.RequestBody;
......@@ -55,7 +55,7 @@ import org.springframework.web.bind.annotation.RequestBody;
public class ConfigurationController {
@Autowired
private PlaybookService playbookService;
private ConfigurationService configurationService;
/**
* Post a deployment configuration.
......@@ -72,7 +72,7 @@ public class ConfigurationController {
public @ResponseBody
String post(@RequestBody String yamlContents) {
try {
return playbookService.saveStringContents(yamlContents);
return configurationService.saveStringContents(yamlContents);
} catch (IOException ex) {
throw new BadRequestException("Not valid contents");
}
......@@ -97,7 +97,7 @@ public class ConfigurationController {
throw new BadRequestException("Must uplaod a file");
}
try {
return playbookService.saveFile(file);
return configurationService.saveFile(file);
} catch (IOException | IllegalStateException ex) {
throw new BadRequestException("Not valid contents");
}
......@@ -120,7 +120,7 @@ public class ConfigurationController {
public @ResponseBody
String get(@PathVariable("id") String id, @RequestParam(value = "format") String format) {
try {
return playbookService.get(id, format);
return configurationService.get(id, format);
} catch (JSONException | NotFoundException ex) {
throw new BadRequestException("Not valid contents");
}
......@@ -139,7 +139,7 @@ public class ConfigurationController {
})
public @ResponseBody
String delete(@PathVariable("id") String id) {
playbookService.delete(id);
configurationService.delete(id);
return "Deleted : " + id;
}
......@@ -155,9 +155,9 @@ public class ConfigurationController {
})
public @ResponseBody
List<String> getIds() {
List<PlaybookRepresentation> all = playbookService.findAll();
List<ConfigurationRepresentation> all = configurationService.findAll();
List<String> ids = new ArrayList<>();
for (PlaybookRepresentation tr : all) {
for (ConfigurationRepresentation tr : all) {
ids.add(tr.getId());
}
return ids;
......@@ -175,7 +175,7 @@ public class ConfigurationController {
})
public @ResponseBody
String deleteAll() {
playbookService.deleteAll();
configurationService.deleteAll();
return "Done";
}
......
......@@ -19,8 +19,6 @@ import com.webcohesion.enunciate.metadata.rs.ResponseCode;
import com.webcohesion.enunciate.metadata.rs.StatusCodes;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.security.RolesAllowed;
import nl.uva.sne.drip.api.exception.BadRequestException;
import nl.uva.sne.drip.api.exception.InternalServerErrorException;
......
......@@ -19,11 +19,12 @@ import com.fasterxml.jackson.annotation.JsonInclude;
import org.springframework.data.mongodb.core.mapping.Document;
/**
* This class represents a playbook used by ansible manager to deploy software.
* This class represents a configuration ( playbook used by ansible manager or
* composer for docker-composer) to deploy software.
*
* @author S. Koulouzis
*/
@Document
@JsonInclude(JsonInclude.Include.NON_NULL)
public class PlaybookRepresentation extends KeyValueHolder {
public class ConfigurationRepresentation extends KeyValueHolder {
}
-----BEGIN RSA PRIVATE KEY-----
MIICXQIBAAKBgQDpC46dDxO8UDSzzZLvcxgEGi4RRIBMQbxMsrOEtF9i8Dsq7Psb
F9n+KFCVCUU+oKjlOu+XdFobtpbMJYMKguJkrViOmaHeT1OTgZsaUIJDBupl359f
MEaUpHIGRYpu5NT/OglsQMHN0TtQD/Kbx5KPPDoBLAOymlSHAmfsopoYZwIDAQAB
AoGADU2AlYyPxtcZOw5IDe0W+Nz5tjifzjqOYh5tSuz06PPnnLqsVs6UvgJVHzzJ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ATE KEY-----
MIICXQIBAAKBgQDpC46dDxO8UDSzzZLvcxgEGi4RRIBMQbxMsrOEtF9i8Dsq7Psb
F9n+KFCVCUU+oKjlOu+XdFobtpbMJYMKguJkrViOmaHeT1OTgZsaUIJDBupl359f
MEaUpHIGRYpu5NT/OglsQMHN0TtQD/Kbx5KPPDoBLAOymlSHAmfsopoYZwIDAQAB
AoGADU2AlYyPxtcZOw5IDe0W+Nz5tjifzjqOYh5tSuz06PPnnLqsVs6UvgJVHzzJ
PBr1qSglFxMoNZ7Fmt+lTEtOWu75NSpur12wOEr2pSTvJy7CQtDfD9HEaU53GdwT
n4YF48mGCnNA5e2lRiPX3WLZPnyfHjIqXZxZi8MIejauOaECQQD6lGpxOGkrw8Td
cQJPYA25vguHr0YN8EJZVi6VmkSbeqaffqIq3bHzWJsa1OaG3PAkoMeOAMfB7URd
+TSd2MsXAkEA7hYLIwQgDcK4mA5wuDv/qFx9KnCQa79tIHLLxKPBVnae/aRQ386K
afMlG5LqGd2y8kMmx4Kxc4aGjfiFkv4vMQJAbt+YsXwqXOkEhI7qXMC9kgAbDfBp
6OT0Fp9hgWR/EuSUMWJQ0vLBOFFuX9LwJaBAyZQyeAy0VoRricEonOc+BQJBANmR
WVIBZg1NIQULRSSG56UCB/tta/yarO2XGfCzOG177uSYcLNk+gXCBOoCwl0qxGkw
xlJRczm/+FvqfJ4MHDECQQCBWUmQEakOh+CMU4CRJIDFWAsBHKNxJ6e+ob/PgmSb
s0xX8vJVSP8E5ZknGPtGeuQCV4pWfZNdNEpm3GAUfLv9
-----END RSA PRIVATE KEY-----
This diff is collapsed.
......@@ -14,6 +14,7 @@ import ansible_playbook
import sys, argparse
from threading import Thread
from time import sleep
import os.path
if len(sys.argv) > 1:
......@@ -41,7 +42,12 @@ def handleDelivery(message):
node_num = 0
vm_list = []
current_milli_time = lambda: int(round(time.time() * 1000))
try:
path = os.path.dirname(os.path.abspath(__file__)) + "/"+ str(current_milli_time()) + "/"
except NameError:
import sys
path = os.path.dirname(os.path.abspath(sys.argv[0])) + "/"+ str(current_milli_time()) + "/"
if not os.path.exists(path):
os.makedirs(path)
......@@ -71,7 +77,11 @@ def handleDelivery(message):
elif name == "composer":
value = param["value"]
compose_file = path + "docker-compose.yml"
if not param["attributes"] == None and not param["attributes"]["name"] == None :
compose_name = param["attributes"]["name"]
else:
current_milli_time = lambda: int(round(time.time() * 1000))
compose_name = "service_"+str(current_milli_time())
fo = open(compose_file, "w")
fo.write(value)
fo.close()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment