最近项目需要在几个集群的机器上部署SaltStack,操作系统有SUSE11 SP3和SP4两个版本的。之前同事在centos的虚拟机上测试一路顺风顺水,没想到上SUSE遇到一堆坑。
坑1:在SaltStack的官网上可以找到两个SUSE用的源,从Document- Installation - SUSE下找到的源是opensuse的(http://download.opensuse.org/repositories/systemsmanagement:/saltstack/SLE_11_SP4/systemsmanagement:saltstack.repo),版本为2016.3.3;而从Downloads- SUSE - SLES11下找到的源是saltstack的(http://repo.saltstack.com/opensuse/SLE_11_SP4/systemsmanagement:saltstack.repo),版本为2015.8.12。版本不一致让人疑惑,但坑不在这里,真正的坑是,不管用哪个源装都会少一些依赖,比如python-requests等几个rpm包,要找到匹配的版本还是花了一番功夫的,我找到的4个包如下,地址就不放了。这还不算大坑。
python-requests-2.4.1-30.1.x86_64.rpm
python-ordereddict-1.1-0.7.31.x86_64.rpm
ca-certificates-1-9.1.noarch.rpm
libffi43-4.3.4_20091019-0.37.28.x86_64.rpm
除了salt,salt-master,salt-minion外,我还装了salt-api,因为需要一个restful的API供外部调用。装完以后,还需要配置外部认证供salt-api使用(https://docs.saltstack.com/en/latest/topics/eauth/index.html),再新建一个操作系统帐号供api使用(我建的帐号为saltapi),无难度。全部配完,起salt-master和salt-api服务,显示OK,但是调用的时候来坑了。