Malki
Malki

Reputation: 2385

Make Jenkins Job run a Puppet manifest

I am trying to setup CI for my project. I want to achieve the following setup:

  1. Programmer pushed code to GIT
  2. Jenkins pulls the latest code
    • Uses Maven to build and run unit-tests
    • Uses Puppet to create a VM on OpenStack
    • Deploys the EAR that Maven created to the VM
    • Runs more advanced tests
    • Emails the report with test results to me
    • Uses Puppet to kill the VM

So essentially I want Jenkins to orchestrate the whole process.

My current problem is that I can't seem to find how to make Jenkins talk to Puppet.

There doesn't seem to be a "Puppet Plugin" for Jenkins (at least not on the official website). And google wasn't much help...

How can I configure the Jenkins Job to tell Puppet to run a specific manifest?

Thanks

Upvotes: 3

Views: 1598

Answers (1)

Bastian Spanneberg
Bastian Spanneberg

Reputation: 1205

As also proposed by Vishal, I do similar stuff by running shell and remote shell executions in one job, triggering the Puppet run on the remote machine (and moving the manifests and modules there before). Downside in my case is that the node doing the job has to have the key of the remote machine to be able to access it.

In your case however, you might want to have a look at the Vagrant-OpenStack-Plugin. This would do a lot of the work you intend to do, and you should be able to simply run vagrant up in a shell execution, which would bring up and provision your OpenStack VM for you.

Disclaimer: haven't tried that particular plugin, but I assume it works similar to the aws-plugin.

Upvotes: 1

Related Questions