[JIRA] (JENKINS-41218) Provide native systemd unit

2020-05-11 Thread 'axmetishe+jenkins...@gmail.com (JIRA)' via Jenkins Issues
Title: Message Title


 
 
 
 

 
 
 

 
   
 Eugene Ahmethanov commented on  JENKINS-41218  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Provide native systemd unit   
 

  
 
 
 
 

 
 Dirk Heinrichs not be part of the Jenkins package, but the Tomcat one, right? not Jenkins, nor Tomcat - environment specific configuration   Also, the "EnvironmentFile" entry is there for providing some kind of backwards compatibility with system v wrong - this is not a backward compatibility level, but conscious way to pass basic deployment configuration instead of large unit file with tons of Environment definitions which will not be updated from place to place   In a pure systemd setup they shouldn't be used anymore as environment variables wrong again - it's a just two different methods for environment configuration for 'pure' systemd setup   Customizations should then go into /etc/systemd/system/myservice.service.d/*.conf customization will still be applied even using EnvironmentFile which is related to general configuration - https://www.freedesktop.org/software/systemd/man/systemd.exec.html   This completely eliminates the need for ANY distribution specific files You will still have to do some customization with deb/rpm packaging at pre-inst/post-inst for example and string replacement will be the lesser problem   I'll try to write a native service file for standalone Jenkins, I already have one for starting swarm agents which I can use as a starting point Glad to hear that.   Regards.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.13.12#713012-sha1:6e07c38)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an e

[JIRA] (JENKINS-41218) Provide native systemd unit

2020-05-11 Thread 'axmetishe+jenkins...@gmail.com (JIRA)' via Jenkins Issues
Title: Message Title


 
 
 
 

 
 
 

 
   
 Eugene Ahmethanov commented on  JENKINS-41218  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Provide native systemd unit   
 

  
 
 
 
 

 
 Dirk Heinrichs The above is for running Jenkins in Tomcat, isn't it? Yes. The example provided based on [Advanced Configuration - Multiple Tomcat Instances|https://tomcat.apache.org/tomcat-8.0-doc/RUNNING.txt] - e.g. single installation and "n" - Tomcat Server instances, which allow to run NOT multiple applications within single server(which is also possible by default), but multiple Tomcat Server instances. This is widely used technique when you desire to split up different application servers but share binaries between them. Unit template "tomcat@.service" follow the described flow above: 
 
Determines current default Tomcat binaries(configured via alternatives) directory and expose required variable  ExecStartPre=/bin/bash -c 'systemctl set-environment CATALINA_HOME=$(readlink -f /usr/bin/tomcat)' 
Retrieves server instance configuration(RedHat or Debian makes no difference here, just replace 'sysconfig' to 'default' on deb packaging stage) EnvironmentFile=-/etc/sysconfig/%i 
Starts dedicated Tomcat Instance for Jenkins 
 This kind of configuration provides flexibility on Servlet container configuration, protocols configuration used for proxy communication, simple server and java versions updates, and simplicity for multiple server configuration(dev/int/stage/prod instances) when you are on bare-metal/virtual machines. So setting up a "tomcat@.service" for single webapps doesn't seem to be necessary at all For the configuration when the single app should have its own server.   One that starts Jenkins standalone, just like the current sys-v init script does. I'd left this advanced java app deployment configuration here for someone who tried to find systemd solution from the maintainers. Feel free to switch this unit to the internal winstone(jetty) servlet container used at Jenkins war/jar binaries. Regards.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment