1.0.1 • Published 4 years ago

thermoconverge v1.0.1

Weekly downloads
-
License
-
Repository
-
Last release
4 years ago

Install Dependencies

We have two kinds of dependencies in this project: tools and angular framework code. The tools help us manage and test the application.

We have preconfigured npm to automatically run bower so we can simply do at the ui folder:

--> npm install

Behind the scenes this will also call bower install. You should find that you have two new folders in your project.

  • node_modules - contains the npm packages for the tools we need
  • app/bower_components - contains the angular framework files

Note that the bower_components folder would normally be installed in the root folder but angular-seed changes this location through the .bowerrc file. Putting it in the app folder makes it easier to serve the files by a webserver.

--> Install grunt by executing following command ("sudo" would be required): npm install -g grunt-cli

--> Set this in environment variable as path - C:\Users\<user_name>\AppData\Roaming\npm (For mac, not required)

--> Install grunt war plugin & clean plugin by executing following command:

npm install grunt-war --save-dev

*When you have any problem, give it a try with an old version of npm using "npm install -g npm@1.4.3"

npm install grunt-contrib-clean --save-dev

--> Install karma-coverage plugin npm install karma-coverage --save-dev

--> run command 'grunt' to build ui.war.

--> run command 'mvn clean compile package -Dmaven.test.skip=true'in the ui folder

--> If there is no error, deploy ui.war in tomcat by using a proper script at .../converge/build.

For example, to install at the local server: run command '.../converge/build/local-deploy.sh'

STEPS TO CONFIGURE DATA SOURCE AND CONNECTION POOL IN TOMCAT

  1. Copy postgres driver jar file (postgresql-9.3-1100-jdbc4.jar) into <CATALINA_HOME>/lib folder. This jar file can be found in existing platform/kinship war files under WEB-INF/lib.

  2. Open server.xml located in <CATALINA_HOME>/conf folder and add below entry within tag. This entry will configure the database details along with JNDI name, driver class name and context factory.

<Resource name="jdbc/postgres" auth="Container"
    type="javax.sql.DataSource"
    driverClassName="org.postgresql.Driver"
    factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
    url="jdbc:postgresql://localhost/novax"
    username="postgres" password="novax@123"
    validationQuery="select 1 from dictionary_entry limit 1"
    maxActive="30" maxIdle="10" minIdle="5" initialSize="10" />
  1. Open context.xml file located in <CATALINA_HOME>/conf and create a resource link as global for JNDI name configured so that the same datasource will be used at container level and not specific to any web application. This will enable platform and kinship web applications to share the same connection pool.
<!-- Uncomment this to disable session persistence across Tomcat restarts -->
<!--
 <Manager pathname="" />
 -->

<!-- Uncomment this to enable Comet connection tacking (provides events
 on session expiration as well as webapp lifecycle) -->
<!--
 <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
 -->
<ResourceLink global="jdbc/postgres" name="jdbc/postgres" type="javax.sql.DataSource" />
  1. Open web.xml file located in <CATALINA_HOME>/conf and add below entry to create a resource reference for datasource configured. *put the following after "Default Welcome File List" in the file.

Then, restart Tomcat!

##novax database modification to customize the converge installation.

To access PostgreSQL,

Server localhost: Database postgres: novax Port 5432: Username postgres: Password for user postgres: novax@123

If you are running Convere at port 8080, run command: update application set app_url = replace(app_url , 'localhost:9080', 'localhost:8080');