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
data/.travis.yml
CHANGED
data/CHANGELOG.mkd
CHANGED
@@ -1,6 +1,198 @@
|
|
1
1
|
CHANGELOG
|
2
2
|
=========
|
3
3
|
|
4
|
+
1.5.1
|
5
|
+
-----
|
6
|
+
|
7
|
+
2015/04/09
|
8
|
+
|
9
|
+
### Thanks
|
10
|
+
|
11
|
+
Thanks to all the users that helped track down RK-86, and Zack Smith in specific
|
12
|
+
for tracing the source of the bug.
|
13
|
+
|
14
|
+
### User notes
|
15
|
+
|
16
|
+
(RK-62) Warn when Rugged is compiled without SSH or HTTPS transports
|
17
|
+
|
18
|
+
If Rugged/libgit2 was compiled without libssh2, trying to access a Git
|
19
|
+
repository via SSH throws a fairly cryptic error. It's not terribly easy to
|
20
|
+
specially handle the error message that's being logged, but in lieu of that r10k
|
21
|
+
now checks the Rugged gem to make sure it's compiled with support for SSH and
|
22
|
+
HTTPS when the Rugged Git provider is used.
|
23
|
+
|
24
|
+
(RK-79) Bump minimum required version of faraday_middlware-multi_json
|
25
|
+
|
26
|
+
Faraday 0.9.0 changed the API for middleware plugins, which made it incompatible
|
27
|
+
with the faraday_middleware-multi_json plugin. That plugin supported the new API
|
28
|
+
in version 0.0.6 but the minimum required version in the r10k gemspec was not
|
29
|
+
updated, allowing r10k to be installed with incompatible versions of faraday and
|
30
|
+
faraday_middleware-multi_json. This has been fixed by requiring the minimum
|
31
|
+
compatible version of faraday_middleware-multi_json.
|
32
|
+
|
33
|
+
(RK-86) Git modules don't properly track branches
|
34
|
+
|
35
|
+
R10k 1.5.0 added smarter syncing for Git caches to reduce network traffic, but
|
36
|
+
it accidentally caused branches to stop tracking changes to the remote branch.
|
37
|
+
This has been fixed and the pre-1.5.0 behavior has been restored.
|
38
|
+
|
39
|
+
1.5.0
|
40
|
+
-----
|
41
|
+
|
42
|
+
2015/04/02
|
43
|
+
|
44
|
+
### Announcements
|
45
|
+
|
46
|
+
Ruby 1.8.7 has had a good run, but it's time for r10k to think about moving on.
|
47
|
+
As of r10k 1.5.0, support for Ruby 1.8.7 is officially deprecated. Issues
|
48
|
+
affecting Ruby 1.8.7 will still be fixed, but will be of lower priority. Support
|
49
|
+
for Ruby 1.8.7 will be dropped entirely in r10k 2.0.0.
|
50
|
+
|
51
|
+
### Thanks
|
52
|
+
|
53
|
+
Thanks to the following contributors for their work on this release:
|
54
|
+
|
55
|
+
* [Brett Swift](https://github.com/brettswift) for adding custom prefix values
|
56
|
+
for sources (RK-35)
|
57
|
+
* [Eli Young](https://github.com/elyscape) for adding additional debug
|
58
|
+
information to `r10k version` (RK-37)
|
59
|
+
* [Pete Fritchman](https://github.com/fetep) for removing a warning generated
|
60
|
+
under Ruby 2.2 (RK-55)
|
61
|
+
* [Theo Chatzimichos](https://github.com/tampakrap) for updating the
|
62
|
+
dependency versions for r10k
|
63
|
+
* [ETL](https://github.com/etlweather), [Ben S](https://github.com/juniorsysadmin),
|
64
|
+
and [Robert Nelson](https://github.com/rnelson0) for their documentation
|
65
|
+
contributions
|
66
|
+
|
67
|
+
### User notes
|
68
|
+
|
69
|
+
(GH-57) Git based modules fail to detect presence of git binary
|
70
|
+
|
71
|
+
As part of RK-17, r10k now checks to make sure that the `git` binary is present
|
72
|
+
and executable before trying to run any commands. If Git is missing, r10k will
|
73
|
+
fail hard instead of trying to run and failing on the first failed command.
|
74
|
+
|
75
|
+
(GH-195) (RK-35) Allow sources to specify a custom prefix string
|
76
|
+
|
77
|
+
For r10k deployments that have separate sources for Puppet code and Hiera data,
|
78
|
+
the created environment paths must line up between the code and data repos. With
|
79
|
+
basic prefixing where the source name is used as the prefix string, it's not
|
80
|
+
possible to use prefixing and commonly named environments. This has been fixed
|
81
|
+
so that the source `prefix` option can be given true, false, or a string which
|
82
|
+
is a custom value to use for prefixing.
|
83
|
+
|
84
|
+
(RK-17) Add rugged/libgit2 based Git implementation
|
85
|
+
|
86
|
+
The libgit2 library and Ruby rugged gem provide a native interface to Git for
|
87
|
+
Ruby that is faster and more consistent than shelling out to Git. An additional
|
88
|
+
rugged based Git implementation has been added along the original 'shellgit'
|
89
|
+
implementation, and the implementations can be swapped out as needed.
|
90
|
+
|
91
|
+
(RK-24) Add '/etc/puppetlabs/r10k/r10k.yaml' to config search path
|
92
|
+
|
93
|
+
In order to be more consistent with the rest of the Puppet ecosystem, r10k will
|
94
|
+
now check for configuration in a standard location inside of '/etc/puppetlabs'.
|
95
|
+
The old location, '/etc/r10k.yaml' is still respected so no configuration change
|
96
|
+
is needed at this point, although the old location will be deprecated in the
|
97
|
+
future.
|
98
|
+
|
99
|
+
(RK-25) Warn if both '/etc/r10k.yaml' and '/etc/puppetlabs/r10k/r10k.yaml' exist
|
100
|
+
|
101
|
+
(RK-31) Remove undocumented search for 'r10k.yaml'
|
102
|
+
|
103
|
+
Early versions of r10k would try to search for 'r10k.yaml' in parent
|
104
|
+
directories, in the same manner that programs like Git and Bundler recursively
|
105
|
+
search for configuration. However this functionality isn't terribly useful, is a
|
106
|
+
bit surprising, and adds a lot of complexity. This behavior has been removed in
|
107
|
+
1.5.0.
|
108
|
+
|
109
|
+
(RK-32, RK-33, RK-38) Provide configuration options for Git providers
|
110
|
+
|
111
|
+
The r10k Git providers can now be selected and configured via configuration in
|
112
|
+
r10k.yaml. See the [Git specific documentation](doc/git) for more information on
|
113
|
+
these settings.
|
114
|
+
|
115
|
+
(RK-37) Support higher verbosity levels for `r10k version`
|
116
|
+
|
117
|
+
If `r10k version` is run with the `--verbose` flag, diagnostic information about
|
118
|
+
r10k will be included along with version information.
|
119
|
+
|
120
|
+
(RK-39, RK-66) Improved logging/messaging
|
121
|
+
|
122
|
+
R10k now logs more information about what's going on and is more consistent
|
123
|
+
about which levels it displays messages.
|
124
|
+
|
125
|
+
(RK-74) Improved log formatting
|
126
|
+
|
127
|
+
The log formatting that r10k uses was added in some distant point in the past
|
128
|
+
where there were few users, and wasn't really designed with users in mind. The
|
129
|
+
formatting has been improved so that at lower log levels the formatting will
|
130
|
+
include the log level and nothing else, and at higher levels it will include
|
131
|
+
timing information.
|
132
|
+
|
133
|
+
(RK-75) Optional log coloring
|
134
|
+
|
135
|
+
At higher log levels r10k can produce a lot of logging information at a rapid
|
136
|
+
rate, and in general errors and warnings are not very visually distinct and easy
|
137
|
+
to miss. To help solve these problems r10k 1.5.0 now has optional colored
|
138
|
+
logging to help provide more information/context at a glance. Coloring can be
|
139
|
+
enabled with the `--color` option.
|
140
|
+
|
141
|
+
(GH-265) (RK-11) Unix commands with > 64KiB of output no longer deadlock
|
142
|
+
|
143
|
+
Unix pipes have a maximum buffer size of 64KiB, and if the pipe buffer fills
|
144
|
+
then subsequent writes will block. Since r10k used to wait for a subprocess to
|
145
|
+
finish before reading from the attached pipes, if the process filled the buffers
|
146
|
+
then the processes would deadlock.
|
147
|
+
|
148
|
+
This has been fixed by continually reading from the subprocess pipes to prevent
|
149
|
+
the buffers from filling up.
|
150
|
+
|
151
|
+
Unfortunately implementing this correctly requires reading from the pipes until
|
152
|
+
EOF, which breaks the ssh ControlPersist functionality. Supporting both the
|
153
|
+
ControlPersist functionality while preventing deadlock introduces too many
|
154
|
+
potential race conditions, so unfortunately workarounds for this issue can't be
|
155
|
+
accepted.
|
156
|
+
|
157
|
+
See https://bugzilla.mindrot.org/show_bug.cgi?id=1988 for more information about
|
158
|
+
the ssh ControlPersist bug.
|
159
|
+
|
160
|
+
### Developer notes
|
161
|
+
|
162
|
+
(GH-142) Use Forge v3 API
|
163
|
+
|
164
|
+
R10k was using the old and deprecated v1 Forge API to determine the latest
|
165
|
+
version of Forge modules when using the `:latest` module version. This has been
|
166
|
+
fixed so that the v3 API is used.
|
167
|
+
|
168
|
+
(RK-16) Decouple Git platform dependent and independent code
|
169
|
+
|
170
|
+
The original code that interfaced r10k and Git was very tightly coupled; there
|
171
|
+
was no defined interface and it was expected that r10k would always shell out to
|
172
|
+
Git. This has been fixed by extracting the shellout specific code to a library
|
173
|
+
and defining a common interface for Git classes so that different Git
|
174
|
+
implementations can be used. The existing shellout implementation has been
|
175
|
+
renamed to 'shellgit' and should be functionally equivalent to the Git
|
176
|
+
implementation in previous versions of r10k.
|
177
|
+
|
178
|
+
(RK-55, GH-355) Prevent warnings on Ruby 2.2
|
179
|
+
|
180
|
+
Ruby 2.2 generates warnings when comparing values and `#<=>` raises an
|
181
|
+
exception; the code triggering this behavior has been cleaned up to prevent a
|
182
|
+
warning from being logged.
|
183
|
+
|
184
|
+
(RK-65) Switch to using the semantic_puppet gem
|
185
|
+
|
186
|
+
R10k is switching from the old vendored copy of 'SemVer' that was stolen from
|
187
|
+
Puppet to the 'semantic_puppet' gem, which is the library that Puppet now uses
|
188
|
+
for version comparisons and parsing.
|
189
|
+
|
190
|
+
(RK-48) Ignore deleted versions when fetching latest module version
|
191
|
+
|
192
|
+
When looking up the latest version of a module on the Forge, if the latest
|
193
|
+
version had been deleted r10k would try to install that deleted version anyways.
|
194
|
+
This has been fixed so that all deleted module releases will be ignored.
|
195
|
+
|
4
196
|
1.4.2
|
5
197
|
-----
|
6
198
|
|
data/CONTRIBUTING.mkd
CHANGED
@@ -8,7 +8,7 @@ tracker][github-issue-tracker]. When filing a bug report or feature request,
|
|
8
8
|
please spend a moment to look for existing issue reports and update those with
|
9
9
|
additional information if possible.
|
10
10
|
|
11
|
-
[github-issue-tracker]: https://github.com/
|
11
|
+
[github-issue-tracker]: https://github.com/puppetlabs/r10k/issues
|
12
12
|
|
13
13
|
### Bug reports
|
14
14
|
|
@@ -57,7 +57,7 @@ Contributing fixes and improvements to the core documentation is a great way to
|
|
57
57
|
help improve R10K. Improvements to the FAQ, example code, and so forth can go a
|
58
58
|
long way towards making R10K more approachable for new users and existing users
|
59
59
|
alike. For more information about the submission process please see the section
|
60
|
-
on [code contributions]
|
60
|
+
on [code contributions](#code-contributions).
|
61
61
|
|
62
62
|
## Code contributions
|
63
63
|
|
@@ -75,7 +75,7 @@ guide.
|
|
75
75
|
* To create a new topic branch; `git checkout -b fix/master/my_contribution master`
|
76
76
|
* Please avoid working directly on the 'master' branch.
|
77
77
|
* Make commits of logical units.
|
78
|
-
* Your commit should include a high level description of your work
|
78
|
+
* Your commit message should include a high level description of your work.
|
79
79
|
* Check for unnecessary whitespace with `git diff --check` before committing.
|
80
80
|
|
81
81
|
```
|
data/Gemfile
CHANGED
data/README.mkd
CHANGED
@@ -3,16 +3,15 @@ r10k
|
|
3
3
|
|
4
4
|
Puppet environment and module deployment
|
5
5
|
|
6
|
-
[![Build Status](https://travis-ci.org/
|
6
|
+
[![Build Status](https://travis-ci.org/puppetlabs/r10k.png?branch=master)](https://travis-ci.org/puppetlabs/r10k)
|
7
7
|
|
8
8
|
Description
|
9
9
|
-----------
|
10
10
|
|
11
|
-
[librarian-puppet]: https://github.com/rodjek/librarian-puppet
|
12
11
|
[workflow]: http://puppetlabs.com/blog/git-workflow-and-puppet-environments/
|
13
12
|
|
14
13
|
R10k provides a general purpose toolset for deploying Puppet environments and
|
15
|
-
modules. It implements the [Puppetfile]
|
14
|
+
modules. It implements the [Puppetfile](doc/puppetfile.mkd) format and provides a native
|
16
15
|
implementation of Puppet [dynamic environments][workflow].
|
17
16
|
|
18
17
|
Requirements
|
@@ -20,7 +19,7 @@ Requirements
|
|
20
19
|
|
21
20
|
R10k supports the following Ruby versions:
|
22
21
|
|
23
|
-
- 1.8.7 (POSIX minimum version)
|
22
|
+
- 1.8.7 (POSIX minimum version, deprecated)
|
24
23
|
- 1.9.3 (Windows minimum version)
|
25
24
|
- 2.0.0
|
26
25
|
- 2.1.0
|
@@ -33,6 +32,14 @@ environments and modules.
|
|
33
32
|
- Git is required for creating environments and modules from Git
|
34
33
|
- SVN is required for creating environments and modules from SVN
|
35
34
|
|
35
|
+
### Ruby 1.8.7 is deprecated
|
36
|
+
|
37
|
+
As of r10k 1.5.0, support for Ruby 1.8.7 is deprecated. Because of the
|
38
|
+
increasing cost of supporting Ruby 1.8.7, issues only affecting 1.8.7 will be
|
39
|
+
fixed but will have a lower priority.
|
40
|
+
|
41
|
+
Support for 1.8.7 will be dropped entirely in r10k 2.0.0.
|
42
|
+
|
36
43
|
Installation
|
37
44
|
------------
|
38
45
|
|
@@ -57,7 +64,7 @@ installation:
|
|
57
64
|
If you have more specific needs or plan on modifying r10k you can run it out of
|
58
65
|
a git repository using Bundler for dependencies:
|
59
66
|
|
60
|
-
git clone git://github.com/
|
67
|
+
git clone git://github.com/puppetlabs/r10k
|
61
68
|
cd r10k
|
62
69
|
bundle install
|
63
70
|
bundle exec r10k help
|
@@ -73,7 +80,7 @@ information see the topic specific documentation:
|
|
73
80
|
* [Environment Deployment Documentation](doc/dynamic-environments.mkd)
|
74
81
|
* [Quickstart](doc/dynamic-environments/quickstart.mkd)
|
75
82
|
* [Common Patterns](doc/common-patterns.mkd)
|
76
|
-
* [Workflow Guide](doc/workflow-guide.mkd)
|
83
|
+
* [Workflow Guide](doc/dynamic-environments/workflow-guide.mkd)
|
77
84
|
|
78
85
|
For more general questions, see the [FAQ](doc/faq.mkd).
|
79
86
|
|
@@ -7,11 +7,27 @@ deployed.
|
|
7
7
|
Config file location
|
8
8
|
--------------------
|
9
9
|
|
10
|
-
|
11
|
-
You can specify an alternate configuration file by specifying the `--config`
|
12
|
-
option, like so:
|
10
|
+
### Manual configuration
|
13
11
|
|
14
|
-
|
12
|
+
An explicit configuration file location be specified by providing the `--config`
|
13
|
+
option to `r10k deploy`, like so:
|
14
|
+
|
15
|
+
r10k deploy --config /srv/puppet/r10k.yaml [...]
|
16
|
+
|
17
|
+
### Automatic configuration
|
18
|
+
|
19
|
+
If an explicit configuration file is not given, r10k will search the following
|
20
|
+
locations for a configuration file.
|
21
|
+
|
22
|
+
* `{current working directory}/r10k.yaml`
|
23
|
+
* `/etc/puppetlabs/r10k/r10k.yaml` (1.5.0 and later)
|
24
|
+
* `/etc/r10k.yaml` (deprecated in 1.5.0)
|
25
|
+
|
26
|
+
In 1.5.0 r10k added `/etc/puppetlabs/r10k/r10k.yaml` to the configuration search
|
27
|
+
path. The old location, `/etc/r10k.yaml` has been deprecated in favor of the new
|
28
|
+
location. If both `/etc/puppetlabs/r10k/r10k.yaml` and `/etc/r10k.yaml` exist
|
29
|
+
and explicit configuration file has not been given, r10k will log a warning and
|
30
|
+
use `/etc/puppetlabs/r10k/r10.yaml`.
|
15
31
|
|
16
32
|
General options
|
17
33
|
---------------
|
@@ -36,6 +52,22 @@ The cachedir setting defaults to `~/.r10k`. If the HOME environment variable is
|
|
36
52
|
unset r10k will assume that r10k is being run with the Puppet [`prerun_command`][prerun_command]
|
37
53
|
setting and will set the cachedir default to `/root/.r10k`.
|
38
54
|
|
55
|
+
### git
|
56
|
+
|
57
|
+
The 'git' setting is a hash that contains Git specific settings.
|
58
|
+
|
59
|
+
#### provider
|
60
|
+
|
61
|
+
The provider option determines which Git provider should be used.
|
62
|
+
|
63
|
+
```yaml
|
64
|
+
git:
|
65
|
+
provider: rugged # one of shellgit, rugged
|
66
|
+
```
|
67
|
+
|
68
|
+
See the [git provider documentation](../git/providers.mkd) for more information
|
69
|
+
regarding Git providers.
|
70
|
+
|
39
71
|
Deployment options
|
40
72
|
------------------
|
41
73
|
|
@@ -84,7 +116,7 @@ from. It may be any valid URL that the source may check out or clone. The remote
|
|
84
116
|
must be able to be fetched without any interactive input, eg usernames or
|
85
117
|
passwords cannot be prompted for in order to fetch the remote.
|
86
118
|
|
87
|
-
```
|
119
|
+
```yaml
|
88
120
|
---
|
89
121
|
sources:
|
90
122
|
mysource:
|
@@ -104,9 +136,11 @@ sources:
|
|
104
136
|
basedir: '/etc/puppet/environments'
|
105
137
|
```
|
106
138
|
|
107
|
-
|
108
|
-
|
109
|
-
|
139
|
+
If two different sources have the same basedir, it's possible for them to create
|
140
|
+
two separate environments with the same name and file path. If this occurs r10k
|
141
|
+
will treat this as a fatal error and will abort. To avoid this, use prefixing on one
|
142
|
+
or both of the sources to make sure that all environment names are unique. See
|
143
|
+
also the [prefix](#prefix) setting.
|
110
144
|
|
111
145
|
### prefix
|
112
146
|
|
@@ -121,6 +155,10 @@ sources:
|
|
121
155
|
basedir: '/etc/puppet/environments'
|
122
156
|
prefix: true # All environments will be prefixed with "mysource_"
|
123
157
|
```
|
158
|
+
#### prefix behaviour
|
159
|
+
* if `true` environment folder will be prefixed with the name of the source.
|
160
|
+
* if `false` (default) environment folder will not be prefixed
|
161
|
+
* if `String` environment folder will be prefixed with the `prefix` value.
|
124
162
|
|
125
163
|
Examples
|
126
164
|
--------
|
@@ -190,3 +228,34 @@ This will create the following directory structure:
|
|
190
228
|
`-- dev_loadtest # dev repository, loadtest branch
|
191
229
|
```
|
192
230
|
|
231
|
+
#### Multiple tenancy with external hieradata
|
232
|
+
|
233
|
+
If hiera data is in a separate repository from your control repository, you
|
234
|
+
must override the `prefix` so environment folders line up in both directories:
|
235
|
+
|
236
|
+
```yaml
|
237
|
+
---
|
238
|
+
sources:
|
239
|
+
main:
|
240
|
+
app1_data:
|
241
|
+
remote: 'git://git-server.site/my-org/app1-hieradata'
|
242
|
+
basedir: '/etc/puppet/hieradata'
|
243
|
+
prefix: "app1"
|
244
|
+
app1_modules:
|
245
|
+
remote: 'git://git-server.site/my-org/app1-puppet-modules'
|
246
|
+
basedir: '/etc/puppet/environments'
|
247
|
+
prefix: "app1"
|
248
|
+
```
|
249
|
+
|
250
|
+
|
251
|
+
This will create the following directory structure:
|
252
|
+
|
253
|
+
```
|
254
|
+
/etc/puppet/environments
|
255
|
+
|-- app1_production # app1 modules repository, production branch
|
256
|
+
|-- app1_develop # app1 modules repository, develop branch
|
257
|
+
|
258
|
+
/etc/puppet/hieradata
|
259
|
+
|-- app1_production # app1 data repository, production branch
|
260
|
+
|-- app1_develop # app1 data repository, develop branch
|
261
|
+
```
|
@@ -12,7 +12,7 @@ The core idea of dynamic environments is that you should be able to manage your
|
|
12
12
|
Puppet modules in the same manner that you would manage any other code base. It
|
13
13
|
builds on top of Git topic branch model.
|
14
14
|
|
15
|
-
[git-topic-branching]: http://git-scm.com/book/en/Git-Branching-Branching-Workflows#Topic-Branches
|
15
|
+
[git-topic-branching]: http://git-scm.com/book/en/Git-Branching-Branching-Workflows#Topic-Branches
|
16
16
|
|
17
17
|
One of the most prevalent ways of using Git relies on using [topic branches][git-topic-branching].
|
18
18
|
Whenever changes need to be made that need to be reviewed or tested before going
|
@@ -22,7 +22,7 @@ is completed it is merged into a "master" or "production" branch. This is very
|
|
22
22
|
powerful because it allows any number of people to rapidly develop features in
|
23
23
|
isolation and merge features in a single operation.
|
24
24
|
|
25
|
-
The dynamic environment model extends
|
25
|
+
The dynamic environment model extends this git branching strategy to
|
26
26
|
your live Puppet masters. It creates a mapping between Git branches and Puppet
|
27
27
|
environments so that you can use the Git branching model and have that be
|
28
28
|
seamlessly reflected in Puppet environments. This means that creating a new Git
|
@@ -45,6 +45,16 @@ future r10k runs. Finally, if there are directories that do not match existing
|
|
45
45
|
branches, r10k will assume that the branches for those environments were delete
|
46
46
|
and will remove those environments.
|
47
47
|
|
48
|
+
r10k will need to be be able to authenticate with each repository. Most Git
|
49
|
+
systems support authentication with SSH keys. GitHub calls them [deploy
|
50
|
+
keys][github-deploy-keys]. Bitbucket calls them [deployment
|
51
|
+
keys][bitbucket-deployment-keys]. Stash calls them [SSH access
|
52
|
+
keys][stash-access-keys].
|
53
|
+
|
54
|
+
[github-deploy-keys]: https://developer.github.com/guides/managing-deploy-keys/#deploy-keys
|
55
|
+
[bitbucket-deployment-keys]: https://confluence.atlassian.com/display/BITBUCKET/Use+deployment+keys
|
56
|
+
[stash-access-keys]: https://confluence.atlassian.com/display/STASH/SSH+access+keys+for+system+use
|
57
|
+
|
48
58
|
Configuration
|
49
59
|
-------------
|
50
60
|
|