Files
cluster-knaster/n8n/workflows/knaster-jobs.json
T

250 lines
5.7 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"name": "knaster: Jobs an Runner/Hermes",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "knaster/jobs",
"responseMode": "responseNode",
"options": {},
"authentication": "headerAuth"
},
"id": "24f3f3a3-47ae-5b87-8902-bcc3465b593a",
"name": "Job",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
0,
300
],
"webhookId": "03e1babe-7daa-5ab1-ba6e-8cc4de50268c",
"credentials": {
"httpHeaderAuth": {
"id": "",
"name": "knaster-webhook"
}
}
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "b3b14ae1-2d7f-5ef9-a96f-1d3693c703f6",
"name": "router_url",
"value": "http://router:8080",
"type": "string"
},
{
"id": "a3123e42-afa4-53f7-a266-066cce1ff763",
"name": "trainer_url",
"value": "http://gpu-flex:9000/jobs",
"type": "string"
},
{
"id": "c672b90a-49d5-5e50-9b23-3766353f0487",
"name": "hermes_url",
"value": "http://hermes:8000/jobs",
"type": "string"
}
]
},
"options": {}
},
"id": "acb2e1cb-0776-564b-b909-b5b3f613dc88",
"name": "Konfiguration",
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
220,
300
],
"notes": "Nach dem Import anpassen. Credential 'knaster-router' = Header Auth: Authorization / Bearer <KNASTER_API_TOKEN>"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "loose"
},
"conditions": [
{
"id": "9dec25ae-5535-5f01-aebb-b9d7e7397686",
"leftValue": "={{ ['graduate_skill','merge_skills'].includes($('Job').item.json.body.job) }}",
"rightValue": true,
"operator": {
"type": "boolean",
"operation": "true"
}
}
],
"combinator": "and"
},
"options": {}
},
"id": "a2881a83-cbb5-5cdb-96bb-d6a1833ac388",
"name": "Skill-Job?",
"type": "n8n-nodes-base.if",
"typeVersion": 2,
"position": [
440,
300
]
},
{
"parameters": {
"method": "POST",
"url": "={{ $('Konfiguration').item.json.hermes_url }}",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={{ JSON.stringify($('Job').item.json.body) }}",
"options": {
"timeout": 30000
}
},
"id": "ba36e0ed-7cca-5c04-af60-9644177cac6f",
"name": "An Hermes (Skill-Autor)",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
660,
200
],
"credentials": {
"httpHeaderAuth": {
"id": "",
"name": "knaster-router"
}
}
},
{
"parameters": {
"method": "POST",
"url": "={{ $('Konfiguration').item.json.trainer_url }}",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={{ JSON.stringify($('Job').item.json.body) }}",
"options": {
"timeout": 30000
}
},
"id": "98abbd0d-1384-52bb-b095-cb978f2bcc37",
"name": "An Trainings-Runner",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
660,
420
],
"credentials": {
"httpHeaderAuth": {
"id": "",
"name": "knaster-router"
}
}
},
{
"parameters": {
"respondWith": "json",
"responseBody": "={{ JSON.stringify({ accepted: true }) }}",
"options": {
"responseCode": 202
}
},
"id": "6678356f-6c70-58fe-a9e0-be3d7cf23851",
"name": "Angenommen",
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.1,
"position": [
880,
300
]
}
],
"connections": {
"Job": {
"main": [
[
{
"node": "Konfiguration",
"type": "main",
"index": 0
}
]
]
},
"Konfiguration": {
"main": [
[
{
"node": "Skill-Job?",
"type": "main",
"index": 0
}
]
]
},
"Skill-Job?": {
"main": [
[
{
"node": "An Hermes (Skill-Autor)",
"type": "main",
"index": 0
}
],
[
{
"node": "An Trainings-Runner",
"type": "main",
"index": 0
}
]
]
},
"An Hermes (Skill-Autor)": {
"main": [
[
{
"node": "Angenommen",
"type": "main",
"index": 0
}
]
]
},
"An Trainings-Runner": {
"main": [
[
{
"node": "Angenommen",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"tags": [
{
"name": "knaster"
},
{
"name": "lifecycle"
}
],
"meta": {
"description": "cluster-knaster – siehe docs/spec. Import inaktiv, Credentials setzen."
}
}