Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/melezhik/chef-plugin
This is jenkins plugin to run chef-client on remote host
https://github.com/melezhik/chef-plugin
automation chef chef-client configuration-management devops-tools jenkins linux ruby
Last synced: about 2 months ago
JSON representation
This is jenkins plugin to run chef-client on remote host
- Host: GitHub
- URL: https://github.com/melezhik/chef-plugin
- Owner: melezhik
- Created: 2013-02-13T08:25:36.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2018-10-30T18:15:41.000Z (about 6 years ago)
- Last Synced: 2024-10-11T20:55:24.991Z (2 months ago)
- Topics: automation, chef, chef-client, configuration-management, devops-tools, jenkins, linux, ruby
- Language: Ruby
- Homepage:
- Size: 1.24 MB
- Stars: 37
- Watchers: 7
- Forks: 13
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
Awesome Lists containing this project
README
# SYNOPSIS
This is jenkins plugin to run chef-client on remote host.
Plugin starts ssh session on remote host using public key authentication and run chef-client there.# Plugin general settings
- host - Specifies remote host to run chef client on.
- login - Specifies the user to log in as on the remote machine.# Plugin advanced settings
- ssh\_indetity\_file - Specifies a path to file from which the identity (private key) for public key authentication is read.
- chef\_client\_config - Specifies a path to file ( on remote host ) from which chef client configuration is read, default values is /etc/chef/client.rb
- chef\_json\_template - Specifies chef attributes and run-list ( see chef documentation ).
- dry\_run - Use to run chef client in why-run mode, which is a type of chef-client run that does everything except modify the system, default value is false.# User interface
![layout](https://raw.github.com/melezhik/chef-plugin/master/images/layout.png "layout")
# Chef attributes and run list settings
- Use chef\_json\_template to define chef attributes and run list.
If you define one, plugin will parse chef_json_template data and stored result in file which in turn will passed as -j parameter into chef-client run.- Please check out [chef wiki](http://wiki.opscode.com/display/chef/Setting+the+run_list+in+JSON+during+run+time) to learn more about chef json files.
- Chef\_json\_template confirms [ERB](http://www.stuartellis.eu/articles/erb/) template syntax. Here is example of chef\_json\_template:
<%
runlist = %w{apache::server mysql}
chef_json = {
:run_list => runlist.map { |r| "recipe[#{r}]" } ,
:apache => {
:version => 80
}
}
%>
<%= chef_json.to_json.to_s %>
# Prerequisites
- ruby-runtime jenkins plugin
- ssh client# Environment variables
You can set some environment variables qith "Jenkins/Configuration/Global properties/Environment variables" . Here the list of varibales to be processed in the plugin:
- LC\_ALL # sets encoding to avoid chef log issues
# Latest stable version[0.1.7](http://maven.jenkins-ci.org/content/repositories/releases/org/jenkins-ci/ruby-plugins/chef/0.1.7)