Appboard/old/configuration database: Difference between revisions

imported>Jason.nicholls
imported>Jason.nicholls
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:Configuration Database}}
{{DISPLAYTITLE:Configuration Database}}
[[Category:AppBoard old]]
[[Category:AppBoard old]]
 
__TOC__
== Overview ==
A default installation of AppBoard / enPortal will use an in-memory H2 database that runs within the same process as the main application. This is the easiest and most convenient configuration but in clustered and/or high availability environments it may be necessary to configure an external shared database.
A default installation of AppBoard / enPortal will use an in-memory H2 database that runs within the same process as the main application. This is the easiest and most convenient configuration but in clustered and/or high availability environments it may be necessary to configure an external shared database.


Line 12: Line 13:


This database is ''only'' used for configuration data and the resource requirements are very minimal if using an external database.
This database is ''only'' used for configuration data and the resource requirements are very minimal if using an external database.
{{Tip|It is recommended to use the default embedded and in-memory H2 database as this does not require any maintenance - unless there is a specific requirement for clustering and/or high-availability environments.}}




== Using an External Configuration Database ==
== Using an External Config DB ==


{{Note|The appropriate JDBC driver must be installed before starting this process!}}
{{Note|
* The appropriate JDBC driver must be installed before starting this process!
* The external DB should exist and you need to have access credentials with a database user that has the ability to create tables.
* The external DB should be for the exclusive use of AppBoard / enPortal
}}




Line 23: Line 30:
enPortal / AppBoard includes a utility to set up and configure an external configuration database. Please note this assumes the appropriate JDBC driver is installed, and you have an external database to connect to along with access credentials:
enPortal / AppBoard includes a utility to set up and configure an external configuration database. Please note this assumes the appropriate JDBC driver is installed, and you have an external database to connect to along with access credentials:


# If you already have configured AppBoard and want to use the existing configuration with an external config DB, make sure to run a full backup before continuing. See the [[appboard/old/backup_and_restore|Backup & Restore]] documentation for more information.
# The AppBoard server should be stopped.
# Open a terminal and change into the <tt>[INSTALL_HOME]/server/bin</tt> directory and run:
# Open a terminal and change into the <tt>[INSTALL_HOME]/server/bin</tt> directory and run:
#: <tt>> portal dbsetup</tt>
#: <tt>> portal dbsetup</tt>
Line 28: Line 37:
## Use the ''Database'' button to select from a list of pre-configured templates, such as MySQL.
## Use the ''Database'' button to select from a list of pre-configured templates, such as MySQL.
## Adjust the ''Host'' and ''Port'' fields to match the database host and port. After making a database selection the port will default to the default for that database type.
## Adjust the ''Host'' and ''Port'' fields to match the database host and port. After making a database selection the port will default to the default for that database type.
## Set the ''Database Name'' field to match the name of the database created to store the AppBoard configuration data. It is recommended this database is ''only'' used by AppBoard.
## Set the ''Database Name'' field to match the name of the database created to store the AppBoard configuration data.
## Set the ''User'' and ''Password'' used to authenticate against the database.
## Set the ''User'' and ''Password'' used to authenticate against the database.
## Click the ''Test'' button to establish a connection and ensure the details are correct.
## Click the ''Test'' button to establish a connection and ensure the details are correct.
Line 34: Line 43:
## The ''Advanced...'' button can be used to configure some additional connection management settings.
## The ''Advanced...'' button can be used to configure some additional connection management settings.
## Click the ''Ok'' button to save changes and exit the tool.
## Click the ''Ok'' button to save changes and exit the tool.
# So far this process simply sets AppBoard to '''connect''' to an external configuration database. This may be OK if the database already contains configuration (clustered or HA environment), but otherwise it will be necessary to either perform a database reset to create the initial default configuration, or to restore an archive to establish the configuration:
#* To reset and create a stock database configuration run:
#*: <tt>> portal dbreset</tt>
#* To restore an archive run (and refer to the [[appboard/old/backup_and_restore|Backup & Restore]] documentation):
#*: <tt>> portal Restore -jar ''<archive.jar>''</tt>
# Start AppBoard. If a dbreset or restore was performed than it is during startup the database will be configured.


{{Note|The dbsetup tool can be re-run to make changes to the configuration as needed. Also the actual configuration information is stored in <tt>[INSTALL_HOME]/server/webapps/enportal/WEB-INF/config/persist.properties</tt> and can be modified directly however it is recommended to use the tool. In support situations this file may be requested for inspection.}}  
{{Note|The dbsetup tool can be re-run to make changes to the configuration as needed. Also the actual configuration information is stored in <tt>[INSTALL_HOME]/server/webapps/enportal/WEB-INF/config/persist.properties</tt> and can be modified directly however it is recommended to use the tool. In support situations this file may be requested for inspection.}}


== Creating an External Config DB ==


