Talaria

Installation

Configuration

Refer to configuration file for how to configure Talaria.

Fixed

For fixed routing, the service block in Talaria's configuration should look similar to the example below:

service:
  defaultScheme: http
  fixed:
    - http://HOSTNAME:PRIMARY_PORT

Where HOSTNAME is your DNS record, docker container, or ip address listening on the PRIMARY_PORT.

NOTE: if you have domain or host certificates available, we recommend always running the service (and all components in the service) in https mode.

Consul

For a consul managed list of Talarias, the service block in Talaria's configuration should look similar to the example below:

service:
  defaultScheme: http
  consul:
    client:
      address: "CONSUL_ADDRESS:8500"
      scheme: "http"
      waitTime: "30s"
    disableGenerateID: true
    vnodeCount: 211
    watches:
      -
        service: "talaria"
        tags:
          - "dev"
          - "docker"
        passingOnly: true
    registrations:
      -
        id: "HOSTNAME"
        name: "talaria"
        tags:
          - "dev"
          - "docker"
          - "stage=dev"
          - "flavor=docker"
        address: "http://HOSTNAME"
        scheme: "http"
        port: 6210
        checks:
          -
            checkID: "talaria-1:http"
            http: "http://HOSTNAME:HEALTH_PORT/health"
            interval: "30s"
            deregisterCriticalServiceAfter: "70s"

Where CONSUL_ADDRESS is your Consul DNS record, docker container, or ip address. Where HOSTNAME is your DNS record, docker container, or ip address for this service listening on the HEALTH_PORT.

Talaria is watching for the other Talarias and is registering itself.

NOTE: if you have certs available, change http to https. HTTP should never be run in production.

Validation

Test Health

curl HOSTNAME:HEALTH_PORT/health -i
$ curl localhost:6201/health -i
HTTP/1.1 200 OK
Content-Type: application/json
X-Talaria-Build: development
X-Talaria-Flavor: development
X-Talaria-Region: local
X-Talaria-Server: localhost
X-Talaria-Start-Time: 26 Aug 19 18:43 UTC
Date: Mon, 26 Aug 2019 18:44:30 GMT
Content-Length: 497
Connection: close

{"CurrentMemoryUtilizationActive":931160064,"CurrentMemoryUtilizationAlloc":2907696,"CurrentMemoryUtilizationHeapSys":66093056,"DeviceCount":0,"MaxMemoryUtilizationActive":931160064,"MaxMemoryUtilizationAlloc":3649496,"MaxMemoryUtilizationHeapSys":66125824,"TotalConnectionEvents":0,"TotalDisconnectionEvents":0,"TotalPingMessagesReceived":0,"TotalPongMessagesReceived":0,"TotalRequestsDenied":0,"TotalRequestsReceived":0,"TotalRequestsSuccessfullyServiced":0,"TotalWRPRequestResponseProcessed":0}

Test Device Connection

Using a device simulator we can mock a device connecting to our cluster. The core part of the device simulator that connects to Talaria is Parados. Instead of mocking the device we can also mock Parados with kratos.

docker run -e URL=http://HOSTNAME:PRIMARY_PORT rdkb-simulator

Where HOSTNAME is your DNS record, docker container, or ip address listening on the PRIMARY_PORT. NOTE: If you are running Talaria locally, you will need to provide the ip address of your machine.

Get Connected Devices

NOTE: This is a very expensive command. Do NOT run it in production.

curl -i -H "Authorization: Basic AUTHOKEN" HOSTNAME:PRIMARY_PORT/api/v2/devices

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

The following is an example. Do not use this auth key in production.

$ curl -i -H "Authorization: Basic dXNlcjpwYXNz" http://localhost:6200/api/v2/devices
HTTP/1.1 200 OK
Content-Type: application/json
X-Talaria-Build: development
X-Talaria-Flavor: development
X-Talaria-Region: local
X-Talaria-Server: localhost
X-Talaria-Start-Time: 26 Aug 19 18:43 UTC
Date: Mon, 26 Aug 2019 18:57:54 GMT
Content-Length: 245

{"devices":[{"id": "mac:112233445566", "pending": 0, "statistics": {"bytesSent": 0, "messagesSent": 0, "bytesReceived": 0, "messagesReceived": 0, "duplications": 0, "connectedAt": "2019-08-26T18:43:57.666272023Z", "upTime": "13m56.48957368s"}}]}

Troubleshooting

The most common error is devices not showing.

Next

Talaria should be up and running now; let's stand up Petasos.

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