This project provides the CFG Task REST Services
This project uses the following components and features:
The availability of the above tools is assumed throughout the instructions on this page.
Download the OpenID Tomcat client adapters found at: http://www.keycloak.org/archive/downloads-3.3.0.html at the time of this writing the file was named
keycloak-tomcat8-adapter-dist-3.3.0.Final.tar.gz
Extract the contents of the archive into tomcat's /lib folder e.g. /opt/tomcat/lib
The instructions for setting up tomcat https and all the certificate scripts are found at:
At the time of this writing, the cfg-task-service app expects the tomcat.keystore to be found at /etc/tomcat8/ssl/ If this is not the actual location create a symbolic link to the correct location.
To deploy the cfg-task-services, do the following:
cd ~/repositories
git clone https://github.com/hres/cfg-task-service.git
cd cfg-task-service
mvn clean install
copy
target/cfg-task-service.war
to webapps
directory of Tomcat 8.0 on HRESSimilarly for the cfg-classification-services:
cd ~/repositories
git clone https://github.com/hres/cfg-classification-service.git
cd cfg-classification-service
mvn clean install
copy
target/cfg-classification-service.war
to webapps
directory of Tomcat 8.0 on HRESFollow the Mongo installation instructions for a Ubuntu install found at:
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/
Rename mongodb.properties.template to mongodb.properties. It is found in the deployed app under the folder WEB-INF/classes/ca/gc/ip346/util/
On the command-line run sudo apt-get install postgresql
to install PostgreSQL
Modify the file /etc/postgresql/9.5/main/pg_hba.conf
. Change the entries under "Database administrative login by Unix domain socket" to:
local
all
all
trust
On the command-line from the projects src/scripts/sql directory, run
psql postgres postgres
to login as postgres user
DROP DATABASE cfg_db_dev;
(if its already there, use \l
to check)
CREATE DATABASE cfg_db_dev;
CREATE USER cfg_db_user PASSWORD 'password';
\c cfg_db_dev cfg_db_user
SET datestyle TO MDY;
\i HRE_create_table_and_load_data.psql
CTRL-D
to exit
In the deployed project folder cfg-task-service/WEB-INF/classes/ca/gc/ip346/util/ Copy db.properties.template
to db.properties
(cp db.properties.template db.properties
)
Verify property settings in the file (username and password should match those created in step 3)