Skip to main content

WSO2 SOA Governance Registry Installation & DB Configuration

WSO2 Installation & Configuration
 Downloading the Product:
Follow the instructions below to download the product from the product web page. You can also download and build the source code.
  1. In your Web browser, go to http://wso2.com/products/governance-registry.
  2. If you are a new user downloading WSO2 products for the first time, register and log in.
  3. Once you are logged in, click the Binary button in the upper right corner of the page.
The binary distribution contains the Carbon binary files for both MS Windows and Linux operating systems, compressed into a single ZIP file. This distribution is recommended for many users.
Installing a WSO2 product is very fast and easy. Before you begin, be sure you have met the installation prerequisites, and then follow the installation instructions for your platform.
Installing the required applications:
  1. Be sure your system meets the Installation Prerequisites. Java Development Kit (JDK) is essential to run the product.  

Installing the Governance Registry:

  1. Download the latest version of the Governance Registry as described in Downloading the Product.
  1. Extract the archive file to a dedicated directory for the Governance Registry, which will hereafter be referred to as <GREG_HOME>.

Setting up JAVA_HOME:

You must set your JAVA_HOME environment variable to point to the directory where the Java Development Kit (JDK) is installed on the computer. Typically, the JDK is installed in a directory under C:/Program Files/Java, such as C:/Program Files/Java/jdk1.6.0_27. If you have multiple versions installed, choose the latest one, which you can find by sorting by date.
Environment variables are global system variables accessible by all the processes running under the operating system. You can define an environment variable as a system variable, which applies to all users, or as a user variable, which applies only to the user who is currently logged in.
You set up JAVA_HOME using the System Properties, as described below. Alternatively, if you just want to set JAVA_HOME temporarily for the current command prompt window, set it at the command prompt.

Execute Start Script:

In order to launch the management console, it is necessary to execute the start script wso2server.bat from the bin folder.
  1. Access Windows command prompt (go to "Start" -> "Run" and type "cmd" without quotes. Press "Enter").
  2. Execute the following command: cd <PRODUCT_HOME>\bin
where <PRODUCT_HOME> is the installation folder of the product. For example, c:\wso2\wso2greg-4.5.3\bin.
  1. Execute the following command:wso2server.bat
WSO2 server for OSB (Start server with this command):
To integrate OSB with G-Reg:
  1. Unzip G-Reg pack and start the server with -Duddi=enable. I.e., for UNIX: /sh -Duddi=enable.
  2. Login to OSB server and create a new session if you have not done so.
DB layer configuration for WSO2:

Setting up the database and users:

Follow the steps below to set up a MySQL database:
  1. Download and install MySQL on your computer using the following command: sudo apt-get install mysql-server mysql-client
  1. Start the MySQL service using the following command:
  2. Log in to the MySQL client as the root user (or any other user with database creation privileges).
  3. Enter the password when prompted.
sudo /etc/init.d/mysql startmysql -u root -p
In most systems, there is no default root password. Press the Enter key without typing anything if you have not changed the default root password.
  1. In the MySQL command prompt, create the database using the following command:
create database regdb;
mysql> create database <DATABASE_NAME> character set latin1;
1.      Give authorization of the database to the regadmin user as follows:grant all privileges on regdb.* to regadmin@'%' identified by 'regadmin';
  1. Once you have finalized the permissions, reload all the privileges by executing the following command: FLUSH PRIVILEGES;
  2. Log out from the MySQL prompt by executing the following command: quit.

Setting up the drivers:

Download the MySQL Java connector JAR file, and copy it to the <PRODUCT_HOME>/repository/components/lib/ directory.

Setting up datasource configurations:

The H2 database that comes by default stores registry and user management related data. Follow the steps below to change the type of the default database or create new databases to manage registry or/and user management related data separately.

Changing the default database

Follow the steps below to change the type of the default H2 database.
  1. Edit the default datasource configuration in the <PRODUCT_HOME>/repository/conf/datasources/m aster-datasources.xml file. Replace the url, username, password and driverClassName settings with your custom values and also the other values accordingly as shown below.
