[chef] Using Chef::REST library , how to create a client and bootstrap with chefserver


Chronological Thread 
  • From: < >
  • To:
  • Subject: [chef] Using Chef::REST library , how to create a client and bootstrap with chefserver
  • Date: Fri, 1 Mar 2013 05:53:18 -0800 (PST)


hi,

Using  Chef::REST library ,i have to create a client in any provider ,register
with my  chef server(bootstrap) and run any cookbook in that client  it is
possible means please provide any sample code ,idea or reference

like this i need 

#!/usr/bin/env ruby
require 'rubygems'
require 'chef/config'
require 'chef/log'
require 'chef/rest'
require 'chef/node'
require 'chef/application/client'

chef_server_url="https://api.opscode.com/organizations/enablers";
client_name = "my-username"
signing_key_filename="/root/.chef/my-username.pem"
client_name = "ganesan123"
signing_key_filename="D:/Chef - Orchestration/chef/chefuser2/ganesan123.pem"
 rest = Chef::REST.new(chef_server_url, client_name, signing_key_filename)
puts rest.get_rest("/clients")


Thanks and Regards,
Ganesan.A


  • [chef] Using Chef::REST library , how to create a client and bootstrap with chefserver, ganesan15785, 03/01/2013

Archive powered by MHonArc 2.6.16.

§