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.
- Download WSO2 GS 1.4.2 from here
- Install JBoss Application Server if you already don't have JBoss. I will refer this JBoss installed location as JBOSS_HOME in later steps
- Unzip the downloaded pack(wso2gs-1.4.2.zip). I will refer this unziped folder as GS_HOME in later steps.
- Copy GS_HOME/repository folder in to a new folder called gs-repo.
- Edit the WebContextRoot of carbon.xml located inside gs-repo/repository/conf as bellow
1: <WebContextRoot>/gs</WebContextRoot>
- 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>
- 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>
- 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>
- Copy the GS_HOME/lib/log4j.properties file to GS_HOME/lib/core/WEB-INF/classes folder
- Copy all the jars located inside GS_HOME/lib/api to GS_HOME/lib/core/WEB-INF/lib
- Create a folder called “gs.war” inside JBOSS_HOME/server/default/deploy
- 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)
- Copy all the jars inside GS_HOME/lib/endorsed to JBOSS_HOME/lib/endorsed
- 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" />
- Locate the JBOSS_HOME/server/default/deploy/jbossweb.sar/server.xml file and uncomment the following part
- 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
- Now start the JBoss server with your IP as bellow
- sh run.sh -b 10.216.5.74
- Thats all and now you can access the the WSO2 Gadget Server management console with following URL(Use your IP instead).
- you can find more details about WSO2 Gadget Server from here and more details on wso2 products from here
This comment has been removed by the author.
ReplyDeleteWSO2 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