User Tools
onboarding:advanced:intellij_idea_-_setup_of_reporting_manager_environment
Table of Contents
Intellij IDEA - Setup of Reporting Manager environment
DB and Appfile Setup
Unfortunately there are a lot of steps here but there is an easy way and a hard way, the easy way only applies to CC and EXT DBs for now so if you need DBs/Appfiles for a different customer you will have to do it the hard way.
For either you should run these two commands first :
- sudo mkdir -p /export/home/scotty/appfiles/
- sudo chown -R $(whoami) /export/home/scotty
The Easy Way
- Clone the following two projects into the same folder (I suggest an applications folder or IdeaProjects folder) :
- CD into database-backup
- Run the following command
- ansible-playbook -i ../env-configuration/prodcrc local.yml –diff –extra-vars “database=reporting_manager mysql_root_pass=THEDBPASS” –vault-id @prompt
- Note that prodcrc can be replaced with prodext if you want EXT data. The database is reporting_manager and ensure to change the root password to your local root password install
- If you are running MySQL through docker you will need to run:
- ansible-playbook -i ../env-configuration/prodcrc local.yml –diff –extra-vars “mysql_path='docker exec -i CONTAINER /usr/local/mysql/bin/mysql' database=reporting_manager mysql_root_pass=THEDBPASS” –vault-id @prompt
- You will need the password for this so also ask someone for that if you don't know it, Once done just leave it run and complete and it should download the DB and run development transforms as well as download the app files
The Harder Way
- Download a Reporting Manager database and load it into your local MySQL instance. You will need to run the Dev scripts on this databases but this can be done after the project is imported. ALSO you will need to insert some users to the DB or take a dump from QA : mysqldump -ureader -p reporting_manager reporting_shiro_user reporting_shiro_role_permissions reporting_shiro_role reporting_shiro_user_reporting_shiro_role > user.dump
- Create the following directories
- sudo mkdir -p /export/home/scotty/appfiles/reports/markupReports
- sudo mkdir -p /export/home/scotty/appfiles/reports/emails
- Make sure these folders are owned by you
- sudo chown -R <youruser>:<your group> /export/home/scotty
Import Prerequisites
In order for everything to go as smoothly as possible please ensure you have done or will do the following before importing the project into Idea.
- Install Grails 2.2.4 for Mac Install SDK Man http://sdkman.io/install.html and use it to install grails 2.2.4 (sdk install grails 2.2.4)
- Ensure you have Java 1.7 - sdk list java - sdk install java VERSION
- You will need to download GWT 2.5.1 and keep it in a secure directory i.e. your user directory or your documents http://www.gwtproject.org/versions.html. Once downloaded you will need to set GWT_HOME to be the location of where you put the downloaded directory
- Ensure the GWT_HOME path is a full path, without reference to home directory etc. e.g: “/home/bosowski/.sdkman/candidates/gwt/gwt-2.5.1”. “~/.sdkman/candidates/gwt/gwt-2.5.1” can result in gwt exceptions.
- Ensure your host file (/etc/hosts for mac/linux) contains the following entry : 23.23.106.9 errigalArtifactory errigalArtefactory
- Ensure you have Idea Ultimate as Idea CE does not support grails. The applications can be run from the command line.
- Ensure your MySQL Version is not above 5.5, most of us use 5.1.
- Ensure your password for the root account in MySQL is the same as the rest of ours - ask someone if you don't know :)
- Clone the project from BitBucket : https://bitbucket.org/errigal/errigal-reporting
Importing the Project in Idea
- Click Import Project and Select the errigal-reporting project and click ok
- Choose Create project from existing sources and click next
- Click next to leave the Project Name as default
- Click next again
- You will then be asked to pick an SDK, ensure you choose 1.7
- You will then be asked from the grails version, navigate and find your install of grails 2.2.4, select it and click next
- You will then be given a list of detected frameworks, click Finish
- Once loaded you should be asked to Configure GWT, click configure then click OK on the next popup
- You should now locate the development scripts and run them against your freshly imported Reporting Manager database. If there are no development scripts, run the QA scripts.
- Next you will need to locate the grails configuration and click edit, this will be at the top bar of Idea and should be to the right
- This will bring up the following box :
- In the VM Options enter the following, remember to change the database to your appropriately named database for the Reporting Manager
- -Xms1024m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m -Djava.reporting.database=reporting_manager -Dgrails.server.port.http=8081
- Click Apply and OK
- Ensure grails-app/actionHandlers directory is marked as source root (classes may not be imported correctly otherwise)
- Right click on grails-app/actionHandlers directory
- Mark Directory as ⇒ Source Root
- Open the Run Grails Command Window in Idea, on Mac this is accomplished via CMD+ALT+G
- Enter clean as a command click ok and allow it to finish
- Open the Grails command window again and run compile and allow it to finish
- Open the Grails command window again and run compile-gwt-modules and allow it to finish
- Click Run and the Grails Application should run
Running the Project in the Terminal
- Edit you .bashrc or .bash_profile file and add the following :
- export GRAILS_OPTS=“-Xms1024m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m -Djava.reporting.database=reporting_manager”
- Set the .bashrc/profile to be source or exit the terminal and create a new terminal
- cd into the project
- Use grails 2.2.4 - sdk use grails 2.2.4
- Clean the project - grails clean
- Compile the project - grails compile
- Compile the GWT Modules - grails compile-gwt-modules
- Set the server port - export GRAILS_OPTS=“$GRAILS_OPTS -Dgrails.server.port.http=8081”
- Run the application - grails run-app
onboarding/advanced/intellij_idea_-_setup_of_reporting_manager_environment.txt · Last modified: 2021/06/25 10:09 by 127.0.0.1






