In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
It is believed that many inexperienced people have no idea about how to install salt/salt-api in DevOps. Therefore, this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
SaltStack is a service model based on Cramp S architecture. In SaltStack architecture, the server side is called Master and the client side is called Minion. The traditional CAccord S architecture is that the client sends a request to the server, and the server receives the request and then returns it to the client after processing. There is not only the traditional SaltStack S architecture service model, but also the publish and subscribe (pub/sub) service model in the message queue. This makes the SaltStack application scenario richer. At present, in the actual environment, SaltStack's C _ paw S architecture is generally used for configuration management.
Both Master and Minion run in daemon mode, always listening on the ports of ret_port (accept minion requests, default port number: 4506) and publish_port (publish messages, default port number: 4505) defined in the configuration file. When Minion is running, it will automatically connect to the Master address ret_port port defined in the configuration file for connection authentication. The default client request id is the value taken by socket.getfqdn (), and you can also change the id value of Minion before Minion starts.
Install the system environment:
Installed version of the system
Installed version of Python
Install the RPM extension
Rpm-ivh http://mirrors.zju.edu.cn/epel/6/x86_64/epel-release-6-8.noarch.rpm
Install salt-master
Yum-y install salt-master
/ etc/init.d/salt-master start
Chkconfig salt-master on
Salt-master-version
Install salt-minion
Yum-y install salt-minion
Sed-I 's/#master: salt/master: 10.0.2.22 master g' / etc/salt/minion # specifies the ip address of the master
/ etc/init.d/salt-minion startchkconfig salt-minion on
Salt-minion-version
Install salt-api
Yum-y install salt-api pyOpenSSL
Chkconfig salt-api on
Sed-I'/ # default_include/s/#default/default/g' / etc/salt/master
Useradd-M-s / sbin/nologin salt
Echo '123456' | passwd salt-- stdin
/ etc/pki/tls/certs
Make testcert
Openssl rsa-in localhost.key-out localhost_nopass.key
Touch / etc/salt/master.d/eauth.conf
External_auth:
Pam:
Salt:
-. *
-'@ wheel'
-'@ runner'
/ etc/salt/master.d/api.conf
Rest_cherrypy:
Port: 8000
Ssl_crt: / etc/pki/tls/certs/localhost.crt
Ssl_key: / etc/pki/tls/private/localhost_nopass.key
Restart the server
Service salt-master restart
Service salt-api restart
Test API
[root@localhost private] # curl-k https://127.0.0.1:8000/login-H "Accept: application/x-yaml"-d username='salt'-d password='123456'-d eauth='pam'
Return:
-eauth: pam
Expire: 1496250537.6364369
Perms:
-. *
-'@ wheel'
-'@ runner'
Start: 1496207337.636436
Token: 4b3c799f7ac9537fa4018242de8698d1d7aedf51
User: salt
After reading the above, have you mastered how to install salt/salt-api in DevOps? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.