Questions tagged [knife]

Knife is a powerful command-line interface (CLI) that comes with Chef.

Knife is used by administrators to interact with the Chef Server API and the local Chef repository. It provides the capability to manipulate nodes, cookbooks, roles, databags, environments, etc., and can also be used to provision cloud resources and to bootstrap systems.

521 questions
8
votes
2 answers

Chef Knife Commands 404 Not Found

I'm trying to use chef, I followed all the steps provided by them to "Install and configure Chef server using your hardware" I've run the following commands from the workstation knife SSL check Output Connecting to host my_server:443 …
André De La O Campos
  • 1,027
  • 1
  • 8
  • 19
8
votes
1 answer

Updating a run list in chef using knife

I have cookbook which contains a list of recipes. What is the command to add some specific recipes (not all) from cookbook using command line tool in chef knife? I know the command to add the whole cookbook to run list which is knife node run_list…
Anirudh Singh
  • 81
  • 1
  • 3
8
votes
2 answers

Allowing a Chef node to upload cookbooks

I'm trying to get our CI machine (running Teamcity) to upload and promote Chef cookbooks once it's finished all of the tests, to make it a proper part of our deployment pipeline. However, the client is not authorized to upload cookbooks, but I can't…
Kristofer Sommestad
  • 3,061
  • 27
  • 39
8
votes
1 answer

Best common workflow for Vagrant and Knife Solo (or any other non Vagrant Chef Env)?

After a while away from Chef I am currently getting back to it for all my server needs. I already used it a few years back for a while and got to like it, but had other people do the ops part lately. But I am still struggling to find a really good…
maxigs
  • 866
  • 6
  • 16
7
votes
1 answer

Chef cookbook version delete, or update specific version

I have long history of a cookbook that has a recipe of the app and is constantly modified. It got to the point where cookbook version is 226. I'm wondering how can upload files to specific cookbook version. I appreciate your help!
user3692800
  • 73
  • 1
  • 1
  • 3
7
votes
7 answers

Chef PEM file invalid or mis-named?

My sytem username is myuser but I'm trying to bootstrap machines with a chef-validator.pem and then a blah.pem file, and getting the following error message: ERROR: Failed to authenticate to https://mychef01 as blah with…
DirtyMikeAndTheBoys
  • 1,077
  • 3
  • 15
  • 29
7
votes
3 answers

knife configure -i fails

Running knife I keep on getting this error, google does not seem to help much WARNING: No knife configuration file found Where should I put the config file? [/home/ubuntu/.chef/knife.rb] ERROR: Ohai::Exceptions::DependencyNotFound: Can not find a…
daemonza
  • 527
  • 5
  • 16
7
votes
2 answers

Stuck trying to bootstrap Windows server using Chef

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…
7
votes
3 answers

knife: obtaining two (or more) attributes in one go

I can currently fetch one attribute of a node at a time via knife search node like this: knife search node "chef_environment:production AND name:i-7a421114" -a cloud.public_hostname # RESULT: i-7a421114: cloud.public_hostname:…
nonbeing
  • 6,907
  • 6
  • 36
  • 46
6
votes
3 answers

chef knife command to show all attributes

I am trying to display all attributes for all nodes using a single knife command. I would specifically like to see the attributes set at the normal level please help
Jeetendra Pujari
  • 1,286
  • 2
  • 17
  • 31
6
votes
1 answer

Turn off verbose_logging for single Chef recipes or resources

I have a recipe which copies a secret_key to my node. Actually the file content is logged into my shell. I want to turn that off for this single recipe, because I don't want the file content to be saved into my shell history. I know that it's…
coderuby
  • 1,188
  • 1
  • 11
  • 26
6
votes
1 answer

How to migrate from one chef-server to another chef-server

I have an existing chef-server setup with around 300 nodes registered to it. Now I would like to move to another chef-server with an updated version. However I am not sure of how we can migrate all the nodes and other data from older chef-server to…
user3540835
  • 453
  • 4
  • 15
6
votes
3 answers

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

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…
Balualways
  • 83
  • 1
  • 3
6
votes
2 answers

how to set password for user at run time in chef

How to set password for user creation in chef , at run time . instead of the encrypting mechanism using openssl and setting it in user resource in chef. instead of the following method: openssl passwd -1…
6
votes
4 answers

How do I install the knife-ec2 plugin?

OSX, 10.9.2: $ ruby -v ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13] $ knife -v Chef: 11.10.4 When I run: $ knife ec2 server list I get: FATAL: Cannot find sub command for: 'ec2 server list' The ec2 commands were moved to…
thisjustin
  • 280
  • 1
  • 3
  • 18
1
2
3
34 35