Questions tagged [chefdk]

Chef Development Kit (ChefDK) brings some essential tools for developing and testing Chef cookbooks.

Official page and resources: http://www.getchef.com/downloads/chef-dk/

GitHub page: https://github.com/opscode/chef-dk

52 questions
1
vote
1 answer

can a node be a part of multiple chef environments

Is it possible for a server to be a part of multiple environments in the same organization? If so, how do we add the node to a new environment without overriding the existing one.
1
vote
1 answer

chef-client showing error message

I've an environment where the chef version is: Chef Development Kit Version: 0.18.30 When I run the chef-client command, I get the following error: root@localhost product]# chef-client [2017-11-06T15:38:25-05:00] WARN:…
John Doe
  • 143
  • 2
  • 13
1
vote
1 answer

Issue with knife job

I am trying to run the push job in chef, But I am getting the following error. Tried to install required gems, But still error is same. [root@chefserver chef-repo]# knife node status devapp1 available [root@chefserver chef-repo]# knife job start…
Sriharsha Kalluru
  • 1,743
  • 3
  • 21
  • 27
1
vote
2 answers

What is the difference between quotation marks and the colon in chef attributes?

I am currently creating a wrapper cookbook, while trying to restrict myself to the correct formatting by using Rubocop and Foodcritic. However, I constantly get the following errors: Use strings in preference to symbols to access node…
ih16
  • 35
  • 1
  • 7
1
vote
1 answer

kitchen.yml attributes not override default values - Chef 12.12 - Kitchen 1.10

I have a simple attributes file: attributes/default.rb. default['simpleattr'] = 'file value' And inside kitchen.yml, I do suites: - name: default run_list: - recipe[simple::default] attributes: simpleattr: 'value from…
OBender
  • 2,492
  • 2
  • 20
  • 33
1
vote
1 answer

Chef shell-init on windows messing up git bash?

I've installed ChefDK on my machine (windows 7). I needed to use the embedded ruby as my system ruby, so I came across this command: echo 'eval "$(chef shell-init bash)"' >> ~/.bash_profile I ran this. It seems to have updated my system ruby to…
user1097108
  • 345
  • 1
  • 4
  • 15
1
vote
1 answer

Berkshelf having issues uploading cookbooks to Chef-Server

I'm trying to use Berkshelf to upload a cookbook with a few dependencies to my Chef-Server. When I use chef exec berks upload I am presented with a bunch of different errors. My current setup is using the latest, or close to, ChefDK versions using a…
FilBot3
  • 3,460
  • 6
  • 33
  • 55
1
vote
1 answer

Test Kitchen, store credentials

With Test Kitchen, in the yaml configs... where is the best place to store globally used attributes that apply to multiple platforms and multiple suites? To use my .kitchen.yml as an example: --- provisioner: name: chef_solo platforms: - name:…
danieljimenez
  • 1,390
  • 4
  • 17
  • 26
1
vote
1 answer

Class: Kitchen::ActionFailed - Test Kitchen + Docker + Remote API

I am trying to create a docker instance on a remote server using test kitchen (That came with ChefDK and with docker-api driver installed) on my Mac (OS X Mavericks) and I seem to failing almost at the last step: stardust:test_kitchen rilindo$…
Rilindo
  • 1,756
  • 1
  • 11
  • 20
1
vote
3 answers

Installing Gem into ChefDK via Chef

I want to install a Gem (kitchen-docker) into ChefDK's Gem path. What is the best way to install this Gem via Chef itself? Is there a more clever solution than the following? execute "chef gem install kitchen-docker" do user "jenkins" not_if…
StephenKing
  • 36,187
  • 11
  • 83
  • 112
0
votes
1 answer

Problem while bootstraping ubuntu chef node from chefDK on windows workstation

I'm new to Chef and I have stuck in a problem. I'm using AWS Chef Automate Server and EC2 ubuntu instance as Chef Node. My workstation is local machine where I have installed ChefDK on windows. I have successfully configured the Chef server with…
0
votes
1 answer

After updating ChefDK, I get the error "undefined local variable or method `credentials_file'" in Test Kitchen or an error in credentials.rb in knife

This issue was discovered after upgrading from ChefDK 3.2.30 to 4.2.0, and everything worked fine before the upgrade (Including these two commands). The full error from "knife node…
Taegost
  • 1,208
  • 1
  • 17
  • 26
0
votes
1 answer

Chef Berks Install (Berkshelf) Timesout contacting Artifactory repository (Faraday Timeout / Actor Crashed)

Artifactory 5.8.4 Professional Chef Development Kit Version: 1.1.16 chef-client version: 12.17.44 delivery version: master (83358fb62c0f711c70ad5a81030a6cae4017f103) berks version: 5.2.0 kitchen version: 1.14.2 In Artifactory, I have this repository…
AKS
  • 16,482
  • 43
  • 166
  • 258
0
votes
1 answer

kitchen create error: Failed to complete #create action: [work_image build failed: The command '/bin/sh -c yum install -y hostname iproute less lsof

I am getting an error while running $ kitchen create Does anyone know what am I doing wrong? INFO -- Kitchen: -----> Starting Kitchen (v1.21.2) INFO -- Kitchen: -----> Creating ... ERROR -- Kitchen: ------Exception------- ERROR…
user674669
  • 10,681
  • 15
  • 72
  • 105
0
votes
1 answer

Unable to configure non-latest chef-dk install

Our organization has not upgraded to Chef 13 or 14, so we have to pin all our cookbooks to version 12. This means pinning to chef-dk version 1.6.11. I'm spinning a centos7 vm in Vagrant with a cookbook and have set the version, but it will only…
Max Cascone
  • 648
  • 9
  • 25