# Advanced config
After installation, several Oneprovider parameters can be further fine-tuned using Erlang application configuration files.
# Configuration files
The basis for configuration are app.config
read-only files located at
/var/lib/op_worker/app.config
and /var/lib/op_panel/app.config
.
You can use them as references for defaults in use and extensive comments
explaining contained variables, but should not be modified.
NOTE: You can also view them for reference on github (make sure to select branch corresponding to specific release): op_worker (opens new window) and op_panel (opens new window).
Settings contained in the app.config
files are overridden by configuration
written by Onepanel during deployment in autogenerated.config
.
The autogenerated file is located at /etc/op_worker/autogenerated.config
and should not be modified by hand.
# Custom configuration
To apply custom configurations, you have two options:
use the
/etc/op_worker/config.d
or/etc/op_panel/config.d
directory:This directory can be used to add custom modifications to the service app config. Any file matching
*.config
placed in this directory will be read on service startup. Files are ordered alphabetically, with later files overriding values from earlier. Sample file names:01-low-priority.config 50 medium-priority.config 90_high-priority.config
Additionally, the use of the
config.d
directory is recommended when you have sensitive data, such as secrets, in the configuration. Placing such sensitive settings in a separate file allows you to exclude it from version control systems like Git.use the
/etc/op_worker/overlay.config
or/etc/op_panel/overlay.config
config file:The
overlay.config
file is another option for custom configuration. Variables set in this file will override the values from theapp.config
,autogenerated.config
files, and files in theconfig.d/
directory. This approach is simpler and recommended for users who do not have a complex configuration setup.
It is important to note that the overlay.config
file takes precedence over
the config.d
directory. Therefore, any configuration in overlay.config
will override the corresponding settings from the files in the config.d
directory.
The configuration files should be written in Erlang format, which consists of a list of 2-tuple elements. Each tuple contains the component name and a list of tuples that contain the variable name and its value.
Click me to view an example configuration snippet
[
{op_worker, [
{openfaas_host, "127.0.0.1"},
{openfaas_port, 31112},
{openfaas_admin_username, "admin"},
{openfaas_admin_password, "password"},
{openfaas_function_namespace, "openfaas-fn"},
{openfaas_function_labels, #{"com.openfaas.scale.min" => 3, "com.openfaas.scale.max" => 30}},
{openfaas_activity_feed_secret, "password"}
]},
{rtransfer_link, [
{verbosity, 0},
{helper_workers, 100}
]}
].
It is important to restart the respective Oneprovider or Onepanel service after applying any configuration changes for the modifications to take effect.
WARNING
Modifying the configuration files requires a good understanding of the system and its dependencies. It is recommended to proceed with caution and make changes only if you are confident about the implications. Incorrect configuration changes can lead to system instability or malfunction. If you are uncertain about any aspect of the configuration, it is advised to consult the official documentation or seek assistance from a qualified administrator.