Table of contents
1.
Introduction
2.
Delta Proxy Minion
3.
Pre Installation
4.
Overview of the Installation Process
5.
Configure the Master
6.
Delta Proxy Configuration Options
7.
Pillar File Creation
8.
Creating Control Proxy Configuration File
9.
Starting the Delta Proxy Minion
10.
Frequently Asked Questions
10.1.
What is Salt?
10.2.
What is a Minion?
10.3.
How do Salt proxy minions help in management?
11.
Conclusion
Last Updated: Mar 27, 2024
Medium

About Delta Proxy Minion

Author Manish Kumar
0 upvote
Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction

Have you ever thought about management??!! How does a company manage a lot of employees? The idea is to have people governed by a manager or team lead. Similarly, when the number of minions exceeds a standard amount, we have to deal with them differently. Here comes the concept of delta proxy minion.

About Delta Proxy MInion

In this blog, you will learn about the delta proxy minions and their installation in detail. So without further ado, let's get started.

Delta Proxy Minion

The delta proxy minion provides the ability to manage multiple proxy minions using a single control proxy, working as a bridge between the master and the proxy minions. This facility was available beginning version 3004. 

The main reason for creating delta proxy minions was to establish a management feature that could manage a large number of proxy minions, which would otherwise not be feasible. We can have a separate instance of proxy minions for each device, but it's not scalable if the number of devices becomes large. Running thousands of minions will need a lot of CPU and memory.

A delta proxy solves this problem: it runs a minion that will manage other minions and act as a bridge between the salt master and the various network devices it can represent. This configuration will enhance scalability and boost systems performance.

Pre Installation

A few prerequisites must be met before we can install delta proxy minions. Make sure that:
 

✨ Your network firmware and devices are working correctly. 

✨ Salt masters are running at least version 3004.

✨ The salt master controlling the proxy minions has network access for the devices it manages.

✨ You have successfully installed, configured and tested proxy minions in the environment where you will install the delta proxy minion.

Overview of the Installation Process

All the delta proxy minion configurations are done on the salt master rather than the minions that will be managed. The installation process consists of different phases:

⚡ Creating a configuration file on the salt master to define the proxy settings.

⚡ Creating a pillar file for each managed device.

⚡ Creating a control proxy configuration file containing the devices it will manage.

⚡ Start and validate the delta proxy minion.

Configure the Master

In this step, we will create a configuration file on the salt master that will handle all the proxy minions. Let's see the steps required to make this configuration file:
 

⚡ Navigate to the /etc/salt on the salt master and create a file named proxy.

⚡ Open the file in any text editor of your choice and the following contents in the file.

# using the delta proxy metaproxy
metaproxy: deltaproxy
# Disabling the FQDNS grain
enable_fqdns_grains: False
# setting the multiprocessing to true
multiprocessing: True


⚡ Save the file

After successfully following the steps above, our salt master is ready to use the delta proxy.

Delta Proxy Configuration Options

The delta proxy configuration file has some configuration options. Let's learn about them in the table below:

Options

Description

multiprocessing It is the ability to run multiple processes at once. The proxy minions can turn off multiprocessing.
metaproxy Use this configuration option against the deltaproxy setting. If this is set to proxy or not included in the configuration file, then a standard proxy will be used instead of a delta proxy.
enable_fqdns_grains If the router cannot use the Reverse DNS lookup to obtain the fqdn, then change the enable_fqdns_grains option to false in the pillar configuration file.
skip_connect_on_init This setting enables or disables connecting to the managed device when it starts.

Pillar File Creation

Pillars are the data structures defined on the Salt Master, which are passed to one or more minions whenever required. Pillars allow the passing of confidential and targeted data to specific minions. Pillar files allow us to give directions to the minions without configuring them that is we can control the minions from the master itself.

Now it's time to create a pillar for each managed device we will run on the salt master. Let's go through the steps required to make the pillar file:

🌀 Open the /srv/pillar directory.

🌀 Create a new pillar file for the minion in this location.

🌀 Open the pillar file in the editor of your choice and the configuration settings in the file. Given below is an example for netmiko device:

proxy:
  proxytype: netmiko
  device_type: arista_eos
  host: 192.168.0.1
  username: ninja
  password: ninja_is_awesome
  always_alive: True

 

🌀 Save the file and open the top file /srv/pillar/top.sls in any editor.

🌀 In the top file, add a section mentioning the minion ID of the device that will be managed. List the name of the pillar file we created in the last step.

my_managed_device_minion_ID:
  - my_managed_device_pillar_file_01

 

🌀 We can follow the above steps whenever we want to add another proxy minion.

Creating Control Proxy Configuration File

We must create control proxy files to manage the control proxy on the salt master. The control proxy is responsible for managing and issuing commands to the network devices it handles. The salt master needs at least one control proxy to manage devices. Let's go through the steps necessary to create a control proxy configuration file:
 

✅ Navigate to the /srv/pillar directory. In this directory, create a new control proxy configuration file. For example, ninja_control_proxy_configuration.sls could be the name of the file.

✅ Open the file in any editor and add the minion ID for each device that needs to be managed.

proxy:
  proxytype: deltaproxy
  ids:
    - my_managed_device_001
    - my_managed_device_002
    - my_managed_device_003

 

✅ Save the file.

✅ In any editor, open the file “/srv/pillar/top.sls”.

✅ Add a section to the top file that references the delta control proxy.

base:
  my_managed_device_minion_001:
    - my_managed_device_pillar_file_001
  my_managed_device_minion_002:
    - my_managed_device_pillar_file_002
  my_managed_device_minion_003:
    - my_managed_device_pillar_file_003
  delta_proxy_control:
    - control_proxy_01_configuration

 

✅ We can repeat the previous steps for each control proxy if required.

Starting the Delta Proxy Minion

We have successfully created the control proxy configuration file. It's time to start the delta proxy minion. Follow the steps to start the single instance of delta proxy minion and test if it is running correctly:
 

💠 Open the terminal in the salt master and run the following command. Use the specific minion ID in the command.

sudo salt-proxy --proxyid=my_managed_device_minion_001


💠 Now, the delta proxy minion is started. To check the delta proxy minion, run the following command on the salt master and target a specific minion. 

salt my_managed_device_minion_001 test.version


💠 The above command returns an output similar to the one given below.

local:
    3004


We have successfully created and verified that the delta proxy minions are working correctly. We can now use these minions the same as the regular proxy minions.

Frequently Asked Questions

What is Salt?

The Salt is a python-based, open-source framework that offers services related to remote execution management. Using Salt, we can configure, provision, automate and orchestrate our system.

What is a Minion?

A minion is a server that runs applications and services. Each minion has an ID the salt master uses to assign tasks to the specific minion.

How do Salt proxy minions help in management?

Salt proxy minions provide the “plumbing” that allows the device discovery and enumeration, status, control, state management and remote execution.

Conclusion

This blog has shed light on the delta proxy minion. These minions are the nodes responsible for running applications and services. We learned how to install and configure the delta proxy minion. A detailed procedural discussion was done to understand the delta proxy minion.

Check out other related articles to learn more:

Configuration of Salt Proxy Minion

Salt System Architecture

Salt Community Resources

And many more on our platform Coding Ninjas Studio.

Refer to our guided paths on Coding Ninjas Studio to learn more about DSA, Competitive Programming, JavaScript, System Design, etc. Enroll in our courses and refer to the mock test and problems available. Take a look at the interview experiences and interview bundle for placement preparations.

Happy Coding!

Live masterclass