assistanz
Assistanz

Deploying packages through SaltStack

Deploying packages through SaltStack

Deploying packages through SaltStack:

This blog will helps you with step by step instruction to Deploying packages through SaltStack . There  are two ways to install packages.

1 -> Single Command & State File

INSTALLING PACKAGES THROUGH SINGLE COMMAND

  • First, execute the command salt ‘saltclient‘ pkg.install net-tools
  • In this demo, We are going to installing ‘netstat’ and ‘lsof’ commands from the salt-master using ‘Single command’.
  • Then execute salt ‘saltclient’ pkg.installed lsof
  • Before installing status:

Deploying packages through SaltStack:

  • Installing from salt-master:

Deploying packages through SaltStack:

  • After installing/verifying on the ‘saltclient’ VM:

Deploying packages through SaltStack:

2 -> Installing Packages Through state file

  • A base environment is required to house the top file/state files, so we need to set the ‘file_roots’ in the salt-master configuration file ( /etc/salt/master ) and restart the salt-master service.
  • Also we need to create directory ‘salt’ under ‘/srv’ ( /srv/salt )
  • Execute this command : cd /srv/ ; mkdir salt
  • # vi /etc/salt/master

Deploying packages through SaltStack:

  • Restart the service using systemctl restart salt-master command
  • We have created ‘apache.sls’ under the /srv/salt, lets check the contents,

Deploying packages through SaltStack:

Syntax:

apache: # ID declaration

pkg: # state declaration

– installed # function declaration

  • On the apache.sls, we have used ‘pkg.installed’ instead of ‘pkg.install’ for Apache installation. Pkg.installed in the state file will help us to ensure that the package is installed with a correct version. If the package is already available it shows ‘Package already installed and its version’ else it will perform the installation.
  • Before executing the state file on our minion we need to verify status.

Deploying packages through SaltStack:

Deploying packages through SaltStack:

  • Well, we can start the installation from salt-master using below command.

       # salt ‘saltclient‘ state.sls apache

  • In meantime, we got the below result on the saltclient’s process using top command.

Deploying packages through SaltStack:

  • Installed result on salt-master:

Deploying packages through SaltStack:

Deploying packages through SaltStack:

  • After executing the state file on our minion:

Deploying packages through SaltStack:

  • Once Apache installed, we need to start the service.
  • We are going to trigger the state file ( apache.sls ) on the minion again to check the pkg.installed function’s result if the pkg already installed on the target/minion.

Deploying packages through SaltStack:

Thanks for visiting this article. We hope it will be useful for your to install the packages through SALT application.

DirectAdmin Server Management Plans

Premium Support

24/7 End User Support from your Helpdesk
$ 99 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • NDA & SLA
  • SLA Review Meetings
  • FREE Consultancy Services
  • Simple SignUp Process
  • Instant Account Activation
  •  

Platinum Support

24/7 Proactive Support
$ 49 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • Advance Proactive Monitoring
  • Guaranteed SLA
  • SLA Review Meetings
  • 3rd Party Application Support
  • FREE Consultancy Services
  • Server Migration Support
  • Weekly Status Report
  • No End User Support
Popular

Unlimited Support

24/7 Support

$ 30 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Support
  • Basic Monitoring
  • 30 Minutes Response Time
  • 4 Hours Resolution time for the Possible Issues
  • Security and Performance Optimization
  • React to Customers queries
  • Simple SignUp Process
  • Instant Account Activation
  • No Third party application support
  • No Migration and End User Support

Cpanel Server Management Plans

Premium Support

24/7 End User Support from your Helpdesk

$ 99 Monthly / Server
  • 24/7 End User White Label Support
  • Unlimited Number of Tickets
  • Chat Support for Admin
  • Separate Account Manager
  • Guaranteed SLA
  • Weekly Status Reports
  • FREE Consultancy Services
  • Simple SignUp Process
  • Instant Account Activation

Platinum Support

24/7 Proactive Server Management
$ 49 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • Advance Proactive Monitoring
  • Guaranteed SLA
  • SLA Review Meetings
  • 3rd Party Application Support
  • FREE Consultancy Services
  • Server Migration Support
  • Weekly Status Report
  • No End User Support
Popular

Unlimited Support

24/7 Server Management

$ 29 Monthly / Server
  • Unlimited Admin Tasks
  • 24/7 Support
  • Basic Monitoring
  • 30 Minutes Response time
  • 4 hours Response time for possible issues
  • Security and Performance Optimization
  • React to Customers queries
  • No Third party application support
  • No Migration and End User Support

Cpanel Server Management Plans

Premium Support

24/7 End User Support from your Helpdesk

$ 99 Monthly / Server
  • 24/7 End User White Label Support
  • Unlimited Number of Tickets
  • Chat Support for Admin
  • Separate Account Manager
  • Guaranteed SLA
  • Weekly Status Reports
  • FREE Consultancy Services
  • Simple SignUp Process
  • Instant Account Activation

Platinum Support

24/7 Proactive Server Management
$ 49 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • Advance Proactive Monitoring
  • Guaranteed SLA
  • SLA Review Meetings
  • 3rd Party Application Support
  • FREE Consultancy Services
  • Server Migration Support
  • Weekly Status Report
  • No End User Support
Popular

Unlimited Support

24/7 Server Management

$ 29 Monthly / Server
  • Unlimited Admin Tasks
  • 24/7 Support
  • Basic Monitoring
  • 30 Minutes Response time
  • 4 hours Response time for possible issues
  • Security and Performance Optimization
  • React to Customers queries
  • No Third party application support
  • No Migration and End User Support