-
Notifications
You must be signed in to change notification settings - Fork 6
Configuring Services
Third-party services can be registered in the Service Catalog using the registrator utility and a configuration file described in this section.
{
"host": "message-broker.local",
"name": "MqttBroker",
"description": "Demo MQTT Broker",
"meta": {
"serviceType": "_mqtt._tcp",
"apiVersion": "3.1.1"
},
"ttl": 120,
"protocols": [
{
"type": "MQTT",
"endpoint": {
"url": "tcp://mqtt-broker.local:1883"
},
"methods": [
"PUB",
"SUB"
],
"content-types": []
}
],
"representation": {}
}
The configuration resembles the properties of the Service object described in the Service Catalog API, with the difference that instead of an id
, the host
(unique id (fqdn or IP address) of the host running the service) and name
(name of the service) are used.
The registration utility is provided in the binary distribution at:
bin/service-registrator
It accepts two CLI arguments:
-
-conf
path to the JSON configuration file of a service -
-endpoint
the URL of the Service Catalog API
Given the Service config file and the endpoint of the Service Catalog, the registrator utility registers the Service in the catalog and keeps updating the registration according to the configured TTL.
Taking the example configuration file shown above (conf/services/mqtt-broker.json
), the desribed service can be registered as follows:
./bin/service-registrator -conf conf/services/mqtt-broker.json -endpoint http://127.0.0.1:8082/sc
About Patchwork Toolkit
Configuration
- Configuring Device Gateway
- Configuring Devices
- Configuring Device Catalog
- Configuring Service Catalog
- Configuring Services
Deployment examples
- Singleall-in-on-box
- Multiple Device Gateways with optional central Device Catalog
- Using central Service Catalog
API for Application developers
Integrating devices
- TBD...
Third-party integrations