Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[KITCHEN-77] Allow custom paths #161

Merged
merged 5 commits into from
Jul 17, 2013
Merged

Conversation

gondoi
Copy link
Contributor

@gondoi gondoi commented Jul 5, 2013

The merge code was using nil when attempting to override data_bags and roles path with custom paths. This will look at those values first and attempt to find and use them.

@fnichol
Copy link
Contributor

fnichol commented Jul 17, 2013

Nice addition, thank you!

fnichol added a commit that referenced this pull request Jul 17, 2013
[KITCHEN-77] Allow custom paths
@fnichol fnichol merged commit 3184f52 into test-kitchen:master Jul 17, 2013
@ekrupnik
Copy link

What about encrypted_data_bag_secret_key_path? Is that supported as well?

I would like to be able to do something like this in my suites configuration block:

suites: 
-name: default
     encrypted_data_bag_secret_key_path: "~/.chef/encrypted_data_bag_secret"
     data_bags_path: "../../../data_bags"
     roles_path: "../../../roles"
     run_list: ["recipe[foo]", "recipe[minitest-handler]"]
     attributes: {}

Also, what version of test-kitchen would I have to install to get the changes merged above? I am currently running test-kitchen version 1.0.0.alpha.7?

@fnichol
Copy link
Contributor

fnichol commented Jul 24, 2013

@ekrupnik you should be able to get all of this with the 1.0.0.beta.1 release using gem install test-kitchen -v=1.0.0.beta.1 or adding gem 'test-kitchen', '~> 1.0.0.beta.1' to your Gemfile if using Bundler.

@fnichol
Copy link
Contributor

fnichol commented Jul 24, 2013

@ekrupnik and yes, encrypted_data_bag_secret_key_path: /path/to/your/secret/file is supported as you used it above 😄

@ekrupnik
Copy link

@fnichol After running gem install test-kitchen -v=1.0.0.beta.1, I uninstalled the old alpha.7 version of test kitchen. Do I have to run a kitchen init again? I am getting an error below:

   [kitchen::driver::vagrant command] BEGIN (vagrant ssh-config)
   [kitchen::driver::vagrant command] END (0m2.61s)
   Vagrant instance <default-opscode-centos-63-chef11> created.
   Finished creating <default-opscode-centos-63-chef11> (1m32.13s).
   Converging <default-opscode-centos-63-chef11>
   ------Exception-------
   Class: Kitchen::ActionFailed
   Message: Failed to complete #converge action: [undefined method `install_omnibus' for #<Kitchen::Driver::Vagrant:0x000000025d8f70>]

@ekrupnik
Copy link

@fnichol My .kitchen.yml file is:

---
driver_plugin: vagrant
driver_config:
  require_chef_omnibus: true
platforms:
- name: opscode-centos-6.4-chef11
  driver_config:
    box: opscode-centos-6.4-chef11
    box_url: /boxes/CentOS-6.4-i386-v20130427.box
suites:
- name: default
  encrypted_data_bag_secret_key_path: "~/.chef/encrypted_data_bag_secret"
  data_bags_path: "../../data_bags"
  roles_path: "../../roles"
  run_list: ["recipe[base]", "recipe[minitest-handler]"]
  attributes: {}

@fnichol
Copy link
Contributor

fnichol commented Jul 24, 2013

@ekrupnik Ah, that's most likely due to an older kitchen-vagrant gem which got an update yesterday as well. Try installing the 0.11.0 version of kitchen-vagrant--that should clear it up. Sorry about that, I forgot that technically the last kitchen-vagrant version constraint would still allow itself to run against the beta.1 release.

@ekrupnik
Copy link

@fnichol Success! I really appreciate your help on this! Thank you!

@ekrupnik
Copy link

@fnichol In your testing, are you doing anything in cookbooks where you use tomcat cookbook to deploy apps? When running version test-kitchen 1.0.0.beta.1 and kitchen-vagrant 0.11.0, I am getting errors which older version (1.0.0.alpha.7 / 0.10.0) did not give me. Errors are with permissions:

   ================================================================================
       Error executing action `deploy` on resource 'tomcat_artifact[app-name]'
       ================================================================================


       Mixlib::ShellOut::ShellCommandFailed
       ------------------------------------
       execute[copy artifact] (/tmp/kitchen-chef-solo/cookbooks/tomcat/providers/artifact.rb line 122) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
       ---- Begin output of cp /tmp/kitchen-chef-solo/cache/artifact_deploys/app-name/1.0.54/app-name-1.0.54.war /r01/apache-tomcat/APP/application/app-name/releases/1.0.54 ; chmod 700 /r01/apache-tomcat/APP/application/app-name/releases/1.0.54/*.war ----
       STDOUT: 
       STDERR: cp: cannot stat `/tmp/kitchen-chef-solo/cache/artifact_deploys/app-name/1.0.54/app-name-1.0.54.war': Permission denied
       chmod: cannot access `/r01/apache-tomcat/APP/application/app-name/releases/1.0.54/*.war': No such file or directory
       ---- End output of cp /tmp/kitchen-chef-solo/cache/artifact_deploys/app-name/1.0.54/app-name-1.0.54.war /r01/apache-tomcat/APP/application/app-name/releases/1.0.54 ; chmod 700 /r01/apache-tomcat/APP/application/app-name/releases/1.0.54/*.war ----
       Ran cp /tmp/kitchen-chef-solo/cache/artifact_deploys/app-name/1.0.54/app-name-1.0.54.war /r01/apache-tomcat/APP/application/app-name/releases/1.0.54 ; chmod 700 /r01/apache-tomcat/APP/application/app-name/releases/1.0.54/*.war returned 1

@gondoi gondoi deleted the kitchen_77 branch August 15, 2013 17:35
BrentOnRails pushed a commit to BrentOnRails/test-kitchen that referenced this pull request Jul 17, 2017
Fix 'invalid char in json text' error
@test-kitchen test-kitchen locked and limited conversation to collaborators Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants