Prerequisite :
- Java 8+ installed and JAVA HOME is set.
- Install apache tomcat 7+
- Need to have any one of the database server installed like Derby, MySQL, Postgres, MSSQL etc
Steps to Deploy HI application :
- Extract helicalinsight-ee-2.1.0.8049 RC1.jar file.
- Once you extract this you will find hi-repository.zip and hi-ee.war
- Unzip the hi-repository.zip file to extract hi-repository folder.
Note: Below is the URL of the blog contains a detailed description on How to deploy Helical Insight application in tomcat with MySQL. By default helical insight is installed with Jetty and Derby. Derby database is needed to hold all the user, roles, profiles kind of information. Rather than using MySQL you can also migrate to certain another database also.
Please refer this blog. You can contact us in case you find any difficulty while performing any of the steps:
https://www.helicalinsight.com/uncategorized/deploy-helical-insight-application-tomcat-mysql/
For first instance deployment :
- Copy that hi-ee.war file and paste it inside apache-tomcat/web apps folder.
- This will gets deployed and create hi-ee folder at the same location.
- Now Copy hi-repository which you have unzipped before.
- Paste this hi-repository folder at any location as per your wish
– In my case, I have created a folder called “FirstInstance” in C drive and pasted hi-repository inside it.
- Go to hi-repository/System/Admin folder.
- Open settings.xml
- Provide path of hi-repository inside <efwSolution></efwSolution> tags.
– In my case it will be C:\\FirstInstance\\hi-repository
- Provide application URL inside <BaseUrl></BaseUrl> tags.
– In my case, URL for first instance will be “http://localhost:8080/hi-ee/hi/html”
- Save this file and close it.
- Now create database “hiee” inside your database server. Your server can be anything like MySQL, Derby, MSSQL, Postgres etc.
- Now go to apache-tomcat/webapps/hi-ee/WEB-INF/classes folder.
- Open application-context.xml file.
- Edit the content in below tags as per your connection details of hiee database which you have created in your database server:
<bean id="dataSource" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close"> <property name="username" value="hiuser"/> <property name="password" value="hiuser"/> <property name="driverClassName" value="com.mysql.jdbc.Driver"/> <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/hiee"/> </bean> <prop key="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</prop>
- Save the file and close it.
- Open project.properties file from same location.
- Provide path to settings.xml, scheduling.XML (For scheduling.xml you can provide any path where this file will start creating as it doesn’t exist by default), Plugins folder path.
- Once done save the file and close it.
- Open log4j.properties from the same location
- Provide path to the location where you want to generate Helical Insight application logs inside appender.file.File tag.
- Save the file and close it.
- Go to apache-tomcat/webapps/hi-ee/WEB-INF/lib folder.
- In lib folder, Download and add JDBC driver of a database in which you have created hiee database.
- Restart tomcat application.
- You will be able to access the first instance using below URL :
– “http://localhost:8080/hi-ee”
For Second instance deployment :
- Rename hi-ee.war file which is present in your extracted location (From where you have extracted .jar file) with some other name like hi-eeV2.war etc.
- Copy that hi-eeV2.war file and paste it inside apache-tomcat/web apps folder.
- This will gets deployed and create hi-eeV2 folder at the same location.
- Now Copy hi-repository which you have unzipped before.
- Paste this hi-repository folder at any location as per your wish
– In my case, I have created a folder called “SecondInstance” in C drive and pasted hi-repository inside it.
- Go to hi-repository/System/Admin folder.
- Open settings.xml
- Provide path of hi-repository inside <efwSolution></efwSolution> tags.
– In my case it will be C:\\SecondInstance\\hi-repository
- Provide application URL inside <BaseUrl></BaseUrl> tags.
– In my case, URL for first instance will be “http://localhost:8080/hi-eeV2/hi/html”
- Save this file and close it.
- Now create database “hieeV2” inside your database server. Your server can be anything like MySQL, Derby, MSSQL, Postgres etc.
- Now go to apache-tomcat/webapps/hi-eeV2/WEB-INF/classes folder.
- Open application-context.xml file.
- Edit the content in below tags as per your connection details of hieeV2 database which you have created in your database server:
<bean id="dataSource" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close"> <property name="username" value="hiuser"/> <property name="password" value="hiuser"/> <property name="driverClassName" value="com.mysql.jdbc.Driver"/> <property name="jdbcUrl" value="jdbc:mysql://localhost:3306/hieeV2"/> </bean> <prop key="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</prop>
- Save the file and close it.
- Open project.properties file from same location.
- Provide path of settings.xml, scheduling.xml (For scheduling.xml you can provide any path where this file will start creating as it doesn’t exist by default), Plugins folder path.
- Once done save the file and close it.
- Open log4j.properties from same location
- Provide path of location where you want to generate Helical Insight application logs insideappender.file.File tag.
- Save the file and close it.
- Go to apache-tomcat/webapps/hi-eeV2/WEB-INF/lib folder.
- In lib folder, Download and add JDBC driver of database in which you have created hiee database.
- Restart tomcat application.
- You will be able to access first instance using below URL :
– “http://localhost:8080/hi-eeV2”
- This is how you can created 2 or more separate instances which are running simultaneously.