saltstack 部署mysql_saltstack api部署,使用.

saltstack api部署,使用.

#这几天一直在研究saltstack api,自己也走了很多坑,把部署,使用的过程记录下来分享给大家,欢迎大家一起交流,探讨。

#系统环境:Centos6.5 X86_64

#python版本:2.6.6

#安装salt服务和依赖:

cat /etc/redhat-release

cd /etc/yum.repos.d/ && wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

rpm -ivh epel-release-6-8.noarch.rpm

yum -y install kernel-firmware kernel-headers perf e2fsprogs

rpm -ivh libyaml-0.1.3-1.4.el6.x86_64.rpm

rpm -ivh PyYAML-3.10-3.1.el6.x86_64.rpm

yum -y install salt-master salt-api

#安装pip:

wget https://pypi.python.org/packages/source/p/pip/pip-1.5.6.tar.gz#md5=01026f87978932060cc86c1dc527903e --no-check-certificate

tar xvfz pip-1.5.6.tar.gz

cd pip-1.5.6

python setup.py build && python setup.py install && pip freeze

#使用pip安装cherrypy:

pip install cherrypy==3.2.3

#配置openssl证书:

cd /etc/pki/tls/certs

[root@localhost certs]# make testcert

umask 77 ; \

/usr/bin/openssl genrsa -aes128 2048 > /etc/pki/tls/private/localhost.key

Generating RSA private key, 2048 bit long modulus

......................................+++

.....................+++

e is 65537 (0x10001)

Enter pass phrase:

Verifying - Enter pass phrase:

umask 77 ; \

/usr/bin/openssl req -utf8 -new -key /etc/pki/tls/private/localhost.key -x509 -days 365 -out /etc/pki/tls/certs/localhost.crt -set_serial 0

Enter pass phrase for /etc/pki/tls/private/localhost.key:

You are about to be asked to enter information that will be incorporated

into your certificate request.

What you are about to enter is what is called a Distinguished Name or a DN.

There are quite a few fields but you can leave some blank

For some fields there will be a default value,

If you enter '.', the field will be left blank.

-----

Country Name (2 letter code) [XX]:CN

State or Province Name (full name) []:beijing

Locality Name (eg, city) [Default City]:beijing

Organization Name (eg, company) [Default Company Lt

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值