[chef] Re: Re: Re: apt repository cookbook


Chronological Thread 
  • From: Daniel Condomitti < >
  • To:
  • Subject: [chef] Re: Re: Re: apt repository cookbook
  • Date: Thu, 19 Feb 2015 14:54:59 -0500

There’s no official process for vetting cookbooks or publishing that they have been through any kind of audit process. It’s just good practice in general to audit anything you’re using in your infrastructure; just like you’d do with an internal review of a codebase within your organization. 

Has anything like that been proposed? Obviously there’s no way to warranty it saying that a specific cookbook isn’t going to break something in your infrastructure or work properly. Some sort of review process to ensure that a cookbook isn’t doing anything malicious or pulling in un-signed dependencies would probably be really helpful to the community. 

On Thursday, February 19, 2015 at 2:48 PM, Douglas Garstang wrote:

Thanks AJ. I'll check that out, but ...

"I wouldn't really recommend using any community cookbooks (not even
mine), especially if you don't know what the code is doing. You are
effectively backdoor/root shelling all of your machines with
ignorance.".

... your pretty much poo-pooing the entire chef community cookbook approach there aren't you?

Doug.

On Thu, Feb 19, 2015 at 11:42 AM, AJ Christensen < " target="_blank"> > wrote:
No need to use a cookbook. Try aptly, it's stand-alone
http://www.aptly.info/ -- packagecloud.io is similar, but a hosted
SaaS.

You might be able to use the LWRPs from that Heavy Water repository
cookbook without using the recipes.

It looks like the resource declaration at line 34-37 is the wrong type
of resource. It looks as though you want a
Chef::Resource::RepositoryPackage (repository_package), which has the
repository parameter/argument:
https://github.com/hw-cookbooks/repository/blob/master/resources/package.rb

The repository resource is special 'default' LWRP.

I wouldn't really recommend using any community cookbooks (not even
mine), especially if you don't know what the code is doing. You are
effectively backdoor/root shelling all of your machines with
ignorance.

cheers,

--aj

On Fri, Feb 20, 2015 at 8:32 AM, Douglas Garstang
< "> > wrote:
> I'm trying to set up an apt repository with chef. Trying to use a community
> cookbook, I found this one: https://github.com/hw-cookbooks/repository
>
> It's readme says to drop new deb files into the /srv/repository_incoming
> directory and then run the chef-client. Doing that gets me this error:
>
> ==> default: NoMethodError
> ==> default: -------------
> ==> default: undefined method `repository' for Chef::Resource::Repository
> ==> default:
> ==> default:
> ==> default: Cookbook Trace:
> ==> default: ---------------
> ==> default:
> /tmp/vagrant-chef/8c7b6c4971128a90594d5194827546c6/cookbooks/repository/recipes/incoming.rb:36:in
> `block (3 levels) in from_file'
> ==> default:
> /tmp/vagrant-chef/8c7b6c4971128a90594d5194827546c6/cookbooks/repository/recipes/incoming.rb:33:in
> `each'
> ==> default:
> /tmp/vagrant-chef/8c7b6c4971128a90594d5194827546c6/cookbooks/repository/recipes/incoming.rb:33:in
> `block (2 levels) in from_file'
> ==> default:
> ==> default:
> ==> default:
> ==> default: Resource Declaration:
> ==> default: ---------------------
> ==> default: # In
> /tmp/vagrant-chef/8c7b6c4971128a90594d5194827546c6/cookbooks/repository/recipes/incoming.rb
> ==> default:
> ==> default:  30: ruby_block 'Repository - Process incoming' do
> ==> default:  31:   action :nothing
> ==> default:  32:   block do
> ==> default:  33:
> Dir.glob(File.join(node[:repository][:incoming][:directory], '*.deb')).each
> do |deb_file|
> ==> default:  34:       r = Chef::Resource::Repository.new(deb_file,
> run_context)
> ==> default:  35:       r.action :nothing
> ==> default:  36:       r.repository node[:repository][:incoming][:name]
> ==> default:  37:       r.run_action(:add)
> ==> default:  38:     end
> ==> default:  39:   end
> ==> default:  40:   only_if do
> ==> default:  41:
> File.directory?(node[:repository][:incoming][:directory])
> ==> default:  42:   end
> ==> default:  43: end
>
> I've been digging around and I can't even find the
> Chef::Resource::Repository resource, so I have no idea what's going on. Any
> idea? Or, is there a better community cookbook for managing a private apt
> repository?
>
> Doug
>



--




Archive powered by MHonArc 2.6.16.

§