Skip to content

Latest commit

 

History

History
113 lines (96 loc) · 4.46 KB

Hyrax_site-conf.adoc

File metadata and controls

113 lines (96 loc) · 4.46 KB

Custom Module Configuration with site.conf

About

Prior to Hyrax 1.15.2, if you wanted to customize a module’s configuration, you had to modify its .conf file. Unfortunately, .conf files do not persist through updates, so you were responsible for restoring your custom configurations post-update.

Hyrax 1.15.2 introduces site.conf, a special configuration file that persists through updates, where you can store custom module configurations. To start using site.conf, see its configuration instruction section.

Beginning with release 1.15.3, Hyrax will include a template file, site.conf.proto, that will include many commonly-modified settings. For instructions on how to use the template, see its configuration instruction section.

Theory of Operation

When you launch your server, the BES loads the module configuration files that reside within /etc/bes/modules. The BES then loads site.conf, which resides in /etc/bes.

As the BES reads the custom-configured parameters that you have copied into site.conf, the BES overrides the default configuration parameters that it loaded from the individual module configuration files. For a detailed configuration example, see the example configuration section.

site.conf Configuration Instructions

The following details how you can customize a module’s configuration with site.conf:

  1. Create site.conf in \etc\bes with the following command:

    sudo touch site.conf
  2. Locate the .conf file for the module that you would like to customize. All configuration files reside within /etc/bes/modules.

  3. Copy the configuration parameters that you would like to customize from the module’s configuration file into site.conf. For a detailed configuration example, see the next section.

    Note
    Configuration parameters are generally a key/value pair; for example, the default server administrator email parameter is email:[email protected], where email is the key and [email protected] is the value.
  4. Save your updates to site.conf.

  5. Restart the server.

site.conf Configuration Example

The following steps detail how you can update the BES’s server administrator configuration parameters with your organization’s information:

  1. Locate the existing server administrator configuration in /etc/bes/bes.conf:

    BES.ServerAdministrator=email:[email protected]
    BES.ServerAdministrator+=organization:OPeNDAP Inc.
    BES.ServerAdministrator+=street:165 NW Dean Knauss Dr.
    BES.ServerAdministrator+=city:Narragansett
    BES.ServerAdministrator+=region:RI
    BES.ServerAdministrator+=postalCode:02882
    BES.ServerAdministrator+=country:US
    BES.ServerAdministrator+=telephone:+1.401.575.4835
    BES.ServerAdministrator+=website:http://www.opendap.org
    Tip
    When adding parameters to the ServerAdministrator configuration, notice how, following the first line, we use += instead of just
    to add new key/value pairs. += indicates to the BES that we are adding new configuration parameters, rather than replacing those that were already loaded. Had we used just + in the above example, the only configured parameter would have been website.
  2. Copy the above block of text from its default .conf file to site.conf.

  3. In site.conf, update the block of text with your organization’s information; for example…​

    BES.ServerAdministrator=email:[email protected]
    BES.ServerAdministrator+=organization:Mogogogo Inc.
    BES.ServerAdministrator+=street:165 Buzzknucker Blvd.
    BES.ServerAdministrator+=city: KnockBuzzer
    BES.ServerAdministrator+=region:OW
    BES.ServerAdministrator+=postalCode:00007
    BES.ServerAdministrator+=country:MG
    BES.ServerAdministrator+=telephone:+1.800.555.1212
    BES.ServerAdministrator+=website:http://www.mogogogo.org
  4. Save your changes to site.conf.

  5. Restart the server.

site.conf.proto Configuration Instructions

The site.conf.proto template resides in \etc\bes. If you want to take advantage of the template, copy site.conf.proto into site.conf with the following command:

cp site.conf.proto site.conf

Uncomment the configuration parameters that you want to modify and update them. For a site.conf configuration example, see the previous section.