r10k 1.4.2 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +2 -0
- data/CHANGELOG.mkd +192 -0
- data/CONTRIBUTING.mkd +3 -3
- data/Gemfile +4 -0
- data/README.mkd +13 -6
- data/doc/dynamic-environments/configuration.mkd +77 -8
- data/doc/dynamic-environments/git-environments.mkd +12 -2
- data/doc/dynamic-environments/quickstart.mkd +6 -0
- data/doc/faq.mkd +6 -6
- data/doc/git/cloning-and-mirroring.mkd +60 -0
- data/doc/git/providers.mkd +68 -0
- data/integration/Gemfile +3 -0
- data/integration/README.mkd +29 -0
- data/integration/configs/README.mkd +7 -0
- data/integration/configs/pe/centos-6-64mda +25 -0
- data/integration/configs/pe/centos-7-64mda +25 -0
- data/integration/configs/pe/debian-6-64mda +25 -0
- data/integration/configs/pe/debian-7-64mda +25 -0
- data/integration/configs/pe/redhat-6-64mda +25 -0
- data/integration/configs/pe/redhat-7-64mda +25 -0
- data/integration/configs/pe/sles-11-64mda +25 -0
- data/integration/configs/pe/ubuntu-1004-64mda +25 -0
- data/integration/configs/pe/ubuntu-1204-64mda +25 -0
- data/integration/configs/pe/ubuntu-1404-64mda +25 -0
- data/integration/files/README.mkd +4 -0
- data/integration/files/hiera.yaml +8 -0
- data/integration/files/modules/helloworld/manifests/init.pp +3 -0
- data/integration/files/modules/hieratest/manifests/init.pp +3 -0
- data/integration/files/modules/unicode/files/pretend_unicode +1 -0
- data/integration/files/modules/unicode/manifests/init.pp +6 -0
- data/integration/files/pre-suite/prod_env.config +3 -0
- data/integration/files/r10k_conf.yaml.erb +9 -0
- data/integration/lib/README.mkd +4 -0
- data/integration/lib/git_utils.rb +205 -0
- data/integration/lib/master_manipulator.rb +205 -0
- data/integration/lib/r10k_utils.rb +166 -0
- data/integration/manifests/README.mkd +4 -0
- data/integration/pre-suite/00_pe_install.rb +4 -0
- data/integration/pre-suite/01_git_config.rb +59 -0
- data/integration/pre-suite/02_pe_r10k.rb +60 -0
- data/integration/pre-suite/03_test_utils.rb +17 -0
- data/integration/pre-suite/README.mkd +5 -0
- data/integration/test_run_scripts/README.mkd +5 -0
- data/integration/test_run_scripts/all_tests-rugged-pe-centos6.sh +20 -0
- data/integration/test_run_scripts/all_tests-rugged-pe-rhel7.sh +20 -0
- data/integration/test_run_scripts/all_tests-rugged-pe-sles11.sh +20 -0
- data/integration/test_run_scripts/all_tests-rugged-pe-ubuntu1204.sh +20 -0
- data/integration/test_run_scripts/all_tests-rugged-pe-ubuntu1404.sh +20 -0
- data/integration/test_run_scripts/all_tests-shellgit-pe-centos6.sh +20 -0
- data/integration/test_run_scripts/all_tests-shellgit-pe-rhel7.sh +20 -0
- data/integration/test_run_scripts/all_tests-shellgit-pe-sles11.sh +20 -0
- data/integration/test_run_scripts/all_tests-shellgit-pe-ubuntu1204.sh +20 -0
- data/integration/test_run_scripts/all_tests-shellgit-pe-ubuntu1404.sh +20 -0
- data/integration/test_run_scripts/basic_functionality/all_tests-pe-centos6.sh +20 -0
- data/integration/test_run_scripts/command_line/all_tests-pe-centos6.sh +20 -0
- data/integration/test_run_scripts/git_source/all_tests-pe-centos6.sh +20 -0
- data/integration/test_run_scripts/user_scenario/basic_workflow/all_tests-pe-centos6.sh +20 -0
- data/integration/test_run_scripts/user_scenario/complex_workflow/all_tests-pe-centos6.sh +20 -0
- data/integration/tests/README.mkd +4 -0
- data/integration/tests/basic_functionality/negative/neg_deploy_with_invalid_r10k_yaml.rb +46 -0
- data/integration/tests/basic_functionality/negative/neg_deploy_with_missing_r10k_yaml.rb +27 -0
- data/integration/tests/command_line/deploy_env_without_mod_update.rb +75 -0
- data/integration/tests/command_line/negative/neg_deploy_env_with_module_update.rb +76 -0
- data/integration/tests/command_line/negative/neg_invalid_cli_dep_flag.rb +22 -0
- data/integration/tests/command_line/negative/neg_invalid_cli_env_flag.rb +22 -0
- data/integration/tests/command_line/negative/neg_invalid_cmd_line_arg.rb +24 -0
- data/integration/tests/git_source/git_source_git.rb +123 -0
- data/integration/tests/git_source/git_source_ssh.rb +84 -0
- data/integration/tests/git_source/git_source_submodule.rb +69 -0
- data/integration/tests/git_source/negative/neg_git_broken_remote.rb +37 -0
- data/integration/tests/git_source/negative/neg_git_unauthorized_https.rb +45 -0
- data/integration/tests/git_source/negative/neg_git_unauthorized_ssh.rb +72 -0
- data/integration/tests/git_source/negative/neg_git_unicode_branch.rb +34 -0
- data/integration/tests/user_scenario/basic_workflow/multi_env_1000_branches.rb +66 -0
- data/integration/tests/user_scenario/basic_workflow/multi_env_custom_forge_git_module.rb +110 -0
- data/integration/tests/user_scenario/basic_workflow/multi_env_custom_forge_git_module_static.rb +113 -0
- data/integration/tests/user_scenario/basic_workflow/multi_env_hiera.rb +93 -0
- data/integration/tests/user_scenario/basic_workflow/multi_env_multi_source.rb +132 -0
- data/integration/tests/user_scenario/basic_workflow/multi_source_custom_forge_git_module.rb +160 -0
- data/integration/tests/user_scenario/basic_workflow/negative/neg_bad_basedir.rb +45 -0
- data/integration/tests/user_scenario/basic_workflow/negative/neg_bad_forge_module.rb +43 -0
- data/integration/tests/user_scenario/basic_workflow/negative/neg_bad_git_module.rb +40 -0
- data/integration/tests/user_scenario/basic_workflow/negative/neg_bad_git_module_ref.rb +42 -0
- data/integration/tests/user_scenario/basic_workflow/negative/neg_bad_git_remote.rb +44 -0
- data/integration/tests/user_scenario/basic_workflow/negative/neg_branch_name_collision.rb +63 -0
- data/integration/tests/user_scenario/basic_workflow/negative/neg_disk_full.rb +73 -0
- data/integration/tests/user_scenario/basic_workflow/negative/neg_duplicate_module_names.rb +45 -0
- data/integration/tests/user_scenario/basic_workflow/negative/neg_inaccessible_forge.rb +51 -0
- data/integration/tests/user_scenario/basic_workflow/negative/neg_invalid_env_name.rb +33 -0
- data/integration/tests/user_scenario/basic_workflow/negative/neg_invalid_puppet_file.rb +35 -0
- data/integration/tests/user_scenario/basic_workflow/negative/neg_module_specified_at_deleted_release.rb +44 -0
- data/integration/tests/user_scenario/basic_workflow/negative/neg_read_only.rb +57 -0
- data/integration/tests/user_scenario/basic_workflow/negative/neg_specify_deleted_forge_module.rb +44 -0
- data/integration/tests/user_scenario/basic_workflow/single_env_10000_files.rb +73 -0
- data/integration/tests/user_scenario/basic_workflow/single_env_custom_forge_git_module.rb +103 -0
- data/integration/tests/user_scenario/basic_workflow/single_env_custom_forge_module.rb +80 -0
- data/integration/tests/user_scenario/basic_workflow/single_env_custom_module.rb +48 -0
- data/integration/tests/user_scenario/basic_workflow/single_env_large_files.rb +73 -0
- data/integration/tests/user_scenario/basic_workflow/single_env_module_already_installed.rb +81 -0
- data/integration/tests/user_scenario/basic_workflow/single_env_module_last_release_deleted.rb +67 -0
- data/integration/tests/user_scenario/basic_workflow/single_env_non-existent_base_dir.rb +93 -0
- data/integration/tests/user_scenario/basic_workflow/single_env_purge_unmanaged_modules.rb +92 -0
- data/integration/tests/user_scenario/basic_workflow/single_env_switch_forge_git_module.rb +116 -0
- data/integration/tests/user_scenario/basic_workflow/single_env_unicode_paths.rb +59 -0
- data/integration/tests/user_scenario/basic_workflow/single_env_upgrade_forge_mod_revert_change.rb +165 -0
- data/integration/tests/user_scenario/complex_workflow/multi_env_add_change_remove.rb +162 -0
- data/integration/tests/user_scenario/complex_workflow/multi_env_remove_re-add.rb +110 -0
- data/lib/r10k/action/cri_runner.rb +10 -13
- data/lib/r10k/cli.rb +3 -8
- data/lib/r10k/cli/version.rb +10 -1
- data/lib/r10k/deployment/config.rb +26 -6
- data/lib/r10k/deployment/config/loader.rb +38 -29
- data/lib/r10k/deployment/source.rb +2 -4
- data/lib/r10k/environment/git.rb +10 -19
- data/lib/r10k/environment/name.rb +86 -0
- data/lib/r10k/errors.rb +8 -5
- data/lib/r10k/feature.rb +35 -0
- data/lib/r10k/feature/collection.rb +23 -0
- data/lib/r10k/features.rb +18 -0
- data/lib/r10k/git.rb +106 -12
- data/lib/r10k/git/alternates.rb +2 -2
- data/lib/r10k/git/cache.rb +43 -26
- data/lib/r10k/git/errors.rb +12 -6
- data/lib/r10k/git/head.rb +3 -0
- data/lib/r10k/git/ref.rb +3 -0
- data/lib/r10k/git/remote_head.rb +6 -0
- data/lib/r10k/git/repository.rb +6 -0
- data/lib/r10k/git/rugged.rb +17 -0
- data/lib/r10k/git/rugged/bare_repository.rb +86 -0
- data/lib/r10k/git/rugged/base_repository.rb +90 -0
- data/lib/r10k/git/rugged/cache.rb +11 -0
- data/lib/r10k/git/rugged/thin_repository.rb +72 -0
- data/lib/r10k/git/rugged/working_repository.rb +99 -0
- data/lib/r10k/git/shellgit.rb +9 -0
- data/lib/r10k/git/shellgit/bare_repository.rb +29 -0
- data/lib/r10k/git/shellgit/base_repository.rb +102 -0
- data/lib/r10k/git/shellgit/cache.rb +11 -0
- data/lib/r10k/git/shellgit/thin_repository.rb +56 -0
- data/lib/r10k/git/shellgit/working_repository.rb +73 -0
- data/lib/r10k/git/stateful_repository.rb +80 -0
- data/lib/r10k/git/tag.rb +3 -0
- data/lib/r10k/git/working_dir.rb +15 -2
- data/lib/r10k/logging.rb +73 -36
- data/lib/r10k/logging/terminaloutputter.rb +36 -0
- data/lib/r10k/module/forge.rb +10 -9
- data/lib/r10k/module/git.rb +14 -44
- data/lib/r10k/module/metadata_file.rb +31 -0
- data/lib/r10k/module/svn.rb +0 -1
- data/lib/r10k/module_repository/forge.rb +20 -7
- data/lib/r10k/puppetfile.rb +1 -1
- data/lib/r10k/settings/container.rb +6 -0
- data/lib/r10k/settings/mixin.rb +9 -0
- data/lib/r10k/source.rb +2 -3
- data/lib/r10k/source/base.rb +5 -5
- data/lib/r10k/source/git.rb +11 -86
- data/lib/r10k/source/svn.rb +8 -52
- data/lib/r10k/util/basedir.rb +4 -4
- data/lib/r10k/util/commands.rb +31 -0
- data/lib/r10k/util/exec_env.rb +36 -0
- data/lib/r10k/util/platform.rb +4 -0
- data/lib/r10k/util/purgeable.rb +2 -2
- data/lib/r10k/util/subprocess.rb +3 -7
- data/lib/r10k/util/subprocess/runner.rb +3 -28
- data/lib/r10k/util/subprocess/runner/posix.rb +103 -0
- data/lib/r10k/util/subprocess/runner/pump.rb +59 -0
- data/lib/r10k/util/subprocess/{windows/runner.rb → runner/windows.rb} +2 -11
- data/lib/r10k/util/symbolize_keys.rb +31 -0
- data/lib/r10k/version.rb +1 -1
- data/lib/shared/puppet/module_tool/metadata.rb +197 -0
- data/r10k.gemspec +7 -5
- data/spec/fixtures/integration/git/puppet-boolean-bare.tar +0 -0
- data/spec/fixtures/module/forge/bad_module/metadata.json +1 -0
- data/spec/fixtures/unit/util/subprocess/posix/runner/no-execute.sh +3 -0
- data/spec/fixtures/vcr/cassettes/R10K_ModuleRepository_Forge/and_the_expected_version_is_latest/can_fetch_all_versions_of_a_given_module.yml +171 -26
- data/spec/fixtures/vcr/cassettes/R10K_ModuleRepository_Forge/and_the_expected_version_is_latest/can_fetch_the_latest_version_of_a_given_module.yml +171 -26
- data/spec/fixtures/vcr/cassettes/R10K_ModuleRepository_Forge/and_the_expected_version_is_latest/ignores_deleted_releases.yml +190 -0
- data/spec/fixtures/vcr/cassettes/R10K_ModuleRepository_Forge/it_handles_errors_from_forgeapi_puppetlabs_com/raises_an_error_for_a_non-existant_module.yml +34 -0
- data/spec/fixtures/vcr/cassettes/R10K_Module_Forge/and_the_expected_version_is_latest/sets_the_expected_version_based_on_the_latest_forge_version.yml +87 -26
- data/spec/integration/git/rugged/bare_repository_spec.rb +13 -0
- data/spec/integration/git/rugged/thin_repository_spec.rb +14 -0
- data/spec/integration/git/rugged/working_repository_spec.rb +13 -0
- data/spec/integration/git/shellgit/bare_repository_spec.rb +13 -0
- data/spec/integration/git/shellgit/thin_repository_spec.rb +14 -0
- data/spec/integration/git/shellgit/working_repository_spec.rb +13 -0
- data/spec/integration/git/stateful_repository_spec.rb +104 -0
- data/spec/matchers/match_realpath.rb +18 -0
- data/spec/shared-contexts/git-fixtures.rb +55 -0
- data/spec/shared-examples/git-repository.rb +38 -0
- data/spec/shared-examples/git/bare_repository.rb +70 -0
- data/spec/shared-examples/git/thin_repository.rb +26 -0
- data/spec/shared-examples/git/working_repository.rb +115 -0
- data/spec/shared-examples/subprocess-runner.rb +83 -0
- data/spec/spec_helper.rb +13 -9
- data/spec/unit/action/cri_runner_spec.rb +0 -6
- data/spec/unit/action/puppetfile/{cri_action_spec.rb → cri_runner_spec.rb} +0 -0
- data/spec/unit/deployment/config/loader_spec.rb +48 -0
- data/spec/unit/deployment/config_spec.rb +49 -0
- data/spec/unit/environment/git_spec.rb +5 -39
- data/spec/unit/environment/name_spec.rb +135 -0
- data/spec/unit/feature_spec.rb +50 -0
- data/spec/unit/git/alternates_spec.rb +1 -1
- data/spec/unit/git/cache_spec.rb +32 -19
- data/spec/unit/git/commit_spec.rb +1 -0
- data/spec/unit/git/head_spec.rb +1 -6
- data/spec/unit/git/ref_spec.rb +0 -23
- data/spec/unit/git/rugged/cache_spec.rb +26 -0
- data/spec/unit/git/shellgit/cache_spec.rb +27 -0
- data/spec/unit/git/stateful_repository_spec.rb +43 -0
- data/spec/unit/git/tag_spec.rb +1 -0
- data/spec/unit/git/working_dir_spec.rb +1 -0
- data/spec/unit/git_spec.rb +74 -0
- data/spec/unit/logging/terminaloutputter_spec.rb +53 -0
- data/spec/unit/logging_spec.rb +68 -0
- data/spec/unit/module/forge_spec.rb +7 -38
- data/spec/unit/module/git_spec.rb +7 -38
- data/spec/unit/module/metadata_file_spec.rb +69 -0
- data/spec/unit/module/svn_spec.rb +0 -4
- data/spec/unit/module_repository/forge_spec.rb +22 -1
- data/spec/unit/puppet/module_tool/metadata_spec.rb +301 -0
- data/spec/unit/settings/container_spec.rb +17 -0
- data/spec/unit/source/git_spec.rb +0 -123
- data/spec/unit/source/svn_spec.rb +66 -0
- data/spec/unit/util/commands_spec.rb +61 -0
- data/spec/unit/util/exec_env_spec.rb +56 -0
- data/spec/unit/util/subprocess/runner/posix_spec.rb +7 -0
- data/spec/unit/util/subprocess/runner/pump_spec.rb +79 -0
- data/spec/unit/util/subprocess_spec.rb +3 -2
- data/spec/unit/util/symbolize_keys_spec.rb +51 -0
- metadata +226 -45
- data/lib/r10k/execution.rb +0 -47
- data/lib/r10k/module/metadata.rb +0 -47
- data/lib/r10k/util/core_ext/hash_ext.rb +0 -19
- data/lib/r10k/util/subprocess/io.rb +0 -7
- data/lib/r10k/util/subprocess/posix.rb +0 -4
- data/lib/r10k/util/subprocess/posix/io.rb +0 -7
- data/lib/r10k/util/subprocess/posix/runner.rb +0 -140
- data/lib/r10k/util/subprocess/windows.rb +0 -4
- data/lib/r10k/util/subprocess/windows/io.rb +0 -6
- data/spec/fixtures/vcr/cassettes/R10K_ModuleRepository_Forge/looking_up_versions.yml +0 -42
- data/spec/fixtures/vcr/cassettes/R10K_ModuleRepository_Forge/looking_up_versions/can_fetch_all_versions_of_a_given_module.yml +0 -42
- data/spec/fixtures/vcr/cassettes/R10K_ModuleRepository_Forge/looking_up_versions/can_fetch_the_latest_version_of_a_given_module.yml +0 -42
- data/spec/unit/deployment/source_spec.rb +0 -24
- data/spec/unit/module/metadata_spec.rb +0 -68
- data/spec/unit/util/core_ext/hash_ext_spec.rb +0 -63
@@ -211,6 +211,12 @@ class profile::base {
|
|
211
211
|
}
|
212
212
|
```
|
213
213
|
|
214
|
+
Ensure that the user r10k runs as (typically root) can access the git
|
215
|
+
repository. See the [git environment guide]
|
216
|
+
(doc/dynamic-environments/git-environments.mkd) for more detail. You can test
|
217
|
+
the access by using su/sudo to perform `git clone yourrepoURL` as the correct
|
218
|
+
user.
|
219
|
+
|
214
220
|
# Summary
|
215
221
|
|
216
222
|
We now have the following functional pieces:
|
data/doc/faq.mkd
CHANGED
@@ -43,10 +43,10 @@ on your remote repositories:
|
|
43
43
|
* [Gitolite v2][gitolite-v2-default-branch]
|
44
44
|
* [Gitolite v3][gitolite-v3-default-branch]
|
45
45
|
|
46
|
-
[git-clone]: https://www.kernel.org/pub/software/scm/git/docs/git-clone.html "git-clone
|
47
|
-
[git-symbolic-ref]: https://www.kernel.org/pub/software/scm/git/docs/git-symbolic-ref.html "git-symbolic-ref
|
46
|
+
[git-clone]: https://www.kernel.org/pub/software/scm/git/docs/git-clone.html "Man page for git-clone"
|
47
|
+
[git-symbolic-ref]: https://www.kernel.org/pub/software/scm/git/docs/git-symbolic-ref.html "Man page for git-symbolic-ref"
|
48
48
|
|
49
|
-
[github-default-branch]: https://help.github.com/articles/setting-the-default-branch "
|
50
|
-
[bitbucket-default-branch]: https://answers.atlassian.com/questions/280944/how-to-change-main-branch-in-bitbucket "
|
51
|
-
[gitolite-v2-default-branch]: http://stackoverflow.com/questions/7091599/git-default-remote-branch-with-gitolite "
|
52
|
-
[gitolite-v3-default-branch]: http://stackoverflow.com/questions/13949093/git-change-default-branch-gitolite "
|
49
|
+
[github-default-branch]: https://help.github.com/articles/setting-the-default-branch "Changing the default branch on GitHub"
|
50
|
+
[bitbucket-default-branch]: https://answers.atlassian.com/questions/280944/how-to-change-main-branch-in-bitbucket "Changing the default branch on Bitbucket"
|
51
|
+
[gitolite-v2-default-branch]: http://stackoverflow.com/questions/7091599/git-default-remote-branch-with-gitolite "Changing the default branch on Gitolite v2"
|
52
|
+
[gitolite-v3-default-branch]: http://stackoverflow.com/questions/13949093/git-change-default-branch-gitolite "Changing the default branch on Gitolite v3"
|
@@ -0,0 +1,60 @@
|
|
1
|
+
Git Cloning and Mirroring
|
2
|
+
=========================
|
3
|
+
|
4
|
+
Most Git operations on a repository require having a full clone of that
|
5
|
+
repository locally available. Because this clone is a full copy, the initial
|
6
|
+
clone is heavyweight and generally time consuming. For a situation like r10k
|
7
|
+
where the same repositories are reused often, constantly cloning and deleting
|
8
|
+
repositories is very inefficient.
|
9
|
+
|
10
|
+
In order to speed up Git operations r10k takes a number of steps to avoid
|
11
|
+
cloning and fetching repositories, as well as deduplicating content across
|
12
|
+
multiple clones of the same repositories.
|
13
|
+
|
14
|
+
Because r10k tends to reuse the same Git repositories in multiple places, r10k
|
15
|
+
avoids repeated, full repository clones by mirroring repositories. When r10k
|
16
|
+
starts using a new repository, it first clones that repository into a central
|
17
|
+
location for later use. This initial clone is the only time that r10k will
|
18
|
+
perform a full clone of that repository.
|
19
|
+
|
20
|
+
When r10k creates an actual checkout of a Git repository, it uses the
|
21
|
+
corresponding mirrored repository as a [reference](#git-alternates). This allows
|
22
|
+
the working checkout to borrow objects from the mirrored repository instead of
|
23
|
+
cloning all of the Git objects again. This saves a great deal of time and space
|
24
|
+
as the number of copies of a repository increases.
|
25
|
+
|
26
|
+
Mirrored git repositories are cloned into the directory specified by the
|
27
|
+
r10k.yaml 'cachedir' setting.
|
28
|
+
|
29
|
+
The name 'cachedir' is a bit of a misnomer; Git repositories are mirrored to
|
30
|
+
speed up access to the remote resource like a cache, but unlike a traditional
|
31
|
+
cache the mirrored repositories are persistent and should not be deleted.
|
32
|
+
|
33
|
+
Because the mirrored repository contains all of the objects for all of the
|
34
|
+
referencing repositories, deleting the mirrored repository is akin to deleting
|
35
|
+
the `.git/objects` directory. Doing so effectively cripples the repository, so
|
36
|
+
removing mirrored repositories should be done with care to avoid deleting
|
37
|
+
repositories that are still in use.
|
38
|
+
|
39
|
+
Git alternates
|
40
|
+
--------------
|
41
|
+
|
42
|
+
A standard git repository stores all content in the `.git/objects` directory,
|
43
|
+
either as a zlib compressed file in `.git/objects/[0-9a-f]{2}/[0-9a-f]{38}` or
|
44
|
+
as part of a packfile in `.git/objects/pack`. Since content can be both stored
|
45
|
+
in and retrieved from this location it's treated like a simple database, and is
|
46
|
+
generally referred to as the Git object database.
|
47
|
+
|
48
|
+
Git allows a single repository to look in more than just `.git/objects` for
|
49
|
+
objects; additional object databases are referred to as **alternates**. If a
|
50
|
+
repository has alternate object databases set up, it will check `.git/objects`
|
51
|
+
and then each alternate object database when looking for an object. Git stores a
|
52
|
+
list of alternate object databases in `.git/objects/info/alternates`. Invoking
|
53
|
+
`git clone` with the `--reference <repo>` flag will use that repository as an
|
54
|
+
alternate object database.
|
55
|
+
|
56
|
+
Links
|
57
|
+
-----
|
58
|
+
|
59
|
+
* [man git-clone(1) --reference](https://www.kernel.org/pub/software/scm/git/docs/git-clone.html)
|
60
|
+
* [man gitrepository-layout(5) objects/info/alternates](https://www.kernel.org/pub/software/scm/git/docs/gitrepository-layout.html)
|
@@ -0,0 +1,68 @@
|
|
1
|
+
Git Providers
|
2
|
+
=============
|
3
|
+
|
4
|
+
As of 1.5.0, r10k can interact with Git repositories using multiple Git
|
5
|
+
providers.
|
6
|
+
|
7
|
+
Shellgit
|
8
|
+
--------
|
9
|
+
|
10
|
+
The shellgit provider is the original Git provider that is based on shelling out
|
11
|
+
to the `git` binary. It relies on the standard set of Git userland executables
|
12
|
+
in order to work.
|
13
|
+
|
14
|
+
The shellgit provider is the default Git provider in order to maintain
|
15
|
+
compatibility with existing r10k installations.
|
16
|
+
|
17
|
+
### Requirements
|
18
|
+
|
19
|
+
The shellgit provider requires that `git` can be found on the `PATH` environment
|
20
|
+
variable. This can be done by installing the git package via the system package
|
21
|
+
manager.
|
22
|
+
|
23
|
+
### SSH Configuration
|
24
|
+
|
25
|
+
Because the shellgit provider relies on the `git` command which in turn uses the
|
26
|
+
`ssh` binary as the SSH transport layer, configuring access to Git repositories
|
27
|
+
over SSH is done by configuring the underlying `ssh` command.
|
28
|
+
|
29
|
+
Rugged
|
30
|
+
------
|
31
|
+
|
32
|
+
The rugged provider is based on the [libgit2](https://github.com/libgit2/libgit2)
|
33
|
+
library and the Ruby [rugged gem](https://github.com/libgit2/rugged).
|
34
|
+
|
35
|
+
### Requirements
|
36
|
+
|
37
|
+
The rugged provider relies on the rugged Ruby gem. The rugged gem requires Ruby
|
38
|
+
1.9 or greater, which in turn means that r10k must be run with Ruby 1.9 or
|
39
|
+
greater to use this provider.
|
40
|
+
|
41
|
+
### SSH Configuration
|
42
|
+
|
43
|
+
In order to use rugged with SSH based Git repositories, the 'private_key' option
|
44
|
+
must be provided. An optional 'username' field can be provided when the Git
|
45
|
+
remote URL does not provide a username.
|
46
|
+
|
47
|
+
```yaml
|
48
|
+
git:
|
49
|
+
private_key: '/root/.ssh/id_rsa'
|
50
|
+
username: 'git'
|
51
|
+
```
|
52
|
+
|
53
|
+
Configuration
|
54
|
+
-------------
|
55
|
+
|
56
|
+
R10K will attempt to use the shellgit provider, then fall back to the rugged
|
57
|
+
provider, and then hard fail if no Git provider is available.
|
58
|
+
|
59
|
+
The Git provider in use can be manually specified by specifying the desired
|
60
|
+
provider in r10k.yaml.
|
61
|
+
|
62
|
+
```yaml
|
63
|
+
git:
|
64
|
+
provider: 'rugged'
|
65
|
+
```
|
66
|
+
|
67
|
+
Valid values are 'rugged' and 'shellgit'. If an invalid value is used r10k will
|
68
|
+
raise an error.
|
data/integration/Gemfile
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
Integration Tests
|
2
|
+
===========================
|
3
|
+
|
4
|
+
This folder contains integration tests for the r10k project. These tests were originally written by the QA team
|
5
|
+
at Puppet Labs and is actively maintained by the QA team. Feel free to contribute tests to this folder as long
|
6
|
+
as they are written with [Beaker](https://github.com/puppetlabs/beaker) and follow the guidelines
|
7
|
+
below.
|
8
|
+
|
9
|
+
## Integration?
|
10
|
+
|
11
|
+
The r10k project already contains RSpec tests and you might be wondering why there is a need to have a set of
|
12
|
+
tests separate from those tests. At Puppet Labs we define an "integration" test as:
|
13
|
+
|
14
|
+
> Validating the system state and/or side effects while completing a complete life cycle of user stories using a
|
15
|
+
> system. This type of test crosses the boundary of a discrete tool in the process of testing a defined user
|
16
|
+
> objective that utilizes a system composed of integrated components.
|
17
|
+
|
18
|
+
What this means for this project is that we will install and configure all infrastructure needed in a real-world
|
19
|
+
r10k environment.
|
20
|
+
|
21
|
+
## Running Tests
|
22
|
+
|
23
|
+
Included in this folder under the "test_run_scripts" sub-folder are simple Bash scripts that will run suites of
|
24
|
+
Beaker tests. This scripts utilize environment variables for specifying test infrastructure. For security
|
25
|
+
reasons we do not provide examples from the Puppet Labs testing environment.
|
26
|
+
|
27
|
+
## Documentation
|
28
|
+
|
29
|
+
Each sub-folder contains a "README.mdk" that describes the content found in the sub-folder.
|
@@ -0,0 +1,7 @@
|
|
1
|
+
Config
|
2
|
+
===========================
|
3
|
+
|
4
|
+
This folder contains [Beaker](https://github.com/puppetlabs/beaker) configuration files. All of these
|
5
|
+
configurations utilize the ["vmpooler"](https://github.com/puppetlabs/vmpooler) service for templates.
|
6
|
+
These configurations are specific to the Puppet Labs environment and will not work in other environments without
|
7
|
+
alteration!
|
@@ -0,0 +1,25 @@
|
|
1
|
+
HOSTS:
|
2
|
+
centos-6-x86_64:
|
3
|
+
roles:
|
4
|
+
- master
|
5
|
+
- dashboard
|
6
|
+
- database
|
7
|
+
- agent
|
8
|
+
platform: el-6-x86_64
|
9
|
+
template: Delivery/Quality Assurance/Templates/vCloud/centos-6-x86_64
|
10
|
+
hypervisor: vcloud
|
11
|
+
centos-6-x86_64-agent:
|
12
|
+
roles:
|
13
|
+
- agent
|
14
|
+
- frictionless
|
15
|
+
platform: el-6-x86_64
|
16
|
+
template: Delivery/Quality Assurance/Templates/vCloud/centos-6-x86_64
|
17
|
+
hypervisor: vcloud
|
18
|
+
CONFIG:
|
19
|
+
nfs_server: none
|
20
|
+
consoleport: 443
|
21
|
+
datastore: instance0
|
22
|
+
folder: Delivery/Quality Assurance/Enterprise/Dynamic
|
23
|
+
resourcepool: delivery/Quality Assurance/Enterprise/Dynamic
|
24
|
+
pooling_api: http://vmpooler.delivery.puppetlabs.net/
|
25
|
+
forge_host: forge-aio01-petest.puppetlabs.com
|
@@ -0,0 +1,25 @@
|
|
1
|
+
HOSTS:
|
2
|
+
centos-7-x86_64:
|
3
|
+
roles:
|
4
|
+
- master
|
5
|
+
- dashboard
|
6
|
+
- database
|
7
|
+
- agent
|
8
|
+
platform: el-7-x86_64
|
9
|
+
template: Delivery/Quality Assurance/Templates/vCloud/centos-7-x86_64
|
10
|
+
hypervisor: vcloud
|
11
|
+
centos-7-x86_64-agent:
|
12
|
+
roles:
|
13
|
+
- agent
|
14
|
+
- frictionless
|
15
|
+
platform: el-7-x86_64
|
16
|
+
template: Delivery/Quality Assurance/Templates/vCloud/centos-7-x86_64
|
17
|
+
hypervisor: vcloud
|
18
|
+
CONFIG:
|
19
|
+
nfs_server: none
|
20
|
+
consoleport: 443
|
21
|
+
datastore: instance0
|
22
|
+
folder: Delivery/Quality Assurance/Enterprise/Dynamic
|
23
|
+
resourcepool: delivery/Quality Assurance/Enterprise/Dynamic
|
24
|
+
pooling_api: http://vmpooler.delivery.puppetlabs.net/
|
25
|
+
forge_host: forge-aio01-petest.puppetlabs.com
|
@@ -0,0 +1,25 @@
|
|
1
|
+
HOSTS:
|
2
|
+
debian-6-amd64:
|
3
|
+
roles:
|
4
|
+
- master
|
5
|
+
- dashboard
|
6
|
+
- database
|
7
|
+
- agent
|
8
|
+
platform: debian-6-amd64
|
9
|
+
template: Delivery/Quality Assurance/Templates/vCloud/debian-6-x86_64
|
10
|
+
hypervisor: vcloud
|
11
|
+
debian-6-amd64-agent:
|
12
|
+
roles:
|
13
|
+
- agent
|
14
|
+
- frictionless
|
15
|
+
platform: debian-6-amd64
|
16
|
+
template: Delivery/Quality Assurance/Templates/vCloud/debian-6-x86_64
|
17
|
+
hypervisor: vcloud
|
18
|
+
CONFIG:
|
19
|
+
nfs_server: none
|
20
|
+
consoleport: 443
|
21
|
+
datastore: instance0
|
22
|
+
folder: Delivery/Quality Assurance/Enterprise/Dynamic
|
23
|
+
resourcepool: delivery/Quality Assurance/Enterprise/Dynamic
|
24
|
+
pooling_api: http://vmpooler.delivery.puppetlabs.net/
|
25
|
+
forge_host: forge-aio01-petest.puppetlabs.com
|
@@ -0,0 +1,25 @@
|
|
1
|
+
HOSTS:
|
2
|
+
debian-7-amd64:
|
3
|
+
roles:
|
4
|
+
- master
|
5
|
+
- dashboard
|
6
|
+
- database
|
7
|
+
- agent
|
8
|
+
platform: debian-7-amd64
|
9
|
+
template: Delivery/Quality Assurance/Templates/vCloud/debian-7-x86_64
|
10
|
+
hypervisor: vcloud
|
11
|
+
debian-7-amd64-agent:
|
12
|
+
roles:
|
13
|
+
- agent
|
14
|
+
- frictionless
|
15
|
+
platform: debian-7-amd64
|
16
|
+
template: Delivery/Quality Assurance/Templates/vCloud/debian-7-x86_64
|
17
|
+
hypervisor: vcloud
|
18
|
+
CONFIG:
|
19
|
+
nfs_server: none
|
20
|
+
consoleport: 443
|
21
|
+
datastore: instance0
|
22
|
+
folder: Delivery/Quality Assurance/Enterprise/Dynamic
|
23
|
+
resourcepool: delivery/Quality Assurance/Enterprise/Dynamic
|
24
|
+
pooling_api: http://vmpooler.delivery.puppetlabs.net/
|
25
|
+
forge_host: forge-aio01-petest.puppetlabs.com
|
@@ -0,0 +1,25 @@
|
|
1
|
+
HOSTS:
|
2
|
+
redhat-6-x86_64:
|
3
|
+
roles:
|
4
|
+
- master
|
5
|
+
- dashboard
|
6
|
+
- database
|
7
|
+
- agent
|
8
|
+
platform: el-6-x86_64
|
9
|
+
template: Delivery/Quality Assurance/Templates/vCloud/redhat-6-x86_64
|
10
|
+
hypervisor: vcloud
|
11
|
+
redhat-6-x86_64-agent:
|
12
|
+
roles:
|
13
|
+
- agent
|
14
|
+
- frictionless
|
15
|
+
platform: el-6-x86_64
|
16
|
+
template: Delivery/Quality Assurance/Templates/vCloud/redhat-6-x86_64
|
17
|
+
hypervisor: vcloud
|
18
|
+
CONFIG:
|
19
|
+
nfs_server: none
|
20
|
+
consoleport: 443
|
21
|
+
datastore: instance0
|
22
|
+
folder: Delivery/Quality Assurance/Enterprise/Dynamic
|
23
|
+
resourcepool: delivery/Quality Assurance/Enterprise/Dynamic
|
24
|
+
pooling_api: http://vmpooler.delivery.puppetlabs.net/
|
25
|
+
forge_host: forge-aio01-petest.puppetlabs.com
|
@@ -0,0 +1,25 @@
|
|
1
|
+
HOSTS:
|
2
|
+
redhat-7-x86_64:
|
3
|
+
roles:
|
4
|
+
- master
|
5
|
+
- dashboard
|
6
|
+
- database
|
7
|
+
- agent
|
8
|
+
platform: el-7-x86_64
|
9
|
+
template: Delivery/Quality Assurance/Templates/vCloud/redhat-7-x86_64
|
10
|
+
hypervisor: vcloud
|
11
|
+
redhat-7-x86_64-agent:
|
12
|
+
roles:
|
13
|
+
- agent
|
14
|
+
- frictionless
|
15
|
+
platform: el-7-x86_64
|
16
|
+
template: Delivery/Quality Assurance/Templates/vCloud/redhat-7-x86_64
|
17
|
+
hypervisor: vcloud
|
18
|
+
CONFIG:
|
19
|
+
nfs_server: none
|
20
|
+
consoleport: 443
|
21
|
+
datastore: instance0
|
22
|
+
folder: Delivery/Quality Assurance/Enterprise/Dynamic
|
23
|
+
resourcepool: delivery/Quality Assurance/Enterprise/Dynamic
|
24
|
+
pooling_api: http://vmpooler.delivery.puppetlabs.net/
|
25
|
+
forge_host: forge-aio01-petest.puppetlabs.com
|
@@ -0,0 +1,25 @@
|
|
1
|
+
HOSTS:
|
2
|
+
sles-11-x86_64:
|
3
|
+
roles:
|
4
|
+
- master
|
5
|
+
- dashboard
|
6
|
+
- database
|
7
|
+
- agent
|
8
|
+
platform: sles-11-x86_64
|
9
|
+
template: Delivery/Quality Assurance/Templates/vCloud/sles-11-x86_64
|
10
|
+
hypervisor: vcloud
|
11
|
+
sles-11-x86_64-agent:
|
12
|
+
roles:
|
13
|
+
- agent
|
14
|
+
- frictionless
|
15
|
+
platform: sles-11-x86_64
|
16
|
+
template: Delivery/Quality Assurance/Templates/vCloud/sles-11-x86_64
|
17
|
+
hypervisor: vcloud
|
18
|
+
CONFIG:
|
19
|
+
nfs_server: none
|
20
|
+
consoleport: 443
|
21
|
+
datastore: instance0
|
22
|
+
folder: Delivery/Quality Assurance/Enterprise/Dynamic
|
23
|
+
resourcepool: delivery/Quality Assurance/Enterprise/Dynamic
|
24
|
+
pooling_api: http://vmpooler.delivery.puppetlabs.net/
|
25
|
+
forge_host: forge-aio01-petest.puppetlabs.com
|
@@ -0,0 +1,25 @@
|
|
1
|
+
HOSTS:
|
2
|
+
ubuntu-1004-amd64:
|
3
|
+
roles:
|
4
|
+
- master
|
5
|
+
- dashboard
|
6
|
+
- database
|
7
|
+
- agent
|
8
|
+
platform: ubuntu-10.04-amd64
|
9
|
+
template: Delivery/Quality Assurance/Templates/vCloud/ubuntu-1004-x86_64
|
10
|
+
hypervisor: vcloud
|
11
|
+
ubuntu-1004-agent:
|
12
|
+
roles:
|
13
|
+
- agent
|
14
|
+
- frictionless
|
15
|
+
platform: ubuntu-10.04-amd64
|
16
|
+
template: Delivery/Quality Assurance/Templates/vCloud/ubuntu-1004-x86_64
|
17
|
+
hypervisor: vcloud
|
18
|
+
CONFIG:
|
19
|
+
nfs_server: none
|
20
|
+
consoleport: 443
|
21
|
+
datastore: instance0
|
22
|
+
folder: Delivery/Quality Assurance/Enterprise/Dynamic
|
23
|
+
resourcepool: delivery/Quality Assurance/Enterprise/Dynamic
|
24
|
+
pooling_api: http://vmpooler.delivery.puppetlabs.net/
|
25
|
+
forge_host: forge-aio01-petest.puppetlabs.com
|
@@ -0,0 +1,25 @@
|
|
1
|
+
HOSTS:
|
2
|
+
ubuntu-1204-amd64:
|
3
|
+
roles:
|
4
|
+
- master
|
5
|
+
- dashboard
|
6
|
+
- database
|
7
|
+
- agent
|
8
|
+
platform: ubuntu-12.04-amd64
|
9
|
+
template: Delivery/Quality Assurance/Templates/vCloud/ubuntu-1204-x86_64
|
10
|
+
hypervisor: vcloud
|
11
|
+
ubuntu-1204-agent:
|
12
|
+
roles:
|
13
|
+
- agent
|
14
|
+
- frictionless
|
15
|
+
platform: ubuntu-12.04-amd64
|
16
|
+
template: Delivery/Quality Assurance/Templates/vCloud/ubuntu-1204-x86_64
|
17
|
+
hypervisor: vcloud
|
18
|
+
CONFIG:
|
19
|
+
nfs_server: none
|
20
|
+
consoleport: 443
|
21
|
+
datastore: instance0
|
22
|
+
folder: Delivery/Quality Assurance/Enterprise/Dynamic
|
23
|
+
resourcepool: delivery/Quality Assurance/Enterprise/Dynamic
|
24
|
+
pooling_api: http://vmpooler.delivery.puppetlabs.net/
|
25
|
+
forge_host: forge-aio01-petest.puppetlabs.com
|
@@ -0,0 +1,25 @@
|
|
1
|
+
HOSTS:
|
2
|
+
ubuntu-1404-amd64:
|
3
|
+
roles:
|
4
|
+
- master
|
5
|
+
- dashboard
|
6
|
+
- database
|
7
|
+
- agent
|
8
|
+
platform: ubuntu-14.04-amd64
|
9
|
+
template: Delivery/Quality Assurance/Templates/vCloud/ubuntu-1404-x86_64
|
10
|
+
hypervisor: vcloud
|
11
|
+
ubuntu-1404-agent:
|
12
|
+
roles:
|
13
|
+
- agent
|
14
|
+
- frictionless
|
15
|
+
platform: ubuntu-14.04-amd64
|
16
|
+
template: Delivery/Quality Assurance/Templates/vCloud/ubuntu-1404-x86_64
|
17
|
+
hypervisor: vcloud
|
18
|
+
CONFIG:
|
19
|
+
nfs_server: none
|
20
|
+
consoleport: 443
|
21
|
+
datastore: instance0
|
22
|
+
folder: Delivery/Quality Assurance/Enterprise/Dynamic
|
23
|
+
resourcepool: delivery/Quality Assurance/Enterprise/Dynamic
|
24
|
+
pooling_api: http://vmpooler.delivery.puppetlabs.net/
|
25
|
+
forge_host: forge-aio01-petest.puppetlabs.com
|