Comments (10)
yes as you can see in https://github.com/ramonskie/bamboo/blob/master/Berksfile#L5
i depend on the much superior backup cookbook from @damm
from bamboo.
The problem is that when you try to resolve this cookbook using Berkshelf, it fails because the backup
cookbook you are using is not available in the supermarket. When you publish your cookbook, supermarket thinks you are using the backup
cookbook from Supermarket.
Try this sample Berksfile
source 'https://supermarket.chef.io'
cookbook 'bamboo'
It will fail to resolve. It will succeed if you add:
source 'https://supermarket.chef.io'
cookbook 'bamboo'
cookbook 'backup', git: 'https://github.com/damm/backup', tag: '0.2.6'
But this causes another problem. If any other cookbook in your Berksfile uses the backup
cookbook from the Supermarket, it will cause those recipes to fail because the resources are not API compatible.
Is there a reason we cant just use the backup
cookbook from the public supermarket?
from bamboo.
@ramonskie If you already realize this, please forgive my explanation, but it seems like the breakage may not be clear: Currently the bamboo
cookbook is simply broken for everyone out of the box, because of the backup
cookbook dependency. When someone tries to use it, it results in an error like this:
$ cat Berksfile
source "https://supermarket.chef.io"
cookbook 'bamboo', '~> 1.7.0'
$ berks install
Resolving cookbook dependencies...
Fetching cookbook index from https://supermarket.chef.io...
Unable to satisfy the following requirements:
- `backup (= 0.3.0)` required by `bamboo-1.7.0`
Unable to find a solution for demands: bamboo (~> 1.7.0)
This is extremely difficult to diagnose particularly because there is in fact already a cookbook named backup
in the public Supermarket. You have to run across the fact that bamboo
has a Berksfile
that specifies a different backup
cookbook than the published one -- none of which is exposed in Supermarket's UI, because it does not look at Berksfile
s.
A cookbook published to Supermarket (bamboo
in this case) can't depend upon a cookbook that is not also published to Supermarket (backup
in this case). If it does, then the dependency can't be resolved without a hacky workaround.
from bamboo.
https://github.com/ramonskie/bamboo/blob/master/Berksfile
from bamboo.
@damm i really don't know why so many ppl have issues with it using berks to upload cookbooks.
maby we should rename backup to
- backupv2
- backupminion
or something like that
from bamboo.
@aogail can you make sure you're using the Berksfile for this cookbook and not setting your own or something? It would appear you're using an outdated or customized Berksfile which is what would be causing the berks install
issues.
Berks is a normal part of the Chef ecosystem and resolving dependencies through a Berksfile setting is perfectly acceptable. Not all Chef cookbooks have a supermarket presence for various reasons and I personally don't think it makes sense to limit oneself to just supermarket cookbooks.
from bamboo.
The Berksfile for this cookbook works fine. The problem is when you try to use the cookbook in another Berksfile. There are a couple of problems:
- Cookbooks on the supermarket are intended to have all of their dependencies be able to be resolved from the sources in the Berksfile. If you go to the supermarket page for bamboo, it tells you the way to use it is to just add the single
cookbook 'bamboo'
entry to yourBerksfile
because Supermarket expects cookbooks in the Supermarket to have dependencies that resolve via the Supermarket. The fact that this one doesn't is just unusual, and therefore unexpected. The git url is a bit of a hack, as you have to depend on the user of the underlying VCS to make tags/branches so that you can depend on specific versions. - The really simple case where you are only using this cookbook in your Berksfile is not that big of a deal. The real problem arises when you are using more than just Bamboo. If you try to use the Bamboo cookbook with another cookbook that depends on backup from the community site (as most cookbooks that use a backup cookbook do), it will break because the resources are not API compatible between the @damm
backup
cookbook and thebackup
cookbook on the community site. The intersection of this Bamboo cookbook and every cookbook on the supermarket that depends onbackup
are broken together.
We tried to get a conversation going with @damm to fix the underlying problem of the backup cookbook having a name collision. For better or for worse, he doesn't seem interested in changing the name to make it easier for people to use. See these issues for background:
https://github.com/damm/backup/issues/31
https://github.com/damm/backup/issues/40
from bamboo.
I think there are a couple of simple solutions to this problem:
- Remove the
backup
dependency from the cookbooksmetadata.rb
file, and document that if you want to use thebackup
recipe, that you need to depend on the @dammbackup
cookbook
or
- Split the backup recipe into a new cookbook (maybe
bamboo_backup
or something) that depends on the @damm backup cookbook.
Both of these accomplish the goal of not breaking dependency resolution and not causing conflicts with other cookbooks.
from bamboo.
@mvdkleijn I was in the middle of typing something similar to what @rylarson just wrote, then saw his note. I will just add that according to Berkshelf devs, using SCM and path locations in the Berksfile is for development convenience and is not recommended for use in published cookbooks. See berkshelf/berkshelf#1408 for example.
from bamboo.
@ramonskie As you know I have the backup_lwrp
namespace if you prefer we can release to a unique namespace for you like bamboo_backup
or backuplwrp
.
I have no real preference whatever works best for you.
from bamboo.
Related Issues (20)
- Create the home_dir or its parent before ark resource runs HOT 4
- Bamboo services and agents should not restart while building HOT 3
- Don't rely on fog gem built into omnibus chef HOT 1
- Make default mysql version more cross-platform HOT 4
- Does Not Support Windows Server 2008/2012 HOT 2
- move to postgresql by default? HOT 5
- switch back to openjdk HOT 1
- latest postgresql cookbook breaks bamboo on ubuntu 14.04 HOT 2
- get rid of derived attributes so wrappers can easily be used
- Issues when running default cookbook on Ubuntu Trusty 14.04 HOT 29
- Vagrant file ... HOT 1
- making java depency user suppliable or optional HOT 3
- vagrant is failing when chef-solo used and "issues_url" and "source_url" defined inside metadata.rb HOT 1
- Vulnerable version HOT 1
- Service bamboo cannot start with Ubuntu 16.04.1 HOT 2
- Unable to login in Bamboo 5.13+ HOT 3
- Bamboo server fails on elastic bamboo configuration
- Unable to satisfy mysql dependency requirements
- Maintainer HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bamboo.