• SaltStack之安装


    环境:

    安装环境:centos6.5 x64
    master:192.168.0.23
    minion:192.168.0.24

    安装epel源

    /etc/init.d/iptables stop
    sed -i '/SELINUX/s/enforcing/disabled/g' /etc/selinux/config 
    
    wget http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm 
    rpm -ivh epel-release-6-8.noarch.rpm
    
    master安装:
    yum -y install salt-master salt-minion
    chkconfig salt-master on
    minion安装
    yum -y install salt-minion
    chkconfig salt-minion on
    

    配置salt-master

    user: root
    worker_threads: 5
    publish_port: 4505
    worker_threads: 5
    pidfile: /var/run/salt-master.pid
    users:
    - root
    file_roots:
    base:
    - /srv/salt/
    dev:
    - /srv/salt/dev/
    log_file: /var/log/salt/master
    

    配置salt-master

    user: root
    master : 192.168.0.23
    id: node24.com
    master_port: 4506
    log_file: /var/logs/salt_minion.log
    

    启动salt

    master
    service salt-master restart
    
    minion
    service salt-minion restart
    

    注意: saltstack 是使用python2的语言编写,对python3的兼容性不好,请使用python2的环境

    salt认证

    master上查看认证

    # salt-key 
    Accepted Keys:
    Denied Keys:
    Unaccepted Keys:
    node24.com
    Rejected Keys:
    

    salt-key -y -a node24.com #添加单个key

    # salt-key 
    Accepted Keys:
    node24.com
    Denied Keys:
    Unaccepted Keys:
    Rejected Keys:
    

    测试salt

    salt '*' test.ping 
    node24.com:
    True
    node23.com:
    True
    

    由此安装完成

  • 相关阅读:
    齐次和线性
    数组指针/指针数组
    坐标转换矩阵
    【转】GMM与K-means聚类效果实战
    利用虚函数实现多态的方式:动态绑定
    类型限定符volatile
    《剑指offer》查找二维数组内元素 c++
    windows下使用命令行编译、链接C++源文件
    关于该博客的美化
    vimium快捷键修改
  • 原文地址:https://www.cnblogs.com/iteemo/p/5547692.html
Copyright © 2020-2023  润新知