com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_link3' is unknown.

Changing the Default RSS Configuration

Introduction

Before using RDBMS provisioning facility offered by WSO2 Storage Server, as the first step, you need to configure RDBMS servers using a configuration file. This includes setting up RSS metadata repository that is used to maintain user-created databases, database users and privilege templates. By default, the RSS metadata repository is pointed to an embedded H2 database that is shipped as part of the WSO2 Storage Server installation archive.

In a typical production setting, we recommend you to use an enterprise-grade RDBMS such as MySQL or Oracle as the RSS metadata repository. You can do this in 3 steps as follows:

  1. In an RDBMS of your choice, create a database as the RSS metadata repository and a database user with admin privileges equivalent to the dba role (this grants access to the database used as the RSS metadata repository).
  2. Select the SQL script appropriate to the RDBMS you have from <SS_HOME>/dbscripts directory and run it. This creates the RSS metadata repository database structure. For example, if your RDBMS is MySQL, the script you must run is <SS_HOME>/dbscripts /rss-manager/mysql/wso2_rss_mysql.sql.
  3. Edit the parameters required to connect to the RSS metadata repository database as well as the database servers to be provisioned in <SS_HOME>/repository/conf/etc/rss-config.xml file as explained below. 

Sample configuration

Following sample configuration shows how to change the default RSS configuration in WSO2 Storage Server.  It uses a MySQL database named rss_db as the RSS metadata repository, which is used to store metadata pertaining to databases, database users, database privilege templates, etc.

It also defines RSS provisioning environments that can be considered as a logical boundary separating a database server instance cluster from another. One typical example of using multiple provisioning environment is that, if you are running a application development infrastructure allowing users to develop applications in different environments within its life cycle, such as DEV, QA, STAGING, PROD, etc, you would ideally need to have separate database provider infrastructure per environment. The aforementioned feature can be a handful in provisioning all those environments with a single WSO2 Storage Server instance.

Not only that, the configuration also allows you to specify the database servers assigned to each environments as well. It is also possible to add database servers to your provisioning environment via WSO2 Storage Server Management Console User Interface as well. See Database Server Instance for more information.

rss-config.xml
<rss-configuration>
    <!-- Database used as the backend of the RSS management repository, to store metadata related to provisioned database servers, databases, database users, database privileges, etc.. -->
  	<rss-mgt-repository>
        <datasource-config>
 		    <dataSourceClassName>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</dataSourceClassName>
                <dataSourceProps>
                    <property name="url">jdbc:mysql://localhost:3306/rss_db</property>
                    <property name="user">xxxx</property>
                    <property name="password">xxxx</property>
                </dataSourceProps>
      		</datasource-config>
  	</rss-mgt-repository>
  	
    <!-- RSS environment is a logical cluster of database servers which is needed to be provisioned by the RSS Manager. Each configured RSS environment can have its own RSS manager implementation allowing the users to provision even multiple types or Database servers in different environments -->
	<rss-environments>
        <rss-environment>
            <name>DEFAULT</name>
			<rss-provider>MYSQL</rss-provider>
			<!-- RSS instances are predefined database server instances to be used by users the other type is User Defined RSS instances,  
            which are defined by individual tenants -->
  			<rss-instances>
      		    <rss-instance>
          		    <name>WSO2RSS1</name>
					<instance-type>WSO2_RSS</instance-type>
          			<dbms-type>MYSQL</dbms-type>
          			<server-category>LOCAL</server-category>
                    <datasource-config>
                        <url>jdbc:mysql://localhost:3306</url>
					    <username>xxxx</username>
					    <password>xxxx</password>
					    <driverClassName>com.mysql.jdbc.Driver</driverClassName>
          			</datasource-config>
      			</rss-instance>
  			</rss-instances>
		</rss-environment>
	</rss-environments>
</rss-configuration>

The elements of the sample configuration are explained below. You can use this information to edit the file according to your requirements.

XML elements of the sample configuration

Property NameDescriptionTypeDefault ValueFixed ValuesMandatory/Optional
< rss-configuration > Root element of RSS configuration document. --Mandatory
<rss-mgt-repository>

This element contains the data source configuration corresponds to the RSS metadata repository which is used to store metadata associated with database servers, databases, database users etc. Individual datasource configuration parameters used in the aforementioned configuration are explained under the subsequent element descriptions.

 --Mandatory
<datasource-config> Root element of the datasource configuration of RSS metadata repository. --Mandatory
<datasourceClassName>

XA Driver Class provided by the JDBC driver used to connect to the type of RDBMS in which the RSS metadata repository is configured.

Eg: If RSS metadata repository database is configured on MySQL - " com.mysql.jdbc.jdbc2.optional.MysqlXADataSource " has to be used as the value of this particular attribute.

 --Mandatory
< dataSourceProps >Root element of the XA data source property collection that needs to be configured in order to initialize the XA datasource driver used in the RSS metadata repository configuration. --Mandatory
<property name="property_name">+

Element used to specify bean properties of the XA datasource driver used in RSS metadata repository configuration. (Note: The set of properties need to be configured would be different depending on the XA driver class used).

Eg: Sample configuration which can be used to populate the bean properties required for MySQL XA driver.

<dataSourceProps>

<property name = "url">xxxx</property>

<property name = "user">xxxx</property>

<property name = "password">xxxx</property>

</dataSourceProps>

 --Mandatory
<rss-environments>Root element that wraps the RSS environment configurations --Mandatory
<rss-environment>+Element used to configure of one particular RSS environment --Mandatory
<name>Element used to configure the name of the RSS environment --Mandatory
<rss-provider>RSS manager implementation used to provision RSS instances configured in the RSS environment --Mandatory
<rss-instances>Root element that wraps the RSS instances configured in the RSS environment to which they belong to. --Mandatory
<rss-instance>+

Element used to configure one particular database server instance to be provisioned.

 --Mandatory
<name>Element used to configure name of the RSS instance    
<dbms-type>

Element used to configure dbms-type of the RSS instance.

Eg: MySQL

 --Mandatory
<instance-type>Element used to configure type of the RSS instance. The value of this particular attribute should be either "WSO2_RSS" or "USER_DEFINED". If a particular RSS instance is configured with the type "WSO2_RSS", it implies that the configured RSS instance would be provisioned as part of the logical database cluster named "WSO2_RSS". In contrast, if a RSS instance is configured with the type "USER_DEFINED", it will be provisioned separately to the servers added as WSO2_RSS. --Mandatory
<server-category>Obsolete attribute that is due to be removed from the immediate upcoming release of SS. LOCAL-Mandatory
<datasource-config>Root element of the datasource configuration of RSS instance --Mandatory

<url>

Element provided to configure the JDBC URL used to connect to the database server configured as the RSS instance --Mandatory
<username>Element provided to configure the username of the database user used to connect to the database server configured as the RSS instance --Mandatory
<password>Element provided to configure the password of the database user used to connect to the database server configured as the RSS instance --Mandatory
<driverClassName>Element provided to configure the JDBC driver class used to connect to the database server configured sa the RSS instance --Mandatory
com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.