salt的核心架构提供了一种高速的交流总线,在核心架构的上层,salt暴露出来的特征是:松散耦合,可插拔的子系统。

salt包含20中插件系统,常见的如下:

  • Authentication 运行job之前给用户授权
  • File server 分布式文件
  • Secure data store Makes user-defined variables and other data securely available.
  • State representation 描述系统基本配置.
  • Return formatter 将job结果格式化为一个普通的数据结构
  • Result cache job结果存储至一个长期存储空间
  • Remote execution 运行很多安装软件需要的任务,分布式文件和其他管理系统需要的东西
  • Configuration 配置目标系统,使达到一个理想状态

每一个salt module就是 salt中一个子系统的扩展。

灵活性

  • 任意一个能运行python的借口,都能运行salt
  • salt 格式化结果的方法
    salt支持多种格式,json, plain text, python data structure, and several other formats,只需要一个命令就可以转换成想要的格式
  • salt配置文件的格式,也可以自己设置
  • salt的存储位置有30种选择

salt组件

每个组价都是一个子系统的扩展

虚拟模块

salt使用virtual modules来抽象操作系统的基本细节。
不同操作系统之间,有些代码很难复用,例如安装某一个包,debian系统用aptkg,redhat使用yumpgk,这些都是用virtual module来实现的。

if debian:
   load this module as pkg
else:
   don’t load this

可以在salt模块中搜索 _virtualname,来找到salt在load module的时候使用的名字

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-29
  • 2021-09-28
  • 2021-07-06
  • 2021-07-10
  • 2021-12-17
猜你喜欢
  • 2022-03-01
  • 2022-12-23
  • 2021-12-07
  • 2021-12-16
  • 2022-01-15
  • 2021-10-15
  • 2021-06-29
相关资源
相似解决方案