Home - GaneshThiru/MicroServices_Apr GitHub Wiki
Welcome to the digitalbanking-microservice wiki!
This digital POC has been hosted on IBM Blumix. Url is http://mydigitalbanking.mybluemix.net/#/
You need the following software:
Postgres 9.6 (9.3, 9.4 is ok too) Pgadmin 4 v.1.1 Apache 2.4 (comes as part of xampp) eclipse helios or STS 3.8.3 or higher version JDK 1.8 Git 1.9.4 or Git Extensions 2.49 Tomcat 8.5 (optional to run the web application inside eclipse) Apache Maven 3.3.9 Docker Toolbox Textpad or Notepad++ (Text editor) Winmerge (for code compares) Setting up your local development environment Install JDK 8. http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html Install eclipse Neon (eclipse IDE for Java EE developers) Choose 32 or 64 bit based on your machine configuration. http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/neon2
Install an application server (Tomcat 8.5) https://tomcat.apache.org/download-80.cgi Choose 8.5.9 It can run on port 8080. (If you have a conflict on port, you can change the port in server.xml)
Install Apache Maven. Default configuration should be fine.
Install xampp so that you get the apache web server.
Install git client. You will need access to the caprepo repositories. Base url: https://github.com/caprepo
Download the code. Create a directory d:\workspace\digitalbanking Use these commands git clone https://github.com/caprepo/digitalbanking-screens.git git clone https://github.com/caprepo/digitalbanking-accountsservice.git git clone https://github.com/caprepo/digitalbanking-cardsservice.git git clone https://github.com/caprepo/digitalbanking-loanservice.git git clone https://github.com/caprepo/digitalbanking-investmentsservice.git git clone https://github.com/caprepo/digitalbanking-transferservice.git
Once the git downloads are completed, you can change to the project directory and run this command: mvn clean install The first time, it will download all the maven jars into your .m2 directory (C:\Users.m2\repository
Setting up your local run environment
Import all the above projects as Maven projects in eclipse. digitalbanking-screens - UI project (This has only angularjs, bootstrap and HTML5). It has web.xml so that it can be generated as a WAR and run on Tomcat. You can also use a web server to configure and run this project. If you have xampp, then open the control panel, and open the apache httpd.conf.
This is the configuration you need in httpd.conf Alias /digitalbanking-screens "D:/workspace/digitalbanking/digitalbanking-screens/src/main/webapp" <Directory "D:/workspace/digitalbanking/digitalbanking-screens/src/main/webapp"> Options Indexes FollowSymLinks Includes AllowOverride All Require all granted
You will also need these entries in the httpd.conf file so that you can access multiple ports: RewriteRule .*accservices/(\w+)/(\w+) http://mydigitalbanking.com:8090/accservices// [R] RewriteRule .*cardservices/(\w+)/(\w+) http://mydigitalbanking.com:8100/cardservices// [R] RewriteRule .*loanservices/(\w+)/(\w+) http://mydigitalbanking.com:8110/loanservices// [R] RewriteRule .*authservices/(\w+)/(\w+) http://mydigitalbanking.com:8120/authservices// [R] RewriteRule .*pymtservices/(\w+)/(\w+) http://mydigitalbanking.com:8130/pymtservices// [R] RewriteRule .*txfrservices/(\w+)/(\w+) http://mydigitalbanking.com:8140/txfrservices// [R] RewriteRule .*invservices/(\w+)/(\w+) http://mydigitalbanking.com:8150/invservices// [R] RewriteRule .*reportservices/(\w+)/(\w+) http://mydigitalbanking.com:8160/reportservices// [R]
You can also add a hosts entry like this in c:\windows\system32\drivers\etc\hosts 127.0.0.1 mydigitalbanking.com
Then you can access the site like this: http://mydigitalbanking.com/digitalbanking-screens
Database Setup
db_account db_cards db_loan db_investments Use the scripts folder in each project. You have to run the sqls in same sequence.
01_create_database.sql 02_create_tables.sql 03_insert_data.sql The database connection is defined in: AccountsService - application.properties CardsService - configuration.yml LoanService - application.properties InvestmentsService - configuration.yml
Each micro service can be run from eclipse using some arguments:
a. Account Service (Spring Boot framework) com.capg.accservices.Application server (Use Run Configurations in eclipse) This will automatically start Tomcat and run it on port 8090.
b. Card Service (dropwizard framework) com.capg.cardservices.App server configuration.yml This will automatically start Tomcat and run it on port 8100.
c. Loan Service (Spring Boot framework) com.capg.loanservice.Application server
d. Investment Service (dropwizard framework) com.capg.investmentservices.InvestmentApp server configuration.yml
Important Links API Registry
Jan 6, 2016
Loan Service has been added. We have also added the dockerfile to containerise the application.
Dec 12, 2016
The following have been coded:
Account Service Card Service Transfers Service Loan Service is in progress We are dockerizing the applications.