Spartan Posted December 2, 2017 Report Posted December 2, 2017 evarevar unnaro teliyadu..but some questions reg depliying J2EE applications. @innovative i think ippudu oka EAR/WAR file undi. we generate that using Jenkins in CICD process. i would like to have environment based connectors in different files and deploy accordingly. like Development Env k okati Staging ki okati Prod ki okati..each of them have different endpoints for ear services/db/ etc... so avanni which file will control, and when deploying how to specify to use that particular descriptor. App Server: JBOSS, WebServer : Tomcat. using Maven. @k2s @tom bhayya PS: Nenu Java ki kotta...dont have any exp in it.. qn dumb aiyte kshaminchandi, tappaite manninchandi. Monday Interview ki preparing. thanks everyone. found one link.. https://www.javaworld.com/article/2073030/java-app-dev/organize-applications--multiple-environment-configurations.html Quote
Spartan Posted December 2, 2017 Author Report Posted December 2, 2017 @innovative @RonitRedy @Suhaas Quote
Spartan Posted December 2, 2017 Author Report Posted December 2, 2017 .net applicaitons lo connnectionstrings etc untai, we can create config files seperately for the web config to use appropriate ones. ala J2EE app lo em untadi. Quote
Spartan Posted December 2, 2017 Author Report Posted December 2, 2017 alage meek telsina interview qns kuda veyandi. Maven, Ant, J2EE app deployment, JBOSS, Tomcat etc.. meeda. Quote
Gains Posted December 2, 2017 Report Posted December 2, 2017 ma degerra ela ante..jenkins tho tar file generate chestharu ... in that tar file we have a war file and different config folder's for diff env... once that tar is unzipped on the box (we use jetty server) ... it is deployed using a script file.. this script file point to the right config folder based on the env Quote
Spartan Posted December 2, 2017 Author Report Posted December 2, 2017 10 minutes ago, Gains said: ma degerra ela ante..jenkins tho tar file generate chestharu ... in that tar file we have a war file and different config folder's for diff env... once that tar is unzipped on the box (we use jetty server) ... it is deployed using a script file.. this script file point to the right config folder based on the env but ear or war lo once zipped, when dpeloying on JBOSS, we shouldnt explode the folders kada.. correct me if i am wrong. Quote
Gains Posted December 2, 2017 Report Posted December 2, 2017 8 minutes ago, Spartan said: but ear or war lo once zipped, when dpeloying on JBOSS, we shouldnt explode the folders kada.. correct me if i am wrong. i mean tar file unzip chestham ..which has war file + config folders ... we wont explode war file 1 Quote
Dimpy123 Posted December 2, 2017 Report Posted December 2, 2017 58 minutes ago, Spartan said: @innovative @RonitRedy @Suhaas Ronitreddy, testing anukonta kada... Quote
Spartan Posted December 2, 2017 Author Report Posted December 2, 2017 25 minutes ago, Gains said: i mean tar file unzip chestham ..which has war file + config folders ... we wont explode war file cool, new point learned. Quote
Spartan Posted December 2, 2017 Author Report Posted December 2, 2017 6 minutes ago, Dimpy123 said: Ronitreddy, testing anukonta kada... not sure just tagged. Quote
Spartan Posted December 2, 2017 Author Report Posted December 2, 2017 https://www.javaworld.com/article/2073030/java-app-dev/organize-applications--multiple-environment-configurations.html Quote
cnugadu Posted December 2, 2017 Report Posted December 2, 2017 1 minute ago, Gains said: i mean tar file unzip chestham ..which has war file + config folders ... we wont explode war file There are multiple ways you could do it but needs some kind of scripting. The above process of tar file makes sense too. 1)checkin config file as confi-dev,config-qa etc. Write a script to unzip the war, rename the config file to config.properties(the file app looks for), then rezip the war file then deploy. Make sure the war file is not corrupted when rezipped. 2) Check in config files in version control and setup script to update when you deploy. 3) If using puppet or chef the 2nd option could be used. Just replace custom script with puppet of chef scripts 4)Assuming all config files are inside war, create a environment variable on you app server matching config file name and location. Use the environment varible inside the java code to get the config file location Quote
sattipandu Posted December 3, 2017 Report Posted December 3, 2017 7 minutes ago, cnugadu said: There are multiple ways you could do it but needs some kind of scripting. The above process of tar file makes sense too. 1)checkin config file as confi-dev,config-qa etc. Write a script to unzip the war, rename the config file to config.properties(the file app looks for), then rezip the war file then deploy. Make sure the war file is not corrupted when rezipped. 2) Check in config files in version control and setup script to update when you deploy. 3) If using puppet or chef the 2nd option could be used. Just replace custom script with puppet of chef scripts 4)Assuming all config files are inside war, create a environment variable on you app server matching config file name and location. Use the environment varible inside the java code to get the config file location #3 best option in my view Quote
evadra_rowdy Posted December 3, 2017 Report Posted December 3, 2017 The apps have 2 parts , one is code which is developer managed and checked into git and built as war file and deployed.2nd is env config/server config owned by infrastructure team, this will have db passwords etc..these stick to machine and manually managed.if u want to automate this, these are pushed by chef/puppet and the same chef assigns a jvm parameter which says if its qa or prod.so jvm picks right config file 1 Quote
Suhaas Posted December 3, 2017 Report Posted December 3, 2017 1 hour ago, Spartan said: @innovative @RonitRedy @Suhaas bro. Java antha telvadi naku. Help Ltt Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.