Caduceus

Currently Caduceus depends on SNS

Installation

Configuration

Refer to configuration file for how to configure Caduceus.

Connecting to AWS

Under the AWS block of the yaml file you will have

aws:
  accessKey: ""
  secretKey: ""
  env: local-dev
  sns:
    awsEndpoint: http://goaws:4100
    region: "us-east-1"
    topicArn: arn:aws:sns:us-east-1:000000000000:xmidt-local-caduceus
    urlPath: "/api/v2/aws/sns"

For local testing you can use a mock sns instance

Validation

Test Health

curl -i HOSTNAME:HEALTH_PORT/health
$ curl -i localhost:6001/health
HTTP/1.1 200 OK
Content-Type: application/json
X-Caduceus-Build: development
X-Caduceus-Flavor: development
X-Caduceus-Region: local
X-Caduceus-Server: localhost
X-Caduceus-Start-Time: 26 Aug 19 18:43 UTC
Date: Mon, 26 Aug 2019 20:10:28 GMT
Content-Length: 427
Connection: close

{"CurrentMemoryUtilizationActive":895574016,"CurrentMemoryUtilizationAlloc":3190504,"CurrentMemoryUtilizationHeapSys":66224128,"MaxMemoryUtilizationActive":946352128,"MaxMemoryUtilizationAlloc":3908816,"MaxMemoryUtilizationHeapSys":66420736,"PayloadsOverHundred":0,"PayloadsOverTenThousand":0,"PayloadsOverThousand":0,"PayloadsOverZero":0,"TotalRequestsDenied":0,"TotalRequestsReceived":0,"TotalRequestsSuccessfullyServiced":0}

Test Webhooks

Get webhooks

curl -i -H "Authorization: Basic AUTHOKEN" HOSTNAME:PRIMARY_PORT/hooks

Where HOSTNAME is your DNS record, docker container, or ip address listening on the PRIMARY_PORT. Where AUTHOKEN is the authHeader in the yaml configuration file.

$ curl -i -H "Authorization: Basic dXNlcjpwYXNz" localhost:6000/hooks
HTTP/1.1 200 OK
Content-Type: application/json
X-Caduceus-Build: development
X-Caduceus-Flavor: development
X-Caduceus-Region: local
X-Caduceus-Server: localhost
X-Caduceus-Start-Time: 26 Aug 19 18:43 UTC
Date: Mon, 26 Aug 2019 20:12:36 GMT
Content-Length: 2

[]

NOTE: dXNlcjpwYXNz is an example auth string for Caduceus. DO NOT use this in production.

Register a webhook

Create a listener.
You should see it by checking the hooks endpoint.

Testing webhook

Connect a device to Talaria, described here. When the device connects and disconnects to Talaria, the listener should receive an online and offline event.

Troubleshooting

The most common error is that Talaria is not configured correctly to talk to Caduceus.

Next

The Cluster is up and running. Take a look at Codex for how to build a Codex cluster.

This documentation is open-source. Please help improve it by filing issues or pull requests.