App::Netdisco::Manual::Configuration - How to Configure Netdisco
The configuration files for Netdisco come with all options set to sensible default values, and just a few that you must initially set yourself.
However as you use the system over time, there are many situations where you might want to tune the behaviour of Netdisco, and for that we have a lot of configuration settings available.
There are two configuration files: config.yml (which lives inside Netdisco) and deployment.yml (which usually lives in ${HOME}/environments).
config.yml
deployment.yml
${HOME}/environments
The config.yml file includes defaults for every setting, and should be left alone. Any time you want to set an option, use only the deployment.yml file. The two are merged when Netdisco starts, with your settings in deployment.yml overriding the defaults from config.yml.
The configuration file format for Netdisco is YAML. This is easy for humans to edit, but you should take care over whitespace and avoid TAB characters. YAML supports several data types:
Boolean - True/False value, using 1 and 0 or true and false respectively
1
0
true
false
List - Set of things using [a, b, c] on one line or - on separate lines
[a, b, c]
-
Dictionary - Key/Value pairs (like Perl Hash) using {key1: val1, key2, val2} on one line or key: value on separate lines
{key1: val1, key2, val2}
key: value
String - Quoted, just like in Perl (and essential if the item contains the colon character)
If you followed the installation instructions, then you should have set the database connection parameters to match those of your local system. That is, the dsn (DB name, host, port), user and pass.
dsn
user
pass
log: debug|warning|error
Default: warning
warning
The log level used by Netdisco. It's useful to see warning messages from the backend poller, as this can highlight broken topology.
logger: console|file
Default: file
file
Destination for log messages. Console means standard ouput. When set to file, the default destination is the ${HOME}/logs directory.
${HOME}/logs
logger_format: String
Default: '[%P] %L @%D> %m'
'[%P] %L @%D> %m'
Structure of the log messages. See "logger_format" in Dancer::Logger::Abstract for details.
domain_suffix: String
Default: None
Set this to your local site's domain name. This is usually removed from node names in the web interface to make things more readable.
no_auth: Boolean
Default: false
Enable this to disable login authentication in the web frontend. The username will be set to guest so if you want to allow extended permissions (admin or port_control, create a dummy user with the appropriate flag, in the database:
guest
admin
port_control
netdisco=> insert into users (username, port_control) values ('guest', true);
port: String
Default: 5000
5000
Port which the web server listens on. Netdisco comes with a good pre-forking web server, so you can change this to 80 if you want to use it directly. However the default is designed to work well with servers such as Apache in reverse-proxy mode.
80
web_plugins: List of String
Default: List of App::Netdisco::Web::Plugin names
Netdisco's plugin system allows the user more control over the user interface. Plugins can be distributed independently from Netdisco and are a better alternative to source code patches. This setting is the list of Plugins which are used in the default Netdisco distribution.
You can override this to set your own list. If you only want to add to the default list then use extra_web_plugins, which allows the Netdisco developers to update web_plugins in a future release.
extra_web_plugins
web_plugins
extra_web_plugins: List of String
List of additional App::Netdisco::Web::Plugin names to load. See also the web_plugins setting.
These settings are from Netdisco 1.x but are yet to be supported in Netdisco 2. If you really need the feature, please let the developers know.
To install App::Netdisco, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Netdisco
CPAN shell
perl -MCPAN -e shell install App::Netdisco
For more information on module installation, please visit the detailed CPAN module installation guide.