Overview
The Configuration Modification tool gives you the option to write new entries or update existing ones in the Configuration table of the Yellowfin database. The tool would typically be used on a fresh installation of a Yellowfin instance.
This tool uses the command line to make changes by connecting directly to your Yellowfin repository database, so we recommend shutting down your Yellowfin instance before you use this tool.
Executing via the command line
The Configuration Modification Tool ships with Yellowfin 9.7 and later. The command line requires details to connect to the database plus the configuration update details, described in the following table.
Parameter | Description | Example | Required? |
---|---|---|---|
jdbcdriver:<driverclass> | The canonical JDBC driver class for the repository database. | jdbcdriver:org.postgresql.Driver | Optional |
jdbcurl:<driverurl> | The connection string to get to the repository database. | jdbcurl:jdbc:postgresql://localhost:5432/yellowfin9703 | Required |
jdbcuser:<user> | The username that has access to the repository database. | jdbcuser:sysadminyfn | Required |
jdbcpassword:<password> | The plain-text password for the username with access to the repository database. | jdbcpassword:highlysecure | Required |
CONFIG_<code>:<config_value> | The configuration option to be updated. You can add as many as you like. If you only wish to update a BOF item, you don’t need to include a CONFIG parameter at all. | CONFIG_EXTERNALURL:http://10.10.10.39:8080 | Optional |
BOF_<code>:<bof_value> | This is used to set/override an item in the BOFinder configuration area of your web.xml file, which stores configuration options related to any plugins, such as database connectors. Note that it will not change your web.xml file: any updates you make with this tool will be saved to your repository database which takes precedence to web.xml. You can add as many as you like. If you only wish to update a CONFIG item, you can exclude the BOF parameter from your console command. | BOF_com.hof.interfaces.EvenCreation:com.hof.interfaces.DummyEventCreation | Optional |
The steps below have been written for a Linux command line, using the bash shell. If you’re using a different command line or your settings syntax is different, you may need to adjust your inputs (for example, if your directory path contains spaces, you might need to use single quote marks around it).
Once complete, your updated CONFIG and BOF items will be visible in your database. Follow the steps below.
- From your console, change directories to the Yellowfin instance to be configured
From the Yellowfin top-level directory, navigate to /appserver/webapps/ROOT/
Run the command (note that depending on your shell, you may need to remove the single quote marks):java -cp ‘WEB-INF/lib/*:WEB-INF/classes’ com.hof.standalone.ModifyConfiguration
The console will display the following help text to remind you of the required parameters
Yellowfin Configuration Modification Tool ========================================== Updates configuration in Yellowfin via a command-line script. Yellowfin needs to be restarted for updated configuration items to take effect. Required Parameters: JdbcDriver:<driverclass> JDBC Driver class for Repository Database (Optional) JdbcUrl:<driverurl> JDBC Database Connection String for Repository Database JdbcUser:<user> User for connecting to Repository Database JdbcPassword:<password> Password (plain-text) for authenticating User to Repository Database CONFIG_<Code>:<config_value> Configuration Item to Update BOF_<Code>:<bof_value> Internal System Plugin Item to Update
Use the help text (or the table above on this wiki page) to write your configuration change as command line text
The text below provides an example, based on the samples we provided in the table above:java -cp ‘WEB-INF/lib/*:WEB-INF/classes’ com.hof.standalone.ModifyConfiguration jdbcuser:sysadminyfn jdbcpassword:highlysecure jdbcurl:jdbc:postgresql://localhost:5432/yellowfin9703 CONFIG_EXTERNALURL:http://10.10.10.39:8080 BOF_com.hof.interfaces.EventCreation:com.hof.interfaces.DummyEventCreation
In the example above, the tool should update the Yellowfin external URL to 10.10.10/39:8080 and add a new event called DummyEventCreation to your database.
If all your parameters are valid, the console will output the following information:
Yellowfin Configuration Modification Tool ========================================== Updates configuration in Yellowfin via a command-line script. Yellowfin needs to be restarted for updated configuration items to take affect. Required Parameters: JdbcDriver:<driverclass> JDBC Driver class for Repository Database (Optional) JdbcUrl:<driverurl> JDBC Database Connection String for Repository Database JdbcUser:<user> User for connecting to Repository Database JdbcPassword:<password> Password (plain-text) for authenticating User to Repository Database CONFIG_<Code>:<config_value> Configuration Item to Update BOF_<Code>:<bof_value> Internal System Plugin Item to Update Parameters: JdbcUser sysadminyfn JdbcPassword ************ JdbcUrl jdbc:postgresql://localhost:5432/yellowfin9703 Found CONFIG EXTERNALURL http://10.10.10.39:8080 Found BOF COM.HOF.INTERFACES.EVENTCREATION com.hof.interfaces.DummyEventCreation Selecting Existing Values SELECT IpOrg, ConfigTypeCode, ConfigCode, ConfigData FROM Configuration WHERE IpOrg = 1 AND ( ConfigTypeCode = 'SYSTEM' AND ( ConfigCode = 'EXTERNALURL' ) ) OR ( ConfigTypeCode = 'BOFINDER' AND ( ConfigCode = 'COM.HOF.INTERFACES.EVENTCREATION' ) ) Found SYSTEM/EXTERNALURL: http://10.10.10.39:8081 Found BOFINDER/COM.HOF.INTERFACES.EVENTCREATION: com.hof.interfaces.DummyEventCreation Deleting existing 2 items.. Deleting SYSTEM/EXTERNALURL Deleting BOFINDER/COM.HOF.INTERFACES.EVENTCREATION Inserting 2 configuration items.. Inserting SYSTEM/EXTERNALURL: http://10.10.10.39:8080 Inserting BOFINDER/COM.HOF.INTERFACES.EVENTCREATION: com.hof.interfaces.DummyEventCreation
Both the CONFIG and BOF item updates will now be visible in the database.