[chef] Re: Why is berks install not getting latest cookbook version from Berks API server?


Chronological Thread 
  • From: Eric Helgeson < >
  • To: " " < >
  • Subject: [chef] Re: Why is berks install not getting latest cookbook version from Berks API server?
  • Date: Wed, 19 Aug 2015 21:36:41 -0500

~> is pessimistic

From the docs[0]:
 ~>(approximately greater than; also known as “pessimistically greater than”, or “pessimistic”),

​That means it will take the lowest version that fits the constraints given.

​If you're following semantec versioning you could set 
depends 'linux_role', '>= 1.1.0'
​which should pickup all versions in the 1.1.x range​


-Eric Helgeson

On Wed, Aug 19, 2015 at 5:04 PM, Fouts, Chris < " target="_blank"> > wrote:

I uploaded my latest linux_role cookbook to my Berks API server, which is just an organization on my Chef server accessed via port 26200. Hence I see

 

$ knife node show linux_role

linux_role   1.1.80  1.1.79  1.1.78  1.1.77  1.1.76  1.1.75  1.1.74  1.1.72  1.1.71  1.1.70  1.1.69  1.1.68  1.1.67  1.1.66  1.1.65  1.1.64  1.1.63

 

Now I want to upload v1.1.80 to my Chef server.

 

First I have to run berks install so I get the cookbook from my Berks API server to my workstation correct? So I do

 

$ berks install
Installing linux_role (1.1.79) from http://chef-server.domain.com:26200 ([chef_server] https://chef-server.domain.com:443/organizations/berks-api)

 

Why doesn’t it pick up v1.1.80? How can I make it pick up v1.1.80? I even restarted the berks-api service to no avail.

 

Here’s my Berksfile

source "http://chef-server.domain.com:26200"

metadata

Here’s the corresponding metadata.rb file

name “top_level_metadata”

depends ‘linux_role’, ‘~> 1.1.0’

I don’t necessarily want to change the version to ‘= 1.1.80’ because I have other role cookbooks that depends on linux_role, which means I’ll have to update it’s version in their metadata.rb file, which means I have to update their version. Other cookbooks in turn depend on them so…. the cycle continues.

What am I missing?

Chris

 





Archive powered by MHonArc 2.6.16.

§