0

I am setting Private Supermarket on an EC2 driver through test kitchen I am using Omnibus cookbook for this , I have placed the corresponding cookbooks like "packagecloud" "supermarket-omnibus-cookbook" and "chef-server-ingredient" .

When I am running the kitchen converge , I am getting the following error :

       [2015-06-12T17:13:54-04:00] WARN: remote_file[/etc/pki/rpm-gpg/RPM-GPG-KEY-packagecloud_io] cannot be downloaded from https://packagecloud.io/gpg.key: 407 "Proxy Authentication Required"


    ================================================================================
    Error executing action `create` on resource 'remote_file[/etc/pki/rpm-gpg/RPM-GPG-KEY-packagecloud_io]'
    ================================================================================

    Net::HTTPServerException
    ------------------------
    407 "Proxy Authentication Required"

    Resource Declaration:
    ---------------------
    # In /tmp/kitchen/cache/cookbooks/packagecloud/providers/repo.rb

     94:   remote_file "/etc/pki/rpm-gpg/RPM-GPG-KEY-#{gpg_filename}" do
     95:     source ::File.join(given_base_url, node['packagecloud']['gpg_key_path'])
     96:     mode '0644'
     97:   end

I have already setup my http proxy . But in the packagecloud cookbook , a variable is setup in cookbooks/packagecloud/resources/repo.rb :

attribute :base_url,        :kind_of => String, :default => "https://packagecloud.io" 

I will be installing this cookbook in production , where there will not be any access to outer websites . With what value should I override it ?

Ishu Gupta
  • 1,071
  • 1
  • 19
  • 43

1 Answers1

0

You need configure chef to use your proxy:

https://docs.chef.io/config_rb_client.html

https://docs.chef.io/config_yml_kitchen.html#provisioner-specific-settings

Roland
  • 1,426
  • 9
  • 9
  • Thanks @Roland, The problem is that I can not have internet access anyway because I am trying to set it up using test kitchen from local system to my ec2 instance which is behind firewall of my enterprise . Is there a way I can do it without contacting packagecloud ? Or configuring the packagecloud artifacts on my github ? – Ishu Gupta Jun 18 '15 at 15:13
  • 1
    You can host the release package yourself and don't use the supermarket cookbook to install it. Afaik it's deprecated, anyways. The packages are available at https://packagecloud.io/chef/stable – Roland Jun 19 '15 at 10:52