How to configure the jenkins in chef

Hi

I have jenkins for building my project from github. I have chef to automate my node.

Here I need to achieve to get the package from jenkins and through chef it gets installed in configure node automatically .

Can anyone help me out on this.

Regards,
Ramadurai.

My experience with automating CI farms has been considerably harder than
dedicated application or data base servers. I have automated both jenkins &
GoCD with Chef in past. Now I use GoCD exclusively. My advice will be:

  • Start with the community jenkins cookbook, see how far those take you.
  • There are bits and pieces of jenkins that are in xml and changes with
    jenkins server’s lifespan (i.e. jenkins itself writes xml bits on those
    files), but the initial bits has to be seeded for automation. I had written
    xml_file cookbook to deal with those scenarios (some parts are managed by
    chef)
  • Do not automate the bits that changes frequently (certain plugins), or
    substantial information is not available. Automating those tend to hose the
    system or gives non-idempotent resources.

hth
ranjib

[1]https://github.com/GoatOS/xml_file

My understanding is that your problem is in getting your build artifacts out of the jenkins build and available to chef.

Without knowing more about your infrastructure I'd recommend that jenkins place the build artifact into a location that is accessible via http that the chef-client can check during a node run. Something that allows you to use a remote_file resource in chef to pull down the build artifact and then do a notify to the recipe that installs the artifact.

I agree with sclarson, it sound to me like you need an artifact store.
Nexus is pretty good for a free tool, and
https://github.com/RiotGamesCookbooks/artifact-cookbook is pretty great for
retrieving artifacts. Artifactory also has a free offering. Jenkins would
build code, and deploy it to Nexus or Artifactory. You can use the
artifact cookbook for retrieving those artifacts and deploying.

That’s the best free tool I’m aware of as well. Nexus will give you support for plain blobs, nuget, maven, and npm.

Bonus that you can then use those tools as a way to script your installer and use the chef package resource to install them if I remember correctly.

Yeah, I have used both Nexus, and Artifactory, to store rpm/deb’s,
retrieved via artifact cookbook, and installed to my system via dpkg/yum as
well.