Minion data cache plugin for Consul key/value data store.
New in version 2016.11.2.
python-consul >= 0.2.0
It is up to the system administrator to set up and configure the Consul infrastructure. All is needed for this plugin is a working Consul agent with a read-write access to the key-value store.
The related documentation can be found in the Consul documentation.
To enable this cache plugin, the master will need the python client for Consul installed. This can be easily installed with pip:
pip install python-consul
Optionally, depending on the Consul agent configuration, the following values could be set in the master config. These are the defaults:
consul.host: 127.0.0.1 consul.port: 8500 consul.token: None consul.scheme: http consul.consistency: default consul.dc: dc1 consul.verify: True
Related docs could be found in the python-consul documentation.
To use the consul as a minion data cache backend, set the master
Checks if the specified bank contains the specified key.
Fetch a key value.
Remove the key from the cache bank with all the key content.
Return an iterable object containing all entries stored in the specified bank.
store(bank, key, data)¶
Store a key value.