Re: Building (and running) Tomcat on MacOS
Hi, Maybe this article can help you: https://medium.com/@fahimhossain_16989/adding-startup-scripts-to-launch-daemon-on-mac-os-x-sierra-10-12-6-7e0318c74de1 Diaclaimer: I didn't test the procedure Kind Regards, Geraldo Netto Em ter, 6 de nov de 2018 15:28, Israel Timoteo Hi Christopher, > > How do you make Tomcat start automatically after your Mac restarts? > > > Israel Timoteo > itimo...@me.com > > > > > On Nov 6, 2018, at 9:05 AM, Christopher Schultz < > ch...@christopherschultz.net> wrote: > > > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA256 > > > > All, > > > > Periodically, some folks ask how to get Tomcat running on MacOS. In > > order to fully-test the most recent version of Tomcat 8.5.x being > > voted on, I built a new environment on my Mac from scratch and > > documented everything. > > > > I put all of my notes into the Tomcat Wiki which can be found here: > > https://wiki.apache.org/tomcat/Building%20Tomcat%20on%20MacOS > > > > Comments and modifications are welcome. It would be even better if > > some folks with Macs who aren't running Tomcat would actually try > > following the instructions and let me know if anything in particular > > doesn't work for you. > > > > - -chris > > -BEGIN PGP SIGNATURE- > > Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ > > > > iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlvhrc0ACgkQHPApP6U8 > > pFjGVA//XYi0+dnb1cmGGtrrZuXPHefRV2LiIf5VIHgQ1oZsiKleqadlsx7mYnD3 > > xwcR0Br9HU4x1z2o9a6JY6pdErLVxJSLsvXcBn0bhZAMe1TXXQk0VzxJo+zbTcQK > > Hh3S2XJDjA/U2cTs0z9FTT+mKvFxMUmI4ZnvBrmFXqQH5IgrMv5ajl20xhoKR899 > > K30q0J67YjzR42E7XCpBSRlPQhFrkVzXsIfublDc+M59riCisRC6M3cNG6CPGdO6 > > ArGVUCxTC+I0+ibdvuhUhWCC8YSm7sqn9/xUHEBhRta3ux+1LwCM1J4TijzOsPo0 > > AL3T+H1PElL+5jQXj6JQPcc5oRBfzNX04WJYEvoow3DaKUKX5/yqCVw6krdeGsTo > > gW0IhA/k2h5p6/g1IKZxjYIHkn2YQAUJtL+M7JopJp1xXYPI6xdorhlfylN/D1ms > > T+HgscItBWEG/o25Agydu6Wlpc8rIN0PIe1lMPFsfUHZf/PjUsj6f0+urnE0Cutx > > sIxvMBBzXd76PXYC8k5q50dQdaZONZdvGxHXBcRut4SwDSj9OAQf4R1DfIPcqEkl > > krF6Q04iuwAr6KewG57HkE3xh6kVbthPaVoXHVYmByBbRClZ6IpXRWax+Cvi/ROF > > AgvEV6Z+iQWwKMSX8nSNooifVOLvjZ9tVcI6fiBQLJAVHXeAsmo= > > =tqi1 > > -END PGP SIGNATURE- > > > > - > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > > For additional commands, e-mail: users-h...@tomcat.apache.org > > > >
Re: Building (and running) Tomcat on MacOS
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Israel, On 11/6/18 12:27 PM, Israel Timoteo wrote: > How do you make Tomcat start automatically after your Mac > restarts? I don't :) I think the best way is to use the Launch Deamon facility of macos. Briefly, as root: 1. Create a file /Library/LaunchDaemons/org.apache.tomcat.startup.plist with all the appropriate settings 2. run "launchctl load -w /Library/LaunchDaemons/org.apache.tomcat.startup.plist" To remove the load-on-start: 3. run "launchctl unload -w /Library/LaunchDaemons/org.apache.tomcat.startup.plist" - -chris >> On Nov 6, 2018, at 9:05 AM, Christopher Schultz >> wrote: >> > All, > > Periodically, some folks ask how to get Tomcat running on MacOS. > In order to fully-test the most recent version of Tomcat 8.5.x > being voted on, I built a new environment on my Mac from scratch > and documented everything. > > I put all of my notes into the Tomcat Wiki which can be found > here: > https://wiki.apache.org/tomcat/Building%20Tomcat%20on%20MacOS > > Comments and modifications are welcome. It would be even better if > some folks with Macs who aren't running Tomcat would actually try > following the instructions and let me know if anything in > particular doesn't work for you. > > -chris >> >> - >> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> > > -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlvh0UIACgkQHPApP6U8 pFjTRQ/8DgJdZyVYYuv4X+uHJSDCmUDCCH8kJo/4UO5IguPIVuzzba4oXKrxXwMU M2B5YwWFF54EooH0DZ4VK3WwJtSoiK5Mcg+VP1onqhia2EzacG+nVcJPQJoRkB2A 2TqZKz+rexEuEuB61eDKSr6XKt+O1PdYjaBxHoQ8cnHpNBwnQVBaQNH8Yd+SCnm+ VDtBn5zkFe346j9YByB43w8ZGtakWqDQEj/9SFtbIlECPNKaNR1H2Xod/phnED4o xFM/SvMcf9TW5g0E2BcgffzLUd6dYDrSsfSlOK823W6tf42MfeGgpE4nNQBkoEcy FgGFaVXd2+6eH7yXuLSVjBxKPcgeZNSVxt+3TbfKTnSZ/eqEMd47X0DaWUV38fKd VEaqd6HeTpk4cAVU/PM/p0D8HEjfsUnETnRcGj5J2rWbf72BmxhsAuKJj7o9TTYF dmH6BgfaZaVhcO+SnAEWcOSMN6lfKE0YDXX6tKFBwyLI92q1T/v6qkablLCd9f+B BBGMSTE/DLlvNtSHSXoodi3NfTGL0MXnvVUQQAVc6D9T4hXrRp6F3vGODXH1Jdjz 0lM8JPQGK/VThq+dUslHfpETB0hWy/MbsDHSFQxEWqFFKwpswRvQEbnL6agL5A01 o7jOBiLO3zVLYLWqEWb7Vmzpr9KjNaHemY/8vX5DyqnxMGK6Ppw= =S1VM -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Building (and running) Tomcat on MacOS
Hi Christopher, How do you make Tomcat start automatically after your Mac restarts? Israel Timoteo itimo...@me.com > On Nov 6, 2018, at 9:05 AM, Christopher Schultz > wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > All, > > Periodically, some folks ask how to get Tomcat running on MacOS. In > order to fully-test the most recent version of Tomcat 8.5.x being > voted on, I built a new environment on my Mac from scratch and > documented everything. > > I put all of my notes into the Tomcat Wiki which can be found here: > https://wiki.apache.org/tomcat/Building%20Tomcat%20on%20MacOS > > Comments and modifications are welcome. It would be even better if > some folks with Macs who aren't running Tomcat would actually try > following the instructions and let me know if anything in particular > doesn't work for you. > > - -chris > -BEGIN PGP SIGNATURE- > Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ > > iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlvhrc0ACgkQHPApP6U8 > pFjGVA//XYi0+dnb1cmGGtrrZuXPHefRV2LiIf5VIHgQ1oZsiKleqadlsx7mYnD3 > xwcR0Br9HU4x1z2o9a6JY6pdErLVxJSLsvXcBn0bhZAMe1TXXQk0VzxJo+zbTcQK > Hh3S2XJDjA/U2cTs0z9FTT+mKvFxMUmI4ZnvBrmFXqQH5IgrMv5ajl20xhoKR899 > K30q0J67YjzR42E7XCpBSRlPQhFrkVzXsIfublDc+M59riCisRC6M3cNG6CPGdO6 > ArGVUCxTC+I0+ibdvuhUhWCC8YSm7sqn9/xUHEBhRta3ux+1LwCM1J4TijzOsPo0 > AL3T+H1PElL+5jQXj6JQPcc5oRBfzNX04WJYEvoow3DaKUKX5/yqCVw6krdeGsTo > gW0IhA/k2h5p6/g1IKZxjYIHkn2YQAUJtL+M7JopJp1xXYPI6xdorhlfylN/D1ms > T+HgscItBWEG/o25Agydu6Wlpc8rIN0PIe1lMPFsfUHZf/PjUsj6f0+urnE0Cutx > sIxvMBBzXd76PXYC8k5q50dQdaZONZdvGxHXBcRut4SwDSj9OAQf4R1DfIPcqEkl > krF6Q04iuwAr6KewG57HkE3xh6kVbthPaVoXHVYmByBbRClZ6IpXRWax+Cvi/ROF > AgvEV6Z+iQWwKMSX8nSNooifVOLvjZ9tVcI6fiBQLJAVHXeAsmo= > =tqi1 > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org >
Building (and running) Tomcat on MacOS
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 All, Periodically, some folks ask how to get Tomcat running on MacOS. In order to fully-test the most recent version of Tomcat 8.5.x being voted on, I built a new environment on my Mac from scratch and documented everything. I put all of my notes into the Tomcat Wiki which can be found here: https://wiki.apache.org/tomcat/Building%20Tomcat%20on%20MacOS Comments and modifications are welcome. It would be even better if some folks with Macs who aren't running Tomcat would actually try following the instructions and let me know if anything in particular doesn't work for you. - -chris -BEGIN PGP SIGNATURE- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlvhrc0ACgkQHPApP6U8 pFjGVA//XYi0+dnb1cmGGtrrZuXPHefRV2LiIf5VIHgQ1oZsiKleqadlsx7mYnD3 xwcR0Br9HU4x1z2o9a6JY6pdErLVxJSLsvXcBn0bhZAMe1TXXQk0VzxJo+zbTcQK Hh3S2XJDjA/U2cTs0z9FTT+mKvFxMUmI4ZnvBrmFXqQH5IgrMv5ajl20xhoKR899 K30q0J67YjzR42E7XCpBSRlPQhFrkVzXsIfublDc+M59riCisRC6M3cNG6CPGdO6 ArGVUCxTC+I0+ibdvuhUhWCC8YSm7sqn9/xUHEBhRta3ux+1LwCM1J4TijzOsPo0 AL3T+H1PElL+5jQXj6JQPcc5oRBfzNX04WJYEvoow3DaKUKX5/yqCVw6krdeGsTo gW0IhA/k2h5p6/g1IKZxjYIHkn2YQAUJtL+M7JopJp1xXYPI6xdorhlfylN/D1ms T+HgscItBWEG/o25Agydu6Wlpc8rIN0PIe1lMPFsfUHZf/PjUsj6f0+urnE0Cutx sIxvMBBzXd76PXYC8k5q50dQdaZONZdvGxHXBcRut4SwDSj9OAQf4R1DfIPcqEkl krF6Q04iuwAr6KewG57HkE3xh6kVbthPaVoXHVYmByBbRClZ6IpXRWax+Cvi/ROF AgvEV6Z+iQWwKMSX8nSNooifVOLvjZ9tVcI6fiBQLJAVHXeAsmo= =tqi1 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat on macOS
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Israel, On 5/20/17 8:56 AM, Israel Timoteo wrote: > 2)There is one Tomcat instance per server and all Tomcats are in a > cluster, having HTTPD in front'> -on HTTPD, mod_jk is used> -one > cluster per each location, multicast is used - I do recall a > presentation where not using multicast was mentioned - I need to > check my notes Unicast is possible, but much less flexible. > 3) The application is developed by a third-party company (B) and > uploaded to one of my non-production servers > > 4) When an application needs to be deployed, I connect (ssh) to > the target server(s) and from there, I use scp to get the war file > from the non-production server and place the war file into a > particular directory; then, I have a script that moves the war file > to $CATALINA_BASE and do some additional validations You ought to be able to scp to the right place from outside the box. If you can do that, just scp from the deployment server (just pick one) to each of the others. Be sure to check to see which servers successfully deployed the application. If any of the servers fail to deploy the new version, "downgrade" the servers that succeeded by "upgrading" them to the old version (which, presumably, will successfully deploy the old version). > -Autodeploy and Parallel deployment are used> -I explored the > FarmWebDeployer option years ago but had the war file removed from > the cluster when the master node was down… maybe I had a wrong > configuration then.. so I will need to check this option again and > experiment For my money, if you've got a cluster I'd try to use the FarmWebDeployer . We had some conversations about the FarmWebDeployer this week at TomcatCon. This component has always had an air of untrustworthyness to it, and not many people have tried it for one reason or another. Honestly, I'd like to have MORE people use it because then it could get some real-world usage, and some real-world feedback. If it does indeed work and is robust, then that's great. Otherwise, we (Tomcat) should either fix the bugs and make it useful or kill it off so nobody relies upon it. So if you are willing to plough-through it, please do so and we'll try to provide the best support we can. > 5) As per the JAVA_OPTS… -I use it for “-server > -Dfile.encoding=UTF-8” -It seems that I can add “-server > -Dfile.encoding=UTF-8” to CATALINA_OPTS; I will change and test it. Macos is 64-bit and you almost certainly have a 64-bit JVM. 64-bit JVMs are *always* running in "server mode" so that's probably not necessary. There are other environment variables you can use to set the file encoding, but an explicit system property is probably the best way to do it. In your case, CATALINA_OPTS or JAVA_OPTS would be fine. Most people use system properties for setting the size of their heaps. They set JAVA_OPTS to "-Xmx16G" and never realize that this means that "catalina.sh stop" will launch a JVM with a 16 GiB heap just to send the "shutdown" command to Tomcat. > I have an additional question: > > 1) Would there be any recommendations for not having one Tomcat > instance per physical server? I typically run 4 separate applications, and I run them in completely separate JVMs on the same server. I do this mostly to make deployments easier and more flexible... I can test/deploy each application separately and upgrade either them, their supporting Tomcats, or their supporting JVMs separately from the rest. Leon is correct that, given a set of reliable web applications, you should be able to run them all in one large JVM. Theoretically, running a single JVM will give you the best resource utilization since you don't pay a penalty for separate memory spaces for the same kinds of things (i.e. the JVM doesn't have to take up 2x memory because of the two processes running). In reality, (a) applications have bugs, (b) JVMs have bugs, (c) threads sometimes have stack-overflows, and (d) JVMs use shared memory to avoid huge amounts of memory for each independent JVM. I find that I get more flexibility from a multi-JVM deployment even though my applications seem to be very well-behaved and I generally deploy everything on the same Tomcat version and JVM version. - -chris -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlkgz7MACgkQHPApP6U8 pFilCA//c5KIC9nOyZ9cc3PU4RmM12HtmXeH+QSd+cDvao5MWtLWOMXoJw98FhMb pVZ5ZTCywn6siusujnG+OHQbL866ubJTmk6A76ey4XErSPHUDtNZrmPFphwFM7pD tbTrQTXG0MyGLLFApKyaHlDUdKARqg2qu2gtxTrtPVvtfADJpLdF6yl9dYf5qFuO b01tCSGfn+jvy39wsYhKw+yItcRjhoDY8dEGfgVGSysuNTmlhGtp1W9Gu8y4v/K2 BEPrMMfFcEZxUvEw60lGfmeuMAgkftgLnw/CwZ/7YJrfikgIgR++psvq0KXcGefd AzEQDoQASX7GEqZd2T4hlIIIXIbRlJBZIEoxnAxVXVc6p0S9zP+GSesZxW5A7OwC CogexBG87N/DjQs4S5QCkzfC06kBauZKLvsKZ/3zQnaOwkMyjk1xD7Pkx8LtXBuY MjqpFehg8kowu0Fhln0LYUcK1M2hqkarYcfgFrazQZd9jpm2IGZnY0ZgcKpuCgFw
Re: Tomcat on macOS
On Sat, May 20, 2017 at 8:56 AM, Israel Timoteowrote: > > > I have an additional question: > > 1) Would there be any recommendations for not having one Tomcat instance > per physical server? > Only if your application can't utilise resources properly. If your application fails to scale, fails to use all available cores or memory, you should have multiple instances. Also if your total memory is insanely high, like way above 64 Gb, you'd be better off with multiple instances. Also if your app uses a lot of synchronisation, having multiple tomcats can help. However, all of that is pretty improbable with a mac mini. Rule of thumb: if you can bring your app with tomcat to near 100% CPU or memory usage, no need for multiple instances. HTH Leon P.S. kudos to you for hosting on macs ;-) Crazy but fun ;-)
Re: Tomcat on macOS
All, Thanks for your replies, very good information. Christopher, Let me share additional information about my environment: 1) All my servers, production and non-production, are hosted at two data centers (different locations) with a third-party company (A) -Server specs: Mac mini, 16 GB memory and 1 TB HD 2)There is one Tomcat instance per server and all Tomcats are in a cluster, having HTTPD in front -on HTTPD, mod_jk is used -one cluster per each location, multicast is used - I do recall a presentation where not using multicast was mentioned - I need to check my notes 3) The application is developed by a third-party company (B) and uploaded to one of my non-production servers 4) When an application needs to be deployed, I connect (ssh) to the target server(s) and from there, I use scp to get the war file from the non-production server and place the war file into a particular directory; then, I have a script that moves the war file to $CATALINA_BASE and do some additional validations -Autodeploy and Parallel deployment are used -I explored the FarmWebDeployer option years ago but had the war file removed from the cluster when the master node was down… maybe I had a wrong configuration then.. so I will need to check this option again and experiment 5) As per the JAVA_OPTS… -I use it for “-server -Dfile.encoding=UTF-8” -It seems that I can add “-server -Dfile.encoding=UTF-8” to CATALINA_OPTS; I will change and test it. I have an additional question: 1) Would there be any recommendations for not having one Tomcat instance per physical server? Israel Timoteo > On May 19, 2017, at 2:06 PM, Mark Eggers <its_toas...@yahoo.com.INVALID> > wrote: > > Folks, > > Beware, the following is extremely ugly Groovy. I've changed the names > to protect the guilty (I think). > > Also, the *_SVR and *_URL values are environment values stored centrally > in Jenkins. That way they can be changed easily. They also show up in > the job logs, which means with a little scripting effort I can get a > history of what versions were deployed to what server when. > > Please review and laugh . . . or better yet, proffer improvements :-). > > On 5/19/2017 10:10 AM, Decker, Richard M wrote: >> Mark, >> >>> -Original Message- >>> From: Mark Eggers [mailto:its_toas...@yahoo.com.INVALID] >>> Sent: Friday, May 19, 2017 10:44 AM >>> To: Tomcat Users List <users@tomcat.apache.org> >>> Subject: Re: Tomcat on macOS >>> >>> Chris, >>> >>> On 5/19/2017 7:33 AM, Christopher Schultz wrote: >>>> Israel, >>>> >>>> On 5/18/17 10:52 AM, Israel Timoteo wrote: >>>>> Any comments from the community for ... >>>> >>>>> 1) What tools is the community using for simultaneous applications >>>>> deployment on several servers, let’s say more than 20? >>>> >>>> I am using neither of these strategies, but... >>>> >>>> a. FarmWebDeployer [1] >>> >>> Doesn't this require a cluster (and therefore multicast)? That becomes >>> challenging in a cloud environment where there's no multicast easily >>> available. >>> >>>> b. Auto-deploy + scp >>> >>> This would be nice with a little scripting. >>> >>>> >>>> Why in the world are you deploying a web application to 20+ >>>> macos-based servers? Or do you have a Macos client and 20+ >>>> non-macos-based servers? >>>> >>>>> 4) Is JAVA_OPTS required? >>>> >>>> JAVA_OPTS is only required if you require any java opts. Do you >>>> require such options? Usually, when people set JAVA_OPTS they really >>>> want to set CATALINA_OPTS instead. >>>> >>>> Hope that helps, >>>> -chris >>>> >>>> [1] >>>> http://tomcat.apache.org/tomcat-8.0-doc/config/cluster-deployer.html >>> >>> What I do is use Jenkins, Maven, Nexus, and a little Groovy scripting. >>> >>> 1. Maven with the Tomcat Maven Plugin [1] >>> >>> The WAR file is customized (context.xml) based on the target environment. >>> >>> 2. Jenkins >>> >>> The build is run by Jenkins, and the build number (with a little 0 padding >>> via a >>> Groovy script) is tacked onto the WAR name as app##nn.war. >> >> I don't mean to hijack the thread, but could you expand on this? Could you >> please provide examples of your Groovy scripts? >> >>> >>> This allows the parallel deploy feature to be used [
Re: Tomcat on macOS
Folks, Beware, the following is extremely ugly Groovy. I've changed the names to protect the guilty (I think). Also, the *_SVR and *_URL values are environment values stored centrally in Jenkins. That way they can be changed easily. They also show up in the job logs, which means with a little scripting effort I can get a history of what versions were deployed to what server when. Please review and laugh . . . or better yet, proffer improvements :-). On 5/19/2017 10:10 AM, Decker, Richard M wrote: > Mark, > >> -Original Message- >> From: Mark Eggers [mailto:its_toas...@yahoo.com.INVALID] >> Sent: Friday, May 19, 2017 10:44 AM >> To: Tomcat Users List <users@tomcat.apache.org> >> Subject: Re: Tomcat on macOS >> >> Chris, >> >> On 5/19/2017 7:33 AM, Christopher Schultz wrote: >>> Israel, >>> >>> On 5/18/17 10:52 AM, Israel Timoteo wrote: >>>> Any comments from the community for ... >>> >>>> 1) What tools is the community using for simultaneous applications >>>> deployment on several servers, let’s say more than 20? >>> >>> I am using neither of these strategies, but... >>> >>> a. FarmWebDeployer [1] >> >> Doesn't this require a cluster (and therefore multicast)? That becomes >> challenging in a cloud environment where there's no multicast easily >> available. >> >>> b. Auto-deploy + scp >> >> This would be nice with a little scripting. >> >>> >>> Why in the world are you deploying a web application to 20+ >>> macos-based servers? Or do you have a Macos client and 20+ >>> non-macos-based servers? >>> >>>> 4) Is JAVA_OPTS required? >>> >>> JAVA_OPTS is only required if you require any java opts. Do you >>> require such options? Usually, when people set JAVA_OPTS they really >>> want to set CATALINA_OPTS instead. >>> >>> Hope that helps, >>> -chris >>> >>> [1] >>> http://tomcat.apache.org/tomcat-8.0-doc/config/cluster-deployer.html >> >> What I do is use Jenkins, Maven, Nexus, and a little Groovy scripting. >> >> 1. Maven with the Tomcat Maven Plugin [1] >> >> The WAR file is customized (context.xml) based on the target environment. >> >> 2. Jenkins >> >> The build is run by Jenkins, and the build number (with a little 0 padding >> via a >> Groovy script) is tacked onto the WAR name as app##nn.war. > > I don't mean to hijack the thread, but could you expand on this? Could you > please provide examples of your Groovy scripts? > >> >> This allows the parallel deploy feature to be used [2]. >> >> 3. Nexus >> >> This is where all of the base artifacts are stored. Nexus 2 is used currently >> since Nexus 3 doesn't have the REST API needed to cleanly interact with the >> Jenkins job via a Groovy script. Maybe I should learn how to write a Nexus >> plugin to get lists of artifact versions via REST . . . >> >> 4. Groovy scripting >> >> Groovy is used in Jenkins to do the following: >> >> a. Query Nexus to get a list of artifact versions b. Prevent non-production >> artifacts from landing on production platforms c. Create the final number for >> parallel deployment >> >> To expand this to multiple machines, a set of pipeline jobs could be created. >> >> a. Build the customized WAR for the target environment b. Multiple jobs >> deploy to the servers in the target environment c. Multiple jobs validate the >> deployment d. Final job sends mail to interested parties with success / >> failure >> >> I know that's a lot of infrastructure. There are certainly things that could >> be >> done differently. Ant (with Ivy), or gradle could be used for the builds. A >> different repository manager could be used (other than Nexus). A different >> CI / CD system could be used (other than Jenkins). >> >> Anything that meets at least the following requirements could be strung >> together. >> >> a. Reliable place to get the WAR file you need to deploy b. Reliable build >> system that can be automated c. Build system that can deploy to Tomcat d. >> Testing that the deployment actually worked e. Notification >> >> The end result is that some authorized person can log into Jenkins, select a >> version of an application to deploy, deploy it to the target environment, >> know that it's been successful (or not), and have notifications automatically >> sent out. >> >> [1] http://tomcat.apache.org/maven-plugin.h
[OT] Re: Tomcat on macOS
Richard, On 5/19/2017 10:10 AM, Decker, Richard M wrote: > Mark, > >> -Original Message- >> From: Mark Eggers [mailto:its_toas...@yahoo.com.INVALID] >> Sent: Friday, May 19, 2017 10:44 AM >> To: Tomcat Users List <users@tomcat.apache.org> >> Subject: Re: Tomcat on macOS >> >> Chris, >> >> On 5/19/2017 7:33 AM, Christopher Schultz wrote: >>> Israel, >>> >>> On 5/18/17 10:52 AM, Israel Timoteo wrote: >>>> Any comments from the community for ... >>> >>>> 1) What tools is the community using for simultaneous applications >>>> deployment on several servers, let’s say more than 20? >>> >>> I am using neither of these strategies, but... >>> >>> a. FarmWebDeployer [1] >> >> Doesn't this require a cluster (and therefore multicast)? That becomes >> challenging in a cloud environment where there's no multicast easily >> available. >> >>> b. Auto-deploy + scp >> >> This would be nice with a little scripting. >> >>> >>> Why in the world are you deploying a web application to 20+ >>> macos-based servers? Or do you have a Macos client and 20+ >>> non-macos-based servers? >>> >>>> 4) Is JAVA_OPTS required? >>> >>> JAVA_OPTS is only required if you require any java opts. Do you >>> require such options? Usually, when people set JAVA_OPTS they really >>> want to set CATALINA_OPTS instead. >>> >>> Hope that helps, >>> -chris >>> >>> [1] >>> http://tomcat.apache.org/tomcat-8.0-doc/config/cluster-deployer.html >> >> What I do is use Jenkins, Maven, Nexus, and a little Groovy scripting. >> >> 1. Maven with the Tomcat Maven Plugin [1] >> >> The WAR file is customized (context.xml) based on the target environment. >> >> 2. Jenkins >> >> The build is run by Jenkins, and the build number (with a little 0 padding >> via a >> Groovy script) is tacked onto the WAR name as app##nn.war. > > I don't mean to hijack the thread, but could you expand on this? Could you > please provide examples of your Groovy scripts? > >> >> This allows the parallel deploy feature to be used [2]. >> >> 3. Nexus >> >> This is where all of the base artifacts are stored. Nexus 2 is used currently >> since Nexus 3 doesn't have the REST API needed to cleanly interact with the >> Jenkins job via a Groovy script. Maybe I should learn how to write a Nexus >> plugin to get lists of artifact versions via REST . . . >> >> 4. Groovy scripting >> >> Groovy is used in Jenkins to do the following: >> >> a. Query Nexus to get a list of artifact versions b. Prevent non-production >> artifacts from landing on production platforms c. Create the final number for >> parallel deployment >> >> To expand this to multiple machines, a set of pipeline jobs could be created. >> >> a. Build the customized WAR for the target environment b. Multiple jobs >> deploy to the servers in the target environment c. Multiple jobs validate the >> deployment d. Final job sends mail to interested parties with success / >> failure >> >> I know that's a lot of infrastructure. There are certainly things that could >> be >> done differently. Ant (with Ivy), or gradle could be used for the builds. A >> different repository manager could be used (other than Nexus). A different >> CI / CD system could be used (other than Jenkins). >> >> Anything that meets at least the following requirements could be strung >> together. >> >> a. Reliable place to get the WAR file you need to deploy b. Reliable build >> system that can be automated c. Build system that can deploy to Tomcat d. >> Testing that the deployment actually worked e. Notification >> >> The end result is that some authorized person can log into Jenkins, select a >> version of an application to deploy, deploy it to the target environment, >> know that it's been successful (or not), and have notifications automatically >> sent out. >> >> [1] http://tomcat.apache.org/maven-plugin.html >> [2] >> https://tomcat.apache.org/tomcat-8.0- >> doc/config/context.html#Parallel_deployment >> >> . . . just my (rather lengthy) 2 cents >> /mde/ > I'll sanitize them and then send them on the list. Please note that I currently rely on the Active Choices plugin which has been blacklisted due to its dependency on the Scriptler plugin. Active Choices has the security fix, but Scrip
RE: Tomcat on macOS
Mark, > -Original Message- > From: Mark Eggers [mailto:its_toas...@yahoo.com.INVALID] > Sent: Friday, May 19, 2017 10:44 AM > To: Tomcat Users List <users@tomcat.apache.org> > Subject: Re: Tomcat on macOS > > Chris, > > On 5/19/2017 7:33 AM, Christopher Schultz wrote: > > Israel, > > > > On 5/18/17 10:52 AM, Israel Timoteo wrote: > >> Any comments from the community for ... > > > >> 1) What tools is the community using for simultaneous applications > >> deployment on several servers, let’s say more than 20? > > > > I am using neither of these strategies, but... > > > > a. FarmWebDeployer [1] > > Doesn't this require a cluster (and therefore multicast)? That becomes > challenging in a cloud environment where there's no multicast easily > available. > > > b. Auto-deploy + scp > > This would be nice with a little scripting. > > > > > Why in the world are you deploying a web application to 20+ > > macos-based servers? Or do you have a Macos client and 20+ > > non-macos-based servers? > > > >> 4) Is JAVA_OPTS required? > > > > JAVA_OPTS is only required if you require any java opts. Do you > > require such options? Usually, when people set JAVA_OPTS they really > > want to set CATALINA_OPTS instead. > > > > Hope that helps, > > -chris > > > > [1] > > http://tomcat.apache.org/tomcat-8.0-doc/config/cluster-deployer.html > > What I do is use Jenkins, Maven, Nexus, and a little Groovy scripting. > > 1. Maven with the Tomcat Maven Plugin [1] > > The WAR file is customized (context.xml) based on the target environment. > > 2. Jenkins > > The build is run by Jenkins, and the build number (with a little 0 padding > via a > Groovy script) is tacked onto the WAR name as app##nn.war. I don't mean to hijack the thread, but could you expand on this? Could you please provide examples of your Groovy scripts? > > This allows the parallel deploy feature to be used [2]. > > 3. Nexus > > This is where all of the base artifacts are stored. Nexus 2 is used currently > since Nexus 3 doesn't have the REST API needed to cleanly interact with the > Jenkins job via a Groovy script. Maybe I should learn how to write a Nexus > plugin to get lists of artifact versions via REST . . . > > 4. Groovy scripting > > Groovy is used in Jenkins to do the following: > > a. Query Nexus to get a list of artifact versions b. Prevent non-production > artifacts from landing on production platforms c. Create the final number for > parallel deployment > > To expand this to multiple machines, a set of pipeline jobs could be created. > > a. Build the customized WAR for the target environment b. Multiple jobs > deploy to the servers in the target environment c. Multiple jobs validate the > deployment d. Final job sends mail to interested parties with success / > failure > > I know that's a lot of infrastructure. There are certainly things that could > be > done differently. Ant (with Ivy), or gradle could be used for the builds. A > different repository manager could be used (other than Nexus). A different > CI / CD system could be used (other than Jenkins). > > Anything that meets at least the following requirements could be strung > together. > > a. Reliable place to get the WAR file you need to deploy b. Reliable build > system that can be automated c. Build system that can deploy to Tomcat d. > Testing that the deployment actually worked e. Notification > > The end result is that some authorized person can log into Jenkins, select a > version of an application to deploy, deploy it to the target environment, > know that it's been successful (or not), and have notifications automatically > sent out. > > [1] http://tomcat.apache.org/maven-plugin.html > [2] > https://tomcat.apache.org/tomcat-8.0- > doc/config/context.html#Parallel_deployment > > . . . just my (rather lengthy) 2 cents > /mde/
Re: Tomcat on macOS
Chris, On 5/19/2017 7:33 AM, Christopher Schultz wrote: > Israel, > > On 5/18/17 10:52 AM, Israel Timoteo wrote: >> Any comments from the community for ... > >> 1) What tools is the community using for simultaneous applications >> deployment on several servers, let’s say more than 20? > > I am using neither of these strategies, but... > > a. FarmWebDeployer [1] Doesn't this require a cluster (and therefore multicast)? That becomes challenging in a cloud environment where there's no multicast easily available. > b. Auto-deploy + scp This would be nice with a little scripting. > > Why in the world are you deploying a web application to 20+ > macos-based servers? Or do you have a Macos client and 20+ > non-macos-based servers? > >> 4) Is JAVA_OPTS required? > > JAVA_OPTS is only required if you require any java opts. Do you > require such options? Usually, when people set JAVA_OPTS they really > want to set CATALINA_OPTS instead. > > Hope that helps, > -chris > > [1] http://tomcat.apache.org/tomcat-8.0-doc/config/cluster-deployer.html What I do is use Jenkins, Maven, Nexus, and a little Groovy scripting. 1. Maven with the Tomcat Maven Plugin [1] The WAR file is customized (context.xml) based on the target environment. 2. Jenkins The build is run by Jenkins, and the build number (with a little 0 padding via a Groovy script) is tacked onto the WAR name as app##nn.war. This allows the parallel deploy feature to be used [2]. 3. Nexus This is where all of the base artifacts are stored. Nexus 2 is used currently since Nexus 3 doesn't have the REST API needed to cleanly interact with the Jenkins job via a Groovy script. Maybe I should learn how to write a Nexus plugin to get lists of artifact versions via REST . . . 4. Groovy scripting Groovy is used in Jenkins to do the following: a. Query Nexus to get a list of artifact versions b. Prevent non-production artifacts from landing on production platforms c. Create the final number for parallel deployment To expand this to multiple machines, a set of pipeline jobs could be created. a. Build the customized WAR for the target environment b. Multiple jobs deploy to the servers in the target environment c. Multiple jobs validate the deployment d. Final job sends mail to interested parties with success / failure I know that's a lot of infrastructure. There are certainly things that could be done differently. Ant (with Ivy), or gradle could be used for the builds. A different repository manager could be used (other than Nexus). A different CI / CD system could be used (other than Jenkins). Anything that meets at least the following requirements could be strung together. a. Reliable place to get the WAR file you need to deploy b. Reliable build system that can be automated c. Build system that can deploy to Tomcat d. Testing that the deployment actually worked e. Notification The end result is that some authorized person can log into Jenkins, select a version of an application to deploy, deploy it to the target environment, know that it's been successful (or not), and have notifications automatically sent out. [1] http://tomcat.apache.org/maven-plugin.html [2] https://tomcat.apache.org/tomcat-8.0-doc/config/context.html#Parallel_deployment . . . just my (rather lengthy) 2 cents /mde/ signature.asc Description: OpenPGP digital signature
Re: Tomcat on macOS
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Israel, On 5/18/17 10:52 AM, Israel Timoteo wrote: > Any comments from the community for ... > > 1) What tools is the community using for simultaneous applications > deployment on several servers, let’s say more than 20? I am using neither of these strategies, but... a. FarmWebDeployer [1] b. Auto-deploy + scp Why in the world are you deploying a web application to 20+ macos-based servers? Or do you have a Macos client and 20+ non-macos-based servers? > 4) Is JAVA_OPTS required? JAVA_OPTS is only required if you require any java opts. Do you require such options? Usually, when people set JAVA_OPTS they really want to set CATALINA_OPTS instead. Hope that helps, - -chris [1] http://tomcat.apache.org/tomcat-8.0-doc/config/cluster-deployer.html -BEGIN PGP SIGNATURE- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlkfAjIACgkQHPApP6U8 pFh0wQ/+K/LfMKZWQVkOtouH2IVihXol8n2tmN33GOtZMo1SJQ0YNEHsM5b0BPse rR2iWuYH9lAbZYZaKA4CZRoUvHFL/3CfHrFhJlSnIZaqrLvJzPLoKUHrDlPiil1f SSmKAhc6Bacv6xWFHlUOoGa5VD37sfj9Wh690kEKZhWBABOlHbZB3zJ5Vivxp8K3 l2Oht1gbpzSXX27TNlEHTv+x/4OddRq1inX5D4tI13G318PlueskKD79n5YJCXcQ 6PwlOxn7m3C0TifWrv62lUCg5CGBEYhuKfMiHOrU+s6z/bxuDKxbdZNvnHCbf3sM he/6qGR289VXnwxmxcLkbyvf3Fr17AiE8k2RkJNfaOCh6mNmWMoNwl84KaLo51KB VxnGK1VNlBE2jr9T0ll6YkKblgW9H1gvbWUEKKDfDHYBf85JHsWwu+LAiLjbYevH hjeAp4rKmyjk+8NrzkWO+9gZvDgL4b6ud//sYcKq2x4VKAnP7IK3DyshccJvDolQ JS7AcZTiWeZJKYh7XHj9XZ1IlQmVrjmitZVsiEsZNA/vR28Be/79NBcG22i5HizV Oc0nw8BSO0eY3yuUoR90dlNyX1cPaDRHpQxac/41cxvqjHVxhc+W3qOoNGtU6lBp 3EZ0fohYMsBY3y84uEwV+iDkKLkfCiXJVHLPYebTPDCPI9ol74k= =os19 -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat on macOS
Thank Thad! Any comments from the community for ... 1) What tools is the community using for simultaneous applications deployment on several servers, let’s say more than 20? 4) Is JAVA_OPTS required? Israel Timoteo > On May 18, 2017, at 6:53 AM, Thad Humphries <thad.humphr...@gmail.com> wrote: > > On Wed, May 17, 2017 at 9:25 PM, Israel Timoteo <itimo...@me.com > <mailto:itimo...@me.com>> wrote: > >> Hi all, >> >> My environment is Tomcat 8.5.12, Java 1.8.0_112 running on macOS 10.12 and >> planning to update Tomcat to 8.5.15. >> >> I’m wondering if I can get comments from the community for my questions >> below? >> >> >> 1) What tools is the community using for simultaneous applications >> deployment on several servers, let’s say more than 20? >> >> 2) Would having the logs located outside of the Tomcat home directory, if >> possible, affect Tomcat operation? >> >> 3) Are there any recommendations/best practices for installing and running >> Tomcat 8.5.15 on macOS 10.12? >> > > On #2 and #3, setup up separate CATALINA_HOME and CATALINA_BASE directories > as described in RUNNING.txt. This will keep logs out of CATALINA_HOME and > make upgrading to new releases of Tomcat fairly easy. > > My Macs aren't production, so you may need to adapt this. I unpack Tomcat > releases to /Library/Tomcat. I remove all but ./bin and ./lib, and rename > ./conf to ./conf-ORIG. I diff this ./conf-ORIG with the ./conf-ORIG from > the last release, making tweaks to my $CATALINA_BASE/conf files as > required. Then I create a link > >$ cd /Library/Tomcat >$ tar zxvf ~/Downloads/apache-tomcat-8.5.11.tar.gz > ... // remove subdirectories... >$ rm catalina >$ ln -s /Library/Tomcat/apache-tomcat-8.5.11 catalina > > and in ~/.bash_profile `export CATALINA_HOME=/Library/Tomcat/catalina` (I > also set CATALINA_HOME and CATALINA_BASE in my org.apache.tomcat plist). > Now restart Tomcat. > > >> >> 4) Is JAVA_OPTS required? >> >> >> >> Thanks for your comments. >> >> Israel >> >> >> >> > > > -- > "Hell hath no limits, nor is circumscrib'd In one self-place; but where we > are is hell, And where hell is, there must we ever be" --Christopher > Marlowe, *Doctor Faustus* (v. 121-24)
Re: Tomcat on macOS
On Wed, May 17, 2017 at 9:25 PM, Israel Timoteo <itimo...@me.com> wrote: > Hi all, > > My environment is Tomcat 8.5.12, Java 1.8.0_112 running on macOS 10.12 and > planning to update Tomcat to 8.5.15. > > I’m wondering if I can get comments from the community for my questions > below? > > > 1) What tools is the community using for simultaneous applications > deployment on several servers, let’s say more than 20? > > 2) Would having the logs located outside of the Tomcat home directory, if > possible, affect Tomcat operation? > > 3) Are there any recommendations/best practices for installing and running > Tomcat 8.5.15 on macOS 10.12? > On #2 and #3, setup up separate CATALINA_HOME and CATALINA_BASE directories as described in RUNNING.txt. This will keep logs out of CATALINA_HOME and make upgrading to new releases of Tomcat fairly easy. My Macs aren't production, so you may need to adapt this. I unpack Tomcat releases to /Library/Tomcat. I remove all but ./bin and ./lib, and rename ./conf to ./conf-ORIG. I diff this ./conf-ORIG with the ./conf-ORIG from the last release, making tweaks to my $CATALINA_BASE/conf files as required. Then I create a link $ cd /Library/Tomcat $ tar zxvf ~/Downloads/apache-tomcat-8.5.11.tar.gz ... // remove subdirectories... $ rm catalina $ ln -s /Library/Tomcat/apache-tomcat-8.5.11 catalina and in ~/.bash_profile `export CATALINA_HOME=/Library/Tomcat/catalina` (I also set CATALINA_HOME and CATALINA_BASE in my org.apache.tomcat plist). Now restart Tomcat. > > 4) Is JAVA_OPTS required? > > > > Thanks for your comments. > > Israel > > > > -- "Hell hath no limits, nor is circumscrib'd In one self-place; but where we are is hell, And where hell is, there must we ever be" --Christopher Marlowe, *Doctor Faustus* (v. 121-24)
Tomcat on macOS
Hi all, My environment is Tomcat 8.5.12, Java 1.8.0_112 running on macOS 10.12 and planning to update Tomcat to 8.5.15. I’m wondering if I can get comments from the community for my questions below? 1) What tools is the community using for simultaneous applications deployment on several servers, let’s say more than 20? 2) Would having the logs located outside of the Tomcat home directory, if possible, affect Tomcat operation? 3) Are there any recommendations/best practices for installing and running Tomcat 8.5.15 on macOS 10.12? 4) Is JAVA_OPTS required? Thanks for your comments. Israel