Skip to content

Commit

Permalink
fix: same datasource and app folder structure as DM-Apps
Browse files Browse the repository at this point in the history
  • Loading branch information
soofstad committed May 8, 2024
1 parent f7ce372 commit 9037073
Show file tree
Hide file tree
Showing 52 changed files with 1,557 additions and 9 deletions.
7 changes: 7 additions & 0 deletions example/app/data/WorkflowDS/Blueprints/AzureContainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "AzureContainer",
"type": "CORE:Blueprint",
"description": "Description of a executable job running as an Azure Container Instance",
"extends": ["Container"],
"attributes": []
}
31 changes: 31 additions & 0 deletions example/app/data/WorkflowDS/Blueprints/Container.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "Container",
"type": "CORE:Blueprint",
"description": "A container job",
"extends": ["JobHandler"],
"attributes": [
{
"name": "label",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"optional": true
},
{
"name": "image",
"type": "CORE:BlueprintAttribute",
"attributeType": "ContainerImage"
},
{
"name": "customCommand",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"optional": true,
"dimensions": "*"
},
{
"name": "name",
"type": "CORE:BlueprintAttribute",
"attributeType": "string"
}
]
}
40 changes: 40 additions & 0 deletions example/app/data/WorkflowDS/Blueprints/ContainerImage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "ContainerImage",
"type": "CORE:Blueprint",
"description": "Container image used as job runner for a task. Full container image name is name/subName",
"attributes": [
{
"name": "type",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"label": "Type",
"default": "",
"optional": false
},
{
"name": "description",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"default": "",
"optional": true,
"label": "Description"
},
{
"name": "imageName",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"optional": true
},
{
"name": "version",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"default": "latest"
},
{
"name": "registryName",
"type": "CORE:BlueprintAttribute",
"attributeType": "string"
}
]
}
35 changes: 35 additions & 0 deletions example/app/data/WorkflowDS/Blueprints/CronJob.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "CronJob",
"type": "CORE:Blueprint",
"description": "Blueprint for a job triggered by a time schedule",
"attributes": [
{
"name": "type",
"type": "CORE:BlueprintAttribute",
"attributeType": "string"
},
{
"name": "cron",
"type": "CORE:BlueprintAttribute",
"attributeType": "string"
},
{
"name": "startDate",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"optional": true
},
{
"name": "endDate",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"optional": true
},
{
"name": "runs",
"type": "CORE:BlueprintAttribute",
"attributeType": "./Job",
"dimensions": "*"
}
]
}
93 changes: 93 additions & 0 deletions example/app/data/WorkflowDS/Blueprints/Job.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"name": "Job",
"type": "CORE:Blueprint",
"attributes": [
{
"name": "type",
"type": "CORE:BlueprintAttribute",
"attributeType": "string"
},
{
"name": "uid",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"optional": true
},
{
"name": "name",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"optional": true
},
{
"name": "label",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"optional": true
},
{
"name": "triggeredBy",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"optional": true
},
{
"name": "status",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"optional": false,
"default": "not started",
"enumType": "./JobStatus"
},
{
"name": "applicationInput",
"type": "CORE:BlueprintAttribute",
"description": "Input entity to a job",
"attributeType": "object",
"label": "Input",
"contained": false,
"optional": true
},
{
"name": "started",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"optional": true
},
{
"name": "ended",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"optional": true
},
{
"name": "outputTarget",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"optional": true
},
{
"name": "result",
"type": "CORE:BlueprintAttribute",
"attributeType": "object",
"contained": false,
"optional": true
},
{
"name": "runner",
"type": "CORE:BlueprintAttribute",
"description": "JobRunner that will handle this job",
"attributeType": "JobHandler",
"label": "Runner",
"optional": true
},
{
"name": "referenceTarget",
"type": "CORE:BlueprintAttribute",
"description": "Dotted id to an analysis entity's job result. Should be on the format: entityId.jobs.*index*.result. Must be generated at run time since the index can vary.",
"attributeType": "string",
"label": "Reference target",
"optional": true
}
]
}
27 changes: 27 additions & 0 deletions example/app/data/WorkflowDS/Blueprints/JobHandler.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "JobHandler",
"type": "CORE:Blueprint",
"description": "Base jobHandler type. Other jobHandlers should extend from this one",
"attributes": [
{
"name": "type",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"optional": false
},
{
"name": "name",
"type": "CORE:BlueprintAttribute",
"attributeType": "string",
"optional": true
},
{
"name": "environmentVariables",
"type": "CORE:BlueprintAttribute",
"description": "a list of strings on format 'myVar=myValue'",
"attributeType": "string",
"dimensions": "*",
"optional": true
}
]
}
25 changes: 25 additions & 0 deletions example/app/data/WorkflowDS/Blueprints/JobStatus.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "JobStatus",
"type": "CORE:Enum",
"description": "String enum for valid job statuses",
"values": [
"registered",
"not started",
"starting",
"running",
"failed",
"completed",
"removed",
"unknown"
],
"labels": [
"Registered",
"Not Started",
"Starting",
"Running",
"Failed",
"Completed",
"Removed",
"Unknown"
]
}
13 changes: 13 additions & 0 deletions example/app/data/WorkflowDS/Blueprints/LocalContainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "LocalContainer",
"type": "CORE:Blueprint",
"description": "Description of a executable job running as a Container in a local Docker network",
"extends": ["Container"],
"attributes": [
{
"name": "network",
"type": "CORE:BlueprintAttribute",
"attributeType": "string"
}
]
}
20 changes: 20 additions & 0 deletions example/app/data/WorkflowDS/Blueprints/Radix.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "Radix",
"type": "CORE:Blueprint",
"description": "Description of a executable job running as an Radix job",
"extends": ["JobHandler"],
"attributes": [
{
"name": "jobName",
"type": "CORE:BlueprintAttribute",
"description": "The name defined in the radixconfig.yaml file",
"attributeType": "string"
},
{
"name": "schedulerPort",
"type": "CORE:BlueprintAttribute",
"description": "The schedulerPort defined in the radixconfig.yaml file",
"attributeType": "string"
}
]
}
23 changes: 23 additions & 0 deletions example/app/data/WorkflowDS/Blueprints/RecurringJob.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "RecurringJob",
"type": "CORE:Blueprint",
"extends": ["./Job"],
"attributes": [
{
"name": "applicationInput",
"type": "CORE:BlueprintAttribute",
"description": "Job entity to run on a schedule",
"attributeType": "./Job",
"label": "Job template",
"contained": true,
"optional": true
},
{
"name": "schedule",
"type": "CORE:BlueprintAttribute",
"description": "Schedule for a cronjob",
"attributeType": "CronJob",
"label": "Schedule"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "RecurringJobHandler",
"type": "CORE:Blueprint",
"description": "",
"extends": ["JobHandler"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "ReverseDescription",
"type": "CORE:Blueprint",
"description": "A job that takes an input of any type, and outputs a copy with the description reversed",
"extends": ["JobHandler"]
}
13 changes: 13 additions & 0 deletions example/app/data/WorkflowDS/Blueprints/Shell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "Shell",
"type": "CORE:Blueprint",
"description": "Description of a shell-job. That is a job that will run in the shell. Only for testing.",
"extends": ["CORE:NamedEntity", "JobHandler"],
"attributes": [
{
"name": "script",
"type": "CORE:BlueprintAttribute",
"attributeType": "string"
}
]
}
17 changes: 17 additions & 0 deletions example/app/data/WorkflowDS/Blueprints/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "Blueprints",
"type": "CORE:Package",
"_meta_": {
"type": "CORE:Meta",
"version": "0.0.1",
"dependencies": [
{
"type": "CORE:Dependency",
"alias": "CORE",
"address": "system/SIMOS",
"version": "0.0.1",
"protocol": "dmss"
}
]
}
}
28 changes: 28 additions & 0 deletions example/app/data/system/SIMOS/Application.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "Application",
"type": "dmss://system/SIMOS/Blueprint",
"description": "This describes an application",
"extends": ["dmss://system/SIMOS/NamedEntity"],
"attributes": [
{
"name": "label",
"type": "dmss://system/SIMOS/BlueprintAttribute",
"attributeType": "string",
"optional": true
},
{
"name": "dataSources",
"type": "dmss://system/SIMOS/BlueprintAttribute",
"attributeType": "string",
"dimensions": "*",
"optional": false
},
{
"name": "roles",
"type": "dmss://system/SIMOS/BlueprintAttribute",
"attributeType": "dmss://system/SIMOS/Role",
"optional": true,
"dimensions": "*"
}
]
}
Loading

0 comments on commit 9037073

Please sign in to comment.