There are 2 subtypes of Daemon catalogs, which require 2 separate Soa.json files for cronJob daemons and soajs daemons.
The soajs daemon has extra parameters where the user can add specifically for soajs.
subType : cronJob
Code Block | ||||
---|---|---|---|---|
| ||||
{ "type": "daemon", "subType": "cronJob", "name": "damonsskubernetes", "group": "damongroup", "description": "This is the decryptiondescription of your cronJob daemon", "tags": ["tag1", "tag2"], "attributes": { "att1": ["att1.1", "att1.2"], "att2": ["att2.1", "att2.2"] }, "program": ["soajs"], "tab": { "main": "kubernetes cronjob", "sub": "Subtype Daemon" }, "documentation": { "readme": "/doc/markupfile", "release": "/doc/markupfile" }, "port": 4100, "version": "1", "maintenance": { "port": { "type": "inherit" }, "readiness": "/heartbeat" }, "prerequisites": { "cpu": " ", "memory": " " } } |
...
Variable | Required | description | example | Default | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
UI meta data | |||||||||||
type | Yes | The following type is supported: static, service, daemon, multi, custom (anything else) | if not set the default type will be custom. | custom | |||||||
subtype | daemons | ||||||||||
tab | - | ||||||||||
name | Yes | The name of the daemon has to be unique and not been used by other daemons at the API catalog. | If the repoName is : xx.pay.merchant-daemon | ||||||||
group | Yes | The group of the daemon, make sure you set the right group to properly display the daemon under the right group at the daemon catalog. | The daemon Group should reflect the system the service belongs to "Payment" | ||||||||
description | No | The daemon description to appear in the daemon catalog UI | "This is a string" | - | |||||||
Search meta data | |||||||||||
tags | No | - | |||||||||
attributes | No | - | |||||||||
program | No | - | |||||||||
Documentation meta data | |||||||||||
documentation | No | - | |||||||||
Type meta data | |||||||||||
swaggerFilename | No | The location of the service swagger file from the repository root. if not set soajs will look for swagger.yml or swagger.json at the root folder. | "/doc/swagger.yml" | swagger.json | |||||||
port | YesNo | The port of the daemon. make sure it is unique and not being used by any other daemon at the API catalog. | 4100 | ||||||||
version | Yes | The version of the daemon. make sure it has the following syntax: a string of /[0-9]+(.[0-9]+)?/ | "1" or "1.1" | "1" | |||||||
maintenance | YesNo | The heartbeat route to probe the health status of the service. |
| ||||||||
prerequisites | No |
Maintenance Icon
For maintenance SOAJS is using font awesome, check out the available icons at https://fontawesome.com/icons?d=gallery
For example, if you choose the wrench icon as follows :
...
Code Block | ||||
---|---|---|---|---|
| ||||
{ "type": "daemon", "subType": "daemon", "name": "damonss", "group": "damongroup", "description": "This is the decryptiondescription of your daemon of type soajs", "tags": ["tag1", "tag2"], "attributes": { "att1": ["att1.1", "att1.2"], "att2": ["att2.1", "att2.2"] }, "program": ["soajs"], "tab": { "main": "kubernetes cronjob", "sub": "Subtype Daemon" }, "documentation": { "readme": "/doc/markupfile", "release": "/doc/markupfile" }, "port": 4100, "version": "1", "extKeyRequired": true, "oauth": true, "urac": true, "urac_Profile": true, "urac_ACL": false, "tenant_Profile": false, "provision_ACL": false, "requestTimeout": 30, "requestTimeoutRenewal": 5, "maintenance": { "port": { "type": "inherit" }, "readiness": "/heartbeat" }, "prerequisites": { "cpu": " ", "memory": " " } } |
...
Code Block | ||||
---|---|---|---|---|
| ||||
{
"port": {
"type": "inherit"
},
"readiness": "/heartbeat",
"commands": [
{"label": "My Command", "path": "/mypath", "icon": "wrench"}
]
} |
VariableSoajs Specific Variables | Required | description | example | Default | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
UI meta data | |||||||||||||||
type | Yes | The following type are supported: static, service, daemon, multi, custom (anything else) | if not set the default type will be custom. | custom | subtype | daemons | tab | - | name | Yes | The name of the daemon has to be unique and not been used by other daemons at the API catalog. | If the repoName is : xx.pay.merchant-daemon | group | Yes | The group of the daemon, make sure you set the right group to properly display the daemon under the right group at the daemon catalog. | The daemon Group should reflect the system the service belongs to "Payment" |
description | No | The daemon description to appear in the daemon catalog UI | "This is a string" | - | |||||||||||
Search meta data | tags | No | - | attributes | No | - | program | No | - | ||||||
Documentation meta data | documentation | No | - | ||||||||||||
Type meta data | |||||||||||||||
swaggerFilename | No | The location of the service swagger file from the repository root. if not set soajs will look for swagger.yml or swagger.json at the root folder. | "/doc/swagger.yml" | swagger.json | |||||||||||
port | Yes | The port of the daemon. make sure it is unique and not being used by any other daemon at the API catalog. | 4100 | version | Yes | The version of the daemon. make sure it has the following syntax: a string of /[0-9]+(.[0-9]+)?/ | "1" or "1.1" | "1"||||||||
extKeyRequired | No | To turn on multi tenancy you need to have extKeyRequired set to true | true | ||||||||||||
oauth | No | To turn on oauth security for this daemon. | soajs supports 2 types of oAuth
soajs empowers you to turn on oAuth at many different levels
| false | |||||||||||
urac | No | To add to the request header the logged in user information | This is super useful when soajs gateway proxy the request to your service and you need to know who is the logged-in user. | false | |||||||||||
urac_Profile | No | To add to the request header the logged in user profile information | false | ||||||||||||
urac_ACL | No | To add to the request header the logged in user ACL information | false | ||||||||||||
tenant_profile | No | false | |||||||||||||
provision_ACL | No | To add to the request header the tenant ACL information | false | ||||||||||||
requestTimeout | No | The request lifetime | 30 | ||||||||||||
requestTimeoutRenewal | No | How many times to renew the request lifetime | 5 | maintenance | Yes | The heartbeat route to probe the health status of the service. |
Code Block | ||||
---|---|---|---|---|
| ||||
{
"port": {
"type": "inherit"
},
"readiness": "/heartbeat",
"commands": [
{"label": "reload", "path": "/reload", "icon": "provision"}
]
} |
...