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
28
votes
2 answers

Which special characters need escaping in a solr query?

Update: I think this question has to do with solr syntax in general, and not Chef in particular. So while I ran into this working with Chef, I presume that anyone working with Solr will also experience this... I'm working on an application that…
hairyhenderson
  • 577
  • 1
  • 7
  • 20
26
votes
2 answers

Getting a LAMP stack running on a Vagrant VM (under Windows 7 host), full instructions?

I have a Vagrant VM standard issue lucid32.box running. What would the complete instructions be to set up LAMP on this? I have looked at knife (part of chef) and attempted: vagrant@lucid32:~$ knife cookbook site install apache2 but got WARNING: No…
therobyouknow
  • 6,604
  • 13
  • 56
  • 73
20
votes
2 answers

Chef clients and validators

I'm trying to understand the concept of Chef clients and validators, and their relationship to the bootstrapping process. According to this article, the chef-client will use the /etc/chef/validation.pem private key to authenticate itself for the…
IAmYourFaja
  • 55,468
  • 181
  • 466
  • 756
20
votes
3 answers

Private key could not be loaded when I run "knife client list"

Configuration file written to /home/ubuntu/sudo /home/ubuntu/chef-repo/.chef/knife.rb ubuntu@mychefclient:~$ knife client list WARNING: No knife configuration file found ERROR: Your private key could not be loaded from /etc/chef/client.pem Check…
Suresh Sala
  • 425
  • 1
  • 6
  • 17
18
votes
9 answers

How to query cookbook versions on a node?

Usage case: The DevOps team launched a node sometime ago, and my team would like to know what's the version(s) of one/several cookbook(s) being used in the run_list. Our DevOps team is firefighting so we'd like to find a way to be…
digit plumber
  • 1,140
  • 2
  • 14
  • 27
17
votes
1 answer

Using knife ec2 plugin to create VM in VPC private subnet

Although I've written a fair amount of chef, I'm fairly new to both AWS/VPC and administrating network traffic (especially a bastion host). Using the knife ec2 plugin, I would like the capability to dynamically create and bootstrap a VM from my…
scubadev
  • 1,072
  • 9
  • 20
14
votes
3 answers

Why doesn't "knife upload roles" upload any roles?

I followed the OpsCode quickstart guide and things went fairly smoothly, but now I'm running into issues experimenting with roles. I have a "starter" role in my repo that was provided by OpsCode. When I follow the first official documentation I…
Josh Gagnon
  • 5,342
  • 3
  • 26
  • 36
12
votes
12 answers

running knife gives me double @ at the address part

I don't know what is wrong with my settting: siegfried@ubuntu:~/chef-repo$ knife ssh -a ipaddress 'name:chefnode' 'uptime' WARNING: Failed to connect to -- Net::SSH::AuthenticationFailed: Authentication failed for user…
user2124498
  • 121
  • 1
  • 5
11
votes
1 answer

Adding role to node does not work

I am following exact syntax but seeing some strange behavior while adding role to one of my nodes I am running following command which should ideally add role - webserver to do_node knife node run_list add do_node 'role[webserver]' But instead this…
Vishal Biyani
  • 4,297
  • 28
  • 55
11
votes
2 answers

Where is my Chef data bag item?

I was trying to create a Chef data bag from within the chef-repo directory using the command: knife data bag create users deployer And i get the response: Created data_bag[users] Created data_bag_item[deployer] But I am not able to locate the data…
Steve Loo
  • 276
  • 1
  • 5
  • 12
10
votes
3 answers

Resolving and downloading chef cookbook dependencies

Let's say I want to use a community cookbook (i.e. http://community.opscode.com/cookbooks/gerrit). So I will download it using 'knife cookbook site download ' and upload to my local chef server. I need to repeat this step for every direct and…
Henrique Gontijo
  • 1,052
  • 2
  • 15
  • 27
9
votes
3 answers

Knife bootstrap error - Successful authentication but not authorized for this action

ERROR: You authenticated successfully to https: as but you are not authorized for this action Response: missing create permission I'm running a pretty basic bootstrap command for a Windows AWS instance knife bootstrap…
TechDawg270
  • 725
  • 3
  • 9
  • 20
9
votes
1 answer

Knife SSH attribute not working

Im confused by the knife ssh command. According to the docs you can pass the -a flag if your node does not have a FQDN or ipaddress attribute set. Also, if you want to override those attributes. I'm running this to test knife ssh on a local VM: $…
glenbot
  • 685
  • 6
  • 7
9
votes
3 answers

Chef - create template with dynamic variable?

I'm having a bit of a challenge on a Chef recipe. I'm new to Chef, so please bear with me. Step 1: My chef recipe installs Ruby Passenger, then compiles the Passenger nginx module along with Nginx. # Install passenger and nginx module bash "Install…
Leonard Teo
  • 1,238
  • 1
  • 17
  • 28
9
votes
1 answer

Can I set fqdn for chef nodes?

I have several servers set up with a custom internal local domain - x.local. So I have servers s1.x.local, etc. My knife reports the fqdn as s1.domain.com. Can I change that without changing the names the servers think they have? Or do I need to…
nroose
  • 1,689
  • 2
  • 21
  • 28
1
2 3
34 35