knife

Reporting and knife runs command for opensource chef

荒凉一梦 提交于 2019-12-25 02:57:46
问题 Chef reporting doc says its for Enterprise chef. For opensource chef I am able to get JSON reports which is getting stored in same directory for all nodes. Is there any better way of reporting fof opensource chef? 回答1: We are using a ReportHandler to report statistics into our Zabbix monitoring at the end of chef-client runs: here. You can adopt this example to your needs. 来源: https://stackoverflow.com/questions/24630230/reporting-and-knife-runs-command-for-opensource-chef

Chef node configuration issue with knife bootstrap- can't authenticate with server

大城市里の小女人 提交于 2019-12-22 05:22:29
问题 I am trying to setup a chef client node using knife bootstrap: knife bootstrap nodename -x user -P passwd --sudo Getting the following error messages:: Chef encountered an error attempting to create the client "nodename .url.com" Authentication Error - Failed to authenticate to the chef server (http 401). Server Response: Invalid signature for user or client 'chef-validator'* My config settings looks good, I have tried restarting all the chef-server services and tried configuring the chef

WARNING: Failed to connect to ip-xxx-xx-xx-xx

自古美人都是妖i 提交于 2019-12-14 02:43:57
问题 Error: FATAL: # nodes found, but does not have the required attribute to establish the connection. Try setting another attribute to open the connection using --attribute. The issue I'm having started with attempting to run a command using the chef knife command. The intent is to have the command run on any server part of the role as you'll see. So, when I run the command I get the following I get the following knife ssh "role:servers" "touch /home/ubuntu/file.txt" WARNING: Failed to connect

while bootstrapping a recipe on windows machine ..facing issues like ConnectTimeoutError: execution expired

时光总嘲笑我的痴心妄想 提交于 2019-12-12 18:29:24
问题 When I am bootstrapping a recipe on windows machine. I am facing an error which is shown below: $ knife bootstrap windows winrm IP-address -x Username -P password -r recipe[notepad] ERROR: HTTPClient::ConnectTimeoutError: execution expired I have installed knife windows pluggin and also configured the winrm but after doing this also .. I am facing this issue. I could not resolve this. Has anyone come across this problem and found a solution? 回答1: actually .. i got the solution for the issue

Stuck trying to bootstrap Windows server using Chef

痞子三分冷 提交于 2019-12-12 07:58:00
问题 I am a mac girl, working on connecting with knife-windows trough Opscode's managed Chef to my Rackspace Windows servers. (I know, it sounds exotic, but these Windows servers are a customer requirment). I tried to Chef for a spin but I am stuck in trying to bootstrap the Windows 2008 Server on Rackspace with the knife-windows command. I am working on OSX, using rvm, ruby 2.1.0 and a local gemset with chef + knife-windows. I was trying to follow the steps from: https://github.com/opscode/knife

Trying to install knife-ec2

允我心安 提交于 2019-12-12 06:40:12
问题 my chef-client version is 11.10.0 trying to install knife-ec2 gem install knife-ec2 ERROR: While executing gem ... (Errno::EACCES) Permission denied - /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/nokogiri-1.6.1/.autotest i tried with other command: sudo /opt/chef/embedded/bin/gem install knife-ec2 Building native extensions. This could take a while... ERROR: Error installing knife-ec2: ERROR: Failed to build gem native extension. /opt/chef/embedded/bin/ruby extconf.rb Extracting libxml2-2.8.0

Object unchanged when running knife client edit

匆匆过客 提交于 2019-12-12 03:22:20
问题 I'm running knife client edit command to edit a node in Chef to set admin permissions. I would like to do this programmatically so my intention is to add this command to a shell script if I can make it work. The previous state of the node is ( UPDATE ): $ knife client show -Fj my_node { "name": "my_node", "public_key": "-----BEGIN PUBLIC KEY-----\n...key...\n-----END PUBLIC KEY-----\n", "validator": false, "admin": false, "json_class": "Chef::ApiClient", "chef_type": "client" } When running

RegexpError in chef when running knife bootstrap

纵然是瞬间 提交于 2019-12-12 02:45:30
问题 I am going through the "Learn to install and manage your own Chef server / Manage a node on your Chef server" tutorial over at learn.chef.io but have run into an issue that Google apparently doesn't know about. I'm trying to run everything locally, so have the following set up: Chef Workstation - my Fedora 20 laptop Chef Server - a VM running CentOS 7 minimal Chef Node - another VM running CentOS 7 minimal I've set up the Workstation and Server, users and organisations, extracted the Starter

How apply chef cookbook/recipes to multiple nodes?

a 夏天 提交于 2019-12-11 23:15:55
问题 Here is example how apply cookbook to node with Chef. But nothing told about multiple nodes. For example I have a akka application, which is passed akka.cluster.seed-nodes parameters. So the algorithm should be: Define array "IP" with ip addresses like [192.168.1.1], [192.168.1.2], [192.168.1.3] Define empty array "bootsrapped" with bootsrapped ip addresses starting iteration over "IP" invoke knife bootstrap with current ip and "pass" -Dakka.cluster.seed-nodes with "bootsrapped" values store

How to specify a data bag path in knife.rb configuration file?

心不动则不痛 提交于 2019-12-11 08:44:22
问题 I have data bags specific to different clients like the following: /data_bags/client1/users/.... /data_bags/client1/projects/.... /data_bags/client2/users/... /data_bags/client2/projects/... So, client1 and client2 have a different set of projects and users, but me as a developer it's better if all the configurations are under folder. I work on them, then when they are production ready, I want to push them to chef server to provision the nodes. But knife.rb expects all the data bags to be