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
0
votes
1 answer

Include part of the recipe according to the role

I'm using nginx_vhost recipe to apply it to two different roles, let's say frontend and web. nginx_vhost recipe has following code on its template for vhost.conf file: <% if @upstream %> upstream <%= @name %> { <% @servers.each do |server| -%> …
boris quiroz
  • 373
  • 5
  • 11
0
votes
2 answers

Opscode Chef Knife

After about 6 hours of working on this - no luck. I have had no luck in doing even one of the most basic things with Opscode Chef. I need to use knife in my terminal and the command doesn't exist. I am not sure how to install it and there is not one…
Ezos
  • 107
  • 1
  • 12
0
votes
2 answers

How to add dynamic parameters to the Chef's node?

I have an infrastructure under Chef's control with a lot of servers deploys each day. I need to add some dynamic data to each node based on user info, like: user_data: first_name: aaa last_name: bbb department: ccc knife node edit doesn't…
lifecoder
  • 1,424
  • 1
  • 14
  • 29
0
votes
1 answer

Use knife to bootstrap recipe on server and forward version parameter

I have a very short recipe that looks something like this: bash "install app" do cwd "/var/lib/app" code <<-EOH npm set registry http://npm.app.com/ npm install app EOH end And I run the following knife command: knife bootstrap…
Or Weinberger
  • 7,332
  • 23
  • 71
  • 116
0
votes
3 answers

gssapi requires Ruby version >= 1.9.1. on gem install

I'm trying to install knife-cloudstack plugin using gem install on Ubuntu 12.04 with chef-client configured and got error as said in title. >gem install knife-cloudstack ERROR: Error installing knife-cloudstack: gssapi requires Ruby version…
HRM
  • 2,097
  • 6
  • 23
  • 37
0
votes
1 answer

knife/chef - how to capture command line argument and pass to a chef recipe

Is there a way to capture a command line argument and pass to a chef recipe? What I'm trying to do is to automate populating hostname to various places. One being in /etc/sysconfig/network DOMAIN field. So if the command to start up a server is…
0
votes
1 answer

Why Chef do not find my files?

I'm developing a Ganglia recipe in Chef. Is very simple, I build four different configurations files, I already tried to use as template, but to keep it simple, I build these configuration files. This is my recipe: return if…
Valter Silva
  • 16,446
  • 52
  • 137
  • 218
0
votes
1 answer

How to use knife-essentials to backup Chef 11

I'm trying to use knife-essentials to backup all objects in a Chef 11 server to json files. I created a directory "backup" containing .chef/download.rb transfer_repo = File.expand_path('..', File.dirname(__FILE__)) chef_server_url…
JamesW
  • 9
  • 3
0
votes
2 answers

With Chef, how do I output the knife.rb settings its using?

I'm using Chef knife and getting ERROR: Could not find cookbook xyz in your cookbook path, skipping it ERROR: Failed to upload 1 cookbook. Looking at the knife.rb for the project and it looks like the cookbook path is right. How do I output what…
jaxzin
  • 13,471
  • 4
  • 19
  • 19
0
votes
1 answer

knife ec2 create server logging

I'm using knife ec2 create server with a run list to create a server and also bootstrap it for initial use. During my bootstrapping I run a bash command using here docs. This base script has echos in it to report on status, which is nice for…
Douglas Ferguson
  • 1,242
  • 2
  • 14
  • 25
0
votes
2 answers

SSLError while trying to create EC2 server with knife

I'm trying to create and provision a new EC2 instance with knife, but keep running into an SSL error: $bundle exec knife ec2 server create ERROR: Excon::Errors::SocketError: hostname "ec2.us-east-1b.amazonaws.com" does not match the server…
AndrewF
  • 6,852
  • 7
  • 29
  • 27
0
votes
2 answers

Issue with Chef / knife bootstrapping a Vagrant VM?

I am trying to bootstrap a vagrant vm and install chef using the following command knife bootstrap localhost -p 2222 -x vagrant -P vagrant --sudo but nothing is happening - no error messages as seen in this paste bin - http://pastebin.com/06pyGAHZ…
Prabhu M
  • 483
  • 2
  • 7
  • 9
0
votes
1 answer

Running knife commands from Capistrano task

I'm attempting to configure the knife commandline tool via a capistrano task, and running into an issue when it hits the following line system "knife configure --yes --defaults -s ... -c ... -u ... -r ..." it says this Could not find net-ssh-2.6.5…
jondavidjohn
  • 61,812
  • 21
  • 118
  • 158
-1
votes
1 answer

Which is best for remote chef-client - knife ssh or regular ssh?

Which is best to use for running chef-client remotely? The provided knife ssh command or regular ssh to machine and execute chef-client manually by switching to root. I understand knife ssh talks directly to chef and should be used but is it only…
-1
votes
2 answers

'knife bootstrap' create client.rb in different location

I'm using knife bootstrap from my workstation to configure a node using cookbooks. In the node, by default client.rb file created in /etc/chef/. If i run chef-client manually, i can use --config option to load client.rb from different location. I…
1 2 3
34
35