Plugin Information |
---|
View Capitomcat on the plugin site for more information. |
Capitomcat is
Capitomcat plugin deploy the WAR file to multiple remote Tomcat servers using Capitomcat which is Capistrano 3 recipe and library for Tomcat deployment.
See also : Capitomcat homepage
And also, You don't need to install Ruby and Capistrano 3 on your Jenkins box. Capitomcat and Capistrano 3 are running on the Jenkins Ruby runtime.
Tested OS list
Please check the link in below. Capitomcat is tested on a lot of Linux environment.
https://github.com/sunggun-yu/capitomcat-test-vagrant
Capitomcat plugin supports 2 way deployment.
Basic
Basic deployment is usual way for Tomcat deployment. Capitomcat will upload the WAR file under your $TOMCAT_HOME/webapps directy.
Basic deployment is the default for Capitomcat deployment.
With updating Context file
Also, Capitomcat supports deploment with updating contex.xml file. if you want keep the old release WAR file or give some build number for WAR file, this will be very helpful.
Authentication & Authorisation
Basically, Capitomcat supports password input. by the way, that password will be saved as plain text in your config file. I'm trying to use certification plugin. but, for security, please consider using public key authentication.
And also, Capitomcat is following Authentication & Authorisation guide line of Capistrano.
please refer to Authentication & Authorisation page on the Capistrano home page for more detail about Authentication & Authorisation.
NOPASSWD Setting
At least of following NOPASSWD setting is required to use Capitomcat.
%your_deploy_user_name ALL=NOPASSWD:/etc/init.d/tomcat7 <Your tomcat command>
%your_deploy_user_name ALL=(<your_tomcat_user> : <your_tomcat_user_group>) NOPASSWD: ALL
Advanced Setting : Tomcat Virtual Host setting
Capitomcat Jenkins plugin is following virtual hosting setting convention of Tomcat.
Open Issues
Change logs
v0.1.0
- Updating Capitomcat library version - 1.2.1
- Updating Capistrano dependency version - 3.3.5
- Can choose the way how to execute the remote tomcat command to apply pty option correctly. you can select the option in advanced menu : `Use background execution for Tomcat command`.
- No - Using Normal script(Default) : It follows the global pty option.
- Yes - Using Background script : It makes pty false in some OS even though global pty is true. for example, RHEL 5.6
for more details, please refer to https://github.com/jenkinsci/capitomcat-plugin/releases/tag/capitomcat-0.1.0
V0.0.11
https://github.com/jenkinsci/capitomcat-plugin/releases/tag/capitomcat-0.0.11
Bug fix : Upgrading issue on ssh port default value.
- ssh port value is null after upgrade to 0.0.10
- adding null check and invalid number value on ssh port.
- ssh port value will be ignored if it is invalid.
V0.0.10
https://github.com/jenkinsci/capitomcat-plugin/releases/tag/capitomcat-0.0.10
- Fix default value issue. default value was disappeared.
- Adding configurable SSH port option.** It supports custom ssh port host. such like Vagrant port forwarding.
- Adding Jenkins Builder.** The Capitomcat deployment can be added in pre and post build step.** It supports multiple Tomcat hosts that has different server setting in each other.
V0.0.9
https://github.com/jenkinsci/capitomcat-plugin/releases/tag/capitomcat-0.0.9
- Bug fix : Potential fix to allow updating the advanced configuration fields.
v0.0.8
https://github.com/jenkinsci/capitomcat-plugin/releases/tag/capitomcat-0.0.8
- Support custom variable injection : please refer to release note in Github (with screenshot)
v0.0.7
https://github.com/jenkinsci/capitomcat-plugin/releases/tag/capitomcat-0.0.7
- BUG-FIX : Config reload - property tomcat port number take default.
v0.0.6
https://github.com/jenkinsci/capitomcat-plugin/releases/tag/capitomcat-0.0.6
- Unpacked WAR directory is not refreshed. eventually, Tomcat doesn't provide latest changes in new WAR file by this issue.
- Thanks to @jwcarman
v0.0.5
https://github.com/sunggun-yu/jenkins-capitomcat-plugin/releases/tag/capitomcat-0.0.5
- Add functionality to select PTY options for global SSH setting : it fix deployment problem of some particular OS environment. ex) CentOS 6.5
- Bug Fix for white space on host name section
v0.0.4.1
Apply the Capitomcat v1.1.3 changes : https://github.com/sunggun-yu/capitomcat/blob/master/CHANGES.md
- Bug Fix : There was space between "-" and "u" at Tomcat work directory cleaning task.
v0.0.3
Apply the Capitomcat v1.1.1 and v1.1.2 changes : https://github.com/sunggun-yu/capitomcat/blob/master/CHANGES.md
- Bug Fix : Some Tomcat startup script need to be executed in background #6 (https://github.com/sunggun-yu/capitomcat/issues/6)** Start/stop command has modified to be executed in the background.** Adding sleep time after command is executed.
- Bug Fix : SSHKIT test and within not properly working at CentOS5.x #7 (https://github.com/sunggun-yu/capitomcat/issues/7)** Removing within method** Adding checking method for remote directory and file existing.
v0.0.2
- Bug Fix : [v0.0.1]Config information not refreshed after built.
v0.0.1
- First Release of Capitomcat Jenkins plugin
8 Comments
Unknown User (dano0b)
Hi,
I'm trying to use an injected variable to fill the hosts part in your plugin but it does not intepret the variable I'm trying to use:
This example is using the postbuild script plugin to inject the properties but I tried using envinject during the build process too.Any way to make capitomcat to use selfdefined variables? This would give us the option to choose the environment(multiple hosts) and version to deploy.
Unknown User (dano0b)
Implemented now, thank you!
Unknown User (sbmage)
Hi, I'm try to deploy use capitomcat.
First step WAR copy is working, but next tomcat command not works.
I configured /etc/sudoers like this :
root ALL=NOPASSWD: ALL
root ALL=NOPASSWD: /etc/init.d/tomcat
(authentication option is use password,
select PTY option is true, use tomcat command option is No)
How could i success remote tomcat command?
Best regards.
INFO Uploading /root/.jenkins/workspace/AAAA/target/ROOT.war 100.0%
INFO 97783531 Running /usr/bin/env chmod 666 /tmp/ROOT-1407484281.war on xxx.xxx.xxx.148
INFO 97783531 Finished in 0.035 seconds with exit status 0 (successful).
INFO 53982039 Running /usr/bin/env sudo -u root cp /tmp/ROOT-1407484281.war /data/webapps/ROOT.war on xxx.xxx.xxx.148
INFO 53982039 Finished in 0.168 seconds with exit status 0 (successful).
INFO 86325ce5 Running /usr/bin/env rm -f /tmp/ROOT-1407484281.war on 172.27.91.148
INFO 86325ce5 Finished in 0.041 seconds with exit status 0 (successful).
xxx.xxx.xxx.148 Cleaning-up Tomcat Work directory : /data/work/Catalina/localhost/ROOT
WARN Tomcat work directory does not exist.
xxx.xxx.xxx.148 Clean Unpacked WAR directory
WARN Tomcat unpacked directory does not exist.
xxx.xxx.xxx.148 Starting Tomcat : /etc/init.d/tomcat start
INFO 9e724f76 Running /usr/bin/env echo `nohup sudo -u root /etc/init.d/tomcat start& > /dev/null 2>&1` && sleep 1 on xxx.xxx.xxx.148
INFO 9e724f76 Finished in 1.068 seconds with exit status 0 (successful).
INFO Check and wait until Tomcat starting up ... 1
INFO Check and wait until Tomcat starting up ... 2
INFO Check and wait until Tomcat starting up ... 3 ... ERROR: Starting Tomcat has failed - timed out
Unknown User (sunggun)
Hi,
Sorry for late reply.
It seems like, it is successfully finished until executing tomcat start.
can you please check the tomcat port number? Capitomcat check the port number by netstat -an | grep 8080(tomcat port number)
Thank you.
Unknown User (sbmage)
After tomcat stop command by capitomcat.
i saw some error message. Is is related trouble of tomcat start?
------------------------------------------------------------------------------------------------------------------------------
Aug 08, 2014 4:38:23 PM org.apache.catalina.util.LifecycleMBeanBase unregister
WARNING: Failed to unregister MBean with name [Catalina:type=Valve,context=/,host=localhost,name=NonLoginAuthenticator] during component destruction
javax.management.InstanceNotFoundException: Catalina:type=Valve,context=/,host=localhost,name=NonLoginAuthenticator
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.exclusiveUnregisterMBean(DefaultMBeanServerInterceptor.java:427)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.unregisterMBean(DefaultMBeanServerInterceptor.java:415)
at com.sun.jmx.mbeanserver.JmxMBeanServer.unregisterMBean(JmxMBeanServer.java:546)
at org.apache.catalina.util.LifecycleMBeanBase.unregister(LifecycleMBeanBase.java:194)
at org.apache.catalina.util.LifecycleMBeanBase.destroyInternal(LifecycleMBeanBase.java:73)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.core.StandardPipeline.removeValve(StandardPipeline.java:460)
at org.apache.catalina.core.StandardPipeline.destroyInternal(StandardPipeline.java:222)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.core.ContainerBase.destroyInternal(ContainerBase.java:1229)
at org.apache.catalina.core.StandardContext.destroyInternal(StandardContext.java:5685)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1041)
at org.apache.catalina.core.ContainerBase.destroyInternal(ContainerBase.java:1234)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1041)
at org.apache.catalina.core.ContainerBase.destroyInternal(ContainerBase.java:1234)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:593)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:822)
at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
at org.apache.catalina.startup.Catalina.stop(Catalina.java:752)
at org.apache.catalina.startup.Catalina.start(Catalina.java:713)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:456)
Unknown User (mahbub)
Hi After Adding Capitomcat plugin config in my task I am getting the following error, can anyone help me to figureout the reason of this error?
Unknown User (mario_raudales)
Hi,
I am trying to use capitomcat to deploy, but when I installed capitomcat plugin I got the following error, I have tried in a Linux server and I got the same error. I am using Jenkins 1.651.2 I have tried many combinations of the plugins "Ruby Runtime" and Capitomcat and I got errors too.
Unknown User (aliyun_containerservice)
I have tried to install this plugin in Jenkins Version 1.651.3 and Version 2.19.2, but it seems I cannot find any new tabs added in "Build Step" or "After Build Step". I can see Capitomcat Plugin shown in already install Plugin -> Plugin Management -> Jenkins. Could you please help to tell if any thing wrong? thank you.