Skip to content

Commit adc99d9

Browse files
committed
Added how processes are deployed using an application descriptor JSON Payload. This was previously available, but was removed in a past commit.
1 parent ab05264 commit adc99d9

File tree

1 file changed

+110
-4
lines changed

1 file changed

+110
-4
lines changed

jupyter-notebooks/tutorials/3_working_with_jobs.ipynb

Lines changed: 110 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@
7676
"id": "95c0cc88-4611-4903-a661-10a80fc60f2e",
7777
"metadata": {},
7878
"source": [
79-
"### Print Unity Configuration"
79+
"### Print Unity Configuration\n",
80+
"If needed you can print the Unity configuration for debugging purposes."
8081
]
8182
},
8283
{
@@ -120,6 +121,7 @@
120121
"cell_type": "markdown",
121122
"id": "59a80d9c-6a9a-4612-bda5-39eaf64bf8e9",
122123
"metadata": {
124+
"jp-MarkdownHeadingCollapsed": true,
123125
"tags": []
124126
},
125127
"source": [
@@ -150,6 +152,7 @@
150152
"cell_type": "markdown",
151153
"id": "9e36a5fb-25ab-40ad-a9cb-ed2c06597cea",
152154
"metadata": {
155+
"jp-MarkdownHeadingCollapsed": true,
153156
"tags": []
154157
},
155158
"source": [
@@ -180,15 +183,110 @@
180183
"cell_type": "markdown",
181184
"id": "69d43073-3e99-4ea2-8021-9104b4003e84",
182185
"metadata": {
183-
"jp-MarkdownHeadingCollapsed": true,
184186
"tags": []
185187
},
186188
"source": [
187189
"## 4. Deploy application\n",
188190
"\n",
189-
"Now that we have collected the information about the application from Dockstore, we can package it up and prep it for deployment to Unity's Science Processing Service.\n",
191+
"Now that we have collected the information about the application from Dockstore, we can package it up and prep it for deployment to Unity's Science Processing Service."
192+
]
193+
},
194+
{
195+
"cell_type": "code",
196+
"execution_count": null,
197+
"id": "5ca73600-08ff-49ff-8a7c-eed9099df872",
198+
"metadata": {},
199+
"outputs": [],
200+
"source": [
201+
"data = {\n",
202+
" \"processDescription\":{\n",
203+
" \"process\":{\n",
204+
" \"id\":\"l1b-cwl\",\n",
205+
" \"title\":\"l1b_pge_cwl\",\n",
206+
" \"owsContext\":{\n",
207+
" \"offering\":{\n",
208+
" \"code\":\"http://www.opengis.net/eoc/applicationContext/cwl\",\n",
209+
" \"content\":{\n",
210+
" \"href\":\"https://raw.githubusercontent.com/unity-sds/unity-sps-workflows/main/sounder_sips/ssips_L1b_workflow.cwl\"\n",
211+
" }\n",
212+
" }\n",
213+
" },\n",
214+
" \"abstract\":\"l1b_pge_cwl\",\n",
215+
" \"keywords\":[\n",
216+
" ],\n",
217+
" \"inputs\":[\n",
218+
" {\n",
219+
" \"id\":\"input_collection_id\",\n",
220+
" \"title\":\"input_collection_id\",\n",
221+
" \"formats\":[\n",
222+
" {\n",
223+
" \"mimeType\":\"text\",\n",
224+
" \"default\":True\n",
225+
" }\n",
226+
" ]\n",
227+
" },\n",
228+
" {\n",
229+
" \"id\":\"start_datetime\",\n",
230+
" \"title\":\"start_datetime\",\n",
231+
" \"formats\":[\n",
232+
" {\n",
233+
" \"mimeType\":\"text\",\n",
234+
" \"default\":True\n",
235+
" }\n",
236+
" ]\n",
237+
" },\n",
238+
" {\n",
239+
" \"id\":\"stop_datetime\",\n",
240+
" \"title\":\"stop_datetime\",\n",
241+
" \"formats\":[\n",
242+
" {\n",
243+
" \"mimeType\":\"text\",\n",
244+
" \"default\":True\n",
245+
" }\n",
246+
" ]\n",
247+
" },\n",
248+
" {\n",
249+
" \"id\": \"output_collection_id\",\n",
250+
" \"title\": \"output_collection_id\",\n",
251+
" \"formats\":[\n",
252+
" {\n",
253+
" \"mimeType\":\"text\",\n",
254+
" \"default\":True\n",
255+
" }\n",
256+
" ]\n",
257+
" }\n",
258+
" ],\n",
259+
" \"outputs\":[\n",
260+
" {\n",
261+
" \"id\":\"output\",\n",
262+
" \"title\":\"L1B-product\",\n",
263+
" \"formats\":[\n",
264+
" {\n",
265+
" \"mimeType\":\"image/tiff\",\n",
266+
" \"default\":True\n",
267+
" }\n",
268+
" ]\n",
269+
" }\n",
270+
" ]\n",
271+
" },\n",
272+
" \"processVersion\":\"develop\",\n",
273+
" \"jobControlOptions\":[\n",
274+
" \"async-execute\"\n",
275+
" ],\n",
276+
" \"outputTransmission\":[\n",
277+
" \"reference\"\n",
278+
" ]\n",
279+
" },\n",
280+
" \"immediateDeployment\":True,\n",
281+
" \"executionUnit\":[\n",
282+
" {\n",
283+
" \"href\":\"docker.registry/ndvims:latest\"\n",
284+
" }\n",
285+
" ],\n",
286+
" \"deploymentProfileName\":\"http://www.opengis.net/profiles/eoc/dockerizedApplication\"\n",
287+
"}\n",
190288
"\n",
191-
"Coming soon..."
289+
"process_service.deploy_process(data)"
192290
]
193291
},
194292
{
@@ -416,6 +514,14 @@
416514
"for job in jobs:\n",
417515
" print(job)"
418516
]
517+
},
518+
{
519+
"cell_type": "code",
520+
"execution_count": null,
521+
"id": "59e8287c-3677-4b1e-8dd4-66b700bb8e66",
522+
"metadata": {},
523+
"outputs": [],
524+
"source": []
419525
}
420526
],
421527
"metadata": {

0 commit comments

Comments
 (0)