Minion Data Cache - Minion数据缓存
大约 1 分钟约 397 字
Minion Data Cache - Minion数据缓存
New in version 2016.11.0.
Minion 的缓存数据包括 Salt Mine data、 minion grains 以及缓存在Salt Master上的 minion pillar 等和类信息。默认地, Salt 使用 localfs
缓存模块将数据保存在Salt Master上一个 msgpack
格式的文件中。
Pluggable Data Cache - 可插拔的数据缓存模块
默认地 Minion data cache 是 localfs
缓存, 其它的外部数据存储服务同样也可以用于存储这些数据,例如 consul
模块。如果需要配置 Salt Master 使用其它的数据缓存服务, 需要设置 cache 参数:
cache: consul
可插拔的数据缓存服务,通过允许在Salt Master上存储的有关Salt Minion的数据可用于与Salt Minion连接的其他Salt Syndics或Salt Master,来支持使用各种Salt部署架构拓扑(如Multi-Master或Salt Syndics配置)。
通过在现有缓存模块之后添加自定义数据存储模块,可以轻松扩展使用其他minion数据缓存模块。
查看目前支持的 cache modules 列表。
Configuring the Minion Data Cache - 配置使用Minion数据缓存服务
默认的 localfs
Minion数据缓存模块不需要任何配置。 使用外部数据存储服务(例如Consul)的外部数据缓存模块需要在master配置中进行设置。
这是Consul的示例配置:
consul.host: 127.0.0.1
consul.port: 8500
consul.token: None
consul.scheme: http
consul.consistency: default
consul.dc: dc1
consul.verify: True
cache: consul