-
Notifications
You must be signed in to change notification settings - Fork 1
/
quickstart.yml
61 lines (55 loc) · 2.3 KB
/
quickstart.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# This example workflow has one of each job type, demonstrating how to use
# mistral to run some jobs on platform with "this-then-that" dependencies.
#
# Workflows in the Civis Platform are written in YAML and a workflow DSL
# (domain specific language) called Mistral.
#
# See this website, https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html,
# for an introduction to YAML.
#
# See the Mistral documentation, https://docs.openstack.org/mistral/train/user/wf_lang_v2.html,
# for a description of the Mistral DSL.
version: '2.0' # you always need this key to specify version 2 of the mistral DSL
quickstart: # the name of the workflow can be anything, but Platform ignores it
tasks: # all tasks for the workflow go here
# Run a python script by specifying a the python3 script action.
# The inputs are any inputs to the /scripts/python3 API endpoint
python:
action: civis.scripts.python3
input:
name: python is the best
source: print("Hello from Python!")
# This key indicates which task(s) to run after this task succeeds.
# There are many possible options. See the mistral docs for details.
on-success:
- r
# This is a task for an R script again with the possible inputs
# determined by the /scripts/r API endpoint.
r:
action: civis.scripts.r
input:
name: R is the best
source: print("Hello from R!")
on-success:
- container # the name of the next task goes here. you can launch
# more than one by adding to the list.
# If you need more flexibility, you can run a container script task.
# Again the possible inputs are determined by the /scripts/scontainers
# API endpoint.
container:
action: civis.scripts.container
input:
name: containers forever
docker_image_name: civisanalytics/datascience-python
required_resources:
cpu: 1024
memory: 1024
disk_space: 1.0
docker_command: echo 'Hello from a container!'
# This task runs an arbitrary Platform job with a known ID.
# It is commented out right now. Note that the tasks above generate a
# new job ID each time they are run.
# platform_job:
# action: civis.run_job
# input:
# job_id: 389574093194329