官方源: saltstack yum源
系統環境
# cat /etc/redhat-release
centos linux release 7.2.1511 (core)
saltstack安裝版本
# salt -v
salt version:
salt: 2017.7.2
dependency versions:
cffi: 0.8.6
cherrypy: not installed
dateutil: 1.5
docker-py: not installed
gitdb: not installed
gitpython: not installed
ioflo: not installed
jinja2: 2.7.2
libgit2: not installed
libnacl: not installed
m2crypto: not installed
mako: 0.8.1
msgpack-pure: not installed
msgpack-python: 0.4.6
mysql-python: not installed
pycparser: 2.14
pycrypto: 2.6.1
pycryptodome: not installed
pygit2: not installed
python: 2.7.5 (default, nov 20 2015, 02:00:19)
python-gnupg: not installed
pyyaml: 3.11
pyzmq: 15.3.0
raet: not installed
smmap: not installed
timelib: not installed
tornado: 4.2.1
zmq: 4.1.4
system versions:
dist: centos 7.2.1511 core
locale: utf-8
machine: x86_64
release: 3.10.0-327.el7.x86_64
system: linux
version: centos linux 7.2.1511 core
安裝步驟和基本配置
1臺master 10.10.10.1 master-node
1臺minion 10.10.10.2 minion-node
master節點
# yum install -y salt-master salt-minion
# cat /etc/salt/master |grep -v "#" |grep -v "^ *$"
inte***ce: 10.10.10.1qa
state_top: top.sls
file_roots:
base:
- /etc/salt/base
prod:
- /etc/salt/prod
pillar_roots:
base:
- /etc/salt/pillar/base
prod:
- /etc/salt/pillar/prod
minion節點
#yum install -y salt-minion
#vim /etc/salt/minion
master: 10.10.10.1
id: 10.10.10.2
啟動master和minion服務
master端
# systemctl start salt-master.service
#4505埠使用者訊息發布、4506使用者接收minion返回訊息
minion端
# systemctl start salt-minion.service
#systemctl start salt-minion
想檢視saltstack具體程序,可以安裝乙個python-setproctitle庫
# yum install -y python-setproctitle
# systemctl restart salt-master
master端
# tree /etc/salt/pki
/etc/salt/pki
├── master
└── minion
├── minion.pem
└── minion.pub #這是minion的公鑰
# salt-key #檢視連線成功的minion
# salt-key -a 10.10.10.2 # -a認證引數
# salt-key
accepted keys: #認證成功的minion
# salt '*' test.ping 測試
# salt '*' cmd.run 'w'
salt-key -l ##檢視所有minion_key
salt-key -a 'key-name' ##接受該key
salt-key -a ##接受所有key
saltstack安裝部署
saltstack是基於python開發的一套c s架構配置管理工具,使用ssl證書籤方的方式進行認證管理,底層使用zeromq訊息佇列pub sub方式通訊。saltstack有兩個主要功能,分別是配置管理與遠端執行。saltstack基於c s架構,伺服器端稱作master,客戶端稱作minio...
SaltStack安裝部署
salt是一種和以往不同的基礎設施管理方法,它是建立在大規模系統高速通訊能力可以大幅提公升的想法上。這種方法使得salt成為乙個強大的能夠解決基礎設施中許多特定問題的多工系統。遠端執行引擎是salt的核心,它能夠為多組系統建立高速 安全的雙向通訊網路。基於這個通許系統,salt提供了乙個非常快速 靈...
Saltstack基本安裝部署
配置環境 master節點 172.16.100.10 minion節點 172.16.100.20 msater節點 安裝軟體包 curl o etc yum.repos.d epel 7.repo yum y install salt master salt minion systemctl s...