1.安装
https://docs.saltproject.io/salt/install-guide/en/latest/topics/overview.html
1.1linux使用Bootstrap installation安装
#下载文件bootstrap-salt.sh curl -o bootstrap-salt.sh -L https://bootstrap.saltproject.io #添加权限 chmod +x bootstrap-salt.sh #安装 #For example, to run the default, which only installs the minion service: ./bootstrap-salt.sh #To install both the Salt master and minion services: ./bootstrap-salt.sh -M #To install just the Salt master service: ./bootstrap-salt.sh -M -N #To perform a pip-based installation: ./bootstrap-salt.sh -P
1.2linux也可以使用手动安装
例如centos7
#下载key sudo rpm --import https://repo.saltproject.io/salt/py3/redhat/7/x86_64/SALT-PROJECT-GPG-PUBKEY-2023.pub #下载repo文件 curl -fsSL https://repo.saltproject.io/salt/py3/redhat/7/x86_64/latest.repo | sudo tee /etc/yum.repos.d/salt.repo #按需求安装salt-minion, salt-master, or other Salt components: sudo yum install salt-master sudo yum install salt-minion sudo yum install salt-ssh sudo yum install salt-syndic sudo yum install salt-cloud sudo yum install salt-api #按需求启动salt-minion, salt-master, or other Salt components: sudo systemctl enable salt-master && sudo systemctl start salt-master sudo systemctl enable salt-minion && sudo systemctl start salt-minion sudo systemctl enable salt-syndic && sudo systemctl start salt-syndic sudo systemctl enable salt-api && sudo systemctl start salt-api
3.所有平台都可以通过pip进行安装
pip3 install salt
2.配置
master文件的地址为/etc/salt/master,通常放置在/etc/salt/master.d/下创建配置文件。
worker_threads为线程数,默认为5个,每个线程支持200个minions,通常worker_threads设置为不超过cpu个数的1.5倍。
标签:bootstrap,sudo,systemctl,master,install,使用,saltstack,salt From: https://www.cnblogs.com/xiaoxiaomuyuyu/p/18026894