Chapter 5. Configuring WebYaST Modules

Contents

5.1. Using Custom NTP Servers
5.2. Configuring System Services
5.3. Initial System Setup Sequence
5.4. Configuration of EULAs
5.5. Configuring Update Intervals of Status Information in Control Panel
5.6. Configuring the Status Module
5.7. Custom Link in the Control Panel
5.8. /etc/webyast/vendor Subdirectory

This chapter describes how to configure the functionality of individual WebYaST modules.

The WebYaST configuration files are written in YAML language. For more information about YAML, see http://www.yaml.org.

5.1. Using Custom NTP Servers

To use a custom NTP server, enter its URL in the NETCONFIG_NTP_STATIC_SERVERS option of the /etc/sysconfig/network/config configuration file. You can add more servers, separated by commas.

5.2. Configuring System Services

The System Services WebYaST module manages both standard (defined in /etc/init.d) and non-standard (custom services. The list of custom services that are managed with this module is defined in the /etc/webyast/custom_services.yml configuration file. The list of all (both standard and custom) system services that are shown in the WebYaST user interface is defined in the /etc/webyast/filter_services.yml configuration file.

5.2.1. Defining Custom Services

For each custom service, add an entry to the /etc/webyast/custom_services.yml file using the following format :

 service_name: 1
 shortdescription: short_description 2
 description: description  3
 start: "start_command" 4
 stop: "stop_command" 5
 status: "status_command" 6

1

The name of the service.

2

An optional short description of the service (one line summary).

3

An optional enhanced human-readable description of the service.

4

The command to start the service.

5

The command to stop the service.

6

The command to get the service status.

Example 5.1. Example custom_services.yml File

collectd:
  shortdescription: Statistics Collection Daemon
  description: Statistics Collection Daemon for filling RRD Files
  start: "/usr/sbin/rccollectd start"
  stop: "/usr/sbin/rccollectd stop"
  status: "/usr/sbin/rccollectd status"

[Note]custom_services.yml File Permissions

Note that the /etc/webyast/custom_services.yml file in this example should be writable only by root, because start, stop and status scripts defined here are called with root privileges.

5.2.2. Defining Services Shown in User Interface

It is not necessary to show all available services in the WebYaST user interface. The list of services that should be shown in WebYaST user interface can be defined in the /etc/webyast/filter_services.yml configuration file.

The /etc/webyast/filter_services.yml file starts with the services: line. Under this line, there is an entry for each service shown in the user interface in the following format:

  - service_name

The services are shown in the user interface in the same order as written in the file. If the /etc/webyast/filter_services.yml file is empty, all services are shown in the user interface.

Example 5.2. Example filter_services.yml File

services:
  - cron
  - my_own_service
  - nfs
  - cups

5.3. Initial System Setup Sequence

The initial system setup is a sequence of configuration dialogs provided by selected WebYaST modules. You can customize the sequence by removing modules from the sequence, changing the sequence order, or by adding new modules. The initial system setup sequence is defined in the configuration file /etc/webyast/basesystem.yml.

Example 5.3. Example basesystem.yml Configuration File

 steps: 
  - controller: language 
  - controller: eulas 
  - controller: administrator 
  - controller: network 
  - controller: systemtime 
  - controller: mail_settings 
  - controller: registration 
 

After the initial line, steps:, the controllers of all modules must be listed in the same order as they should appear in the initial system sequence setup. The format of each line is:

-controller: controller_name

Find the possible controller values as shipped with WebYaST in Example 5.3, “Example basesystem.yml Configuration File”.

It is possible to change the order or delete individual controller lines. You can also add your own controllers to the sequence.


5.3.1. Creating Custom Modules

It is possible to create your own modules for the initial system setup, using the existing initial system setup modules as model. The modules for the initial system setup sequence must meet the following requirements:

  • The form submit buttons must be implemented using the Ruby on Rails helper form_send_buttons. This helper generates the Cancel/Save or the Back/Next button pairs.

  • After data is successfully written, the redirect_success method must be called.

5.4. Configuration of EULAs

With the WebYaST eulas module, you can configure which end user license agreements (EULAs) are displayed to the user during the initial system setup.

You can configure one or more EULAs to be displayed. The list of EULAs to be used is defined in the /etc/webyast/eulas.yml configuration file.

Example 5.4. Example eulas.yml File

    licenses:
    - SLES-11
    - APPLIANCE
   

After the initial line, licenses:, all EULAs must be listed in the same order as they appear during the initial system setup. The format of each line is:

- EULA_name

where EULA_name is the name of the directory containing the text of the EULA. The full path to this directory is /usr/share/yastws/eulas/licenses/EULA_name/ .

The EULA_name directory must contain plain text files with the text of the respective EULA. The text files should be named according to the following pattern: license.locale.txt. If the file with an appropriate locale is not found, license.txt is used as a fallback.

5.4.1. Minimum EULA Configuration

Configuration with no EULAs is possible. If the /etc/webyast/eulas.yml file is missing (or if it contains only the initial line), no licenses will be displayed.

5.4.2. Minimum Single EULA Configuration

Minimum single license configuration must contain the English text of the license stored in /usr/share/yastws/eulas/licenses/EULA_name/license.txt and the /etc/webyast/eulas.yml configuration file with the following content:

licenses:
- EULA_name

5.4.3. Accepting EULAs

If the file /usr/share/yastws/eulas/licenses/EULA_name/no-acceptance-needed exists, no options for accepting or rejecting the EULA are displayed in the user interface. After clicking Next, the license is considered accepted.

Sometimes, accepting the EULA from command line on the target appliance is useful. Entering the following commands has the same effect as accepting the EULA via the graphical user interface:

touch /var/lib/yastws/eulas/accepted-licenses/EULA_name
chown yastws /var/lib/yastws/eulas/accepted-licenses/EULA_name

5.5. Configuring Update Intervals of Status Information in Control Panel

The system update and system health information in the Control Panel is regularly updated. The default update interval is 5 minutes. The interval can be set in the /etc/webyast/control_panel.yml configuration file.

The /etc/webyast/control_panel.yml file uses the following format (showing the default values):

 patch_status_timeout: 288001
 system_status_timeout: 3002
 display_patch_status: true3
 display_system_status: true4
 appliance_label: My Appliance5

1

Timeout before automatic reloading of patches status (in seconds). Value 0 disables automatic reload.

2

Timeout before automatic reloading of system status (in seconds). Value 0 disables automatic reload.

3

Whether the system status should be displayed, true or false.

4

Whether the system status should be displayed, true or false.

5

The label shown at the top of the page (My Appliance by default).

5.6. Configuring the Status Module

The WebYaST Status module uses the collectd daemon to get the data. The daemon uses plug-ins to collect various types of status data. In the /etc/collectd.conf configuration file, you can configure which plug-ins are loaded.

5.7. Custom Link in the Control Panel

You can create an icon linking to an arbitrary site (such as your own web interface) in the WebYaST control panel Configuration area.

To create such a link, create a file named shortcuts.yml in the top directory of any WebYaST plugin or YaST2 Webclient root directory. The shortcuts.yml should have the following structure:

main:
  icon: '/icons/custom-icon.png' 1
  url: http://example.com 2
  groups: [ System ] 3
  title: Title 4
 

1

The path to an icon file in a public directory. First, the module public directory (/srv/www/yast/vendor/plugins/MODULE/public/) is used. If the icon is not found there, the common WebYaST /srv/www/yast/public/ directory is used.

2

The URL of the link.

3

The module group the link should belong to.

4

The title displayed under the icon.

5.8. /etc/webyast/vendor Subdirectory

Custom vendor configuration files such as basesystem.yml, filter_services.yml, custom_services.yml, eulas.yml, logs.yml, or control_panel.yml can be placed under the /etc/webyast/vendor subdirectory overriding the default settings provided with the WebYaST installation. Branding packages should install modified configuration files under this directory.


WebYaST WebYaST Vendor Guide 11