Skip to content

Retrieves configuration from CoreOS etcd

License

Notifications You must be signed in to change notification settings

play-rconf/play-rconf-etcd

Repository files navigation

Play Remote Configuration - CoreOS etcd

Latest release JitPack Build GitHub license

Retrieves configuration from CoreOS etcd


About this project

In production, it is not always easy to manage the configuration files of a Play Framework application, especially when it running on multiple servers. The purpose of this project is to provide a simple way to use a remote configuration with a Play Framework application.

How to use

To enable this provider, just add the classpath "io.playrconf.provider.EtcdProvider" and the following configuration:

remote-configuration {

  ## CoreOS etcd
  # ~~~~~
  # Retrieves configuration from CoreOS etcd
  etcd {

    # API endpoint. HTTPS endpoint could be used,
    # but the SSL certificate must be valid
    endpoint = "http://127.0.0.1:2379/"
    endpoint = ${?REMOTECONF_ETCD_ENDPOINT}

    # Authentication username
    username = ""
    username = ${?REMOTECONF_ETCD_USERNAME}

    # Authentication password
    password = ""
    password = ${?REMOTECONF_ETCD_PASSWORD}

    # Prefix. Get only values with key beginning
    # with the configured prefix. With etcd, it
    # must be a directory.
    prefix = "/"
    prefix = ${?REMOTECONF_ETCD_PREFIX}
  }
}

License

This project is released under terms of the MIT license.