IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
GCE Virtual Machine Discovery
editGCE Virtual Machine Discovery
editGoogle Compute Engine VM discovery allows to use the google APIs to perform automatic discovery (similar to multicast in non hostile multicast environments). Here is a simple sample configuration:
cloud: gce: project_id: <your-google-project-id> zone: <your-zone> discovery: type: gce
The following gce settings (prefixed with cloud.gce
) are supported:
-
project_id
- Your Google project id (mandatory).
-
zone
- helps to retrieve instances running in a given zone (mandatory). It should be one of the GCE supported zones. See also Using GCE zones.
-
retry
-
If set to
true
, client will use ExponentialBackOff policy to retry the failed http request. Defaults totrue
. -
max_wait
-
The maximum elapsed time after the client instantiating retry. If the time elapsed goes past the
max_wait
, client stops to retry. A negative value means that it will wait indefinitely. Defaults to0s
(retry indefinitely). -
refresh_interval
-
How long the list of hosts is cached to prevent further requests to the GCE API.
0s
disables caching. A negative value will cause infinite caching. Defaults to0s
.
Binding the network host
It’s important to define network.host
as by default it’s bound to localhost
.
You can use core network host settings or gce specific host settings: