Skip to main content

How to deploy WSO2 Carbon 3.2.2 based product on JBoss

This post will discuss how to deploy WSO2 Carbon 3.2.2 based product with JBoss Application Server. WSO2 Gadget Server 1.4.2 will be deployed with Jboss 5.1.0 as an example in Linux environment . Also it is important to note that the same set of steps can be extended to other WSO2 products as well.
  1. Download WSO2 GS 1.4.2 from here
  2. Install JBoss Application Server if you already don't have JBoss. I will refer this JBoss installed location as JBOSS_HOME in later steps
  3. Unzip the  downloaded pack(wso2gs-1.4.2.zip). I will refer this unziped folder as GS_HOME in later steps.
  4. Copy GS_HOME/repository folder in to a new folder called gs-repo.
  5. Edit the WebContextRoot of carbon.xml  located inside gs-repo/repository/conf as bellow
      1: <WebContextRoot>/gs</WebContextRoot> 
  6. Also make sure to change http and https ports defined in carbon.xml accordingly. After changing ports the ServletTransports section of gs-repo/repository/conf /carbon.xml should be as bellow.
      1: <!-- Override the ports defined in mgt-transports.xml -->   
    
      2: <ServletTransports>  
    
      3:     <HTTPS>8443</HTTPS>  
    
      4:     <HTTP>8080</HTTP>  
    
      5: </ServletTransports>
    
  7. Open registry.xml inside gs-repo/repository/conf and set the absolute path to database as bellow
      1: <dbConfig name="wso2registry">
      2:     <url>jdbc:h2:/home/ranga/Desktop/wso2gs-1.4.2/gs-repo/repository/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE</url>
      3:     <userName>wso2carbon</userName>
      4:     <password>wso2carbon</password>
      5:     <driverName>org.h2.Driver</driverName>
      6:     <maxActive>50</maxActive>
      7:     <maxWait>60000</maxWait>
      8:     <minIdle>5</minIdle>
      9: </dbConfig>
    
  8. Open user-mgt.xml inside gs-repo/repository/conf and set the absolute path to database as bellow
      1: <Configuration>
      2:     <AdminRole>admin</AdminRole>
      3:     <AdminUser>
      4:         <UserName>admin</UserName>
      5:         <Password>admin</Password>
      6:     </AdminUser>
      7:     <EveryOneRoleName>everyone</EveryOneRoleName> 
      8:     <!-- By default users in this role sees the registry root -->
      9:     <Property name="url">jdbc:h2:/home/ranga/Desktop/wso2gs-1.4.2/gs-repo/repository/database/WSO2CARBON_DB;DB_CLOSE_ON_EXIT=FALSE</Property>
     10:     <Property name="userName">wso2carbon</Property>
     11:     <Property name="password">wso2carbon</Property>
     12:     <Property name="driverName">org.h2.Driver</Property>
     13:     <Property name="maxActive">50</Property>
     14:     <Property name="maxWait">60000</Property>
     15:     <Property name="minIdle">5</Property>
     16: </Configuration>
  9. Copy the GS_HOME/lib/log4j.properties file to GS_HOME/lib/core/WEB-INF/classes folder
  10. Copy all the jars located inside GS_HOME/lib/api to GS_HOME/lib/core/WEB-INF/lib
  11. Create a folder called “gs.war” inside JBOSS_HOME/server/default/deploy
  12. Copy the GS_HOME/lib/core/WEB-INF folder in to the JBOSS_HOME/server/default/deploy/gs.war (Which is created in step 11)
  13. Copy all the jars inside GS_HOME/lib/endorsed to JBOSS_HOME/lib/endorsed
  14. Configuring JBoss SSL connector as  below.
    • Locate the JBOSS_HOME/server/default/deploy/jbossweb.sar/server.xml file and uncomment the following part
        1: <!-- SSL/TLS Connector configuration using the admin devl guide keystore
        2: <Connector protocol="HTTP/1.1" SSLEnabled="true" 
        3:     port="8443" address="${jboss.bind.address}"
        4:     scheme="https" secure="true" clientAuth="false" 
        5:     keystoreFile="${jboss.server.home.dir}/conf/chap8.keystore"
        6:     keystorePass="rmi+ssl" sslProtocol = "TLS" />
        7: --> 
      
    • Make sure to change the port to 8443
    • Set absolute path to keystoreFile which is located in gs-repo/repository/resources/security/wso2carbon.jks
    • Set the keystorePassword to password used ( wso2carbon) .
    • So the final outpul looks like bellow
        1: <!-- SSL/TLS Connector configuration using the admin devl guide keystore -->
        2: <Connector protocol="HTTP/1.1" SSLEnabled="true" 
        3:     port="8443" address="${jboss.bind.address}"
        4:     scheme="https" secure="true" clientAuth="false" 
        5:     keystoreFile="/home/ranga/Desktop/wso2gs-1.4.2/gs-repo/repository/resources/security/wso2carbon.jks"
        6:     keystorePass="wso2carbon" sslProtocol = "TLS" />
      
  15. Now open a command line window and go to JBOSS_HOME/bin and  define an environment variable called CARBON_HOME and set the path to your gs-repo directory as bellow.
    • export CARBON_HOME=/media/data/work/products/StratosRelease/3.2.2/released/wso2gs-1.4.2/gs-repo
  16. Now start the JBoss server with your IP as bellow
    • sh run.sh -b 10.216.5.74
  17. Thats all and now you can access the  the WSO2 Gadget Server management console with following URL(Use your IP instead).
  18. you can find more details about WSO2 Gadget Server from here and more details on wso2 products from here

