Purpose: Use the Saltstack tool to deploy batch servers and automate the installation (uninstall) of services (such as MySQL).[[email protected] ~]# ll total dosage 304228-rw-r--r--1 root root 311516309 March mysql-5.6.21-linux-glibc2.5-x86_64.tar.gz- Rwxr-xr-x 1 root root 6628 March 12:52 mysql_ binary installation. sh-rwxr-xr-x 1 root root 590 March 12:53 mysql_ binary Uninstall. sh[[e Mail protected] ~]#1. View the master and Minion status.
Tags: Epel share picture images height action Write charset IDT WordOne, Returnner introduction1, by default, the execution result of the command sent to Minion is returned to Salt-master. The Saltstack Returnner interface allows the results to be sent to any system. Github:https://github.com/saltstack/salt/tree/develop/salt/returners Official website: https://docs.saltstack.com/en/latest/ref/returners/Seco
The operating system is centos6.3, centos6.4, and Windows server2008r2.
The download link in this article may be updated with the version on the official saltstack website, but there may be changes or errors. Please refer to the version link you need to install. I wrote a specific link to facilitate repeated operations in the near future.
In this article, Linux uses epel for installation, and Windows selects the EXE installation package.
1. in your sy
Saltstack Configuration ManagementSaltstack configuration management, also known as state management, Saltstack cannot rollback a state. When we write the SLS file, to support multiple executions, such as: Write the Software Installation module, each time you execute this state, will check whether the software is installed.The SLS description file written in Saltstack
Deploy SaltStack in CentOS 6.5
(1) install python 2.7Https://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz
#tarxvzfPython-2.7.8.tgz#cdPython-2.7.8#./configure--prefix=/usr/local#make--jobs=`grepprocessor/proc/cpuinfo|wc-l`#makeinstall# Copy the python header file to the standard directory to avoid missing the required header file when compiling the saltstack.#cd/usr/local/include/python2.7#cp-a./*/usr/lo
The module is used to manage object operations, which is also an entry for Saltstack to be managed via push, such as executing commands, viewing package installations, viewing service runs, and so on, all via the Saltstack module.After installing master and Minion, many module will be installed and the supported module list can be viewed by the following commandSalt ' minion1 ' sys.list_modulesMinion1:-ACL-
1.1 Installing the Epel source# cd/usr/local/src/# wget http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm# RPM-IVH epel-release-6-8.noarch.rpm1.2 installation RpmforgeThis step is important, there is no python-jinja2 on the Epel source of Redhat 6 and CentOS 6, and a change card is installed at the beginning .1 wgethttp://apt.sw.be/redhat/el6/en/x86_64/rpmforge/rpms/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpmRPM-UVH rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm2. Installing de
Saltstack official has a Web UI called Halite a UI to perform management on a page. The backend uses the Saltstack API
I've been writing the UI myself for a while, using flask and Metro. The project also put aside, too lazy to move. Now see the official website of the UI tool, although the function is very incomplete, but the basic implementation, State view or some.
Let's build the Halite first, and then
Saltstack provides a very rich set of functional modules (written in Python), covering the basic functions of the operating system, common tool support, and, of course, the SYS module to list the modules supported by the current version#salt ' * ' Sys.list_modulesNext, the common modules are introduced, and the API usage methods of the modules are also enumerated. The API principle is implemented by invoking the Master client module, instantiating a L
Webtatic: The main supply of the latest lamp and other software sources (official website: https://www.webtatic.com/)Today, I use Saltstack to install its software, that is, to extend a Yum repository. To facilitate the installation/updating of lamp-related software.No nonsense, direct sticker configuration Yum/init.sls:Clean_yum_cache:Cmd.wait:-Name:yum Clean AllWEBATIC_RPM:File.managed:-Name:/soft/latest.rpm-source:salt://yum/files/latest.rpm-mode:6
When installing salt-minion through Salt-minion-xxxx.xx.x-amd64-setup.exe under Windows, the default is to install and boot the Salt-minion service. However, if the salt-minion is started as a service, the visual operation of Windows cannot be controlled . In order to be able to manipulate the visual interface of Windows through salt-minion, you need to disable the Salt-minion service and start salt-minion in a process way.The solution is as follows:1. Start >> run >>services.msc to stop the S
:8080WEB-NODE3:10.0.0.7:8080WEB-NODE4:10.0.0.7:8080WEB-NODE5:10.0.0.7:8080Web-node55:10.0.0.7:8080Zabbix-agent:----------Zabbix_server:10.0.0.7Linux-node2.example.com:----------Backend_www_oldboyedu_com:----------Web-node1:10.0.0.7:8080Web-node2:10.0.0.7:8080WEB-NODE3:10.0.0.7:8080WEB-NODE4:10.0.0.7:8080WEB-NODE5:10.0.0.7:8080Web-node55:10.0.0.7:8080Zabbix-agent:----------Zabbix_server:10.0.0.7At this point in the browser to see that n nodes have been addedOld boy Website: http://www.etiantian.o
Saltstack in the Minion side of the task, sometimes there are problems, such as hang, not the end.For example, we execute the following Salt command:Salt ' * ' cmd.run ' ping outofmemory.cn 'ping outofmemory.cnThis command will continue to ping under Linux, we do not give -c 4 the parameters, this time we need to end this command.First you need to find the job_id of this task, which can be done by running on the master side:Salt-run jobs.activeDisplay
Grains #收集设备的所有信息Grains is a collection of information that is collected at Minion startup, such as the operating system type, network card IP, kernel version, CPU architecture, and so on.Using commandsSalt ' client.wyp.com ' grains.ls lists all grains project namesSalt ' client.wyp.com ' grains.items lists all grains items and valuesGrains information is not dynamic and is not always changed, it is only collected at minion startup.We can do configuration management according to some information
Pillar ComponentsPillar is also one of the most important components of saltstack, and its role is to define any data related to the controlled host, and the defined data can be used by other components such as templates, State, API, etc. The data defined in pillar is associated with the host of the different business features, so that the host can only see its own matching data, so pillar security is very high, suitable for some more sensitive data,
Minion end needs to match which environment (typically the environment directory name) executes the corresponding stateStatus: Is the related state defined in the files in the environment directory that end with. SLS, for example: pgk.installed file.managed service.runing3. In the state file declared in the Top.sls file, configure the actual state to minion the end match4. When Minion finds the corresponding. sls file, the Minion side performs the related functions (so-called states) provided b
"Salt's directory Structure"The environment has a default, but you can change the configuration in the/etc/salt/master file file_rootsFile_roots:Base-/data1/salt/base/Db:-/data1/salt/db/Dev-/data1/salt/dev/Prod-/data1/salt/prod/650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/82/7D/wKioL1dWxk6RXYN4AABVqeZqhCQ679.jpg "title=" Saltstack directory structure. jpg "alt=" wkiol1dwxk6rxyn4aabvqezqhcq679.jpg "/>"Mastering Saltstack's SLS file namesp
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.