WSO2 Registry master-datasources.xml and WSO2AM_DB - wso2

The release 4.5.3 differs from the 4.5.1 in the sense that in the master-datasources.xml appears a new datasource for the WSO2AM_DB
What does this means?
How the two product relate to each other?
If I have a registry host and, API host and a MySQL host how can I have a shared registry?
As for what I configured before API manager was dependent from registry and BAM so I needed to have the DB for the registry and BAM (so install registry than BAM than API).
How do the new datasource change this dependancy path does Registry also be dependant on the API manager, but who creates the DB first?
Thanks
Luca

This does not mean Governance Registry is dependent on Api Manager. This is a datasource defined for API manager to use if available to store it is runtime data. You can use the same WSO2_CARBON_DB if you need but then you need to do some configurations. So this is purely to store API related run-time data additionally to Carbon database. (JNDI lookup for this datasource happens from API manager).

We configured WSO2_CARBON_DB datasource to point to our organization's Oracle database. GReg distribution includes specific scripts required to setup the data model.
In case we need to point WSO2AM_DB datasource to the same Oracle DB, we could not find any scripts or documentation for that.

Related

WSO2 Identity Server 5.1.0 undocumented databases WSO2METRICS_DB and jpadb

A standard installation of Identity Server 5.1.0 creates beside the known WSO2CARBON_DB database two other h2 databases: "WSO2METRICS_DB" and "jpadb".
Unfortunately we couldn't find any documentation on this databases. Could someone please provide us with an pointer to the docs or give us a hint how to answer the following questions:
Are these two databases required? For what are they used?
If you configure WSO2 IS against a MySQL database, do I need to create these databases in MySQL as well?
Do I need to backup these databases?
In case of an upgrade of IS 5.0.0 to 5.1.0. How do I handle the two databases?
If you are migrating WSO2 Identity Server 5.0.0 to 5.1.0, you can refer the official documentation [1].
Metrics is a new feature added to Identity Server with 5.1.0 version. It has a separate database and the datasource is defined in repository/conf/datasources/metrics-datasources.xml file. The metrics feature is by default enabled in the config file repository/conf/metrics.xml file. With this feature, you can view JVM metrics by going to Configure -> Metrics -> JVM Metrics feature in the IS management console. All the metrics related data is stored in this new database.
For the metrics database, the database script is located in IS_HOME/dbscripts/metrics directory and there you can find the tables related to this feature which are created in the metrics database.
If you don't wish to use this feature, you may disable it from the metrics.xml file in conf.
The other jpadb is for the workflow feature introduced with IS 5.1.0. You can find documentation in [2]. So in a migration, these should be created separately and you don't need backup as these are new databases.
For your existing database in IS 5.0.0, there are some schema changes for existing tables. You can find DB migration scripts in [1].
[1] https://docs.wso2.com/display/IS510/Upgrading+from+a+Previous+Release#UpgradingfromaPreviousRelease-Upgradingthedatabase
[2] http://wso2.com/library/articles/2015/09/article-wso2-identity-server-5.1.0-workflow-feature-and-use-cases/
This jpabd is used by human task feature to store the task related information.
Identity server ships BPEL and HumanTask features and jpabd is part of that.
WSO2_METRICS_DB is used for WSO2 Carbon Metrics. https://docs.wso2.com/display/ML100/JVM+Metrics

Accessing WSO2 BPS and ESB registry from code

