Comments (15)
This is pretty much implemented in #53.
from r10k.
Ah, nm. I get it now.
On Thursday, August 1, 2013, Adam wrote:
This is pretty much implemented in #53#53
.β
Reply to this email directly or view it on GitHubhttps://github.com//issues/48#issuecomment-21978868
.
from r10k.
I'm hitting this same issue in 1.0.0 too --> https://gist.github.com/glarizza/5a81e45f2f489d87d464 and the prefixing should alleviate it...
from r10k.
This should be fixed by GH-53, so I'm targeting this at 1.1.0.
from r10k.
IMHO, the prefix solution is kind of hackyugly. It means that my modulepath of:
/etc/puppetlabs/puppet/environments/$environment/modules
Doesn't work. Instead I need to use:
/etc/puppetlabs/puppet/environments/puppet_$environment/modules
and something similar for hiera. It works, but I don't think it should be necessary.
from r10k.
@binford2k Use the Puppetfile to grab the modules on which each environment is dependent? Your modpath can include multiple paths...
from r10k.
The bigger deal is that this is going to be a backwards-incompatible change in the middle of a series...the environment folders that are created aren't going to match your existing $modulepath setting in puppet.conf. While I think the prefixing is necessary and fixes some big R10k bugs, actually prefixing the FILENAME on disk should be kept for a major release.
Is there a way internally to track the branch as "puppet_#{branchname}" but only create the folder name on-disk as "#{branchname}"? Within a single repo/source, you're not going to have conflicting branch names, so I don't think we'd have any clashes here. Thoughts?
from r10k.
If I'm understanding correctly, what would address your concerns is to only default to using prefixes when there are multiple repos under the same basedir, and only in those basedirs where there are multiple repos being cloned?
from r10k.
It was an oversight that I released the behavior as-is, because it was backwards incompatible. (To be honest I didn't realize how many users were using multiple repositories successfully.) I think that in the short run we need to revert the default case to never prefix, and in the longer run have better detection of when prefixing is needed.
from r10k.
@adam-vessey for the short term, do you think that 8cb2209 would be adequate to address this problem? I think that we can just roll back this behavior change in 1.1.1 and consider adding better detection in either 1.2 or 2.
from r10k.
@adrienthebo Looks like that should do it.
If it seems like it would be useful, I'll try to get some code together to do the actual counting (should be fairly quick), so we can default to prefixing where it seems to be required.
from r10k.
In the long run I think we'll need to build a full directory structure of what files are going to go where, so we can do smarter things with prefixing and purging and whatnot. If we have that, a lot of things get much simpler.
(Also, thanks for the really fast response. Holy responding to notifications batman!)
from r10k.
Notes for updating to 1.1.1
If you are putting multiple sources in a single directory, do this:
sources:
first:
remote: 'git://something.com/repo.git'
prefix: true
basedir: '/shared/basedir'
second:
remote: 'git://somethingother.com/repo.git'
prefix: true
basedir: '/shared/basedir'
This is equivalent to the automatic behavior introduced in 1.1.0.
If you're using multiple sources in different directories you can omit the prefix section:
sources:
first:
remote: 'git://something.com/repo.git'
basedir: '/first/basedir'
second:
remote: 'git://somethingother.com/repo.git'
basedir: '/second/basedir'
If you modified your modulepath to something like this:
[master]
modulepath = /etc/puppetlabs/puppet/environments/first_${environment}
You can omit the first_
prefixing.
from r10k.
Isn't the prefixing making usage a bit too complicated? IMO it would be nice if puppet wouldn't need to know anything about my different r10k-sources, i.e. I shouldn't be required to adjust the modulepath
when changing the sources. (Maybe the same @binford2k was saying.)
How about that r10k would merge the modules from multiple sources into one directory for each environment?
from r10k.
@njam The prefixing is a solution to one set of problems, but it isn't applicable to all solutions. If you're in a situation where you have a multi-tenant puppetmaster and you want each group to have an isolated set of modules, like qa_production
, qa_featurebranch
, ops_production
, and so forth, prefixing is great. However if you have multiple repositories that are being blended into a single environment it gets more complex. It's not strictly possible to just mix the modules directories together since there might be conflicts in the Puppetfiles and there might be files committed in both repositories, so I don't think that there's a really simple answer to this.
Since the original problem described in this issue is resolved I'm going to close this issue. @njam if you think that there are better ways of handling this I would love your input; just file an issue on this project and we can go from there. :)
Thanks to everybody for contributing to the reporting on this issue!
from r10k.
Related Issues (20)
- environment_name is undocumented HOT 5
- Pass changed modules list into the postrun command HOT 6
- Setting install_path on a module in an environment source errors
- Tarball module content will be unpacked into an subdirectory with tarball name HOT 2
- R10k canβt be installed with Ruby 3.x HOT 6
- Add a TOC to the configuration doc
- svn doesn't work any more HOT 5
- Yaml environments fails to deploy banch when commit sha is a number HOT 1
- r10k gem fails to install on windows without admin or Create symbolic links user rights HOT 2
- R10k should be able to use bare Git repository without authentication as conrol_repo HOT 4
- R10k container - cannot generate types (missing puppet binary) HOT 1
- $modifiedenvs does not pass environment to postrun hook on deletion HOT 1
- r10k should not depend on gettext as a runtime dependency HOT 1
- r10k puppetfile install fails with "ERROR -> wrong number of arguments (given 2, expected 1)" when pool_size set to 1 HOT 1
- Not sure about the hiera.yaml statement in common-patterns HOT 2
- Allow override of exclude_spec option with puppetfile install subcommand HOT 1
- r10k gem is not compatible with faraday 2.9.0 HOT 2
- environment deployments: postrun $modifiedenvs lists all environments rather than only those modified HOT 1
- r10k does not write files correctly from git on Windows HOT 2
- Failing on aarch64 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 r10k.