-
Notifications
You must be signed in to change notification settings - Fork 64
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
Properties for repositories don't work #85
Comments
Sorry, I think that particular feature was removed. The README may need updating. My current recommendation is to use this cookbook to set up your default server and write your own 'wrapper' cookbook that encapsulates some extra setup behavior. |
I am a bit new to chef, hence pardon my ignorance. Today I tried to create repo using 'resources' approach. I added following to recipe/app.rb nexus_hosted_repository node[:nexus][:name] do However, I keep getting error "ERROR: nexus_hosted_repository[local_snapshots](nexus::app line 111) had an error: TypeError: can't convert Array into String" I don't understand which variable it thinks is of type Array ??? |
Can you create a gist of the full stack trace? I'd like to see the compiled Chef resource as well if possible. |
-Here it is : [2014-06-06T20:43:51+00:00] INFO: template[/etc/nginx/sites-available/nexus_proxy.conf] created file /etc/nginx/sites-available/nexus_proxy.conf =============================================================================== Chef::Exceptions::ValidationFailedData Bag Items must contain a Hash or Mash! Cookbook Trace:/tmp/vagrant-chef-1/chef-solo-1/cookbooks/nexus/libraries/chef_nexus.rb:218:in Resource Declaration:In /tmp/vagrant-chef-1/chef-solo-1/cookbooks/my-nexus/recipes/default.rb13: nexus_hosted_repository node[:nexus][:name] do Compiled Resource:Declared in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/my-nexus/recipes/default.rb:13:in `from_file'nexus_hosted_repository("local_snapshots") do [2014-06-06T20:43:53+00:00] INFO: Running queued delayed notifications before re-raising exception
bash$ cat ~/.chef/data_bags/nexus/_wildcard.json |
Seems like there is something wrong with your data bag setup. My guess would be maybe you aren't passing an encrypted data bag secret in your run? |
You mean chef.encrypted_data_bag_secret_key_path = File.join(chef_dir, "encrypted_data_bag_secret") I am already doing that. Is there additional step required? |
I think I found the issue. Following line is causing the error as default chef environment is '_default' and we are trying to load file with that id /libraries/chef_nexus.rb:203 |
I have the same issue, and being a newbie myself, I'm not sure I understand what you did to fix the problem. Would you please help me understand how to fix the issue? |
I send a patch to fix the issue, which is now incorporated into the On Fri, Sep 26, 2014 at 2:59 PM, Antoine Toulme [email protected]
|
Thank you! |
Hmmm, I'm still getting the same problem. I will investigate further. |
you mean issue with the databag ? Are you running chef solo? If yes then you might want to have following config in
and make sure that directory pointed to |
I actually use Berkshelf+Vagrant. |
Hi,
I am trying to use properties to create hosted, proxy and group repos, but looks like these properties are completely ignored.
Here are the attributes that I added to attributes/default.rb
default[:nexus][:hosted_repositories] = [{name: "My Test Repo",publisher: true}]
default[:nexus][:proxy_repositories] = [{ name: "My Proxy Repo", subscriber: true, publisher: false, url: "http://some-other-nexus/repo" }]
default[:nexus][:group_repositories] = [ {name: "My Group Repo", add: ["My Hosted Repo"], remote: ["My Proxy Repo"] }]
am I missing something?
The text was updated successfully, but these errors were encountered: