Dev System Setup

Software Requirement

  • Mongo DB (V 5.0.18)

  • NodeJS

  • Mongo Client (NoSqlBooster/Robomongo(optional))

  • Maven(3.2.3)

  • Eclipse or any IDE

  • Java 8

Step 1 - Get the code

  1. Create a local folder

  2. Clone the repo from - https://github.com/PublicisSapient/PSknowHOW.git

  3. run the command in root folder - mvn clean install -DskipTests -Dfindbugs.skip=true -Dpmd.skip=true -Dmaven.javadoc.skip=true

Step 2 - Setup the database

  • Connect MongoDB with MongoClient

  • Create DB user using following commonds

    • mongo admin --eval "db.createUser({user: '${MONGODB_ADMIN_USER}', pwd: '${MONGODB_ADMIN_PASS}', roles:[{role:'root',db:'admin'}]});

    • use ${kpidashboard}
      db.createUser({user: '${MONGODB_APPLICATION_USER}', pwd: '${MONGODB_APPLICATION_PASS}', roles:[{role:'readWrite', db:'${kpidashboard}'}]})

  • Execute the scripts from root/database-scripts/installation-script using Mongo Client

Step 2 - Update the properties

  • Update the applicaiton.properties -

    • MONGODB_APPLICATION_USER and MONGODB_APPLICATION_PASS in application.properties for all occurance of
      spring.data.mongodb.username =
      spring.data.mongodb.password =

       

Step 2 - Run the UI

  1. npm install -g @angular/cli (not mandatory as the npm command can itself resolve it, if it doesn't then only execute)

  2. npm install 

  3. npm start

  4. Navigate to http://localhost:4200/

DB Setup

https://github.com/PublicisSapient/PSknowHOW/tree/beta/mongodb/scripts

  1. create_db_user.sh  This is tested by creating a user other then which are specified in create_db_user.sh with  "role" : "readWrite", and ran all the below scripts which works fine . So user is independent .

  2. kpi_master_insert.js  
       * Contains all the PSknowHOW KPI information like KPI ID, KPI Name etc.

  3. kpi_category_insert.js
       *  Creates category and Contains category information it is configurable based on Industry standard .  

  4. kpi_category_mapping_insert.js
       *  This will map  KPIs with the category which got created from kpi_category_insert.js

  5. superadmin_setup.js
        * Create SUPERADMIN user if it doesn't  exist and assigns ROLE_SUPERADMIN.

  6. create_roles.js 
       * This script creates roles like PROJECT_VIEWER, PROJECT_ADMIN, GUEST

  7. insert_action_policy_rules.js
       * Provide authorization for actions like SuperAdmin can do anything, Any user can add a project except guest user, User with ROLE_PROJECT_ADMIN can update the project.

  8. metadata_identifier.js
       * Used for mapping suggestion in Jira and Azure board. like providing suggestion for "Story first status" : open, In progress, In Analysis, close .

  9. insert_hierarchy_levels.js
       * Defining Filter hierarchy Like BU,  Vertical etc.

  10. insert_hierarchy_level_suggestions.js
       * Inserts hierarchy suggestion like list of account , list portfolio etc

  11. insert_additional_filter_categories.js
       * This script enable filter like SQUAD.

  12. default_estimation_mapping.js
       * Defining 8hrs as default storypoint  

  13. dbCollection_indexes.js
       * creates db index

  14. email_server_details_global_config.js  
       * It enables Email notification.
    <Please update your Email server address in this script to activate notification>

  15. zephyr_cloud_details.js    *The script reaches static zephyr url to fetch data

  16. insert_or_remove_kpi_in_user_board_config.js
       * This script is used to add or remove any KPI to SHOW/HIDE from Dashboard based on users  

  17. insert_processors.js
      * This script will add the processor list for first time installation and enables users to run the processors on demand .

Changes Needs To Be Done

 Update DB details and customAPI URL, in all the application.properties file of customapi and processor's.

  • customapi\src\main\resources\application-dev.properties 

  • processors\<Any-processor>\src\main\resources\application.properties

In case node_modules and Package-lock.json file is present in UI folder , then delete it.
(node_modules will be not there if user is cloning it first time it will be generated after “npm install “ command)

Guidance For Mac Users:

  • Do not run any commands with sudo.

  • Preferably setup the code under <Users>/<userId>/Documents folder (or within that hierarchy) to get away from any permission issues

 

  1. Clone repo

  2. install software as mentioned on page

  3. load project in your repo

  4. mvn clean install -DskipTests -Ddockerfile.skip=true -Dmaven.javadoc.skip=true

  5. UI install and clean  - npm install

  6. Run UI Project - npm start

  7. Start Mongo db

  8. Import mongo dump or run processor to create data

  9. Change application.properties for customapi

10. Run customapi application
11. change environment.ts file and change baseUrl to - baseUrl: '//localhost:8080'

© 2022 Publicis Sapient. All rights reserved.