Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

There are 2 subtypes of Daemon catalogs.

SubType : cronJob


Code Block
languageactionscript3
titlesoa.json for type=daemon
{
    "type": "daemon",
	"subType": "cronJob",
    "name": "damonsskubernetes",
    "group": "damongroup",
	"description": "This is the decryptiondescription of your cronJob daemon",

	"tagstab": ["tag1", "tag2"],
	"attributes": {
		"att1{
    	"main": ["att1.1"kubernetes_cronjob", "att1.2"],
		"att2
    	"sub": ["att2.1", "att2.2"]
	},
	"program": ["soajs"],
	"tab": {"Subtype_Daemon"
  	},

    	"mainport": "kubernetes cronjob"4100,
    	"subversion": "Subtype Daemon1"
,
 	},
	"documentation": {
		"readme": "/doc/markupfile",
		"release": "/doc/markupfile"
	},

	//Search criteria
  	"porttags": 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,["tag1", "tag2"],
	"attributes": {
		"att1": ["att1.1", "att1.2"],
		"att2": ["att2.1", "att2.2"]
	},
	"program": ["soajs"],

	//Configuration
	"maintenance": {
        "port": {
            "type": "inherit"
        },
        "readiness": "/heartbeat"
    },
    "prerequisites": {
        "cpu": " ",
        "memory": " "
    },

	//Custom profile
 	"profile": {
        //free to add whatever you want
    }
}

...

VariableRequireddescriptionexampleDefault
UI meta data
typeYesThe following type
are
is supported: static, service, daemon, multi, custom (anything else)if not set the default type will be custom.custom
subtype


daemons
tab


-
nameYesThe 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 
Then your daemon name should be: "merchant-daemon"


groupYesThe 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"


descriptionNoThe daemon description to appear in the daemon catalog UI"This is a string"-
Search meta data
tagsNo

-
attributesNo

-
programNo

-
Documentation meta data
documentationNo

-
Type meta data
swaggerFilenameNoThe 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
NoThe port of the daemon. make sure it is unique and not being used by any other daemon at the API catalog. 4100
versionYesThe version of the daemon. make sure it has the following syntax: a string of /[0-9]+(.[0-9]+)?/"1" or "1.1""1"
maintenanceNoThe heartbeat route to probe the health status of the service. 


Code Block
languageactionscript3
titleexample
{
 "port": {
    "type": "inherit"
        },
 "readiness": "/heartbeat",

 "commands": [
    {"label": "reload", "path": "/reload", "icon": "provision"}
        ]
}



prerequisitesNo



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
languagejs
titleexample
{
 "port": {
    "type": "inherit"
        },
 "readiness": "/heartbeat",

 "commands": [
    {"label": "My Command", "path": "/mypath", "icon": "wrench"}
        ]
}


Image Added


...

subType : daemon

The SOAJS daemon has extra parameters where the user can add specifically for this subType.


Code Block
languageactionscript3
titlesoa.json for type=daemon
{
    "type": "daemon",
	"subType": "daemon",
    "name": "damonss",
    "group": "damongroup",
	"description": "This is the description 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": " "
    }
}

...

Soajs Specific VariablesRequireddescriptionexampleDefault
extKeyRequiredNoTo turn on multi tenancy you need to have extKeyRequired set to true
default value is

true
oauthNoTo turn on oauth security for this daemon. 
default is false

soajs supports 2 types of oAuth

  • oAuth0 aka JWT or webToken
  • oAuth 2.0

soajs empowers you to turn on oAuth at many different levels

  1. At the service level by adding it to soa.json
    Adding it to soa.json means you want oauth to be on for this service by default

  2. At the service > environment level from the console under: develop tab → API catalog → service settings
    Adding it at the service settings gives you the flexibility to turn it on and off per service per environment, 
    Please note that this will overwrite soa.json  

  3. At the tenant level from the console under: manage tab → multi-tenancy
    Adding it at the tenant level gives you the flexibility to turn on or off oauth per tenant.
    Please note that this will overwrite the above 2 points
    Also, you can specify the type of oauth you want (oauth0 or oauth2)
false
uracNoTo add to the request header the logged in user information 

This is

supper

super useful when soajs gateway proxy the request to your service and you need to know who is the logged-in user.

default is


false
urac_ProfileNoTo add to the request header the logged in user profile information 
default is

false
urac_ACLNoTo add to the request header the logged in user ACL information 
default is

false
tenant_profileNo

false
provision_ACLNoTo add to the request header the tenant ACL information 
default is

false
requestTimeoutNoThe request lifetime
default is 30 

30
requestTimeoutRenewalNoHow many times to renew the request lifetime
default is

5
maintenanceYesThe heartbeat route to probe the health status of the service. 
Code Block
languageactionscript3
titleexample
{
 "port": {
    "type": "inherit"
        },
 "readiness": "/heartbeat",

 "commands": [
    {"label": "reload", "path": "/reload", "icon": "provision"}
        ]
}
prerequisites

...

Code Block
languagejs
titleexample
{
 "port": {
    "type": "inherit"
        },
 "readiness": "/heartbeat",

 "commands": [
    {"label": "My Command", "path": "/mypath", "icon": "wrench"}
        ]
}
Image Removed