Skip to main content
Jump to: navigation, search

Difference between revisions of "Etcd-Based Discovery Provider"

Line 22: Line 22:
 
|-
 
|-
 
| ecf.discovery.etcd.protocol
 
| ecf.discovery.etcd.protocol
| Etcd Server URL protocol. Example:  'http' in constructed Etcd Server URL 'http://127.0.0.1:4001/v2/keys'
+
| Etcd Server URL protocol. Example:  'http' in constructed Etcd Server URL 'http://127.0.0.1:2379/v2/keys'
 
| String
 
| String
 
| http
 
| http
 
|-
 
|-
 
| ecf.discovery.etcd.hostname
 
| ecf.discovery.etcd.hostname
| Etcd Server URL hostname.  Example:  '127.0.0.1'  in constructed Etcd Server URL 'http://127.0.0.1:4001/v2/keys'
+
| Etcd Server URL hostname.  Example:  '127.0.0.1'  in constructed Etcd Server URL 'http://127.0.0.1:2379/v2/keys'
 
| String
 
| String
| 127.0.0.1
+
| None.   Note that this system property is required and must be set to an operational etcd host.
 
|-
 
|-
 
| ecf.discovery.etcd.port
 
| ecf.discovery.etcd.port
| Etcd Server URL port.  Example:  '4001' in constructed Etcd Server URL 'http://127.0.0.1:4001/v2/keys'
+
| Etcd Server URL port.  Example:  '2379' in constructed Etcd Server URL 'http://127.0.0.1:2379/v2/keys'
 
| String
 
| String
| 4001
+
| 2379
 
|-
 
|-
 
| ecf.discovery.etcd.path
 
| ecf.discovery.etcd.path
| Etcd Server URL initial path.  Example:  '/v2/keys'  in constructed Etcd Server URL 'http://127.0.0.1:4001/v2/keys'
+
| Etcd Server URL initial path.  Example:  '/v2/keys'  in constructed Etcd Server URL 'http://127.0.0.1:2379/v2/keys'
 
| String
 
| String
 
| /v2/keys
 
| /v2/keys
 
|-
 
|-
 
| ecf.discovery.etcd.targetid
 
| ecf.discovery.etcd.targetid
| Etcd Server target.  Example:  'http://foo.bar:4002/v2/keys' in  'http://foo.bar:4002/v2/keys'.  Note that
+
| Etcd Server target.  Example:  'http://foo.bar:2379/v2/keys' in  'http://foo.bar:2379/v2/keys'.  Note that
 
if set, the value provided by this property will '''override''' the protocol, hostname, port, and path specified by the properties defined above.
 
if set, the value provided by this property will '''override''' the protocol, hostname, port, and path specified by the properties defined above.
 
| String
 
| String
Line 53: Line 53:
  
 
|-
 
|-
| ecf.discovery.etcd.closettl
+
| ecf.discovery.etcd.sessionTTL
| Etcd Client Container Close Time To Live (TTL).  In seconds.  This is the default time in seconds that the ECF Etcd Client 'close' message has on the etcd server as a time to live.
+
| Etcd Client Container SessionId Time To Live (TTL).  This is the time to live in seconds for the directory associated with the ectd-provider client.  The default behavior of the etcd-provider is to update the time to live when ~75% of the seconds in the TTL have expired.  If the ectd-provider gets disconnected from the etcd provider, any published services will remain available for =< TTL.
 
| Integer
 
| Integer
| 10 seconds
+
| 30 seconds
 +
 
 +
|-
 +
| ecf.discovery.etcd.containerId
 +
| Etcd Client Container Id.  This is the id that is shared for all etc-provider clients  The default is 'org.eclipse.ecf.provider.etcd.EtcdDiscoveryContainer' which means that all etcd-provider subscriptions are available at the following path:  http://127.0.0.1:2379/v2/keys/org.eclipse.ecf.provider.etcd.EtcdDiscoveryContainer/ 
 +
| String
 +
| org.eclipse.ecf.provider.etcd.EtcdDiscoveryContainer
  
 
|}
 
