Topic
  • 8 replies
  • Latest Post - ‏2017-05-27T05:19:31Z by Priya_maheshwaram
i.iliev
i.iliev
5 Posts

Pinned topic Using Jenkins to build and deploy to WebSphere v8

‏2011-09-23T13:36:22Z |
Just completed infrastructure project for a small team based on Jenkins to build and deploy JavaEE application to WebSphere v8. The CI infrastructure resides on linux box and WebSphere is hosted on AIX servers. As central part of whole process serves Jenkins with some interesting plugins. The developers are using SVN as SCM and Jira for issue tracking and project planning.
The first part involves building an JavaEE application as EAR and deploying it on WAS8. We had already jacl scripts for deployment on WAS and these were called from shell scripts for local deployment. Now, the situation changed, because of the separation between the build and deployment environment, so we faced the problem of remote deployment to WAS8. Fortunately, there is a very nice Jenkins plugin(1), which wraps the wsadmin within Jenkins CI server. You simply add additional build step into the Jenkins job configuration page and everything works automatically. Moreover, all the available Jenkins variables can be used as parameters to wsadmin, which makes dynamical configuration very easy. Because of the remote connection feature of wsadmin tool it doesn't matter if the deployment is done local or remote.
So, we just changed our scripts to take the workspace directory dynamically, corrected the path to the EAR file into them and added the necessary build step to the jobs in Jenkins. That was - it worked immediately. Well, almost - we had to change that Jenkins runs as root, because of permission problems calling the wsadmin as non-root user.
 
The second part is not related to WAS - here the challenge was to build normal Java application running in batch mode and deploy it to the remote AIX servers. Because of firewall limitations we were not able to get NFS to work between the build and productive system, so the only communication way was via SSH. We found another neat Jenkins pligin, which is able to publish over SSH(2). Because we already had working SSH connection between the two islands it was trivial to set this plugin to work. The rest was some little changes to the ant scripts to publish the artifacts in Jenkins' workspace directory and some shell tricks to be able to archive the previous version on the prod system. Again, the availability of the Jenkins environment variables made this very easy - we were able to mark the deployment artifacts with the current build number, for example, thus making very obviously what is the current working version. 
 
So, thanks to Jenkins and the great plugin support we were able to accomplish everything within several hours!
 
I wanted to share this info here in case someone else tries to solve similar problems and is not aware of the availability of all these nice plugins. 
 
Feedback is always welcome!  
 