Icon
Do not change the datasource name WSO2_CARBON_DB in the below configurations.
<datasource>
       <name>WSO2_CARBON_DB</name>
       <description>The datasource used for registry and user manager</description>
       <jndiConfig>
           <name>jdbc/WSO2CarbonDB</name>
       </jndiConfig>
       <definition type="RDBMS">
           <configuration>
               <url>jdbc:mysql://localhost:3306/regdb</url>
               <username>regadmin</username>
               <password>regadmin</password>
               <driverClassName>com.mysql.jdbc.Driver</driverClassName>
               <maxActive>80</maxActive>
               <maxWait>60000</maxWait>
               <minIdle>5</minIdle>
               <testOnBorrow>true</testOnBorrow>
               <validationQuery>SELECT 1</validationQuery>
               <validationInterval>30000</validationInterval>
           </configuration>
       </definition>
</datasource>

Creating database tables: To create the database tables, connect to the database that you created earlier and run the following scripts 

  1. To create tables in the registry and user manager database (WSO2CARBON_DB), use the below script:
You may have to enter the password for each command when prompted.
mysql -u regadmin -p -Dregdb < '<PRODUCT_HOME>/dbscripts/mysql.sql';
  1. Restart the server.
OR
  1. You can create database tables automatically when starting the product for the first timeby using the -Dsetup parameter as follows:
  2. For Windows: <PRODUCT_HOME>/bin/wso2server.bat -Dsetup
  3. For Linux: <PRODUCT_HOME>/bin/wso2server.sh –Dsetup
  4. If server will start successfully it means table are created and now available in the regdb.

Comments

Popular posts from this blog

Oracle SOA 12C rest adapter with Custom HTTP headers

Most existing web applications are connected through web services, which are commonly known as SOAP services. More and more users are relying on mobile devices for communication, and they’re looking for lighter ways to access enterprise information on the go. REST services are the answer for the mobile device platform, because they get rapid responses and fast access to data. Oracle SOA Suite 12 c  provides a complete set of service infrastructure components for designing, deploying, and managing composite applications. Oracle SOA Suite 12 c  enables services to be created, managed, and orchestrated into composite applications and business processes. Some time we have need to send HTTP headers in REST service, In OSB we use header component and add what ever is needed but in oracle SOA 12C it's little bit different. Let see how we can do it. Create one SOA Application. Create one SOA Sample project inside SOA Application. Go to composite and drag drop REST ...

Solution for BPM standard dashboard & activity guide not working in Oracle SOA 12.2.1.0 C

As earlier i publish a post about different issue of Oracle BPM, After some oracle support i got to fixed them. Issue Blog Here... Issue 3:BPM 12.2.1 process workspace activity guide not working. if you have a normal BPM Process, then this is the issue. In order to have data populated in "Activity Guide" firstly you should create a BPMN Guided Business Process. Below you can find the documentation about activity guide and how to create a Guided Business Process: https://docs.oracle.com/middleware/1221/bpm/bpm-develop/GUID-F765955D-90A5-48D4-8D2A-2F01FBB539E3.htm#BPMPD901 And here is specified: " A Guided Business Process is modeled as an activity guide that is based on a business process. The Activity Guide includes a set of Milestones. A milestone is a contained set of tasks that the end user has to complete. A milestone is complete when the user successfully runs a specific set of tasks in the milestone. " And in the below chapters you will find the ...

Swagger API document from Any WADL & Schema in Oracle SOA

Hi everyone, Hope everyone is doing well these days, Recently i started a project work over how to generate swagger API document for your any REST API, In case if you don't know what is swagger please go and check " https://swagger.io/tools/swagger-editor/ ". It's a great and easy to use tool which will help to create user friendly, human readable form API documentation with extension for generating API client in different languages with capability of testing your API from same. What is swagger editor, Design, describe, and document your API on the first open source editor fully dedicated to OpenAPI-based APIs. The Swagger Editor is great for quickly getting started with the OpenAPI (formerly known as the Swagger Specification) specification, with support for Swagger 2.0 and OpenAPI 3.0.  What benefits you will get by using swagger, Runs Anywhere, The Editor works in any development environment, be it locally or in the web. Smart Feedback, Validate you...