Configuration Management
You can use configuration files and channels to manage configuration for your clients, rather than configuring each client manually.
Configuration parameters are scripted and stored in configuration files. You can write configuration files directly using the SUSE Manager Web UI, or you can upload or link to files that exist in other locations.
Configuration files can be centrally managed. Centrally managed configuration files are provided by global configuration channels and can be applied to any client subscribed to the SUSE Manager Server.
Configuration channels are used to organize configuration files. You can subscribe clients to configuration channels, and deploy configuration files as required.
Configuration files are version-controlled, so you can add configuration settings, test them on your clients, and roll back to a previous revision as required. When you have created your configuration channels, you can also perform comparisons between various configuration files, and between revisions of the same configuration file.
Centrally managed configuration files are provided by global configuration channels.
This table shows the supported features, where:
-
features are supported by SUSE
-
features are not supported by SUSE
-
features are under consideration, and may or may not be supported at a later date.
Feature | Status |
---|---|
Global Configuration Channels |
|
Deploying Files |
|
Comparing Files |
|
Locally Managed Files |
(with Salt features) |
Sandbox Files |
|
Applying the Highstate |
|
File Import from a Client |
|
Jinja Templating |
|
Configuration Macros |
(with Salt features: grains, pillar data, etc.) |
1. Create Configuration Channels
1.1. Central Configuration Channel
To create a new central configuration channel:
-
In the SUSE Manager Web UI, navigate to
, and click Create Config Channel. -
Type a name for the channel.
-
Type a label for the channel. This field must contain only letters, numbers, hyphens (
-
) and underscores (_
). -
Type a description for the channel that allows you to distinguish it from other channels.
-
Click Create Config Channel to create the new channel.
1.2. Salt State Channel
You can also use a configuration channel to manage Salt states on clients:
-
In the SUSE Manager Web UI, navigate to
, and click Create State Channel. -
Type a name for the channel.
-
Type a label for the channel. This field must contain only letters, numbers, hyphens (
-
) and underscores (_
). -
Type a description for the channel that allows you to distinguish it from other channels.
-
Type the
SLS Contents
for theinit.sls
file. -
Click Create Config Channel to create the new channel.
2. Add Configuration Files, Directories, or Symbolic Links
When you have created a configuration channel you can add a configuration file, directory, or symbolic link:
-
In the SUSE Manager Web UI, navigate to
, and click the name of the configuration channel that you want to add a configuration file to, and navigate to the subtab. -
In the
File Type
field, choose whether you want to create a text file, directory, or symbolic link. -
In the
Filename/Path
field, type the absolute path to the location where the file should be deployed. -
If you are creating a symbolic link, type the target file and path in the
Symbolic Link Target Filename/Path
field. -
Type the
User name
andGroup name
for the file in theOwnership
field, and theFile Permissions Mode
. -
If the client has SELinux enabled, you can configure
SELinux contexts
to enable the required file attributes (for example: user, role, and file type). -
If the configuration file includes a macro, enter the symbol that marks the beginning and end of the macro.
-
Enter the configuration file contents in the
File Contents
text box, using the script drop-down box to choose the appropriate scripting language. -
Click Create Configuration File.
3. Subscribe Clients to Configuration Channels
You can subscribe individual clients to configuration channels by navigating to Configuration
tab.
To subscribe multiple clients to a configuration channel, you can use the system set manager (SSM).
-
In the SUSE Manager Web UI, navigate to
and select the clients you want to work with. -
Navigate to
, and go to the subtab to see the list of available configuration channels. -
OPTIONAL: Click the number in the
Systems currently subscribed
column to see which clients are currently subscribed to the configuration channel. -
Check the configuration channels you want to subscribe to, and click Continue.
-
Rank the configuration channels using the up and down arrows. Where settings conflicts occur between configuration channels, channels closer to the top of the list take precedence.
-
Determine how the channels are applied to the selected clients. Click Subscribe With Lowest Priority to add the new channels at a lower priority than currently subscribed channels. Click Subscribe with Highest Priority to add the new channels at a higher priority than currently subscribed channels. Click Replace Existing Subscriptions to remove existing channels and replace them with the new channels.
-
Click Apply Subscriptions.
If new configuration channel priorities conflict with existing channels, the duplicate channel is removed and replaced according to the new priority. If the client’s configuration priorities are going to be reordered by an action, the Web UI requires you to confirm the change before proceeding. |
4. Compare Configuration Files
You can also use the system set manager (SSM) to compare the configuration file deployed on clients with the configuration file stored on the SUSE Manager Server.
-
In the SUSE Manager Web UI, navigate to
and select the clients subscribed to the configuration files you want to compare. -
Navigate to
, and go to the subtab to the list of available configuration files. -
OPTIONAL: Click the number in the
Systems
column to see which clients are currently subscribed to the configuration file. -
Check the configuration files to compare, and click Schedule File Comparison.
5. Jinja templating on clients
Jinja templating is possible on Salt clients. Jinja provides variables from pillars or grains. They can be used in configuration files or Salt states.
For more information, see https://docs.saltproject.io/salt/user-guide/en/latest/topics/jinja.html with this example:
{% if grains.os_family == 'RedHat' %} {% set dns_cfg = '/etc/named.conf' %} {% elif grains.os_family == 'Debian' %} {% set dns_cfg = '/etc/bind/named.conf' %} {% else %} {% set dns_cfg = '/etc/named.conf' %} {% endif %} dns_conf: file.managed: - name: {{ dns_cfg }} - source: salt://dns/files/named.conf