This repository has been archived by the owner on Nov 17, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
pipeline_definition.json
95 lines (94 loc) · 2.78 KB
/
pipeline_definition.json
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
{
"objects" : [
{
"id" : "Default",
"scheduleType" : "cron",
"failureAndRerunMode" : "CASCADE",
"schedule" : { "ref" : "PipewelderSchedule" },
"pipelineLogUri" : "#{myS3LogDir}",
"role" : "DataPipelineDefaultRole",
"resourceRole" : "DataPipelineDefaultResourceRole"
},
{
"id" : "PipewelderShellCommandActivity",
"command" : "(cd ${INPUT1_STAGING_DIR} && chmod +x run && ./run) > ${OUTPUT1_STAGING_DIR}/stdout.txt",
"runsOn" : { "ref" : "PipewelderEC2Resource" },
"input" : { "ref" : "PipewelderS3InputLocation" },
"output" : { "ref" : "PipewelderS3OutputLocation" },
"type" : "ShellCommandActivity",
"stage" : "true"
},
{
"id" : "PipewelderSchedule",
"startDateTime" : "#{myStartDateTime}",
"type" : "Schedule",
"period" : "#{mySchedulePeriod}"
},
{
"id" : "PipewelderEC2Resource",
"terminateAfter" : "#{myTerminateAfter}",
"instanceType" : "t1.micro",
"type" : "Ec2Resource"
},
{
"id" : "PipewelderS3InputLocation",
"directoryPath" : "#{myS3InputDir}",
"type" : "S3DataNode"
},
{
"id" : "PipewelderS3OutputLocation",
"directoryPath" : "#{myS3OutputDir}/#{format(@scheduledStartTime, 'YYYY-MM-dd_HHmmss')}",
"type" : "S3DataNode"
}
],
"parameters" : [
{
"id": "myName",
"description": "A unique name for this pipeline, passed to CreatePipeline",
"type": "String"
},
{
"id": "myDescription",
"description": "A description of this pipeline, passed to CreatePipeline",
"type": "String"
},
{
"id": "myTags",
"description": "A list of tag:value pairs, passed to CreatePipeline",
"default": [],
"type": "String",
"isArray": "True"
},
{
"id": "myS3InputDir",
"description": "S3 directory where the run executable lives, destination for Pipewelder 'upload' commands",
"type": "AWS::S3::ObjectKey"
},
{
"id": "myS3OutputDir",
"description": "S3 directory where output files are collected",
"type": "AWS::S3::ObjectKey"
},
{
"id": "myS3LogDir",
"description": "S3 log folder",
"type": "AWS::S3::ObjectKey"
},
{
"id": "myStartDateTime",
"description": "Instant for the first run; Pipewelder will add multiples of mySchedulePeriod to ensure this instant is in the future",
"type": "String"
},
{
"id": "mySchedulePeriod",
"description": "How often to run, such as '1 hours'",
"type": "String"
},
{
"id": "myTerminateAfter",
"default": "#{format(minusMinutes(#{mySchedulePeriod}, 10))}",
"description": "duration after which the run should be terminated",
"type": "String"
}
]
}