knife

Chef Knife Commands 404 Not Found

别等时光非礼了梦想. 提交于 2019-12-04 03:13:04
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 Successfully verified certificates from `my_server' However when I use the following command knife client list Output: ERROR: The object you are looking for could not be found What is going on? I found what is the root cause of my error, the chef_server_url must has the organization's name at the end of the URL. chef_server_url ' https://my_server:443

knife bootstrap windows winrm from Mac OS X workstation fails

本秂侑毒 提交于 2019-12-03 21:06:13
Running the command knife bootstrap windows winrm ec2box.amazonaws.com -r 'role[web]' -x Administrator -P 'mypassword' from my Mac OS X workstation produces the output below. Running it from a Windows workstation, the command successfully runs. Is there an extra step I need to take to get my Mac OS X workstation to communicate via WinRM correctly? I'm using this on Amazon's Windows Server 2012 AMI. It printed #39 everywhere on my terminal, not an artifact of Stack Overflow. WARNING: Could not load IOV methods. Check your GSSAPI C library for an update WARNING: Could not load AEAD methods.

Stuck trying to bootstrap Windows server using Chef

巧了我就是萌 提交于 2019-12-03 13:50:58
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 trying to bootstrap the Windows 2008 Server on Rackspace with the knife-windows command. I am working on OSX, using rvm, ruby 2.1.0 and a local gemset with chef + knife-windows. I was trying to follow the steps from: https://github.com/opscode/knife-windows I have configured the winrm service. I have set up a rule to allow inbound connections in my

How to query cookbook versions on a node?

橙三吉。 提交于 2019-12-03 10:18:44
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 self-sufficient. Commands Tried: knife cookbook show COOKBOOK give all possible versions, but does not specify which one being used. knife node show NODE shows all cookbooks, but there's no version info attached. Question: Is there a command (something similar to knife search , ohai ) to query the chef-server for the versions deployed on the node? Tejay Cardon If you

Using knife ec2 plugin to create VM in VPC private subnet

爱⌒轻易说出口 提交于 2019-12-03 09:41:26
问题 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 developer workstation. The VM should be able to exist in either a public or private subnet of my VPC. I would like to do all of this without use of an elastic IP. I would also like for my bastion host to be hands off (i.e. I would like to avoid having

Using knife ec2 plugin to create VM in VPC private subnet

ぃ、小莉子 提交于 2019-12-03 00:25:16
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 developer workstation. The VM should be able to exist in either a public or private subnet of my VPC. I would like to do all of this without use of an elastic IP. I would also like for my bastion host to be hands off (i.e. I would like to avoid having to create explicit per-VM listening tunnels on my bastion host) I have successfully used the knife ec2

Chef clients and validators

不羁的心 提交于 2019-12-02 18:23:25
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 initial run, because /etc/chef/client.pem doesn't exist yet. This initial run will, somehow, produce that client.pem , which is then used for all subsequent client requests. My questions: What process places the /etc/chef/validation.pem file on the chef-client node in the first place? The bootstrap? Can someone provide an example of a knife command

Encrypt data bag from inside of ruby without relying on knife

落花浮王杯 提交于 2019-12-01 23:02:11
At the moment to encrypt a data bag, I have to do : system "knife data bag from file TemporaryEncrypting \"#{enc_file_path}\" --secret-file #{Secret_Key_Path}" and that doesn't work because knife can't find a config file and I can't seem to get it read the one in C:\chef . How do I do this from within ruby? I worked out how to encrypt inside of ruby, just use this code: require 'chef/knife' #require 'chef/encrypted_data_bag_item' #you need to do this in chef version 12, they've moved it out of knife and into it's own section require 'json' secret = Chef::EncryptedDataBagItem.load_secret Secret

How can I edit a chef attribute of an ec2 node using knife

旧城冷巷雨未停 提交于 2019-11-30 14:37:54
I want to edit ec2 node's node_data using a knife node command. I can manually do it by using below command. knife node edit NODE_NAME It will generate a json which I need to edit. "name": "NODE-1", 3 "chef_environment": "test", 4 "normal": { 5 "node_data": { 6 "version": "23690ecc9c572e47db242bfad1296388f91da1e9", 7 "depot_path": "https://s3.amazonaws.com/builds/", 8 "source_repo": "softwares/" 9 }, 10 "tags": [ 11 12 ] 13 }, 14 "run_list": [ 15 "role[my-role]" 16 ] 17 } I want to edit node_data in that json. If I had to edit run_list the there is a command for that knife node run_list add

To setup chef workstation

♀尐吖头ヾ 提交于 2019-11-28 14:44:40
Trying to setup chef workstation knife configure -i previous it worked but now its not working i am unable to create knife.rb it says the following error: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.10.0/lib/chef/config_fetcher.rb:53:in `realpath': Not a directory - /home/ubuntu/.chef/knife.rb (Errno::ENOTDIR) from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.10.0/lib/chef/config_fetcher.rb:53:in `realpath' from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.10.0/lib/chef/config_fetcher.rb:53:in `config_missing?' from /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.10.0