Updated on 2012-10-18T14:25:24Z at 2012-10-18T14:25:24Z by Kishore Paidimarri
  • MMNY_Jose_Luis_Fernandez_Lastr
    2 Posts

    Re: Using Jenkins to build and deploy to WebSphere v8

    ‏2011-10-26T11:09:59Z  
     Hi i.iliev,
     
         we are now faceing this architecture you descrive in first part. Just now we are installing Jeckins as the IC engine and configuring different jobs using plugins. Most of the targer servers are WAS 7 so we have to deploy ear files. Now we have a PHP solution that runs a JACL and wsadmin on remote DMGRs.          So now we  are interested in using WAS jenkins plugin   "...there is a very nice Jenkins plugin(1), which wraps the wsadmin within Jenkins CI server...". In this point I wonder several questions.   Is this plugin and Jenkins server aware the JACL and wsadmin execution? How Jenkins is informed about the wsadmin.log?      I'd be pleased if you can tell me some more information about this matter.  Many Thanks folks
  • i.iliev
    i.iliev
    5 Posts

    Re: Using Jenkins to build and deploy to WebSphere v8

    ‏2011-10-26T19:04:03Z  
     Hi i.iliev,
     
         we are now faceing this architecture you descrive in first part. Just now we are installing Jeckins as the IC engine and configuring different jobs using plugins. Most of the targer servers are WAS 7 so we have to deploy ear files. Now we have a PHP solution that runs a JACL and wsadmin on remote DMGRs.          So now we  are interested in using WAS jenkins plugin   "...there is a very nice Jenkins plugin(1), which wraps the wsadmin within Jenkins CI server...". In this point I wonder several questions.   Is this plugin and Jenkins server aware the JACL and wsadmin execution? How Jenkins is informed about the wsadmin.log?      I'd be pleased if you can tell me some more information about this matter.  Many Thanks folks
     Hi,
     
    just think of it as you'd have a shell script calling wsadmin with the options passed as parameters to it. Jenkins gets the output of the process running wsadmin and writes it to its console log, so you get some info about the progress. At the end it analyzes the exit status of wsadmin execution and can mark the build as failed, if configured so. wsadmin.log, trace files, etc. are as they are configured normally by you - no any changes here. The nice features, using the plugin is that it is integrated in the Jenkins platform and that you can use all the available Jenkins vars, etc. If you have more questions about the plugin I'd suggest you to take a look at its wiki or drop a note to Romain (the author of the plugin) - I'm sure he'll be glad to answer your questions.
     
    Hope this helps, 
    Ilko 
  • MMNY_Jose_Luis_Fernandez_Lastr
    2 Posts

    Re: Using Jenkins to build and deploy to WebSphere v8

    ‏2011-10-27T10:04:44Z  
     Hi Ilko,
    thank you very much. This is just what I wanted. I will tell you as this implementation progresses. This is a very large installation with a los of WAS on linux an z/OS.
    On the other hand, do you know how jenkins engine and artifactory perform and deploy in WAS 7?   Thank you very much for your help! :)
  • i.iliev
    i.iliev
    5 Posts

    Re: Using Jenkins to build and deploy to WebSphere v8

    ‏2011-10-28T12:05:53Z  
     Hi Ilko,
    thank you very much. This is just what I wanted. I will tell you as this implementation progresses. This is a very large installation with a los of WAS on linux an z/OS.
    On the other hand, do you know how jenkins engine and artifactory perform and deploy in WAS 7?   Thank you very much for your help! :)
     Hi,
     
    No experience till now on WAS7, but I can't see any reason for performance problems arising due to the usage of the plugin. I can't see any troubles with WAS8 - to me it takes the same time for full deployment as it was at the times we used the shell scripts.
     
    Interesting on your progress on z/OS - is this native z/OS or hosted linux VMs on top of z/OS, running WAS? I have customer with some WAS installations on zLinux - it will be interesting to hear your experience with the plugin in such environment. 
     
    Thanks, 
    Ilko 
     
     
    Updated on 2011-10-28T12:05:53Z at 2011-10-28T12:05:53Z by i.iliev
  • Kishore Paidimarri
    Kishore Paidimarri
    2 Posts

    Re: Using Jenkins to build and deploy to WebSphere v8

    ‏2012-10-16T17:45:03Z  
     I am trying configure Jenkins plug-in for our application deployment set-up. I am getting an error saying "The host can't be reached" Below are the details. I am trying the setup for WAS 7
    Connection-type: SOAP
    Port: 8880
    Host: 168.40.164.234
     
    is the host a Deployment Manager? or websphere server instance host? I gave the installation path as my WAS test environment 7 profile1 bin folder path
  • i.iliev
    i.iliev
    5 Posts

    Re: Using Jenkins to build and deploy to WebSphere v8

    ‏2012-10-18T08:06:28Z  
     I am trying configure Jenkins plug-in for our application deployment set-up. I am getting an error saying "The host can't be reached" Below are the details. I am trying the setup for WAS 7
    Connection-type: SOAP
    Port: 8880
    Host: 168.40.164.234
     
    is the host a Deployment Manager? or websphere server instance host? I gave the installation path as my WAS test environment 7 profile1 bin folder path
     Hi,
     
    I'd first try to call the remote host directly from the local wsadmin to be sure that the network and firewall settings are set up correctly. I think that you are facing general network problem not related to the plugin itself. Can you ping the remote host from the local machine? Can you call wsadmin with the remote host as parameter - the port must be open on the firewall? Is the 8880 the correct port?
     
    In general, if you have ND installations it is advisable to use the DeploymentManager profile to connect to.
     
    regards,
    Ilko
  • Kishore Paidimarri
    Kishore Paidimarri
    2 Posts

    Re: Using Jenkins to build and deploy to WebSphere v8

    ‏2012-10-18T14:25:24Z  
    • i.iliev
    • ‏2012-10-18T08:06:28Z
     Hi,
     
    I'd first try to call the remote host directly from the local wsadmin to be sure that the network and firewall settings are set up correctly. I think that you are facing general network problem not related to the plugin itself. Can you ping the remote host from the local machine? Can you call wsadmin with the remote host as parameter - the port must be open on the firewall? Is the 8880 the correct port?
     
    In general, if you have ND installations it is advisable to use the DeploymentManager profile to connect to.
     
    regards,
    Ilko
     Thansk for the reply, I got it solved. I was using a wrong port. I called the remote host directly.
  • Priya_maheshwaram
    Priya_maheshwaram
    1 Post

    Re: Using Jenkins to build and deploy to WebSphere v8

    ‏2017-05-27T05:19:31Z  
     Thansk for the reply, I got it solved. I was using a wrong port. I called the remote host directly.

    Jenkins CI (the new name of Hudson) is a very popular continuous integration system. It can be used to monitor the execution of various jobs, including but not limited to compilation, packaging, testing and deploying of software. Also, it is very easy to configure and comes with a great set of (3rd party) plugins.
    I use Jenkins in a number of ways: to monitor and prepare & test new releases of Phing, monitor various internal processes (such as backup logs), and build and deploy various other projects that I work on.