-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
git post-receive template should use archive, not clone #367
Comments
I believe git clone on a local filesystem uses hardlinks so I wonder how much it actually uses. |
Earlier, cloning from a local filesystem using the existing template, the first du (including the .git) was around 151M or so, with the .git being something like 80M of that. |
I have actual stats now: This is doing a traditional git clone from an upstream not on the machine. [root@puppet1 ~]# du -sh /etc/puppet/environments/production/
148M /etc/puppet/environments/production/
[root@puppet1 ~]# du -sh /etc/puppet/environments/production/.git
85M /etc/puppet/environments/production/.git This is cloning from the local /opt/puppet.git. [root@puppet1 ~]# du -sh /etc/puppet/environments/testpostgres/
404M /etc/puppet/environments/testpostgres/
[root@puppet1 ~]# du -sh /etc/puppet/environments/testpostgres/.git
340M /etc/puppet/environments/testpostgres/.git |
This didn't get that much attention. I'm wondering if we should look at supporting r10k out of the box, but there are no packages for that on most distros. Thoughts? |
@ekohl we could. Add a dependency on puppet-r10k. https://forge.puppet.com/puppet/r10k |
To try and limp towards |
Currently, the post-receive template uses git clone to populate environments. Using git archive would greatly reduce the space used, as it's close to
svn export
. Using my checkout of this repo:Are there concerns using archive rather than clone?
Edit:
To check out a specific branch to a specific dir:
git archive --format tar --prefix branchname/ branchname: | tar -x -C /etc/puppet/environments
The text was updated successfully, but these errors were encountered: