{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Step 1 - Select and instantiate an Ellip Workflows archetype " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "In this step, we will create an application structure, based on an archetype, that is a template of an application (see [Application Archetypes](../../archetypes/index.rst))." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Prerequisites" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "- The <community-name> and <app-name> values." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Procedure" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "* Open a Terminal using the JupyterLab Launcher,\n", "* Enter the workspace directory:\n", "\n", "```console\n", "cd /workspace\n", "```\n", "\n", "* Set the proper values for community and app-name:\n", "\n", "```console\n", "APP_NAME=\n", "COMMUNITY=\n", "```\n", "\n", "* Generate the application structure from the archetype:\n", "\n", "```console\n", "mvn archetype:generate -B \\\n", " -DgroupId=com.terradue \\\n", " -DartifactId=${APP_NAME} \\\n", " -Dversion=0.1-SNAPSHOT \\\n", " -Dpackage=${APP_NAME} \\\n", " -Dcommunity=${COMMUNITY} \\\n", " -Ddescription='Sentinel-1 backscatter timeseries' \\\n", " -Dsummary='Data transformation application - Sentinel-1 backscatter timeseries' \\\n", " -DarchetypeArtifactId=ewf-notebook-stagein-1 \\\n", " -DarchetypeGroupId=com.terradue.app\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "If the app-name value was *myapp*, we would have under ```/workspace/myapp``` an application structure like:\n", "\n", "```console\n", "tree myapp/\n", "myapp/\n", "├── Jenkinsfile\n", "├── pom.xml\n", "├── README.md\n", "└── src\n", " ├── main\n", " │ └── app-resources\n", " │ ├── application_template.xml\n", " │ ├── dependencies\n", " │ │ └── python\n", " │ │ └── packages.list\n", " │ └── notebook\n", " │ ├── etc\n", " │ │ └── snappy.ini\n", " │ ├── libexec\n", " │ │ └── input.ipynb\n", " │ └── run\n", " └── test\n", " └── test_util.py\n", "\n", "9 directories, 9 files\n", "```\n", "\n", "\n", "* ```src/main/app-resources``` with\n", "notebook/run, the wrapping streaming executable, a python script that instantiates, parametrizes and invokes the Jupyter notebook and finally publishes the generated results (depending on the template it stages-in the inputs) - **no edits here!**,\n", "* ```src/main/app-resources/notebook/libexec/input.ipynb```, the Jupyter Notebook that will be converted as an executable,\n", "* ```src/test``` with the unit tests for the application" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Next step\n", "\n", "* [Step 2 - Set the software repository](step-2.ipynb) of the Hands-On puts these files in a GitLab software repository" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.12" } }, "nbformat": 4, "nbformat_minor": 2 }