- 
                Notifications
    You must be signed in to change notification settings 
- Fork 5
Configuring Device Catalog
        Alexandr Krylovskiy edited this page Nov 7, 2014 
        ·
        9 revisions
      
    Device Catalog is configured using a JSON configuration file, path to which is provided to the DC via -conf flag.
The default configuration file (provided in the binary distribution) is located at
conf/device-catalog.json
{
  "description": <string>,
  "dnssdEnabled": <bool>,
  "publicAddr": <string>,
  "bindAddr": <int>,
  "bindPort": <int>,
  "apiLocation": <string>,
  "staticDir": <string>,
  "storage": {
  	"type": <string>
  },
  "serviceCatalog": [
   {
     "discover": <bool>,
     "endpoint": <string>,
     "ttl": <int>
   }
  ]
}Where
- 
descriptionis a human-readable description
- 
dnssdEnabledis a flag enabling DNS-SD advertisement of the catalog on the network
- 
publicAddris the FQDN or IP address of the host, which must be routable in the deployment environment
- 
bindAddris the bind address for the Device Catalog API
- 
bindPortis the tcp port for the API
- 
apiLocationis the API location (path in the endpoint URL)
- 
staticDiris the path to the directory with static files
- 
storageis the configuration of the storage backend
- 
typeis the type of the backend (onlymemoryis currently supported)
- 
serviceCatalogis an array of Service Catalogs. The Device Catalog will be published as a service to each configured Service Catalog (if not empty)
- 
discoveris a flag enabling automatic discovery of the Service Catalog using DNS-SD
- 
endpointis the URL of the remote Service Catalog API (http://address:port/path)
- 
ttlis the TTL for the service registration
The default configuration file (provided in the binary distribution) is the following:
{
  "description": "Standalone Device Catalog",
  "dnssdEnabled": true,
  "publicAddr": "fqdn-of-the-host",
  "bindAddr": "0.0.0.0",
  "bindPort": 8081,
  "apiLocation": "/dc",
  "staticDir": "./static",
  "storage": {
    "type": "memory"
  },
  "serviceCatalog": [
    {
      "discover": false,
      "endpoint": "http://remotehost:8081/dc",
      "ttl": 120
    }
  ]
}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