Ask Your Question
0

Puppet open source and Jenkins Integration

asked 2017-05-02 06:07:09 -0500

Sourav gravatar image

Hi all,

First of all, I would like to confess that I am new to puppet.

I am looking to integrate our Jenkins build server with puppet scripts to promote continuous integration.

We have Jenkins running on a different server. It build the war packages and currently uses shell scripts to deploy. I am looking at bringing in puppet where after each successful Jenkins build, the puppet script will do the deployment on the DEV servers.

I am using Puppet open source and my Jenkins version is 1.609. I also looked at https://forge.puppet.com/rtyler/jenkins/ but could not follow much but it probably talks about setting up Jenkins as well which I don't want.

If anyone could point me to appropriate links or provide valuable tips or suggestions then that would be my great fortune.

Thanks, Sourav

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-05-02 16:09:15 -0500

DarylW gravatar image

You have two different problems... first problem is 'publish' the updated build artifact, the second problem is 'update' the deployed version of your application.

One solution is to create an rpm/deb file (using fpm) and deploy that to your own local package server as a part of your system build. If you don't care about scheduling the deployment, you could (providing that you use incremental versions) specify the configuration for the package as ensure => 'latest' and when you have an updated version in your repository, puppet will deploy it (on the next run).

If you want to manually orchestrate the rollout of new versions, that requires implementing a specific deployment strategy. You either kick off a deployment process as a part of your build, using something like ansible to manage enabling/disabling puppet agent runs to set up a canary deploy, or using the Puppet Enterprise Application Orchestration features. I believe that the author of mcollectiveis working on a set of plugins to add similar capabilities (app orchestration and playbooks) via the http://choria.io/ project.

edit flag offensive delete link more

Comments

My jenkins artifact resides on a different Unix machine and is accessible via the URL - http://car-build-001.com:8080/jenkins/job/Study/ws/dist/study.war The trouble is I am not sure how to fetch that war file via the URL.

Sourav gravatar imageSourav ( 2017-05-02 21:37:26 -0500 )edit

I have written the script - file { "/tmp/": source => "http://car-build-001.com:8080/jenkins/job/Study/ws/dist/study.war", } But I am getting the below error - Debug: HTTP HEAD request to http://car-build-001.com:8080/jenkins/job/Study/ws/dist/study.war returned 403 Forbidden

Sourav gravatar imageSourav ( 2017-05-02 21:39:10 -0500 )edit

Is there a plugin which would enable me to fetch that war package through the Jenkins URL? I think that error was returned because I did not supply the UID and password. Is there a way to achieve that?

Sourav gravatar imageSourav ( 2017-05-02 21:39:54 -0500 )edit

https://forge.puppet.com/puppet/archive should be the module that you would use to solve your problem.

DarylW gravatar imageDarylW ( 2017-05-03 12:11:24 -0500 )edit

The archive module probably does not support recursive download. My file name in the URL changes due to versioning so I won't be able to predict the filename beforehand. I thought recursive download would ensure that it downloads whatever file is present in the URL. And, thanks for your replies.

Sourav gravatar imageSourav ( 2017-05-03 20:34:37 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-05-02 06:07:09 -0500

Seen: 61 times

Last updated: May 02