teg saltstack部署

葫芦的运维日志

下一篇 搜索 上一篇

浏览量 4807

2019/11/19 02:52


部署环境:

操作系统

Saltstack版本

Centos7.6

2017.07.8

配置文件:

  /etc/salt/master

  /etc/salt/minion

  /etc/salt/ master.d/

  /etc/salt/minion.d/

1.部署master

1.1获取yum

yum install https://repo.saltstack.com/yum/redhat/salt-repo-2017.7-1.el7.noarch.rpm

1.2部署服务(master节点)

yum install salt-master

yum install salt-minion

yum install salt-ssh

yum install salt-syndic

yum install salt-cloud

yum install salt-api

 

1.3修改配置文件

 


#vim  /etc/salt/master

#grep -Ev "^$|[#;]" master

auto_accept: True

default_include: master.d/*.conf

file_roots:

   base:

     - /srv/salt/



#cat /etc/salt/master.d/api.conf



rest_cherrypy:

    host: 0.0.0.0

    port: 8081

    disable_ssl: True

    log_access_file: /data/log/salt-api

    thread_pool: 128

socket_queue_size: 128

#cat /etc/salt/master.d/eauth.conf
external_auth:
  pam:
    salt-admin:
      - .*
      - '@runner'
      - '@wheel'
      - '@jobs'
#cat /etc/salt/minion
default_include: minion.d/*.conf
acceptance_wait_time: 8
rejected_retry: True
#cat /etc/salt/minion.d/master.conf
master:
  - ip.ip.ip.ip   #masterip
#cat /etc/salt/minion.d/ops-deploy-agent.conf
enable_zip_modules: True

#systemctl start salt-master0
#systemctl  enable salt-master 
#systemctl  start salt-api
#systemctl enable salt-api 

2.部署minion

2.1获取yum

yum install https://repo.saltstack.com/yum/redhat/salt-repo-2017.7-1.el7.noarch.rpm

2.2部署服务

yum install salt-minion

2.3修改配置文件

#cat/etc/salt/minion

default_include: minion.d/*.conf

acceptance_wait_time: 8

rejected_retry: True



#cat /etc/salt/minion.d/master.conf

master:

  - ip.ip.ip.masterip

#systemctl start salt-minion

#systemctl enable salt-minion

 

3.验证(master节点)

#salt-key –L

葫芦的运维日志

打赏

上一篇 搜索 下一篇
© 冰糖葫芦甜(bthlt.com) 2021 王梓打赏联系方式 陕ICP备17005322号-1