I am trying to access the registry of WSO2 BPS and WSO2 ESB from Java in order to automatically fill the registry based on the data I provide.
I have already found a number of resources about the required Java code and dependencies, this being the most helpful one: [WSO2 Governance Registry]Using WSRegistryServiceClient. However, the approach described in these resources depends on the WSRegistryService service. This service is included in Governance Registry by default, but not in the other WSO2 products. I have verified that my code works for the Governance Registry. For any other WSO2 product on my machine, I get this error:
The service cannot be found for the endpoint reference (EPR) https://localhost:9445/services/WSRegistryService
I found an old thread suggesting that it should be possible to install the WSRegistryService on other WSO2 products as well, but I have not been able to find out how to do so. I can't seem to find it within the features I can install from the web console of the products. I have also tried manually copying the relevant jar from the plugins directory of Governance Registry into the plugins directory of other products, but that doesn't seem to be sufficient.
Note that my application for filling the registry will not be running on the carbon server whose registry I want to access, so using CarbonContext.getThreadLocalCarbonContext() (an approach I found in some other articles) is not an option.
I think your referring to how to install features to WSO2 products,
Please find this documentation.

Sharing registry and user store between WSO2 ESB and IDS

We are using WSO2 products ESB and IS in our product. We have configured MySql datasource for user stores and registry in Identity Server. We also have tenant specific user stores configured in Identity Server.
We would like to configure ESB to use the same user stores that are of Identity Server.
We have tried configuring the datasources and user-mgt.xml with the same user stores. When ESB is being launched we're getting some exceptions.
Kindly advise the following:
If we want to share registry and user stores, can we just add the datasources in master-datasources.xml and refer them in respective xml in ESB? Or, anything different?
Thanks in advance!
Yes. You can just share same user-mgt.xml and master-datasources.xml file with both ESB and IS. If you want to point to the same user store, user management database and same registry. (if registry.xml file has not been changed). But there can be issues, if ESB and IS are not release with same carbon platform. Because there can be slightly different between the user kernel implementation of two different carbon versions. Could you let us know the ESB and IS version that you are using? Also errors that you see in ESB startup?

Stratos 1.6.0 - Messaging between Storage Server and Data Service Service

I am configuring Stratos 1.6.0 and trying get the following scenario working.
Create a database in Storage Server
Create a user in Storage Server
Assign the user to the database
Generate datasource for the user/database combination in the Storage Server
Create DataService in Data Service Server and use the data source above
From what I can see in the code... when one creates a datasource in a Carbon application, the org.wso2.carbon.ndatasource.core.DataSourceRepository will notify the member's in the cluster of the new DataSource. These members will then invalidate the registry cache.
The problem comes is that in the default clustering configuration in Stratos 1.6.0, the Storage Server and the Data Service Server are in different Tribe domains, so messaging using Tribe is not possible between the two types of applications.
How can one get the Data Service Server to update its datasource configuration when datasources are created in the Storage Server?
What you've mentioned in your query itself is exactly what's expected from providing the option to create a datasource via WSO2 Storage Server. However, there are certain technical complexities associated with sharing datasources across nodes/clusters of different Carbon products (other than the type of Carbon product in which the datasources are created) and we're currently in the middle of attending to them. Therefore, all considered, a better way to integrate SS with DSS would be, first create your database/database user in WSO2 SS, then create datasources with that information (connection strings, user credentials, etc) in WSO2 DSS and consume them.
Regards,
Prabath
P.S. You can refer http://sparkletechthoughts.blogspot.in/2013/04/relational-storage-solution-using-wso2.html which provides you with a comprehensive guide for creating databases/database users/privilege templates.

wso2 product Registry menu (config, governance, local)

Is there any authoritative documentation available for data found under the Registry UI menu (for example as found in WSO2 ESB admin screens)?
I have seen snippets of information about this registry, for example:
The configuration registry contains product specific configuration
that can be shared across multiple instances of the same product (a
cluster of ESB nodes for example).
Source: link
To start with, I have a few questions:
What is the difference between this registry and the WSO2 Governance Registry?
What are the typical use cases for a WSO2 esb admin user for interacting with this Registry?
What are the typical use cases for a WSO2 esb developer for interacting with this Registry?
Is there a description of all the meta data stored in this registry?
In All WSO2 products there is an internal registry which is used to store resources. WSo2 Governance Registry uses the same core features + some more feature that gives complete Governance scenario. If you need you can mount to an external WSo2 Governance Registry without using the internal registry you referred.You can find more details here.