Sunday, January 12, 2014

Working with ESB JIRA Connector



This blog post explains how to create test data using Developer Studio and how to create an issue using ESB JIRA connector using the created test data .

1. First open the Developer Studio Application and go to the dashboard. Create an ESB Config Project by clicking the “ESB Config Project Link” .


2. It will Direct you to the “New ESB Project” window. Select “ New ESB Config Project”

3.Give a name for the project expect to create and browse and mention the location of the project .


Now the ESB Config project is created and we need to create a proxy service to work with JIRA operations.


4. Go to the dash board again and click on “Proxy Services” link

 
5. Select “Create New Proxy Services” Option

 
6. Create a Custom proxy by entering details to the required fields and click on finish to complete.

  
7. Go to the Project Explorer and select the created ESB Config project and right click on it . You can see the menu available → Select “Import Cloud connector” from menu . It will direct you to the ESB Cloud Connector window. Browse and locate the JIRA connector location.
 
 
8.Go to the palette and open the created XML file and verify the JIRA Connector Tab is available in the palette, expand the JIRA connector pallet and you can see all the JIRA Connector operations available.



9. Here I'm going to explain how to create a new issue using JIRA connector . So drag and drop the “Config' and “Create Issue” JIRA operations in to the XML design view and verify the source code is created accordingly for the added JIRA operations by navigating to the “Source” tab.

 
Source View of the above operation should be like this. 

 
10. Now go to the dashboard of the developer studio and select “carbon application project” link to create new carbon application project.


11. Enter the project name and the location of the new carbon application project and click on finish button.


 12. Now save the created carbon application project in preferred location

 
13.Now export the created and saved carbon application by right clicking the carbon application project available at project explorer and click on the “Export Carbon Application project” option. It will open the the “WSO2 Platform Distribution” window. Export the carbon application in to the preferred destination.


14. Now Start the ESB server, Go to the management console and log in to the application. Then go to the connectors section of the main tab →click on “Add Connectors” and it will direct you to browse the location where the connectors are available. Select the JIRA Connector from the available location and upload the connector. 




15. The JIRA Connector uploaded successfully displayed in the connectors window .Enable the uploaded JIRA connector.



16. Then go to the Carbon applications section at the main page and click on “Add” to upload the created carbon application using Developer Studio Previously.

 
17.Browse the location of the exported carbon application and upload the carbon application.

18. Go to the services section at the main tab and Click on “List” to check whether the uploaded carbon application is deployed with the proxy.

Go to the service dashboard of the created proxy and get the end points of the URI

http://chathurika:8280/services/<proxy>


Invoke the proxy using curl -v http://chathurika:8280/services/<proxy>

The JIRA issue will be created according to the given instructions in the proxy.


For any JIRA operation you can create test data using the Developer studio application and deploy it in ESB as a carbon application . After that you can invoke the created proxy using CURL or SOAPUI.











Saturday, January 11, 2014

Installing PostgresSQL on Ubuntu



1.Verify that you do not already have installed PostgreSQL in your machine
Run the following command in your console

ps ax | grep postgres

2.If you get a response similar to the one below, then you have PostgreSQL installed

Ss 0:00 postgres: writer process
Ss 0:00 postgres: wal writer process
Ss 0:00 postgres: autovacuum launcher process
Ss 0:00 postgres: stats collector process

3.Install PostgreSQL on your system

sudo apt-get update
sudo apt-get install postgresql-9.1

4.Configure your PostgreSQL Password

sudo -u postgres psql template1
ALTER USER postgres with encrypted password 'your_password';
Press ctrl-d

5.Configure MD5 Autentication

sudo nano /etc/postgresql/9.1/main/pg_hba.conf

6.Update the

local all postgres

7.Entry to

local all postgres md5

8.Enable TCP/IP connections

sudo nano /etc/postgresql/9.1/main/postgresql.conf

Locate the line

#listen_addresses = 'localhost'

and change it to

listen_addresses = 'localhost'

9.Restart the postgresql

sudo service postgresql restart

10.Create the database

create database testdb;

11.List available databases

\list

12.List users

\du >>> List Users