Wiki source code of Automating Application Deployment From Jenkins or Hudson
Last modified by David Avendasora on 2012/05/29 07:54
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
57.1 | 1 | With the combination of the [[Jenkins>>url:http://jenkins-ci.org/||shape="rect"]] or [[Hudson>>url:http://hudson-ci.org/||shape="rect"]] continuous integration server and the REST Routes and Direct Actions that have been added to [[Wonder's JavaMonitor>>doc:documentation.Home.Deployment.Wonder JavaMonitor and wotaskd.WebHome]] you can automatically deploy from Hudson directly to your app servers! |
![]() |
16.1 | 2 | |
3 | Included as an attachment to this page is a small Perl script that I demonstrated at WOWODC 2010. This script will take a build out of Hudson and deploy it to your wotaskd/JavaMonitor server. It will also add the app and create an instance if the app is not found in wotaskd. | ||
4 | |||
![]() |
24.1 | 5 | You need to: |
![]() |
22.1 | 6 | |
![]() |
56.2 | 7 | 1. Install a few CPAN Modules on your Hudson host {{code 0="none" title="Required CPAN Modules"}}perl -MCPAN -e 'install Math::Pari' |
![]() |
22.1 | 8 | perl -MCPAN -e 'install REST::Client' |
9 | perl -MCPAN -e 'install JSON' | ||
![]() |
49.1 | 10 | perl -MCPAN -e 'install File::Rsync' |
![]() |
56.2 | 11 | perl -MCPAN -e 'install Net::SSH::Perl'{{/code}} Installing Net::SSH::Perl on Ubuntu is a bit of a pig. I found these [[instructions>>url:http://www.csclug.org/?q=node/128||shape="rect"]] helpful. |
![]() |
54.1 | 12 | On CentOS, you will have to install the **openssl-devel** package. You will also need to install the **perl-CPAN** package (//yum install perl-CPAN//). |
13 | 1. Install the [[wodeploy.pl>>url:https://github.com/wocommunity/Deployment-Tools/tree/master/WODeploy||shape="rect"]] script on your Jenkins host | ||
14 | 1. Install the Hudson [[Batch Tasks Plugin>>url:http://wiki.hudson-ci.org//display/HUDSON/Batch+Task+Plugin||shape="rect"]] using Jenkins' built-in Plugin Manager (**Manage Jenkins** -> **Manage Plugins**) | ||
15 | 1. In your Jenkins job, create a new Batch Task with the following call: | ||
![]() |
22.1 | 16 | |
![]() |
55.1 | 17 | {{code 0="none" title="Add This as a Batch Task to your Hudson Job"}} |
![]() |
22.1 | 18 | |
![]() |
53.1 | 19 | /path/to/wodeploy.pl -U http://your.womonitorserver.com:56789/cgi-bin/WebObjects/JavaMonitor.woa -n ${DEPLOYED_APPLICATION_NAME} -P ${WORKSPACE}/Projects/${PROJECT_NAME}/dist/${DEPLOYED_APPLICATION_NAME}.woa -W ${WORKSPACE}/Projects/${PROJECT_NAME}/dist/Split/WebObjects/${DEPLOYED_APPLICATION_NAME}.woa -p yourMonitorPassword |
![]() |
16.1 | 20 | |
21 | {{/code}} |