Pre-Deployment
Serverless Framework globally
1) Install the npm install serverless -g
Node Package Manager
2) Install dependencies using npm install
.env
file :
3) Create a Note: Ensure these values are safely stored and are NOT public.
CHAINLINK_ACCESS_KEY=<Your EI Access Key>
CHAINLINK_ACCESS_SECRET=<Your EI Secret>
Deployment
Deploy service using serverless:
Note: Ensure You have configured you Serverless CLI to use your AWS ACCESS KEY and SECRET KEY with the appropriate permissions to deploy.
sls deploy
API Reference
Health Check
GET https://
/
Job Registration (called by CL node when Job Spec is created)
POST https://
/
Parameter | Type | Description |
---|---|---|
jobId |
string |
Required. The External JOB ID of the Job Spec (on CL node). This is automatically populated and sent at time of job registration |
type |
string |
Required. The Name of the External Inititator admin created on the Node via Chainlink CLI. This is automatically populated and sent at time of job registration |
params |
JSON Object |
Required. Any spec params that are sent when the job is registered. (these are written in your job spec file) |
params.jobName |
String |
Required. The unique name of the Job Spec file. (the value of the name field in your job spec). You must specify this in your job spec |
ip |
string |
Required. The IP Address of the Node thats registering the JOB. This is automatically populated and sent at time of job registration |
Example of a valid Job Spec :
type = "webhook"
schemaVersion = 1
name = "job-1"
externalJobID = "unique-external-job-id" # you can pre-define it or just have the node auto generate one for you at creation by removing the attribute from your job spec
externalInitiators = [
{ name = "name-of-your-ei-on-your node", spec = "{\"jobName\": \"job-1\"}" }
]
observationSource = """
parse_request [type="jsonparse" path="foo" data="$(jobRun.requestBody)"]
parse_request
"""