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
13
votes
5 answers

Knife SSH doesn't find my nodes

knife ssh isn't finding my nodes. I know it should be able to because when I can search for them I find them # knife search node name:* 2 items found Node Name: web_01 ... Node Name: admin ... However, when I run knife ssh (I'll show it with…
Max
  • 439
  • 1
  • 4
  • 12
7
votes
3 answers

Chef bootstrap giving 401 unauthorized

I'm trying to bootstrap a new chef node by running: knife bootstrap -x lewis -N gitlab --sudo But I get the following output: [Mon, 03 Sep 2012 14:45:17 +0000] INFO: *** Chef 10.12.0 *** [Mon, 03 Sep 2012 14:45:17 +0000] INFO: Client key…
loddy1234
  • 71
  • 1
  • 1
  • 2
6
votes
2 answers

Chef: connection refused for cookbook upload

Be gentle, I'm new to chef, trying to get my environment set up and have some new recipes to upload to my new chef server. I'm able to do some commands, and I was able to knife bootstrap the new node, so I'm pretty sure my configuration is…
Eve Freeman
  • 228
  • 1
  • 2
  • 9
6
votes
5 answers

Bare minimal Chef provisioning and deployment?

I've read the documentation on Chef twice over. I still can't wrap my head around it's concept because they skip but fundamentals and jump to complex deployments with chef-server. Using chef-solo and possibly knife, is there a simple way to…
5
votes
3 answers

Chef - SSH without password

When executing: knife bootstrap {{IP}} --ssh-user centos --ssh-password '' \ --sudo --use-sudo-password --node-name node1 \ --run-list 'recipe[learn_chef_httpd]' I am getting the following error: ERROR: Net::SSH::AuthenticationFailed:…
James McDougall
  • 151
  • 1
  • 1
  • 9
5
votes
2 answers

Why can't “knife data bag from file” find existing json file on chef server?

Summary: I'm running into a problem with "knife data bag from file", where knife doesn't recognize the .json data bag file pulled down from a remote git repo. Background: I'm currently trying to transition from chef-solo use to chef server while…
ellisera
  • 53
  • 1
  • 3
5
votes
5 answers

Upload everything with Knife

Let's say you have a standard Chef repository with directories as follows: cookbooks data_bags environments roles Is there way to upload it all in one go? Otherwise you have to do this: knife cookbook upload -a knife data bag from file…
Steve Bennett
  • 5,539
  • 12
  • 45
  • 57
5
votes
3 answers

Deploy an AWS Auto Scaling groups using Chef Server

You can, for example, to deploy an an Auto Scaling groups consists of web severs, ELB and DB using AWS CloudFormation (with Chef server): http://aws.amazon.com/cloudformation/aws-cloudformation-templates/ But, you need to initially create a CF…
Ryan
  • 5,341
  • 21
  • 71
  • 87
4
votes
0 answers

Knife upload data bag fails with Chef::ChefFS::FileSystem::OperationNotAllowedError

I am currently doing the Chef tutorials provided at learn.chef.io. In the fourth workshop, one of the steps is to create some data bags and then upload them using: knife upload data-bags/vhosts The actual data bag objects are in .json files within…
4
votes
1 answer

How to create an EC2 instance with knife?

I was able to make knife access AWS by following: http://www.agileweboperations.com/amazon-ec2-instances-with-opscode-chef-using-knife Now, I get a knife command almost working: $ knife ec2 server create -r "role[base]" -I ami-c1aaabb5 -f t1.micro…
poseid
  • 529
  • 3
  • 10
  • 20
4
votes
4 answers

How to configure knife and EC2 to create a new instance from the command line?

I am playing with Amazon EC2 to create instance. I was reading here: here in the knife documenation for EC2, that I would need to set: # EC2: knife[:aws_access_key_id] = "Your AWS Access Key" knife[:aws_secret_access_key] = "Your AWS Secret…
poseid
  • 529
  • 3
  • 10
  • 20
3
votes
1 answer

How to manually set up a Chef node?

I have a Chef server running on Ubuntu 14.04 (see Note 1) and I can access the "Chef Manage" website by visiting the IP address (mychefserver.myorg.com) in my browser. I have a workstation running on Mac OS X El Capitan (see Note 2) and I can…
user22a6db72d7249
  • 503
  • 1
  • 7
  • 12
3
votes
4 answers

Knife can't ssh into newly instantiated EC2 server

I just set up a new Chef environment as I'm currently expanding my knowledge of Chef. I have a Key Pair set up on EC2, I have my Knife configuration set up. When I attempt to spawn a server, the node is created but Knife can't ssh into it. Here's my…
Ian Atkin
  • 183
  • 8
3
votes
1 answer

How do I get knife to bootstrap an EC2 instance in a public VPC?

I don't know much about routing and subnets and vpc's, I never had to use those with my old AWS account. In my new AWS account, I started a new Amazon Linux AMI instance (ami-043a5034). The security group it is attached to includes allowing port 22.…
Reese
  • 148
  • 10
3
votes
2 answers

chef upload cookbook failed with network error

I've created a chef server on a virtual machine (192.168.0.21). The server runs fine on https (this is the last version from the opscode site). knife user list (and the other list commands) run fine, returning the right results (all the…
donald
  • 233
  • 3
  • 10
1
2 3 4 5 6