Salt equations are packaged and circulated to Salt bosses utilizing the package chief. This idea was affected from RPM, Yum and Pacman bundling systems. Salt state, pillar, file formats and different Files are utilized by the equation and after that packaged into a solitary File.
After a formula package is made, it is duplicated to the Repository System to make it to use for Salt bosses. Prior to moving to the package administrator, let us view how to install a "nginx" package utilizing the Salt essential command.
he following syntax is used to install a “nginx” package.
Here, the pkg.install nginx command is used to install a package. After execution, you will see the following response.
It will produce the following output –
Now, you have installed a package. To start the services for that package, use the command given below.
After running this command, the result looks as shown in the code block below.
Along these lines, we have installd and begun the administrations for the "nginx" package utilizing the essential command. Give us now a chance to examine how to fabricate and install packages in the Salt package administrator.
Packages can be based on any system where you can install Salt. There are three kind of packages and they are pursues.
Give us now a chance to see how to fabricate packages utilizing the Fomula File.
Most files from the package are situated at the –/srv/spm/salt/registry as a matter of course, however the pillar File can be set in the –/srv/spm/pillar/index. The Formula File depicts the package.
The reactor files lives in the/srv/spm/reactor/registry.
The files in this kind of a package are configuration Files for Salt, which regularly live in the/and so forth/salt/index. Configuration files for packages other than Salt can and ought to be taken care of with a Salt State (utilizing an equation sort of package).
Give us a chance to proceed with the below steps to manufacture a package.
Make a FORMULA File and place it in the foundation of the package organizer.
Collect the formula Files in an folder on the assemble system.
Run spm fabricate. The package is constructed and set in the/srv/spm_build folder. The below command is utilized to assemble a package.
Presently, duplicate the .spm file to an folder on the store system.
You can share the srv/spm_build organizer on the system, or duplicate the Files to your FTP or the Webserver.
Create repo metadata utilizing the below command.
This segment clarifies about Installing Salt package director packages.
To Configure remote archives, the Salt Master has to know where the store is through a configuration procedure.
Files are in the/and so on/salt/spm.repos.d/spm.repo registry.
Here, the file contains the name of the store and the connection to the archive. You can likewise utilize http, https, ftp, or the file path. To utilize File path, you can get to it utilizing the URL: file://srv/spm_build.
After the vault is designed on the Salt master, archive metadata is downloaded utilizing the command below.
The SPM packages are situated in the srv/spm/salt registry. Add the below path to the File roots on the Salt master,
Presently, restart the salt master.
To install the package apache, utilize the below command.
You can likewise install straightforwardly from the SPM file utilizing the command below.
To remove a package, for instance – apache, utilize the below command,
Note that, if any files have been altered, they won't be removed.
SaltStack Related Interview Questions
|Python Interview Questions||Puppet (software) Interview Questions|
|wxPython Interview Questions||Ansible (software) Interview Questions|
|Unix/Linux Interview Questions||Osi Model Interview Questions|
|Python Automation Testing Interview Questions||Chef (software) Interview Questions|
SaltStack Related Practice Tests
|Python Practice Tests|
All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.