This cookbook can be used to install the Gliderlabs Registrator.
- Debian/Ubuntu
- RHEL/CentOS
docker
- If thedocker
orsource_docker
install method is chosengolang
- If thesource
install method is chosenyum
,apt
,zypper
- Ifpackage
install method is chosen
Supported directory needs to be installed, e.g. Consul or Etcd. Please check the http://gliderlabs.com/registrator/latest/user/backends/
JSON: ['value']
== node['gliderlabs_registrator']['value']
Key | Type | Description | Default |
---|---|---|---|
['install_method'] | String | Installation method. Possible values: 'package', 'docker', 'source_docker', 'source'. Method 'package' requires 'addrepo' recipe to add custom repository. | 'source_docker' |
['registrator_repo'] | String | Docker repo for 'docker' installation method | 'gliderlabs/registrator' |
['registrator_tag'] | String | Docker repo tag for 'docker' installation method | 'latest' |
['golang_docker_repo'] | String | Docker repo with Go image for 'source_docker' install method | 'golang' |
['golang_docker_tag'] | String | Docker repo tag for 'source_docker' install method | 'latest' |
['bin_path'] | String | Path where to place the binary for 'source_docker' and 'source' methods | '/usr/local/bin' |
['src_command'] | String | Command to use to get sources for 'source_docker' and 'source' methods | 'go get github.com/gliderlabs/registrator' |
['backend'] | String | Directory backend type. Check documentation for the list of supported backends. | nil |
['backend_url'] | String | Directory backend URL | nil |
['backend_port'] | String | Directory backend port | nil |
['cleanup'] | String | Remove dangling services | nil |
['deregister'] | String | Deregister exited services "always" or "on-success" | 'always' |
['internal'] | String | Use internal ports instead of published ones | nil |
['ip'] | String | IP for ports mapped to the host | nil |
['resync'] | String | Frequency with which services are resynchronized | nil |
['retry-attempts'] | String | Max retry attempts to establish a connection with the backend. Use -1 for infinite retries | nil |
['retry-interval'] | String | Interval (in millisecond) between retry-attempts. | 2000 |
['tags'] | String | Append tags for all registered services | nil |
['ttl'] | String | TTL for services (default is no expiry) | nil |
['ttl-refresh'] | String | Frequency with which service TTLs are refreshed | nil |
['docker_bind'] | String | Docker socket to listen | '/var/run/docker.sock:/tmp/docker.sock' |
Include gliderlabs_registrator
in your node's run_list
:
{
"run_list": [
"recipe[gliderlabs_registrator::default]"
]
}
Alternatively, you can include it within your own recipe:
include_recipe 'gliderlabs_registrator::default'
Author:: Petr Belyaev upcfrost@gmail.com