Comments

  1. This comment has been removed by the author.

    ReplyDelete
  2. WSO2 HAS DECIDED TO DROP SUPPORT FOR WEBAPP DEPLOYMENT MODE OF THE WSO2 PLATFORM AND PRODUCTS. WSO2 DOES NOT ENCOURAGE INSTALLING WSO2 PRODUCTS ON TOP OF OTHER APPLICATION SERVERS.

    ReplyDelete

Post a Comment

Popular posts from this blog

How to install IBM WebSphere MQ on Ubuntu (Linux)

Following are the steps to install IBM WebSphere MQ version 8 on Ubuntu 14.04. 1) Create a user account with name "mqm" in Ubuntu. This should basically create a user called "mqm" and usergroup called "mqm" 2) Login to "mqm" user account and proceed with next steps 3) Increase the open file limit for the user "mqm" to "10240" or higher value. For this open "/etc/security/limits.conf" file and set the values as bellow. mqm       hard  nofile     10240 mqm       soft   nofile     10240 4) Increase the number of processes allowed for the user "mqm" to "4096" or higher value. For this open "/etc/security/limits.conf" file and set the values as bellow. You will need to edit this file as a sudo user. mqm       hard  nproc      4096 mqm       soft   nproc      4096 5) Install "RPM" on Ubuntu if you already don't have it. sudo apt-get install rpm ...

Beautiful Trincomalee : One of the stunning places to visit in Sri-Lanka

Recently my self and few of my friends traveled to the ancient city of Trncomalee which is situated in eastern province and lies on the east cost of the little island. In ancient times it was identified as Gokanna and it was one of the major see ports in the international trading history of Sri Lanka. The city is home to the famous ancient Koneswaram Temple and it is said that this is the capital city of king Ravana . This was my first travel to this ancient city and I would say that, it is one of the best places to visit in Sri Lanka. There are lot of places to visit there including Konesvaram Temple, Dutch Fort, Nilaveli Beach, Marble Beach and Pigeon Island . Nilaveli beach is considered to be one of the best beaches in Sri Lanka and Knee deep shallow seas spreads out hundreds of meters towards the sea. That provides ideal and pure conditions for sun bathing. Some of the pictures taken(by me and my friends) trough out the tour is listed bellow as a evidence to the stunning...

Creating a Simple Axis Service(.aar file) and Deploy it in WSO2 Application Server

In this post I am explaining how to Create a Simple Axis Service(.aar file) and Deploy it in WSO2 Application Server using a simple sample. And also at the end I am describing how to do the same thing with creation of a Jar Service. Lets assume "sample-home" as our parent directory and inside that we can create following folder structure. With this folder structure we can include our external libraries (jar files) inside lib folder and  the "services.xml" file inside "META-INF" folder. Following is the sample services.xml definition which I used with this sample creation. < service name = "HelloService" > < Description > This is a sample service to explain simple aar service </ Description > < messageReceivers > < messageReceiver mep = "http://www.w3.org/2006/01/wsdl/in-out" class = "org.apache.axis2.rpc.receivers.RPCMessageReceiver" /> </ messageReceivers > < parame...