# Run the <tt>portal dbsetup" command in ${INSTALL_HOME}/bin directory.  When you run this command, there is a GUI that assists with selecting the database type and configuring the database connection.  This tool saves changes to the file: /server/webapps/enportal/WEB-INF/config/persist.properties, with the specific configuration details that you provide for you database connection.  If your server does not have a graphical display, you can modify this file directly in lieu of running the dbsetup command.
In cases where an existing external database is not available it will be necessary to install and create one specifically for AppBoard. The following guides are '''examples''' only - please refer to the actual database product documentation for complete documentation.
# Configure a database connection in the dbsetup GUI, by completing the following:
## Click the Database button and select your type of database from the selection list (e.g. Oracle)
## Set the Host and Port fields to match the IP location of your database (as resolved from the enPortal/AppBoard server).
## Set the Database Name field to match the name of the database created to store the enPortal/AppBoard data.
## Set the User and Password fields to match the database user and password that were configured on your database to control access.
## Test the Connection by clicking the Test button to verify the database connection settings.
## Select Ok to save the changes and exit the tool.


*[[appboard/old/configuration_database/example_sybase|Sybase SQL Anywhere]]
*[[appboard/old/configuration_database/example_oracle|Oracle]]
*[[appboard/old/configuration_database/example_mssql|Microsoft SQL Server]]
*[[appboard/old/configuration_database/example_db2|IBM DB2]]


If you need to actually install/create the external database the following guide may be of assistance [[Configuring_Databases|Configuring Databases]].
In addition, once the database has been created, it will be necessary to run through the ''Using an External Config DB'' section to configure AppBoard to use it.

Latest revision as of 09:03, 18 July 2014

Overview

A default installation of AppBoard / enPortal will use an in-memory H2 database that runs within the same process as the main application. This is the easiest and most convenient configuration but in clustered and/or high availability environments it may be necessary to configure an external shared database.

The configuration database is used to store a variety of system configuration:

  • enPortal users
  • enPortal channel configuration
  • enPortal Single Sign-on tokens
  • AppBoard (versions 2.3 or later) Stacks, Boards, Widgets, filter rules, etc...

This database is only used for configuration data and the resource requirements are very minimal if using an external database.

Template-tip.png
It is recommended to use the default embedded and in-memory H2 database as this does not require any maintenance - unless there is a specific requirement for clustering and/or high-availability environments.


Using an External Config DB

Template-note.png
  • The appropriate JDBC driver must be installed before starting this process!
  • The external DB should exist and you need to have access credentials with a database user that has the ability to create tables.
  • The external DB should be for the exclusive use of AppBoard / enPortal


DB Setup Tool

enPortal / AppBoard includes a utility to set up and configure an external configuration database. Please note this assumes the appropriate JDBC driver is installed, and you have an external database to connect to along with access credentials:

  1. If you already have configured AppBoard and want to use the existing configuration with an external config DB, make sure to run a full backup before continuing. See the Backup & Restore documentation for more information.
  2. The AppBoard server should be stopped.
  3. Open a terminal and change into the [INSTALL_HOME]/server/bin directory and run:
    > portal dbsetup
  4. This will launch a graphical user interface to assist with the configuration as shown to the right.
    1. Use the Database button to select from a list of pre-configured templates, such as MySQL.
    2. Adjust the Host and Port fields to match the database host and port. After making a database selection the port will default to the default for that database type.
    3. Set the Database Name field to match the name of the database created to store the AppBoard configuration data.
    4. Set the User and Password used to authenticate against the database.
    5. Click the Test button to establish a connection and ensure the details are correct.
    6. The Advanced Url... button can be used to set specific JDBC connection parameters.
    7. The Advanced... button can be used to configure some additional connection management settings.
    8. Click the Ok button to save changes and exit the tool.
  5. So far this process simply sets AppBoard to connect to an external configuration database. This may be OK if the database already contains configuration (clustered or HA environment), but otherwise it will be necessary to either perform a database reset to create the initial default configuration, or to restore an archive to establish the configuration:
    • To reset and create a stock database configuration run:
      > portal dbreset
    • To restore an archive run (and refer to the Backup & Restore documentation):
      > portal Restore -jar <archive.jar>
  6. Start AppBoard. If a dbreset or restore was performed than it is during startup the database will be configured.
Template-note.png
The dbsetup tool can be re-run to make changes to the configuration as needed. Also the actual configuration information is stored in [INSTALL_HOME]/server/webapps/enportal/WEB-INF/config/persist.properties and can be modified directly however it is recommended to use the tool. In support situations this file may be requested for inspection.

Creating an External Config DB

In cases where an existing external database is not available it will be necessary to install and create one specifically for AppBoard. The following guides are examples only - please refer to the actual database product documentation for complete documentation.

In addition, once the database has been created, it will be necessary to run through the Using an External Config DB section to configure AppBoard to use it.