|}
  
 
Note that these values and defaults are also defined in the source code in the '''org.eclipse.ecf.provider.etcd.EtcdDiscoveryContainerConfig''' class available at githhub [https://github.com/ECF/etcd-provider/blob/master/bundles/org.eclipse.ecf.provider.etcd/src/org/eclipse/ecf/provider/etcd/EtcdDiscoveryContainerConfig.java here].
 
Note that these values and defaults are also defined in the source code in the '''org.eclipse.ecf.provider.etcd.EtcdDiscoveryContainerConfig''' class available at githhub [https://github.com/ECF/etcd-provider/blob/master/bundles/org.eclipse.ecf.provider.etcd/src/org/eclipse/ecf/provider/etcd/EtcdDiscoveryContainerConfig.java here].

Revision as of 23:54, 4 December 2017

As per enhancement request 440824, recently a new ECF discovery provider has been created, based upon the etcd server/service. See the etcd github project here for specifics about the etcd project.

Getting and Building the ECF Etcd Discovery Provider

The ECF Etcd Discovery Provider is currently available as one of ECF's github repositories. The etcd provider repository is here.

ECF does not currently build this provider, but this is something that could be done in the near future (fall 2014) if there is sufficient interest and some support for the necessary build and test configuration on ECF's build server. If you are able/willing to contribute to make this happen, please communicate with the project team by joining and posting to the ecf-def mailing list.

The ECF Etcd Discovery Provider is the project org.eclipse.ecf.provider.etcd in the bundles subdirectory. This is an Eclipse project and may be built via Eclipse Kepler or newer. Note that there is also a PDE feature project available in features/org.eclipse.ecf.provider.etcd.feature.

Etcd Discovery Provider Configuration Properties

As with other discovery providers, the ECF Etcd Discovery Provider is configured properties. Here is a table of the Etcd Discovery Provider configuration properties and their default values:

Property Name Description Type Default value
ecf.discovery.etcd.protocol Etcd Server URL protocol. Example: 'http' in constructed Etcd Server URL 'http://127.0.0.1:2379/v2/keys' String http
ecf.discovery.etcd.hostname Etcd Server URL hostname. Example: '127.0.0.1' in constructed Etcd Server URL 'http://127.0.0.1:2379/v2/keys' String None. Note that this system property is required and must be set to an operational etcd host.
ecf.discovery.etcd.port Etcd Server URL port. Example: '2379' in constructed Etcd Server URL 'http://127.0.0.1:2379/v2/keys' String 2379
ecf.discovery.etcd.path Etcd Server URL initial path. Example: '/v2/keys' in constructed Etcd Server URL 'http://127.0.0.1:2379/v2/keys' String /v2/keys
ecf.discovery.etcd.targetid Etcd Server target. Example: 'http://foo.bar:2379/v2/keys' in 'http://foo.bar:2379/v2/keys'. Note that

if set, the value provided by this property will override the protocol, hostname, port, and path specified by the properties defined above.

String null/no value resulting in the protocol, hostname, port, and path properties used to construct the etcd service URL
ecf.discovery.etcd.sessionid Etcd Client Container SessionId. This is typically an automatically-generiated UUID String value...e.g.: de1326d9-1ac6-431f-8ae1-9c0e31294047. If this property is set String null/no value resulting in a new UUID being created and assigned as the Etcd Client Container SessionId.
ecf.discovery.etcd.sessionTTL Etcd Client Container SessionId Time To Live (TTL). This is the time to live in seconds for the directory associated with the ectd-provider client. The default behavior of the etcd-provider is to update the time to live when ~75% of the seconds in the TTL have expired. If the ectd-provider gets disconnected from the etcd provider, any published services will remain available for =< TTL. Integer 30 seconds
ecf.discovery.etcd.containerId Etcd Client Container Id. This is the id that is shared for all etc-provider clients The default is 'org.eclipse.ecf.provider.etcd.EtcdDiscoveryContainer' which means that all etcd-provider subscriptions are available at the following path: http://127.0.0.1:2379/v2/keys/org.eclipse.ecf.provider.etcd.EtcdDiscoveryContainer/ String org.eclipse.ecf.provider.etcd.EtcdDiscoveryContainer

Note that these values and defaults are also defined in the source code in the org.eclipse.ecf.provider.etcd.EtcdDiscoveryContainerConfig class available at githhub here.

Back to the top