Reputation: 16685
We have an internal git server using Gitlab, say, http://git-server.domain.com. I created a "project" group, and pushed a cookbook so, according to git, the cookbook is accessible via http://git-server.domain.com/project/mycookbook.git.
Now I have an environment cookbook called myapp_dev, and its Berksfile looks like this
source "https://supermarket.chef.io"
source "http://git-server.domain.com/project"
metadata
and its metadata.rb looks like this
name 'myapp_dev'
(snip)
version '0.1.0'
depends 'mycookbook', '~> 1.0.0'
When I do a berks install, I get
Required artifacts do not exist at the desired version
Missing artifacts: mycookbook
Unable to find a solution for demands: mycookbook(>= 0.0.0), myapp_dev (0.1.0)
What do I have configured wrong?
Upvotes: 2
Views: 921
Reputation: 78
source 'https://supermarket.getchef.com'
metadata
cookbook 'my_cookbook', git:'http://git-server.domain.com/project/my_cookbook', tag: 'some_tag'
The source is for the community cookbooks, unless you have your own supermarket instance. For the cookbooks that are not on supermarket use the cookbook as shown above in the example.
Upvotes: 3