Questions tagged [knife]

Knife is a command line tool used to interface with Chef.

Knife is a command-line tool that provides an interface between a local chef-repo and the server. It helps the administrator to manages

  • Nodes
  • Cookbooks and recipes
  • Roles
  • Stores of JSON data (data bags), including encrypted data
  • Environments
  • Cloud resources, including provisioning
  • The installation of the chef-client on management workstations
  • Searching of indexed data on the Chef server

The knife quick references can be found in this image.

85 questions
0
votes
2 answers

Can I uninstall a chef cookbook I installed with `knife cookbook site install`?

I have installed a chef cookbook with knife cookbook site install. But I don't want/need that one. Is it possible to uninstall a cookbook like this? To clean up my cookbooks directory?
Amandasaurus
  • 31,471
  • 65
  • 192
  • 253
0
votes
1 answer

Run community chef cookbook

I want to configure a mailserver on AWS with this cookbook: https://supermarket.chef.io/cookbooks/postfix-dovecot I have chef-client and chef-dk installed. I have downloaded the package and changed the cookbook attributes with my personal…
0
votes
0 answers

Chef: Cookbook website not found

I've been following several guides and read thru documentation trying to get knife-solo to provision a VM for me. Knife solo will work with Berkshelf (used to manage a library of chef cookbooks), so I'm using that as well. I can successfully prepare…
Brian
  • 240
  • 3
  • 16
0
votes
0 answers

Invalid Redirect error when trying to create user in Chef Server 12

When I try to create a user in Chef Enterprise Server, I am getting an error sudo chef-server-ctl user-create admin m n ******@i&&&.com chefrocks --filename admin.pem ERROR: Invalid Redirect: POST request was redirected from…
Nina
  • 1
  • 1
0
votes
1 answer

How can I get the correct client.pem file on a bootstrapped Windows Azure VM?

I'm really struggling to bootstrap a Windows VM in Azure using knife azure. I have my image and I've created the winrm firewall rule and configured winrm per the instructions. The machine spins up and the bootstrap connection starts, but the…
Chris
  • 86
  • 4
0
votes
1 answer

knife cookbook site downland with all dependencies

I'm just starting out with chef, and I'm following http://gettingstartedwithchef.com. One thing it suggests is using knife cookbook site download $COOKBOOK_NAME to get community cookbooks. However sometimes they come with dependencies, and I then…
Amandasaurus
  • 31,471
  • 65
  • 192
  • 253
0
votes
1 answer

Is there a way to update attributes files directly in chef server without uploading cookbook again

I am using hosted chef environment in windows.I need to update the attribute file during each chef client run. Currently ,I update it manually and upload the cookbook in chef server.Is there any way in which I can directly edit the attribute file in…
Nina
  • 1
  • 1
0
votes
1 answer

"unable to get local issuer certificate" in chef when using knife bootstrap with windows domain auth

I have a working installation of open source chef and am trying to add domain authentication to bootstrap Windows servers. I've created the HTTPS listener as described in the knife windows documentation. I used the domain certificate for this node…
0
votes
1 answer

Specifying SSH port with Chef, knife bootstrap

Per Chef's documentation, the -p (or --ssh-port) flag should allow me to specify an SSH port, however, the following: knife bootstrap host.com -x user -P password --ssh-port 5846 -N nodename --sudo returns: -bash: --ssh-port: command not…
tony_perkis666
  • 243
  • 2
  • 12
0
votes
0 answers

Open Source Chef Server can't upload cookbook

I just setup the open source chef server on an Ubuntu 12.04 EC2 instance, I've setup my webui and am able to get responses from my knife commands ie: knife node list, knife client list, knife user list, etc... I'm able to update roles, databags,…
veilig
  • 161
  • 6
0
votes
1 answer

Not able to assign elastic ip using knife

I want to create a EC2 instance using knife with an elastic ip assigned to it. Knife has the option --associate-eip but when I use this option it fails with error "ERROR: Elastic IP requested is not available." eventhough the EIP in AWS console…
pravi
  • 11
  • 1
0
votes
1 answer

how to list chef nodes that are not pingable - knife

I have bunch of ec2 nodes registered to chef server, more than half of them were terminated earlier. I still see them as nodes under knife node list. How do I delete them that are not pingable? My clients are not running chef-client periodically,…
Chucks
  • 521
  • 1
  • 7
  • 13
0
votes
1 answer

knife azure image list doesn't return User image

I'm trying to create and bootstrap a Windows VM in Azure using knife-azure. I initially tried using a Public Win 2008 r2 image, but quickly found out that winrm needs to be configured before this can work. So, I created a VM from that image,…
0
votes
1 answer

Chef's knife ec2 plugin create server inside VPC with public IP

So I'm using knife ec2 plugin to create a server, inside a VPC, and then provision it with chef-solo. Here is my basic command: knife ec2 server create -S private-key -I ami-1234 --flavor=m1.medium --subnet xyz The server is spun up properly,…
comjf
  • 156
  • 3
0
votes
1 answer

Installing nginx via chef Role is not applying my changes

I wrote a role to use the default nginx cookbook. The role is not applying any of my attributes. It keeps installing nginx 1.2.1. { "name": "nginx", "json_class": "Chef::Role", "chef_type": "role", "override_attributes": { "nginx": { …
Jumbalaya Wanton
  • 133
  • 1
  • 1
  • 5