hidden empty developer manual and tuned some information

This commit is contained in:
dcore94 2024-04-09 10:39:13 +02:00
parent b92c35aea0
commit c051bbe637
23 changed files with 372 additions and 348 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 5a8d1b3f06ca264daa4e76498191e8d0
config: ad0f261c44d3976e25dcead86057a3da
tags: 645f666f9bcd5a90fca523b33c5a78b7

View File

@ -12,7 +12,7 @@ Welcome to CCP's documentation!
introduction
usermanual/index
developermanual/index
.. developermanual/index
Indices and tables

View File

@ -254,13 +254,15 @@ After the transition to the the Launch state, like for every other transition, t
After a successful *Launch*, the Method execution moves into *Deploy* state. As shown by the script task decorator, this task is scripted meaning that by default it's a no-operation and the commands to be performed are supplied by the creator of the Method at definition time through the *deploy-script* attribute. Example operations that could occur during this phase in a deploy script are: fetching of code on Git repositories, installation of fine grained dependencies (for example *pip install -r requirements.txt*), building of code, downloading of resource files.
From the *Deploy* phase a Method execution enters the *Execute* phase. Like for the *Deploy* phase what exactly happens during this phase is determined by the *execute-script* provided by the Method creator at Method definition time. Instructions in the execute-script usually contain invocation of main code components.
After the *Deploy* phase, a Method execution enters the *Execute* phase. Like for the *Deploy* phase what exactly happens during this phase is determined by the *execute-script* provided by the Method creator at Method definition time. Instructions in the execute-script usually contain invocation of main code components.
The time spent in the *Execute* phase is limited by the Infrastructure. It is up the the Infrastructure manager to define what is the maximum amount of time allowed for Method execution. If the method allows it, the execution time can be futher limited by the user requesting the execution of a Method, by setting the *ccpmaxtime* input parameter.
The *Fetch* following a successful *Execute* phase is a non scriptable transition in charge of uploading the outputs of a Method execution to the Execution storage.
The following *Undeploy* phase can be used by Method developers to perform operations after the Method execution has terminated. This phase is not thought to be a cleanup task because on containerised Infrastructures the system takes autonoumously care of destroying resources at the end of a Method execution. Instead it could be used to perform extra work like notifying external systems or sharing outputs.
.. The following *Undeploy* phase can be used by Method developers to perform operations after the Method execution has terminated. This phase is not thought to be a cleanup task because on containerised Infrastructures the system takes autonoumously care of destroying resources at the end of a Method execution. Instead it could be used to perform extra work like notifying external systems or sharing outputs.
It is currently not possible to script the "Undeploy" phase because, on container based Infrastructures, the system takes autonoumously care of destroying resources at the end of a Method execution.
Finally, the *Destroy* phase is the time where the Infrastructure controller literally destroys the Runtime of the execution and all resources created during the previous phases.
@ -394,7 +396,7 @@ The Method list widget is comprised of a toolbar, a search field and the list of
Method editor
~~~~~~~~~~~~~
The *Method editor* widget is a visual tool for creating, deleting, editing or cloning a Method descriptor.
The *Method editor* widget is a visual tool for creating, deleting, editing, cloning or deriving a Method descriptor.
The following Figure shows an example visualization of the Method editor.
@ -420,7 +422,9 @@ The following Figure shows an example visualization of the Method execution form
Method execution form
In the area labelled with [1], the principal metadata of the Method is shown. In the Inputs area [2] it is possible to edit the input values that are passed to the Execution. The input fields try to match as close as possible the constraints defined for the input in the Method descriptor. The execute button [4] triggers the sending of the execution request. A code generator widget [5] can be used in order to download code snippets that act as working examples for requesting the Execution programmatically through the CCP APIs (see :ref:`rest`). Currently Python 3, R, Jupyter Notebook are supported but the list will grow in the future.
In the area labelled with [1], the principal metadata of the Method is shown. In the Inputs area [2] it is possible to edit the input values that are passed to the Execution. The input fields try to match as close as possible the constraints defined for the input in the Method descriptor. The execute button [4] triggers the sending of the execution request. A code generator widget [5] can be used in order to download code snippets that act as working examples for requesting the Execution programmatically through the CCP APIs (see :ref:`rest`). Currently Python 3, R, Jupyter Notebook and Julia are supported but the list will grow in the future.
A direct link is provided that, when navigated to, will open the execution form with exactly the same parametrization that has been submitted for execution.
Execution monitor
~~~~~~~~~~~~~~~~~
@ -434,7 +438,11 @@ The following Figure shows an example visualization of the Execution monitor.
Execution monitor
The list of Executions are organized by their Method names [1]. For every Method the number of executions in the different states ('accepted', 'running', 'successful', 'failed') is reported. When expanding a Method the list of all Executions is shown [2]. Every list item reports information about the Method version, the status, timing, Infrastructure and Runtime of the Execution. When outputs are available a link to download them is shown [3]. Actions that can be performed on an Execution [5] are download as zip archive, archive to workspace, download provenance descriptor in Prov-O format, re-execute and delete. An Execution item can also be drag and dropped onto the Execution form widget in order to prepare a request for a new onne. Code for programmatically requesting the same Execution can be generated with a proper code generation widget [6]. Currently Python 3, R and Jupyter Notebooks are supported. By using the triggers on the global toolbar [6] the list of Executions can be refreshed, a previously exported Execution can be reimported from a local zip file and archived Exections can be re-imported from their sharable workspace link.
The list of Executions are organized by their Method names [1]. For every Method the number of executions in the different states ('accepted', 'running', 'successful', 'failed') is reported. When expanding a Method the list of all Executions is shown [2]. Every list item reports information about the Method version, the status, timing, Infrastructure and Runtime of the Execution. When outputs are available a link to download them is shown [3]. Actions that can be performed on an Execution [5] are download as zip archive, archive to workspace, download provenance descriptor in Prov-O format, re-execute and delete. An Execution item can also be drag and dropped onto the Execution form widget in order to prepare a request for a new onne. Code for programmatically requesting the same Execution can be generated with a proper code generation widget [6]. Currently Python 3, R, Julia and Jupyter Notebooks are currently supported.
A direct link is shown that allows, when navigated to, to open the execution form with exatly the same parametrization of the execution itself.
By using the triggers on the global toolbar [6] the list of Executions can be refreshed, a previously exported Execution can be reimported from a local zip file and archived Exections can be re-imported from their sharable workspace link.
.. _rest:
@ -445,7 +453,7 @@ Most of the services that build up CCP are accessible programmatically via REST
In particular, listing Methods (Jobs), executing them or getting infromation on running executions (jobStatus) are accessible through a standard API defined by OGC (Open Geospatial Consortium).
The REST API is Processes 1.2 described at (https://ogcapi.ogc.org/processes/) and can be considered a modern rework of the former WPS spcification.
The CCP REST API is documented as OpenAPI 3 specification at ().
The CCP REST API is documented as OpenAPI 3 specification at (https://app.swaggerhub.com/apis/OGC/ogcapi-processes-1-example-1/1.0.0).
Through the code generation widgets available in the UI elements described above, it is possible to obtain stubs that show how to interact programmatically with CCP in order to request a Method execution or re-execution and to monitor the evolution.

View File

@ -1,20 +1,9 @@
/*
* _sphinx_javascript_frameworks_compat.js
* ~~~~~~~~~~
*
* Compatability shim for jQuery and underscores.js.
*
* WILL BE REMOVED IN Sphinx 6.0
* xref RemovedInSphinx60Warning
/* Compatability shim for jQuery and underscores.js.
*
* Copyright Sphinx contributors
* Released under the two clause BSD licence
*/
/**
* select a different prefix for underscore
*/
$u = _.noConflict();
/**
* small helper function to urldecode strings
*

View File

@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@ -324,6 +324,7 @@ aside.sidebar {
p.sidebar-title {
font-weight: bold;
}
nav.contents,
aside.topic,
div.admonition, div.topic, blockquote {
@ -331,6 +332,7 @@ div.admonition, div.topic, blockquote {
}
/* -- topics ---------------------------------------------------------------- */
nav.contents,
aside.topic,
div.topic {
@ -606,6 +608,7 @@ ol.simple p,
ul.simple p {
margin-bottom: 0;
}
aside.footnote > span,
div.citation > span {
float: left;
@ -667,6 +670,16 @@ dd {
margin-left: 30px;
}
.sig dd {
margin-top: 0px;
margin-bottom: 0px;
}
.sig dl {
margin-top: 0px;
margin-bottom: 0px;
}
dl > dd:last-child,
dl > dd:last-child > :last-child {
margin-bottom: 0;
@ -735,6 +748,14 @@ abbr, acronym {
cursor: help;
}
.translated {
background-color: rgba(207, 255, 207, 0.2)
}
.untranslated {
background-color: rgba(255, 207, 207, 0.2)
}
/* -- code displays --------------------------------------------------------- */
pre {

View File

@ -4,7 +4,7 @@
*
* Base JavaScript utilities for all Sphinx HTML documentation.
*
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/

View File

@ -5,7 +5,7 @@
* This script contains the language-specific data used by searchtools.js,
* namely the list of stopwords, stemmer, scorer and splitter.
*
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/

View File

@ -17,6 +17,7 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left:
.highlight .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */
.highlight .gd { color: #A00000 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #E40000 } /* Generic.Error */
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #008400 } /* Generic.Inserted */

View File

@ -4,7 +4,7 @@
*
* Sphinx JavaScript utilities for the full-text search.
*
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/

View File

@ -1,27 +1,27 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<html class="writer-html5" lang="en">
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Developer manual &mdash; CCP 0.1.0 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../_static/css/theme.css?v=19f00094" />
<link rel="canonical" href="/docs/developermanual/index.html" />
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/sphinx_highlight.js"></script>
<script src="../_static/jquery.js?v=5d32c60e"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=2389946f"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="prev" title="User manual" href="../usermanual/index.html" />
</head>
<body class="wy-body-for-nav">
@ -44,10 +44,9 @@
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<p class="caption" role="heading"><span class="caption-text">Contents:</span></p>
<ul class="current">
<ul>
<li class="toctree-l1"><a class="reference internal" href="../introduction.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="../usermanual/index.html">User manual</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Developer manual</a></li>
</ul>
</div>
@ -81,9 +80,7 @@
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="../usermanual/index.html" class="btn btn-neutral float-left" title="User manual" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
</div>
<footer>
<hr/>

View File

@ -1,22 +1,23 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<html class="writer-html5" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Index &mdash; CCP 0.1.0 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="canonical" href="/docs/genindex.html" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=2389946f"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=4825356b"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="#" />
<link rel="search" title="Search" href="search.html" />
@ -45,7 +46,6 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="introduction.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="usermanual/index.html">User manual</a></li>
<li class="toctree-l1"><a class="reference internal" href="developermanual/index.html">Developer manual</a></li>
</ul>
</div>

View File

@ -1,23 +1,24 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<html class="writer-html5" lang="en">
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Welcome to CCPs documentation! &mdash; CCP 0.1.0 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="canonical" href="/docs/index.html" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=2389946f"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=4825356b"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
@ -47,7 +48,6 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="introduction.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="usermanual/index.html">User manual</a></li>
<li class="toctree-l1"><a class="reference internal" href="developermanual/index.html">Developer manual</a></li>
</ul>
</div>
@ -93,7 +93,6 @@
<li class="toctree-l2"><a class="reference internal" href="usermanual/index.html#rest-apis-interacting-with-methods-and-executions-programmatically">REST APIs: Interacting with Methods and Executions programmatically</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="developermanual/index.html">Developer manual</a></li>
</ul>
</div>
</section>

View File

@ -1,23 +1,24 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<html class="writer-html5" lang="en">
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Introduction &mdash; CCP 0.1.0 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="canonical" href="/docs/introduction.html" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=2389946f"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=4825356b"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
@ -52,7 +53,6 @@
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="usermanual/index.html">User manual</a></li>
<li class="toctree-l1"><a class="reference internal" href="developermanual/index.html">Developer manual</a></li>
</ul>
</div>

View File

@ -1,23 +1,24 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<html class="writer-html5" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Search &mdash; CCP 0.1.0 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="canonical" href="/docs/search.html" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/sphinx_highlight.js"></script>
<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=2389946f"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=4825356b"></script>
<script src="_static/js/theme.js"></script>
<script src="_static/searchtools.js"></script>
<script src="_static/language_data.js"></script>
@ -48,7 +49,6 @@
<ul>
<li class="toctree-l1"><a class="reference internal" href="introduction.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="usermanual/index.html">User manual</a></li>
<li class="toctree-l1"><a class="reference internal" href="developermanual/index.html">Developer manual</a></li>
</ul>
</div>

File diff suppressed because one or more lines are too long

View File

@ -1,27 +1,27 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<html class="writer-html5" lang="en">
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>User manual &mdash; CCP 0.1.0 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../_static/css/theme.css?v=19f00094" />
<link rel="canonical" href="/docs/usermanual/index.html" />
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/sphinx_highlight.js"></script>
<script src="../_static/jquery.js?v=5d32c60e"></script>
<script src="../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js?v=2389946f"></script>
<script src="../_static/doctools.js?v=888ff710"></script>
<script src="../_static/sphinx_highlight.js?v=4825356b"></script>
<script src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Developer manual" href="../developermanual/index.html" />
<link rel="prev" title="Introduction" href="../introduction.html" />
</head>
@ -71,7 +71,6 @@
<li class="toctree-l2"><a class="reference internal" href="#rest-apis-interacting-with-methods-and-executions-programmatically">REST APIs: Interacting with Methods and Executions programmatically</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../developermanual/index.html">Developer manual</a></li>
</ul>
</div>
@ -122,187 +121,187 @@ The technology and the list of available Runtimes is strictly related to type of
<p>At its heart a Method is a JSON structure that aggregates a section of metadata, the definition of input parameters, the description of expected outputs, instructions for customising the deploy and execute steps of its lifecycle and link to a compatible Infrastructure.</p>
<p>The syntax of the JSON data structure is constrained by the grammar proposed by the OGC Processes API specification (&lt;<a class="reference external" href="https://ogcapi.ogc.org/processes/">https://ogcapi.ogc.org/processes/</a>&gt;).</p>
<p>The following code snippet illustrates an example.</p>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;id&quot;</span><span class="p">:</span><span class="s2">&quot;408d9dc5-ee37-4123-9f07-4294f13bce19&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;JDK-8 Example maven&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;description&quot;</span><span class="p">:</span><span class="s2">&quot;Test for executing a jdk8 sample app from GitHub repository built with maven&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;version&quot;</span><span class="p">:</span><span class="s2">&quot;0.0.1&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;jobControlOptions&quot;</span><span class="p">:[</span><span class="w"></span>
<span class="w"> </span><span class="s2">&quot;async-execute&quot;</span><span class="w"></span>
<span class="w"> </span><span class="p">],</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;keywords&quot;</span><span class="p">:[</span><span class="w"></span>
<span class="w"> </span><span class="s2">&quot;jdk&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;java&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;jdk8&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;java8&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;maven&quot;</span><span class="w"></span>
<span class="w"> </span><span class="p">],</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;metadata&quot;</span><span class="p">:[</span><span class="w"></span>
<span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;Marco Lettere&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;role&quot;</span><span class="p">:</span><span class="s2">&quot;author&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;href&quot;</span><span class="p">:</span><span class="s2">&quot;https://accounts.dev.d4science.org/auth/admin/realms/d4science/users/88c76e47-5881-4716-a2bf-02d3b4073574&quot;</span><span class="w"></span>
<span class="w"> </span><span class="p">},</span><span class="w"></span>
<span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;role&quot;</span><span class="p">:</span><span class="s2">&quot;category&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;Test&quot;</span><span class="w"></span>
<span class="w"> </span><span class="p">},</span><span class="w"></span>
<span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;%2Fgcube%2Fdevsec%2FCCP&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;role&quot;</span><span class="p">:</span><span class="s2">&quot;context&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;href&quot;</span><span class="p">:</span><span class="s2">&quot;https://accounts.dev.d4science.org/auth/admin/realms/d4science/clients/%2Fgcube%2Fdevsec%2FCCP&quot;</span><span class="w"></span>
<span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w"> </span><span class="p">],</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;outputTransmission&quot;</span><span class="p">:[</span><span class="w"></span>
<span class="w"> </span><span class="s2">&quot;value&quot;</span><span class="w"></span>
<span class="w"> </span><span class="p">],</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;inputs&quot;</span><span class="p">:{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;ccpimage&quot;</span><span class="p">:{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;id&quot;</span><span class="p">:</span><span class="s2">&quot;ccpimage&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;Runtime&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;description&quot;</span><span class="p">:</span><span class="s2">&quot;The image of the runtime to use for method execution. This depends on the infrastructure specific protocol for interacting with registries.&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;minOccurs&quot;</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;maxOccurs&quot;</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;schema&quot;</span><span class="p">:{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;type&quot;</span><span class="p">:</span><span class="s2">&quot;string&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;format&quot;</span><span class="p">:</span><span class="s2">&quot;url&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;contentMediaType&quot;</span><span class="p">:</span><span class="s2">&quot;text/plain&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;default&quot;</span><span class="p">:</span><span class="s2">&quot;nubisware/ccp-jdk8-jammy:latest&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;readonly&quot;</span><span class="p">:</span><span class="s2">&quot;true&quot;</span><span class="w"></span>
<span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w"> </span><span class="p">},</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;repository&quot;</span><span class="p">:{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;id&quot;</span><span class="p">:</span><span class="s2">&quot;repository&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;Repository URL&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;description&quot;</span><span class="p">:</span><span class="s2">&quot;Git url to repository&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;minOccurs&quot;</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;maxOccurs&quot;</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;schema&quot;</span><span class="p">:{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;type&quot;</span><span class="p">:</span><span class="s2">&quot;string&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;format&quot;</span><span class="p">:</span><span class="s2">&quot;url&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;default&quot;</span><span class="p">:</span><span class="s2">&quot;https://github.com/dcore94/jdk-maven-example&quot;</span><span class="w"></span>
<span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w"> </span><span class="p">},</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;mainclass&quot;</span><span class="p">:{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;id&quot;</span><span class="p">:</span><span class="s2">&quot;mainclass&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;Main Class&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;description&quot;</span><span class="p">:</span><span class="s2">&quot;The main class to run&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;minOccurs&quot;</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;maxOccurs&quot;</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;schema&quot;</span><span class="p">:{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;type&quot;</span><span class="p">:</span><span class="s2">&quot;string&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;default&quot;</span><span class="p">:</span><span class="s2">&quot;example.HelloWorld&quot;</span><span class="w"></span>
<span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w"> </span><span class="p">},</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;outputs&quot;</span><span class="p">:{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;filetext&quot;</span><span class="p">:{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;id&quot;</span><span class="p">:</span><span class="s2">&quot;filetext&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;Text output&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;description&quot;</span><span class="p">:</span><span class="s2">&quot;Some output is written in txt format to file.txt&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;minOccurs&quot;</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;maxOccurs&quot;</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;metadata&quot;</span><span class="p">:[</span><span class="w"></span>
<span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;file.txt&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;role&quot;</span><span class="p">:</span><span class="s2">&quot;file&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;href&quot;</span><span class="p">:</span><span class="s2">&quot;/output/file.txt&quot;</span><span class="w"></span>
<span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w"> </span><span class="p">],</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;schema&quot;</span><span class="p">:{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;type&quot;</span><span class="p">:</span><span class="s2">&quot;string&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;contentMediaType&quot;</span><span class="p">:</span><span class="s2">&quot;text/plain&quot;</span><span class="w"></span>
<span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w"> </span><span class="p">},</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;filexml&quot;</span><span class="p">:{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;id&quot;</span><span class="p">:</span><span class="s2">&quot;filexml&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;XML output&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;description&quot;</span><span class="p">:</span><span class="s2">&quot;Some output is written in XML format to file.xml&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;minOccurs&quot;</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;maxOccurs&quot;</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;metadata&quot;</span><span class="p">:[</span><span class="w"></span>
<span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;file.xml&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;role&quot;</span><span class="p">:</span><span class="s2">&quot;file&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;href&quot;</span><span class="p">:</span><span class="s2">&quot;/ccp_data/output/file.xml&quot;</span><span class="w"></span>
<span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w"> </span><span class="p">],</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;schema&quot;</span><span class="p">:{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;type&quot;</span><span class="p">:</span><span class="s2">&quot;string&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;contentMediaType&quot;</span><span class="p">:</span><span class="s2">&quot;application/xml&quot;</span><span class="w"></span>
<span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w"> </span><span class="p">},</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;filejson&quot;</span><span class="p">:{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;id&quot;</span><span class="p">:</span><span class="s2">&quot;filejson&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;JSON output&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;description&quot;</span><span class="p">:</span><span class="s2">&quot;Some output is written in JSON format to file.json&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;minOccurs&quot;</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;maxOccurs&quot;</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;metadata&quot;</span><span class="p">:[</span><span class="w"></span>
<span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;file.json&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;role&quot;</span><span class="p">:</span><span class="s2">&quot;file&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;href&quot;</span><span class="p">:</span><span class="s2">&quot;/ccp_data/output/file.json&quot;</span><span class="w"></span>
<span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w"> </span><span class="p">],</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;schema&quot;</span><span class="p">:{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;type&quot;</span><span class="p">:</span><span class="s2">&quot;string&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;contentMediaType&quot;</span><span class="p">:</span><span class="s2">&quot;application/json&quot;</span><span class="w"></span>
<span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w"> </span><span class="p">},</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;filecsv&quot;</span><span class="p">:{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;id&quot;</span><span class="p">:</span><span class="s2">&quot;filecsv&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;CSV output&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;description&quot;</span><span class="p">:</span><span class="s2">&quot;Some output is written in CSV format to file.csv&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;minOccurs&quot;</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;maxOccurs&quot;</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;metadata&quot;</span><span class="p">:[</span><span class="w"></span>
<span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;file.csv&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;role&quot;</span><span class="p">:</span><span class="s2">&quot;file&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;href&quot;</span><span class="p">:</span><span class="s2">&quot;/output/file.csv&quot;</span><span class="w"></span>
<span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w"> </span><span class="p">],</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;schema&quot;</span><span class="p">:{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;type&quot;</span><span class="p">:</span><span class="s2">&quot;string&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;contentMediaType&quot;</span><span class="p">:</span><span class="s2">&quot;text/csv&quot;</span><span class="w"></span>
<span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w"> </span><span class="p">},</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;additionalParameters&quot;</span><span class="p">:{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;parameters&quot;</span><span class="p">:[</span><span class="w"></span>
<span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;execute-script&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;value&quot;</span><span class="p">:[</span><span class="w"></span>
<span class="w"> </span><span class="s2">&quot;cd execution&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="s2">&quot;mkdir -p /ccp_data/output&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="s2">&quot;java -cp target/jdk-maven-example-0.0.1-SNAPSHOT.jar {{ mainclass }} 1&gt;&gt; /ccp_data/stdout.txt 2&gt;&gt; /ccp_data/stderr.txt&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="s2">&quot;cp /tmp/file.* /ccp_data/output/&quot;</span><span class="w"></span>
<span class="w"> </span><span class="p">]</span><span class="w"></span>
<span class="w"> </span><span class="p">},</span><span class="w"></span>
<span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;deploy-script&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;value&quot;</span><span class="p">:[</span><span class="w"></span>
<span class="w"> </span><span class="s2">&quot;git clone {{ repository }} execution 1&gt;&gt; /ccp_data/stdout.txt 2&gt;&gt; /ccp_data/stderr.txt&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="s2">&quot;cd execution&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="s2">&quot;mvn clean package 1&gt; /ccp_data/stdout.txt 2&gt;&gt; /ccp_data/stderr.txt&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="s2">&quot;cd -&quot;</span><span class="w"></span>
<span class="w"> </span><span class="p">]</span><span class="w"></span>
<span class="w"> </span><span class="p">},</span><span class="w"></span>
<span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;undeploy-script&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;value&quot;</span><span class="p">:[]</span><span class="w"></span>
<span class="w"> </span><span class="p">},</span><span class="w"></span>
<span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;cancel-script&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;value&quot;</span><span class="p">:[]</span><span class="w"></span>
<span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w"> </span><span class="p">]</span><span class="w"></span>
<span class="w"> </span><span class="p">},</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;links&quot;</span><span class="p">:[</span><span class="w"></span>
<span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;href&quot;</span><span class="p">:</span><span class="s2">&quot;infrastructures/nubisware-docker-swarm-nfs&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;rel&quot;</span><span class="p">:</span><span class="s2">&quot;compatibleWith&quot;</span><span class="p">,</span><span class="w"></span>
<span class="w"> </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;Docker swarm with NFS on Nubis cluster&quot;</span><span class="w"></span>
<span class="w"> </span><span class="p">}</span><span class="w"></span>
<span class="w"> </span><span class="p">]</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
<div class="highlight-json notranslate"><div class="highlight"><pre><span></span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;id&quot;</span><span class="p">:</span><span class="s2">&quot;408d9dc5-ee37-4123-9f07-4294f13bce19&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;JDK-8 Example maven&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;description&quot;</span><span class="p">:</span><span class="s2">&quot;Test for executing a jdk8 sample app from GitHub repository built with maven&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;version&quot;</span><span class="p">:</span><span class="s2">&quot;0.0.1&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;jobControlOptions&quot;</span><span class="p">:[</span>
<span class="w"> </span><span class="s2">&quot;async-execute&quot;</span>
<span class="w"> </span><span class="p">],</span>
<span class="w"> </span><span class="nt">&quot;keywords&quot;</span><span class="p">:[</span>
<span class="w"> </span><span class="s2">&quot;jdk&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;java&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;jdk8&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;java8&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;maven&quot;</span>
<span class="w"> </span><span class="p">],</span>
<span class="w"> </span><span class="nt">&quot;metadata&quot;</span><span class="p">:[</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;Marco Lettere&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;role&quot;</span><span class="p">:</span><span class="s2">&quot;author&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;href&quot;</span><span class="p">:</span><span class="s2">&quot;https://accounts.dev.d4science.org/auth/admin/realms/d4science/users/88c76e47-5881-4716-a2bf-02d3b4073574&quot;</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;role&quot;</span><span class="p">:</span><span class="s2">&quot;category&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;Test&quot;</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;%2Fgcube%2Fdevsec%2FCCP&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;role&quot;</span><span class="p">:</span><span class="s2">&quot;context&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;href&quot;</span><span class="p">:</span><span class="s2">&quot;https://accounts.dev.d4science.org/auth/admin/realms/d4science/clients/%2Fgcube%2Fdevsec%2FCCP&quot;</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="p">],</span>
<span class="w"> </span><span class="nt">&quot;outputTransmission&quot;</span><span class="p">:[</span>
<span class="w"> </span><span class="s2">&quot;value&quot;</span>
<span class="w"> </span><span class="p">],</span>
<span class="w"> </span><span class="nt">&quot;inputs&quot;</span><span class="p">:{</span>
<span class="w"> </span><span class="nt">&quot;ccpimage&quot;</span><span class="p">:{</span>
<span class="w"> </span><span class="nt">&quot;id&quot;</span><span class="p">:</span><span class="s2">&quot;ccpimage&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;Runtime&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;description&quot;</span><span class="p">:</span><span class="s2">&quot;The image of the runtime to use for method execution. This depends on the infrastructure specific protocol for interacting with registries.&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;minOccurs&quot;</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;maxOccurs&quot;</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;schema&quot;</span><span class="p">:{</span>
<span class="w"> </span><span class="nt">&quot;type&quot;</span><span class="p">:</span><span class="s2">&quot;string&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;format&quot;</span><span class="p">:</span><span class="s2">&quot;url&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;contentMediaType&quot;</span><span class="p">:</span><span class="s2">&quot;text/plain&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;default&quot;</span><span class="p">:</span><span class="s2">&quot;nubisware/ccp-jdk8-jammy:latest&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;readonly&quot;</span><span class="p">:</span><span class="s2">&quot;true&quot;</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="nt">&quot;repository&quot;</span><span class="p">:{</span>
<span class="w"> </span><span class="nt">&quot;id&quot;</span><span class="p">:</span><span class="s2">&quot;repository&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;Repository URL&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;description&quot;</span><span class="p">:</span><span class="s2">&quot;Git url to repository&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;minOccurs&quot;</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;maxOccurs&quot;</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;schema&quot;</span><span class="p">:{</span>
<span class="w"> </span><span class="nt">&quot;type&quot;</span><span class="p">:</span><span class="s2">&quot;string&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;format&quot;</span><span class="p">:</span><span class="s2">&quot;url&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;default&quot;</span><span class="p">:</span><span class="s2">&quot;https://github.com/dcore94/jdk-maven-example&quot;</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="nt">&quot;mainclass&quot;</span><span class="p">:{</span>
<span class="w"> </span><span class="nt">&quot;id&quot;</span><span class="p">:</span><span class="s2">&quot;mainclass&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;Main Class&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;description&quot;</span><span class="p">:</span><span class="s2">&quot;The main class to run&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;minOccurs&quot;</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;maxOccurs&quot;</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;schema&quot;</span><span class="p">:{</span>
<span class="w"> </span><span class="nt">&quot;type&quot;</span><span class="p">:</span><span class="s2">&quot;string&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;default&quot;</span><span class="p">:</span><span class="s2">&quot;example.HelloWorld&quot;</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="nt">&quot;outputs&quot;</span><span class="p">:{</span>
<span class="w"> </span><span class="nt">&quot;filetext&quot;</span><span class="p">:{</span>
<span class="w"> </span><span class="nt">&quot;id&quot;</span><span class="p">:</span><span class="s2">&quot;filetext&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;Text output&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;description&quot;</span><span class="p">:</span><span class="s2">&quot;Some output is written in txt format to file.txt&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;minOccurs&quot;</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;maxOccurs&quot;</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;metadata&quot;</span><span class="p">:[</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;file.txt&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;role&quot;</span><span class="p">:</span><span class="s2">&quot;file&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;href&quot;</span><span class="p">:</span><span class="s2">&quot;/output/file.txt&quot;</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="p">],</span>
<span class="w"> </span><span class="nt">&quot;schema&quot;</span><span class="p">:{</span>
<span class="w"> </span><span class="nt">&quot;type&quot;</span><span class="p">:</span><span class="s2">&quot;string&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;contentMediaType&quot;</span><span class="p">:</span><span class="s2">&quot;text/plain&quot;</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="nt">&quot;filexml&quot;</span><span class="p">:{</span>
<span class="w"> </span><span class="nt">&quot;id&quot;</span><span class="p">:</span><span class="s2">&quot;filexml&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;XML output&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;description&quot;</span><span class="p">:</span><span class="s2">&quot;Some output is written in XML format to file.xml&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;minOccurs&quot;</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;maxOccurs&quot;</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;metadata&quot;</span><span class="p">:[</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;file.xml&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;role&quot;</span><span class="p">:</span><span class="s2">&quot;file&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;href&quot;</span><span class="p">:</span><span class="s2">&quot;/ccp_data/output/file.xml&quot;</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="p">],</span>
<span class="w"> </span><span class="nt">&quot;schema&quot;</span><span class="p">:{</span>
<span class="w"> </span><span class="nt">&quot;type&quot;</span><span class="p">:</span><span class="s2">&quot;string&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;contentMediaType&quot;</span><span class="p">:</span><span class="s2">&quot;application/xml&quot;</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="nt">&quot;filejson&quot;</span><span class="p">:{</span>
<span class="w"> </span><span class="nt">&quot;id&quot;</span><span class="p">:</span><span class="s2">&quot;filejson&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;JSON output&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;description&quot;</span><span class="p">:</span><span class="s2">&quot;Some output is written in JSON format to file.json&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;minOccurs&quot;</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;maxOccurs&quot;</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;metadata&quot;</span><span class="p">:[</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;file.json&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;role&quot;</span><span class="p">:</span><span class="s2">&quot;file&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;href&quot;</span><span class="p">:</span><span class="s2">&quot;/ccp_data/output/file.json&quot;</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="p">],</span>
<span class="w"> </span><span class="nt">&quot;schema&quot;</span><span class="p">:{</span>
<span class="w"> </span><span class="nt">&quot;type&quot;</span><span class="p">:</span><span class="s2">&quot;string&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;contentMediaType&quot;</span><span class="p">:</span><span class="s2">&quot;application/json&quot;</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="nt">&quot;filecsv&quot;</span><span class="p">:{</span>
<span class="w"> </span><span class="nt">&quot;id&quot;</span><span class="p">:</span><span class="s2">&quot;filecsv&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;CSV output&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;description&quot;</span><span class="p">:</span><span class="s2">&quot;Some output is written in CSV format to file.csv&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;minOccurs&quot;</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;maxOccurs&quot;</span><span class="p">:</span><span class="mi">1</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;metadata&quot;</span><span class="p">:[</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;file.csv&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;role&quot;</span><span class="p">:</span><span class="s2">&quot;file&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;href&quot;</span><span class="p">:</span><span class="s2">&quot;/output/file.csv&quot;</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="p">],</span>
<span class="w"> </span><span class="nt">&quot;schema&quot;</span><span class="p">:{</span>
<span class="w"> </span><span class="nt">&quot;type&quot;</span><span class="p">:</span><span class="s2">&quot;string&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;contentMediaType&quot;</span><span class="p">:</span><span class="s2">&quot;text/csv&quot;</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="nt">&quot;additionalParameters&quot;</span><span class="p">:{</span>
<span class="w"> </span><span class="nt">&quot;parameters&quot;</span><span class="p">:[</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;execute-script&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;value&quot;</span><span class="p">:[</span>
<span class="w"> </span><span class="s2">&quot;cd execution&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s2">&quot;mkdir -p /ccp_data/output&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s2">&quot;java -cp target/jdk-maven-example-0.0.1-SNAPSHOT.jar {{ mainclass }} 1&gt;&gt; /ccp_data/stdout.txt 2&gt;&gt; /ccp_data/stderr.txt&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s2">&quot;cp /tmp/file.* /ccp_data/output/&quot;</span>
<span class="w"> </span><span class="p">]</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;deploy-script&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;value&quot;</span><span class="p">:[</span>
<span class="w"> </span><span class="s2">&quot;git clone {{ repository }} execution 1&gt;&gt; /ccp_data/stdout.txt 2&gt;&gt; /ccp_data/stderr.txt&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s2">&quot;cd execution&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s2">&quot;mvn clean package 1&gt; /ccp_data/stdout.txt 2&gt;&gt; /ccp_data/stderr.txt&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s2">&quot;cd -&quot;</span>
<span class="w"> </span><span class="p">]</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;undeploy-script&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;value&quot;</span><span class="p">:[]</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;name&quot;</span><span class="p">:</span><span class="s2">&quot;cancel-script&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;value&quot;</span><span class="p">:[]</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="p">]</span>
<span class="w"> </span><span class="p">},</span>
<span class="w"> </span><span class="nt">&quot;links&quot;</span><span class="p">:[</span>
<span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="nt">&quot;href&quot;</span><span class="p">:</span><span class="s2">&quot;infrastructures/nubisware-docker-swarm-nfs&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;rel&quot;</span><span class="p">:</span><span class="s2">&quot;compatibleWith&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="nt">&quot;title&quot;</span><span class="p">:</span><span class="s2">&quot;Docker swarm with NFS on Nubis cluster&quot;</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="p">]</span>
<span class="p">}</span>
</pre></div>
</div>
<p>This is an example of a Method that executes Java 8 code rooted at a main class <em>example.HelloWorld</em> and cloned from a public GitHub reposiotry. The code is built with Maven.</p>
@ -329,10 +328,10 @@ The technology and the list of available Runtimes is strictly related to type of
<p>The message carrying the execution request is sent to CCP and the execution starts. The first task puts the execution in <em>Launch</em> state. During this phase the Runtime for the execution is prepared. On a container based Infrastructure this usually resolves to using the <em>ccpimage</em> input parameter in order to fetch the container image from a reposiory and instantiatiate the container.</p>
<p>After the transition to the the Launch state, like for every other transition, the outcome of the operation is evaluated and in case of errors the process terminates by transitioning directly to the <em>Destroy</em> state thus ensuring that the infrastructure is cleaned up.</p>
<p>After a successful <em>Launch</em>, the Method execution moves into <em>Deploy</em> state. As shown by the script task decorator, this task is scripted meaning that by default its a no-operation and the commands to be performed are supplied by the creator of the Method at definition time through the <em>deploy-script</em> attribute. Example operations that could occur during this phase in a deploy script are: fetching of code on Git repositories, installation of fine grained dependencies (for example <em>pip install -r requirements.txt</em>), building of code, downloading of resource files.</p>
<p>From the <em>Deploy</em> phase a Method execution enters the <em>Execute</em> phase. Like for the <em>Deploy</em> phase what exactly happens during this phase is determined by the <em>execute-script</em> provided by the Method creator at Method definition time. Instructions in the execute-script usually contain invocation of main code components.</p>
<p>After the <em>Deploy</em> phase, a Method execution enters the <em>Execute</em> phase. Like for the <em>Deploy</em> phase what exactly happens during this phase is determined by the <em>execute-script</em> provided by the Method creator at Method definition time. Instructions in the execute-script usually contain invocation of main code components.</p>
<p>The time spent in the <em>Execute</em> phase is limited by the Infrastructure. It is up the the Infrastructure manager to define what is the maximum amount of time allowed for Method execution. If the method allows it, the execution time can be futher limited by the user requesting the execution of a Method, by setting the <em>ccpmaxtime</em> input parameter.</p>
<p>The <em>Fetch</em> following a successful <em>Execute</em> phase is a non scriptable transition in charge of uploading the outputs of a Method execution to the Execution storage.</p>
<p>The following <em>Undeploy</em> phase can be used by Method developers to perform operations after the Method execution has terminated. This phase is not thought to be a cleanup task because on containerised Infrastructures the system takes autonoumously care of destroying resources at the end of a Method execution. Instead it could be used to perform extra work like notifying external systems or sharing outputs.</p>
<p>It is currently not possible to script the “Undeploy” phase because, on container based Infrastructures, the system takes autonoumously care of destroying resources at the end of a Method execution.</p>
<p>Finally, the <em>Destroy</em> phase is the time where the Infrastructure controller literally destroys the Runtime of the execution and all resources created during the previous phases.</p>
</section>
<section id="execution-context-of-a-method">
@ -356,7 +355,7 @@ The technology and the list of available Runtimes is strictly related to type of
<p>The following variables are related to the authentication and authorization context of the Method execution. They can be used to access D4Science services in a secure and convenient way also for very long lasting executions.</p>
<div class="literal-block-wrapper docutils container" id="id2">
<div class="code-block-caption"><span class="caption-text">How to use <em>ccptaskid</em> to separate output of different replicas to different files in <em>execute-script</em>.</span><a class="headerlink" href="#id2" title="Permalink to this code"></a></div>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span> mkdir -p /ccp_data/output <span class="o">&amp;&amp;</span> <span class="nb">echo</span> <span class="nv">$RANDOM</span> &gt;&gt; /ccp_data/output/<span class="sb">`</span>printenv ccptaskid<span class="sb">`</span>.txt
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="w"> </span>mkdir<span class="w"> </span>-p<span class="w"> </span>/ccp_data/output<span class="w"> </span><span class="o">&amp;&amp;</span><span class="w"> </span><span class="nb">echo</span><span class="w"> </span><span class="nv">$RANDOM</span><span class="w"> </span>&gt;&gt;<span class="w"> </span>/ccp_data/output/<span class="sb">`</span>printenv<span class="w"> </span>ccptaskid<span class="sb">`</span>.txt
</pre></div>
</div>
</div>
@ -456,7 +455,7 @@ The following is a representation of the data structure representing an Executio
</section>
<section id="method-editor">
<h3>Method editor<a class="headerlink" href="#method-editor" title="Permalink to this heading"></a></h3>
<p>The <em>Method editor</em> widget is a visual tool for creating, deleting, editing or cloning a Method descriptor.</p>
<p>The <em>Method editor</em> widget is a visual tool for creating, deleting, editing, cloning or deriving a Method descriptor.</p>
<p>The following Figure shows an example visualization of the Method editor.</p>
<figure class="align-default" id="id5">
<img alt="Method editor widget" src="../_images/methodeditorwidget.png" />
@ -477,7 +476,8 @@ The following is a representation of the data structure representing an Executio
<p><span class="caption-text">Method execution form</span><a class="headerlink" href="#id6" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<p>In the area labelled with [1], the principal metadata of the Method is shown. In the Inputs area [2] it is possible to edit the input values that are passed to the Execution. The input fields try to match as close as possible the constraints defined for the input in the Method descriptor. The execute button [4] triggers the sending of the execution request. A code generator widget [5] can be used in order to download code snippets that act as working examples for requesting the Execution programmatically through the CCP APIs (see <a class="reference internal" href="#rest"><span class="std std-ref">REST APIs: Interacting with Methods and Executions programmatically</span></a>). Currently Python 3, R, Jupyter Notebook are supported but the list will grow in the future.</p>
<p>In the area labelled with [1], the principal metadata of the Method is shown. In the Inputs area [2] it is possible to edit the input values that are passed to the Execution. The input fields try to match as close as possible the constraints defined for the input in the Method descriptor. The execute button [4] triggers the sending of the execution request. A code generator widget [5] can be used in order to download code snippets that act as working examples for requesting the Execution programmatically through the CCP APIs (see <a class="reference internal" href="#rest"><span class="std std-ref">REST APIs: Interacting with Methods and Executions programmatically</span></a>). Currently Python 3, R, Jupyter Notebook and Julia are supported but the list will grow in the future.</p>
<p>A direct link is provided that, when navigated to, will open the execution form with exactly the same parametrization that has been submitted for execution.</p>
</section>
<section id="execution-monitor">
<h3>Execution monitor<a class="headerlink" href="#execution-monitor" title="Permalink to this heading"></a></h3>
@ -489,7 +489,9 @@ The following is a representation of the data structure representing an Executio
<p><span class="caption-text">Execution monitor</span><a class="headerlink" href="#id7" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<p>The list of Executions are organized by their Method names [1]. For every Method the number of executions in the different states (accepted, running, successful, failed) is reported. When expanding a Method the list of all Executions is shown [2]. Every list item reports information about the Method version, the status, timing, Infrastructure and Runtime of the Execution. When outputs are available a link to download them is shown [3]. Actions that can be performed on an Execution [5] are download as zip archive, archive to workspace, download provenance descriptor in Prov-O format, re-execute and delete. An Execution item can also be drag and dropped onto the Execution form widget in order to prepare a request for a new onne. Code for programmatically requesting the same Execution can be generated with a proper code generation widget [6]. Currently Python 3, R and Jupyter Notebooks are supported. By using the triggers on the global toolbar [6] the list of Executions can be refreshed, a previously exported Execution can be reimported from a local zip file and archived Exections can be re-imported from their sharable workspace link.</p>
<p>The list of Executions are organized by their Method names [1]. For every Method the number of executions in the different states (accepted, running, successful, failed) is reported. When expanding a Method the list of all Executions is shown [2]. Every list item reports information about the Method version, the status, timing, Infrastructure and Runtime of the Execution. When outputs are available a link to download them is shown [3]. Actions that can be performed on an Execution [5] are download as zip archive, archive to workspace, download provenance descriptor in Prov-O format, re-execute and delete. An Execution item can also be drag and dropped onto the Execution form widget in order to prepare a request for a new onne. Code for programmatically requesting the same Execution can be generated with a proper code generation widget [6]. Currently Python 3, R, Julia and Jupyter Notebooks are currently supported.</p>
<p>A direct link is shown that allows, when navigated to, to open the execution form with exatly the same parametrization of the execution itself.</p>
<p>By using the triggers on the global toolbar [6] the list of Executions can be refreshed, a previously exported Execution can be reimported from a local zip file and archived Exections can be re-imported from their sharable workspace link.</p>
</section>
</section>
<section id="rest-apis-interacting-with-methods-and-executions-programmatically">
@ -497,36 +499,36 @@ The following is a representation of the data structure representing an Executio
<p>Most of the services that build up CCP are accessible programmatically via REST endpoints.
In particular, listing Methods (Jobs), executing them or getting infromation on running executions (jobStatus) are accessible through a standard API defined by OGC (Open Geospatial Consortium).
The REST API is Processes 1.2 described at (<a class="reference external" href="https://ogcapi.ogc.org/processes/">https://ogcapi.ogc.org/processes/</a>) and can be considered a modern rework of the former WPS spcification.</p>
<p>The CCP REST API is documented as OpenAPI 3 specification at ().</p>
<p>The CCP REST API is documented as OpenAPI 3 specification at (<a class="reference external" href="https://app.swaggerhub.com/apis/OGC/ogcapi-processes-1-example-1/1.0.0">https://app.swaggerhub.com/apis/OGC/ogcapi-processes-1-example-1/1.0.0</a>).</p>
<p>Through the code generation widgets available in the UI elements described above, it is possible to obtain stubs that show how to interact programmatically with CCP in order to request a Method execution or re-execution and to monitor the evolution.</p>
<p>The following is an example code stub generated for the R programming language.</p>
<div class="literal-block-wrapper docutils container" id="id8">
<div class="code-block-caption"><span class="caption-text">Example code for requesting a Method execution on CCP</span><a class="headerlink" href="#id8" title="Permalink to this code"></a></div>
<div class="highlight-R notranslate"><div class="highlight"><pre><span></span> <span class="c1"># Dependencies</span>
<span class="nf">library</span><span class="p">(</span><span class="n">httr</span><span class="p">)</span>
<span class="nf">library</span><span class="p">(</span><span class="n">jsonlite</span><span class="p">)</span>
<span class="nf">library</span><span class="p">(</span><span class="n">rstudioapi</span><span class="p">)</span>
<div class="highlight-R notranslate"><div class="highlight"><pre><span></span><span class="w"> </span><span class="c1"># Dependencies</span>
<span class="w"> </span><span class="nf">library</span><span class="p">(</span><span class="n">httr</span><span class="p">)</span>
<span class="w"> </span><span class="nf">library</span><span class="p">(</span><span class="n">jsonlite</span><span class="p">)</span>
<span class="w"> </span><span class="nf">library</span><span class="p">(</span><span class="n">rstudioapi</span><span class="p">)</span>
<span class="c1"># Init</span>
<span class="n">user</span> <span class="o">=</span> <span class="s">&#39;usrname&#39;</span>
<span class="n">context</span> <span class="o">=</span> <span class="s">&#39;a vre&#39;</span>
<span class="n">auth_ep</span> <span class="o">=</span> <span class="s">&#39;https://authep&#39;</span>
<span class="n">client_id</span> <span class="o">=</span> <span class="s">&#39;aclietnid&#39;</span>
<span class="n">ccp_ep</span> <span class="o">=</span> <span class="s">&#39;https://ccpep&#39;</span>
<span class="w"> </span><span class="c1"># Init</span>
<span class="w"> </span><span class="n">user</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&#39;usrname&#39;</span>
<span class="w"> </span><span class="n">context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&#39;a vre&#39;</span>
<span class="w"> </span><span class="n">auth_ep</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&#39;https://authep&#39;</span>
<span class="w"> </span><span class="n">client_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&#39;aclietnid&#39;</span>
<span class="w"> </span><span class="n">ccp_ep</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&#39;https://ccpep&#39;</span>
<span class="n">getToken</span> <span class="o">&lt;-</span> <span class="nf">function</span><span class="p">()</span> <span class="p">{</span>
<span class="c1">#login</span>
<span class="n">res</span> <span class="o">=</span> <span class="nf">POST</span><span class="p">(</span><span class="n">auth_ep</span><span class="p">,</span> <span class="n">body</span><span class="o">=</span><span class="nf">list</span><span class="p">(</span><span class="s">&#39;grant_type&#39;</span><span class="o">=</span><span class="s">&#39;password&#39;</span><span class="p">,</span> <span class="s">&#39;client_id&#39;</span><span class="o">=</span><span class="n">client_id</span><span class="p">,</span> <span class="s">&#39;username&#39;</span><span class="o">=</span><span class="n">user</span><span class="p">,</span> <span class="s">&#39;password&#39;</span><span class="o">=</span><span class="n">pwd</span><span class="p">),</span> <span class="n">encode</span><span class="o">=</span><span class="nf">c</span><span class="p">(</span><span class="s">&#39;form&#39;</span><span class="p">),</span> <span class="nf">add_headers</span><span class="p">(</span><span class="nf">c</span><span class="p">(</span><span class="s">&#39;Content-Type&#39;</span> <span class="o">=</span> <span class="s">&#39;application/x-www-form-urlencoded&#39;</span><span class="p">)))</span>
<span class="n">tok</span> <span class="o">=</span> <span class="nf">fromJSON</span><span class="p">(</span><span class="nf">content</span><span class="p">(</span><span class="n">res</span><span class="p">,</span> <span class="s">&#39;text&#39;</span><span class="p">))</span>
<span class="c1">#authorize</span>
<span class="n">res</span> <span class="o">=</span> <span class="nf">POST</span><span class="p">(</span><span class="n">auth_ep</span><span class="p">,</span> <span class="n">body</span><span class="o">=</span><span class="nf">list</span><span class="p">(</span><span class="s">&#39;grant_type&#39;</span><span class="o">=</span><span class="s">&#39;urn:ietf:params:oauth:grant-type:uma-ticket&#39;</span><span class="p">,</span> <span class="s">&#39;audience&#39;</span><span class="o">=</span><span class="n">context</span><span class="p">),</span> <span class="n">encode</span><span class="o">=</span><span class="nf">c</span><span class="p">(</span><span class="s">&#39;form&#39;</span><span class="p">),</span> <span class="nf">add_headers</span><span class="p">(</span><span class="nf">c</span><span class="p">(</span><span class="s">&#39;Content-Type&#39;</span> <span class="o">=</span> <span class="s">&#39;application/x-www-form-urlencoded&#39;</span><span class="p">,</span> <span class="s">&#39;Authorization&#39;</span> <span class="o">=</span> <span class="nf">paste</span><span class="p">(</span><span class="s">&#39;Bearer&#39;</span><span class="p">,</span> <span class="n">tok</span><span class="p">[</span><span class="s">&#39;access_token&#39;</span><span class="p">],</span> <span class="n">sep</span><span class="o">=</span><span class="s">&#39; &#39;</span><span class="p">))))</span>
<span class="n">jwt</span> <span class="o">=</span> <span class="nf">fromJSON</span><span class="p">(</span><span class="nf">content</span><span class="p">(</span><span class="n">res</span><span class="p">,</span> <span class="s">&#39;text&#39;</span><span class="p">))[</span><span class="s">&#39;access_token&#39;</span><span class="p">]</span>
<span class="w"> </span><span class="n">getToken</span><span class="w"> </span><span class="o">&lt;-</span><span class="w"> </span><span class="nf">function</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="c1">#login</span>
<span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">POST</span><span class="p">(</span><span class="n">auth_ep</span><span class="p">,</span><span class="w"> </span><span class="n">body</span><span class="o">=</span><span class="nf">list</span><span class="p">(</span><span class="s">&#39;grant_type&#39;</span><span class="o">=</span><span class="s">&#39;password&#39;</span><span class="p">,</span><span class="w"> </span><span class="s">&#39;client_id&#39;</span><span class="o">=</span><span class="n">client_id</span><span class="p">,</span><span class="w"> </span><span class="s">&#39;username&#39;</span><span class="o">=</span><span class="n">user</span><span class="p">,</span><span class="w"> </span><span class="s">&#39;password&#39;</span><span class="o">=</span><span class="n">pwd</span><span class="p">),</span><span class="w"> </span><span class="n">encode</span><span class="o">=</span><span class="nf">c</span><span class="p">(</span><span class="s">&#39;form&#39;</span><span class="p">),</span><span class="w"> </span><span class="nf">add_headers</span><span class="p">(</span><span class="nf">c</span><span class="p">(</span><span class="s">&#39;Content-Type&#39;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&#39;application/x-www-form-urlencoded&#39;</span><span class="p">)))</span>
<span class="w"> </span><span class="n">tok</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">fromJSON</span><span class="p">(</span><span class="nf">content</span><span class="p">(</span><span class="n">res</span><span class="p">,</span><span class="w"> </span><span class="s">&#39;text&#39;</span><span class="p">))</span>
<span class="w"> </span><span class="c1">#authorize</span>
<span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">POST</span><span class="p">(</span><span class="n">auth_ep</span><span class="p">,</span><span class="w"> </span><span class="n">body</span><span class="o">=</span><span class="nf">list</span><span class="p">(</span><span class="s">&#39;grant_type&#39;</span><span class="o">=</span><span class="s">&#39;urn:ietf:params:oauth:grant-type:uma-ticket&#39;</span><span class="p">,</span><span class="w"> </span><span class="s">&#39;audience&#39;</span><span class="o">=</span><span class="n">context</span><span class="p">),</span><span class="w"> </span><span class="n">encode</span><span class="o">=</span><span class="nf">c</span><span class="p">(</span><span class="s">&#39;form&#39;</span><span class="p">),</span><span class="w"> </span><span class="nf">add_headers</span><span class="p">(</span><span class="nf">c</span><span class="p">(</span><span class="s">&#39;Content-Type&#39;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&#39;application/x-www-form-urlencoded&#39;</span><span class="p">,</span><span class="w"> </span><span class="s">&#39;Authorization&#39;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">paste</span><span class="p">(</span><span class="s">&#39;Bearer&#39;</span><span class="p">,</span><span class="w"> </span><span class="n">tok</span><span class="p">[</span><span class="s">&#39;access_token&#39;</span><span class="p">],</span><span class="w"> </span><span class="n">sep</span><span class="o">=</span><span class="s">&#39; &#39;</span><span class="p">))))</span>
<span class="w"> </span><span class="n">jwt</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">fromJSON</span><span class="p">(</span><span class="nf">content</span><span class="p">(</span><span class="n">res</span><span class="p">,</span><span class="w"> </span><span class="s">&#39;text&#39;</span><span class="p">))[</span><span class="s">&#39;access_token&#39;</span><span class="p">]</span>
<span class="nf">return </span><span class="p">(</span><span class="n">jwt</span><span class="p">)</span>
<span class="p">}</span>
<span class="w"> </span><span class="nf">return </span><span class="p">(</span><span class="n">jwt</span><span class="p">)</span>
<span class="w"> </span><span class="p">}</span>
<span class="c1"># request in JSON</span>
<span class="n">request</span> <span class="o">=</span> <span class="nf">fromJSON</span><span class="p">(</span><span class="s">&#39;{</span>
<span class="w"> </span><span class="c1"># request in JSON</span>
<span class="w"> </span><span class="n">request</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">fromJSON</span><span class="p">(</span><span class="s">&#39;{</span>
<span class="s"> &quot;inputs&quot;:{</span>
<span class="s"> &quot;ccpimage&quot;:&quot;bash&quot;,</span>
<span class="s"> &quot;ccpreplicas&quot;:&quot;1&quot;</span>
@ -539,42 +541,42 @@ The REST API is Processes 1.2 described at (<a class="reference external" href="
<span class="s"> &quot;response&quot;:&quot;raw&quot;</span>
<span class="s"> }&#39;</span><span class="p">)</span>
<span class="c1"># Auth code</span>
<span class="n">pwd</span> <span class="o">=</span> <span class="nf">askForPassword</span><span class="p">(</span><span class="s">&#39;Password to login&#39;</span><span class="p">)</span>
<span class="n">jwt</span> <span class="o">=</span> <span class="nf">getToken</span><span class="p">()</span>
<span class="w"> </span><span class="c1"># Auth code</span>
<span class="w"> </span><span class="n">pwd</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">askForPassword</span><span class="p">(</span><span class="s">&#39;Password to login&#39;</span><span class="p">)</span>
<span class="w"> </span><span class="n">jwt</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">getToken</span><span class="p">()</span>
<span class="c1"># Request Method execution</span>
<span class="n">url</span> <span class="o">=</span> <span class="nf">paste</span><span class="p">(</span><span class="n">ccp_ep</span><span class="p">,</span> <span class="s">&#39;processes/{methodid}/execution&#39;</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="s">&#39;/&#39;</span><span class="p">)</span>
<span class="n">res</span> <span class="o">=</span> <span class="nf">POST</span><span class="p">(</span><span class="n">url</span><span class="p">,</span> <span class="n">body</span><span class="o">=</span><span class="n">request</span><span class="p">,</span> <span class="n">encode</span> <span class="o">=</span> <span class="s">&#39;json&#39;</span><span class="p">,</span> <span class="nf">add_headers</span><span class="p">(</span><span class="nf">c</span><span class="p">(</span><span class="s">&#39;Authorization&#39;</span> <span class="o">=</span> <span class="nf">paste</span><span class="p">(</span><span class="s">&#39;Bearer&#39;</span><span class="p">,</span> <span class="n">jwt</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="s">&#39; &#39;</span><span class="p">))))</span>
<span class="nf">if</span><span class="p">(</span><span class="nf">status_code</span><span class="p">(</span><span class="n">res</span><span class="p">)</span> <span class="o">==</span> <span class="m">201</span><span class="p">){</span>
<span class="n">jobStatus</span> <span class="o">=</span> <span class="nf">fromJSON</span><span class="p">(</span><span class="nf">content</span><span class="p">(</span><span class="n">res</span><span class="p">,</span> <span class="s">&#39;text&#39;</span><span class="p">))</span>
<span class="p">}</span><span class="n">else</span><span class="p">{</span>
<span class="nf">stop</span><span class="p">(</span><span class="nf">paste</span><span class="p">(</span><span class="s">&#39;Unable to start execution:&#39;</span><span class="p">,</span> <span class="nf">content</span><span class="p">(</span><span class="n">res</span><span class="p">,</span> <span class="s">&#39;text&#39;</span><span class="p">)))</span>
<span class="p">}</span>
<span class="w"> </span><span class="c1"># Request Method execution</span>
<span class="w"> </span><span class="n">url</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">paste</span><span class="p">(</span><span class="n">ccp_ep</span><span class="p">,</span><span class="w"> </span><span class="s">&#39;processes/{methodid}/execution&#39;</span><span class="p">,</span><span class="w"> </span><span class="n">sep</span><span class="o">=</span><span class="s">&#39;/&#39;</span><span class="p">)</span>
<span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">POST</span><span class="p">(</span><span class="n">url</span><span class="p">,</span><span class="w"> </span><span class="n">body</span><span class="o">=</span><span class="n">request</span><span class="p">,</span><span class="w"> </span><span class="n">encode</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&#39;json&#39;</span><span class="p">,</span><span class="w"> </span><span class="nf">add_headers</span><span class="p">(</span><span class="nf">c</span><span class="p">(</span><span class="s">&#39;Authorization&#39;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">paste</span><span class="p">(</span><span class="s">&#39;Bearer&#39;</span><span class="p">,</span><span class="w"> </span><span class="n">jwt</span><span class="p">,</span><span class="w"> </span><span class="n">sep</span><span class="o">=</span><span class="s">&#39; &#39;</span><span class="p">))))</span>
<span class="w"> </span><span class="nf">if</span><span class="p">(</span><span class="nf">status_code</span><span class="p">(</span><span class="n">res</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="m">201</span><span class="p">){</span>
<span class="w"> </span><span class="n">jobStatus</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">fromJSON</span><span class="p">(</span><span class="nf">content</span><span class="p">(</span><span class="n">res</span><span class="p">,</span><span class="w"> </span><span class="s">&#39;text&#39;</span><span class="p">))</span>
<span class="w"> </span><span class="p">}</span><span class="n">else</span><span class="p">{</span>
<span class="w"> </span><span class="nf">stop</span><span class="p">(</span><span class="nf">paste</span><span class="p">(</span><span class="s">&#39;Unable to start execution:&#39;</span><span class="p">,</span><span class="w"> </span><span class="nf">content</span><span class="p">(</span><span class="n">res</span><span class="p">,</span><span class="w"> </span><span class="s">&#39;text&#39;</span><span class="p">)))</span>
<span class="w"> </span><span class="p">}</span>
<span class="c1"># Poll for jobstatus</span>
<span class="n">url</span> <span class="o">=</span> <span class="nf">paste</span><span class="p">(</span><span class="n">ccp_ep</span><span class="p">,</span> <span class="s">&#39;jobs&#39;</span><span class="p">,</span> <span class="n">jobStatus</span><span class="p">[</span><span class="s">&#39;jobID&#39;</span><span class="p">],</span> <span class="n">sep</span><span class="o">=</span><span class="s">&#39;/&#39;</span><span class="p">)</span>
<span class="nf">while </span><span class="p">(</span><span class="n">jobStatus</span><span class="p">[</span><span class="s">&#39;status&#39;</span><span class="p">]</span> <span class="o">!=</span> <span class="s">&#39;successful&#39;</span> <span class="o">&amp;&amp;</span> <span class="n">jobStatus</span><span class="p">[</span><span class="s">&#39;status&#39;</span><span class="p">]</span> <span class="o">!=</span> <span class="s">&#39;failed&#39;</span><span class="p">){</span>
<span class="nf">print</span><span class="p">(</span><span class="nf">paste</span><span class="p">(</span><span class="s">&#39;[&#39;</span><span class="p">,</span><span class="nf">Sys.time</span><span class="p">(),</span><span class="s">&#39;]&#39;</span><span class="p">,</span><span class="n">jobStatus</span><span class="p">[</span><span class="s">&#39;status&#39;</span><span class="p">],</span><span class="s">&#39;: &#39;</span><span class="p">,</span><span class="n">jobStatus</span><span class="p">[</span><span class="s">&#39;message&#39;</span><span class="p">]))</span>
<span class="nf">Sys.sleep</span><span class="p">(</span><span class="m">5</span><span class="p">)</span>
<span class="n">res</span> <span class="o">=</span> <span class="nf">GET</span><span class="p">(</span><span class="n">url</span><span class="p">,</span> <span class="nf">add_headers</span><span class="p">(</span><span class="nf">c</span><span class="p">(</span><span class="s">&#39;Authorization&#39;</span> <span class="o">=</span> <span class="nf">paste</span><span class="p">(</span><span class="s">&#39;Bearer&#39;</span><span class="p">,</span> <span class="n">jwt</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="s">&#39; &#39;</span><span class="p">))))</span>
<span class="nf">if</span><span class="p">(</span><span class="nf">status_code</span><span class="p">(</span><span class="n">res</span><span class="p">)</span> <span class="o">==</span> <span class="m">200</span><span class="p">){</span>
<span class="n">jobStatus</span> <span class="o">=</span> <span class="nf">fromJSON</span><span class="p">(</span><span class="nf">content</span><span class="p">(</span><span class="n">res</span><span class="p">,</span> <span class="s">&#39;text&#39;</span><span class="p">))</span>
<span class="p">}</span><span class="n">else</span> <span class="nf">if</span><span class="p">(</span><span class="nf">status_code</span><span class="p">(</span><span class="n">res</span><span class="p">)</span> <span class="o">==</span> <span class="m">401</span><span class="p">){</span>
<span class="n">jwt</span> <span class="o">=</span> <span class="nf">getToken</span><span class="p">()</span>
<span class="p">}</span><span class="n">else</span><span class="p">{</span>
<span class="nf">stop</span><span class="p">(</span><span class="s">&#39;Unable to poll for execution status&#39;</span><span class="p">)</span>
<span class="p">}</span>
<span class="p">}</span>
<span class="w"> </span><span class="c1"># Poll for jobstatus</span>
<span class="w"> </span><span class="n">url</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">paste</span><span class="p">(</span><span class="n">ccp_ep</span><span class="p">,</span><span class="w"> </span><span class="s">&#39;jobs&#39;</span><span class="p">,</span><span class="w"> </span><span class="n">jobStatus</span><span class="p">[</span><span class="s">&#39;jobID&#39;</span><span class="p">],</span><span class="w"> </span><span class="n">sep</span><span class="o">=</span><span class="s">&#39;/&#39;</span><span class="p">)</span>
<span class="w"> </span><span class="nf">while </span><span class="p">(</span><span class="n">jobStatus</span><span class="p">[</span><span class="s">&#39;status&#39;</span><span class="p">]</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="s">&#39;successful&#39;</span><span class="w"> </span><span class="o">&amp;&amp;</span><span class="w"> </span><span class="n">jobStatus</span><span class="p">[</span><span class="s">&#39;status&#39;</span><span class="p">]</span><span class="w"> </span><span class="o">!=</span><span class="w"> </span><span class="s">&#39;failed&#39;</span><span class="p">){</span>
<span class="w"> </span><span class="nf">print</span><span class="p">(</span><span class="nf">paste</span><span class="p">(</span><span class="s">&#39;[&#39;</span><span class="p">,</span><span class="nf">Sys.time</span><span class="p">(),</span><span class="s">&#39;]&#39;</span><span class="p">,</span><span class="n">jobStatus</span><span class="p">[</span><span class="s">&#39;status&#39;</span><span class="p">],</span><span class="s">&#39;: &#39;</span><span class="p">,</span><span class="n">jobStatus</span><span class="p">[</span><span class="s">&#39;message&#39;</span><span class="p">]))</span>
<span class="w"> </span><span class="nf">Sys.sleep</span><span class="p">(</span><span class="m">5</span><span class="p">)</span>
<span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">GET</span><span class="p">(</span><span class="n">url</span><span class="p">,</span><span class="w"> </span><span class="nf">add_headers</span><span class="p">(</span><span class="nf">c</span><span class="p">(</span><span class="s">&#39;Authorization&#39;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">paste</span><span class="p">(</span><span class="s">&#39;Bearer&#39;</span><span class="p">,</span><span class="w"> </span><span class="n">jwt</span><span class="p">,</span><span class="w"> </span><span class="n">sep</span><span class="o">=</span><span class="s">&#39; &#39;</span><span class="p">))))</span>
<span class="w"> </span><span class="nf">if</span><span class="p">(</span><span class="nf">status_code</span><span class="p">(</span><span class="n">res</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="m">200</span><span class="p">){</span>
<span class="w"> </span><span class="n">jobStatus</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">fromJSON</span><span class="p">(</span><span class="nf">content</span><span class="p">(</span><span class="n">res</span><span class="p">,</span><span class="w"> </span><span class="s">&#39;text&#39;</span><span class="p">))</span>
<span class="w"> </span><span class="p">}</span><span class="n">else</span><span class="w"> </span><span class="nf">if</span><span class="p">(</span><span class="nf">status_code</span><span class="p">(</span><span class="n">res</span><span class="p">)</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="m">401</span><span class="p">){</span>
<span class="w"> </span><span class="n">jwt</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">getToken</span><span class="p">()</span>
<span class="w"> </span><span class="p">}</span><span class="n">else</span><span class="p">{</span>
<span class="w"> </span><span class="nf">stop</span><span class="p">(</span><span class="s">&#39;Unable to poll for execution status&#39;</span><span class="p">)</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span><span class="p">}</span>
<span class="nf">print</span><span class="p">(</span><span class="nf">paste</span><span class="p">(</span><span class="s">&#39;[&#39;</span><span class="p">,</span><span class="nf">Sys.time</span><span class="p">(),</span><span class="s">&#39;]&#39;</span><span class="p">,</span><span class="n">jobStatus</span><span class="p">[</span><span class="s">&#39;status&#39;</span><span class="p">],</span><span class="s">&#39;: &#39;</span><span class="p">,</span><span class="n">jobStatus</span><span class="p">[</span><span class="s">&#39;message&#39;</span><span class="p">]))</span>
<span class="n">url</span> <span class="o">=</span> <span class="nf">paste</span><span class="p">(</span><span class="n">ccp_ep</span><span class="p">,</span> <span class="s">&#39;executions&#39;</span><span class="p">,</span> <span class="n">jobStatus</span><span class="p">[</span><span class="s">&#39;jobID&#39;</span><span class="p">],</span> <span class="n">sep</span><span class="o">=</span><span class="s">&#39;/&#39;</span><span class="p">)</span>
<span class="n">res</span> <span class="o">=</span> <span class="nf">GET</span><span class="p">(</span><span class="n">url</span><span class="p">,</span> <span class="nf">add_headers</span><span class="p">(</span><span class="nf">c</span><span class="p">(</span><span class="s">&#39;Accept&#39;</span> <span class="o">=</span> <span class="s">&#39;application/json&#39;</span><span class="p">,</span> <span class="s">&#39;Authorization&#39;</span> <span class="o">=</span> <span class="nf">paste</span><span class="p">(</span><span class="s">&#39;Bearer&#39;</span><span class="p">,</span> <span class="n">jwt</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="s">&#39; &#39;</span><span class="p">))))</span>
<span class="nf">print</span><span class="p">(</span><span class="nf">fromJSON</span><span class="p">(</span><span class="nf">content</span><span class="p">(</span><span class="n">res</span><span class="p">,</span> <span class="s">&#39;text&#39;</span><span class="p">)))</span>
<span class="w"> </span><span class="nf">print</span><span class="p">(</span><span class="nf">paste</span><span class="p">(</span><span class="s">&#39;[&#39;</span><span class="p">,</span><span class="nf">Sys.time</span><span class="p">(),</span><span class="s">&#39;]&#39;</span><span class="p">,</span><span class="n">jobStatus</span><span class="p">[</span><span class="s">&#39;status&#39;</span><span class="p">],</span><span class="s">&#39;: &#39;</span><span class="p">,</span><span class="n">jobStatus</span><span class="p">[</span><span class="s">&#39;message&#39;</span><span class="p">]))</span>
<span class="w"> </span><span class="n">url</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">paste</span><span class="p">(</span><span class="n">ccp_ep</span><span class="p">,</span><span class="w"> </span><span class="s">&#39;executions&#39;</span><span class="p">,</span><span class="w"> </span><span class="n">jobStatus</span><span class="p">[</span><span class="s">&#39;jobID&#39;</span><span class="p">],</span><span class="w"> </span><span class="n">sep</span><span class="o">=</span><span class="s">&#39;/&#39;</span><span class="p">)</span>
<span class="w"> </span><span class="n">res</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">GET</span><span class="p">(</span><span class="n">url</span><span class="p">,</span><span class="w"> </span><span class="nf">add_headers</span><span class="p">(</span><span class="nf">c</span><span class="p">(</span><span class="s">&#39;Accept&#39;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&#39;application/json&#39;</span><span class="p">,</span><span class="w"> </span><span class="s">&#39;Authorization&#39;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">paste</span><span class="p">(</span><span class="s">&#39;Bearer&#39;</span><span class="p">,</span><span class="w"> </span><span class="n">jwt</span><span class="p">,</span><span class="w"> </span><span class="n">sep</span><span class="o">=</span><span class="s">&#39; &#39;</span><span class="p">))))</span>
<span class="w"> </span><span class="nf">print</span><span class="p">(</span><span class="nf">fromJSON</span><span class="p">(</span><span class="nf">content</span><span class="p">(</span><span class="n">res</span><span class="p">,</span><span class="w"> </span><span class="s">&#39;text&#39;</span><span class="p">)))</span>
<span class="n">url</span> <span class="o">=</span> <span class="nf">paste</span><span class="p">(</span><span class="n">ccp_ep</span><span class="p">,</span> <span class="s">&#39;executions&#39;</span><span class="p">,</span> <span class="n">jobStatus</span><span class="p">[</span><span class="s">&#39;jobID&#39;</span><span class="p">],</span> <span class="s">&#39;outputs/output.zip&#39;</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="s">&#39;/&#39;</span><span class="p">)</span>
<span class="nf">GET</span><span class="p">(</span><span class="n">url</span><span class="p">,</span> <span class="nf">add_headers</span><span class="p">(</span><span class="nf">c</span><span class="p">(</span><span class="s">&#39;Accept&#39;</span> <span class="o">=</span> <span class="s">&#39;application/json&#39;</span><span class="p">,</span> <span class="s">&#39;Authorization&#39;</span> <span class="o">=</span> <span class="nf">paste</span><span class="p">(</span><span class="s">&#39;Bearer&#39;</span><span class="p">,</span> <span class="n">jwt</span><span class="p">,</span> <span class="n">sep</span><span class="o">=</span><span class="s">&#39; &#39;</span><span class="p">))),</span>
<span class="nf">write_disk</span><span class="p">(</span><span class="s">&#39;./output.zip&#39;</span><span class="p">,</span> <span class="n">overwrite</span> <span class="o">=</span> <span class="kc">FALSE</span><span class="p">))</span>
<span class="w"> </span><span class="n">url</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">paste</span><span class="p">(</span><span class="n">ccp_ep</span><span class="p">,</span><span class="w"> </span><span class="s">&#39;executions&#39;</span><span class="p">,</span><span class="w"> </span><span class="n">jobStatus</span><span class="p">[</span><span class="s">&#39;jobID&#39;</span><span class="p">],</span><span class="w"> </span><span class="s">&#39;outputs/output.zip&#39;</span><span class="p">,</span><span class="w"> </span><span class="n">sep</span><span class="o">=</span><span class="s">&#39;/&#39;</span><span class="p">)</span>
<span class="w"> </span><span class="nf">GET</span><span class="p">(</span><span class="n">url</span><span class="p">,</span><span class="w"> </span><span class="nf">add_headers</span><span class="p">(</span><span class="nf">c</span><span class="p">(</span><span class="s">&#39;Accept&#39;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">&#39;application/json&#39;</span><span class="p">,</span><span class="w"> </span><span class="s">&#39;Authorization&#39;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nf">paste</span><span class="p">(</span><span class="s">&#39;Bearer&#39;</span><span class="p">,</span><span class="w"> </span><span class="n">jwt</span><span class="p">,</span><span class="w"> </span><span class="n">sep</span><span class="o">=</span><span class="s">&#39; &#39;</span><span class="p">))),</span>
<span class="w"> </span><span class="nf">write_disk</span><span class="p">(</span><span class="s">&#39;./output.zip&#39;</span><span class="p">,</span><span class="w"> </span><span class="n">overwrite</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">FALSE</span><span class="p">))</span>
</pre></div>
</div>
</div>
@ -586,7 +588,6 @@ The REST API is Processes 1.2 described at (<a class="reference external" href="
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="../introduction.html" class="btn btn-neutral float-left" title="Introduction" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="../developermanual/index.html" class="btn btn-neutral float-right" title="Developer manual" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>
<hr/>

View File

@ -12,7 +12,7 @@ Welcome to CCP's documentation!
introduction
usermanual/index
developermanual/index
.. developermanual/index
Indices and tables

View File

@ -254,13 +254,15 @@ After the transition to the the Launch state, like for every other transition, t
After a successful *Launch*, the Method execution moves into *Deploy* state. As shown by the script task decorator, this task is scripted meaning that by default it's a no-operation and the commands to be performed are supplied by the creator of the Method at definition time through the *deploy-script* attribute. Example operations that could occur during this phase in a deploy script are: fetching of code on Git repositories, installation of fine grained dependencies (for example *pip install -r requirements.txt*), building of code, downloading of resource files.
From the *Deploy* phase a Method execution enters the *Execute* phase. Like for the *Deploy* phase what exactly happens during this phase is determined by the *execute-script* provided by the Method creator at Method definition time. Instructions in the execute-script usually contain invocation of main code components.
After the *Deploy* phase, a Method execution enters the *Execute* phase. Like for the *Deploy* phase what exactly happens during this phase is determined by the *execute-script* provided by the Method creator at Method definition time. Instructions in the execute-script usually contain invocation of main code components.
The time spent in the *Execute* phase is limited by the Infrastructure. It is up the the Infrastructure manager to define what is the maximum amount of time allowed for Method execution. If the method allows it, the execution time can be futher limited by the user requesting the execution of a Method, by setting the *ccpmaxtime* input parameter.
The *Fetch* following a successful *Execute* phase is a non scriptable transition in charge of uploading the outputs of a Method execution to the Execution storage.
The following *Undeploy* phase can be used by Method developers to perform operations after the Method execution has terminated. This phase is not thought to be a cleanup task because on containerised Infrastructures the system takes autonoumously care of destroying resources at the end of a Method execution. Instead it could be used to perform extra work like notifying external systems or sharing outputs.
.. The following *Undeploy* phase can be used by Method developers to perform operations after the Method execution has terminated. This phase is not thought to be a cleanup task because on containerised Infrastructures the system takes autonoumously care of destroying resources at the end of a Method execution. Instead it could be used to perform extra work like notifying external systems or sharing outputs.
It is currently not possible to script the "Undeploy" phase because, on container based Infrastructures, the system takes autonoumously care of destroying resources at the end of a Method execution.
Finally, the *Destroy* phase is the time where the Infrastructure controller literally destroys the Runtime of the execution and all resources created during the previous phases.
@ -394,7 +396,7 @@ The Method list widget is comprised of a toolbar, a search field and the list of
Method editor
~~~~~~~~~~~~~
The *Method editor* widget is a visual tool for creating, deleting, editing or cloning a Method descriptor.
The *Method editor* widget is a visual tool for creating, deleting, editing, cloning or deriving a Method descriptor.
The following Figure shows an example visualization of the Method editor.
@ -420,7 +422,9 @@ The following Figure shows an example visualization of the Method execution form
Method execution form
In the area labelled with [1], the principal metadata of the Method is shown. In the Inputs area [2] it is possible to edit the input values that are passed to the Execution. The input fields try to match as close as possible the constraints defined for the input in the Method descriptor. The execute button [4] triggers the sending of the execution request. A code generator widget [5] can be used in order to download code snippets that act as working examples for requesting the Execution programmatically through the CCP APIs (see :ref:`rest`). Currently Python 3, R, Jupyter Notebook are supported but the list will grow in the future.
In the area labelled with [1], the principal metadata of the Method is shown. In the Inputs area [2] it is possible to edit the input values that are passed to the Execution. The input fields try to match as close as possible the constraints defined for the input in the Method descriptor. The execute button [4] triggers the sending of the execution request. A code generator widget [5] can be used in order to download code snippets that act as working examples for requesting the Execution programmatically through the CCP APIs (see :ref:`rest`). Currently Python 3, R, Jupyter Notebook and Julia are supported but the list will grow in the future.
A direct link is provided that, when navigated to, will open the execution form with exactly the same parametrization that has been submitted for execution.
Execution monitor
~~~~~~~~~~~~~~~~~
@ -434,7 +438,11 @@ The following Figure shows an example visualization of the Execution monitor.
Execution monitor
The list of Executions are organized by their Method names [1]. For every Method the number of executions in the different states ('accepted', 'running', 'successful', 'failed') is reported. When expanding a Method the list of all Executions is shown [2]. Every list item reports information about the Method version, the status, timing, Infrastructure and Runtime of the Execution. When outputs are available a link to download them is shown [3]. Actions that can be performed on an Execution [5] are download as zip archive, archive to workspace, download provenance descriptor in Prov-O format, re-execute and delete. An Execution item can also be drag and dropped onto the Execution form widget in order to prepare a request for a new onne. Code for programmatically requesting the same Execution can be generated with a proper code generation widget [6]. Currently Python 3, R and Jupyter Notebooks are supported. By using the triggers on the global toolbar [6] the list of Executions can be refreshed, a previously exported Execution can be reimported from a local zip file and archived Exections can be re-imported from their sharable workspace link.
The list of Executions are organized by their Method names [1]. For every Method the number of executions in the different states ('accepted', 'running', 'successful', 'failed') is reported. When expanding a Method the list of all Executions is shown [2]. Every list item reports information about the Method version, the status, timing, Infrastructure and Runtime of the Execution. When outputs are available a link to download them is shown [3]. Actions that can be performed on an Execution [5] are download as zip archive, archive to workspace, download provenance descriptor in Prov-O format, re-execute and delete. An Execution item can also be drag and dropped onto the Execution form widget in order to prepare a request for a new onne. Code for programmatically requesting the same Execution can be generated with a proper code generation widget [6]. Currently Python 3, R, Julia and Jupyter Notebooks are currently supported.
A direct link is shown that allows, when navigated to, to open the execution form with exatly the same parametrization of the execution itself.
By using the triggers on the global toolbar [6] the list of Executions can be refreshed, a previously exported Execution can be reimported from a local zip file and archived Exections can be re-imported from their sharable workspace link.
.. _rest:
@ -445,7 +453,7 @@ Most of the services that build up CCP are accessible programmatically via REST
In particular, listing Methods (Jobs), executing them or getting infromation on running executions (jobStatus) are accessible through a standard API defined by OGC (Open Geospatial Consortium).
The REST API is Processes 1.2 described at (https://ogcapi.ogc.org/processes/) and can be considered a modern rework of the former WPS spcification.
The CCP REST API is documented as OpenAPI 3 specification at ().
The CCP REST API is documented as OpenAPI 3 specification at (https://app.swaggerhub.com/apis/OGC/ogcapi-processes-1-example-1/1.0.0).
Through the code generation widgets available in the UI elements described above, it is possible to obtain stubs that show how to interact programmatically with CCP in order to request a Method execution or re-execution and to monitor the evolution.