r10k 1.3.5 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +1 -1
  3. data/CHANGELOG.mkd +210 -0
  4. data/CONTRIBUTING.mkd +105 -0
  5. data/Gemfile +2 -6
  6. data/README.mkd +97 -0
  7. data/doc/common-patterns.mkd +44 -0
  8. data/doc/dynamic-environments.mkd +12 -5
  9. data/doc/dynamic-environments/configuration.mkd +16 -1
  10. data/doc/dynamic-environments/{git-environments.markdown → git-environments.mkd} +13 -9
  11. data/doc/dynamic-environments/introduction.mkd +1 -2
  12. data/doc/dynamic-environments/master-configuration.mkd +70 -0
  13. data/doc/dynamic-environments/quickstart.mkd +241 -0
  14. data/doc/dynamic-environments/svn-environments.mkd +45 -0
  15. data/doc/dynamic-environments/usage.mkd +44 -5
  16. data/doc/dynamic-environments/workflow-guide.mkd +247 -0
  17. data/doc/faq.mkd +52 -0
  18. data/doc/puppetfile.mkd +203 -0
  19. data/lib/r10k/action/cri_runner.rb +75 -0
  20. data/lib/r10k/action/deploy.rb +9 -0
  21. data/lib/r10k/action/deploy/display.rb +104 -0
  22. data/lib/r10k/action/deploy/environment.rb +92 -0
  23. data/lib/r10k/action/deploy/module.rb +70 -0
  24. data/lib/r10k/action/puppetfile.rb +10 -0
  25. data/lib/r10k/action/puppetfile/check.rb +41 -0
  26. data/lib/r10k/action/puppetfile/cri_runner.rb +32 -0
  27. data/lib/r10k/action/puppetfile/install.rb +53 -0
  28. data/lib/r10k/action/puppetfile/purge.rb +37 -0
  29. data/lib/r10k/action/runner.rb +36 -0
  30. data/lib/r10k/action/visitor.rb +31 -0
  31. data/lib/r10k/cli/deploy.rb +14 -45
  32. data/lib/r10k/cli/puppetfile.rb +15 -53
  33. data/lib/r10k/deployment.rb +113 -58
  34. data/lib/r10k/deployment/basedir.rb +3 -38
  35. data/lib/r10k/deployment/config.rb +2 -1
  36. data/lib/r10k/deployment/source.rb +2 -0
  37. data/lib/r10k/environment/base.rb +40 -0
  38. data/lib/r10k/environment/git.rb +14 -17
  39. data/lib/r10k/environment/svn.rb +31 -15
  40. data/lib/r10k/errors.rb +33 -22
  41. data/lib/r10k/errors/formatting.rb +28 -0
  42. data/lib/r10k/execution.rb +2 -0
  43. data/lib/r10k/git/cache.rb +1 -6
  44. data/lib/r10k/git/errors.rb +1 -2
  45. data/lib/r10k/git/ref.rb +1 -1
  46. data/lib/r10k/module.rb +1 -1
  47. data/lib/r10k/module/base.rb +94 -2
  48. data/lib/r10k/module/forge.rb +33 -30
  49. data/lib/r10k/module/git.rb +13 -9
  50. data/lib/r10k/module/svn.rb +41 -28
  51. data/lib/r10k/puppetfile.rb +17 -1
  52. data/lib/r10k/semver.rb +2 -0
  53. data/lib/r10k/source/base.rb +8 -0
  54. data/lib/r10k/source/git.rb +1 -1
  55. data/lib/r10k/source/svn.rb +23 -5
  56. data/lib/r10k/svn/remote.rb +23 -3
  57. data/lib/r10k/svn/working_dir.rb +60 -9
  58. data/lib/r10k/task.rb +1 -0
  59. data/lib/r10k/task/deployment.rb +9 -1
  60. data/lib/r10k/task/environment.rb +2 -0
  61. data/lib/r10k/task/module.rb +1 -0
  62. data/lib/r10k/task/puppetfile.rb +3 -0
  63. data/lib/r10k/task_runner.rb +1 -0
  64. data/lib/r10k/util/attempt.rb +84 -0
  65. data/lib/r10k/util/basedir.rb +65 -0
  66. data/lib/r10k/util/purgeable.rb +55 -45
  67. data/lib/r10k/util/setopts.rb +53 -0
  68. data/lib/r10k/util/subprocess.rb +6 -30
  69. data/lib/r10k/util/subprocess/posix/runner.rb +29 -2
  70. data/lib/r10k/util/subprocess/result.rb +17 -4
  71. data/lib/r10k/util/subprocess/subprocess_error.rb +24 -0
  72. data/lib/r10k/version.rb +1 -1
  73. data/r10k.gemspec +7 -29
  74. data/spec/fixtures/unit/puppetfile/invalid-syntax/Puppetfile +1 -0
  75. data/spec/fixtures/unit/puppetfile/load-error/Puppetfile +1 -0
  76. data/spec/matchers/exit_with.rb +28 -0
  77. data/spec/r10k-mocks.rb +3 -0
  78. data/spec/r10k-mocks/mock_config.rb +28 -0
  79. data/spec/r10k-mocks/mock_env.rb +7 -0
  80. data/spec/r10k-mocks/mock_source.rb +10 -0
  81. data/spec/shared-examples/git-ref.rb +7 -7
  82. data/spec/spec_helper.rb +17 -5
  83. data/spec/unit/action/cri_runner_spec.rb +76 -0
  84. data/spec/unit/action/puppetfile/cri_action_spec.rb +65 -0
  85. data/spec/unit/action/runner_spec.rb +64 -0
  86. data/spec/unit/action/visitor_spec.rb +39 -0
  87. data/spec/unit/deployment_spec.rb +142 -0
  88. data/spec/unit/environment/base_spec.rb +38 -0
  89. data/spec/unit/environment/git_spec.rb +40 -10
  90. data/spec/unit/environment/svn_spec.rb +41 -4
  91. data/spec/unit/errors/formatting_spec.rb +84 -0
  92. data/spec/unit/git/alternates_spec.rb +1 -1
  93. data/spec/unit/git/head_spec.rb +1 -1
  94. data/spec/unit/git/ref_spec.rb +1 -1
  95. data/spec/unit/git/working_dir_spec.rb +1 -1
  96. data/spec/unit/module/base_spec.rb +72 -0
  97. data/spec/unit/module/forge_spec.rb +49 -8
  98. data/spec/unit/module/git_spec.rb +78 -0
  99. data/spec/unit/module/svn_spec.rb +40 -4
  100. data/spec/unit/module_spec.rb +3 -3
  101. data/spec/unit/puppetfile_spec.rb +84 -0
  102. data/spec/unit/settings/container_spec.rb +1 -1
  103. data/spec/unit/source/base_spec.rb +31 -0
  104. data/spec/unit/source/git_spec.rb +7 -7
  105. data/spec/unit/source/svn_spec.rb +1 -1
  106. data/spec/unit/svn/working_dir_spec.rb +56 -0
  107. data/spec/unit/util/attempt_spec.rb +82 -0
  108. data/spec/unit/util/setopts_spec.rb +59 -0
  109. data/spec/unit/util/subprocess/result_spec.rb +36 -0
  110. data/spec/unit/util/subprocess/subprocess_error_spec.rb +26 -0
  111. data/spec/unit/util/subprocess_spec.rb +2 -7
  112. metadata +83 -100
  113. data/.nodeset.yml +0 -7
  114. data/.rspec +0 -1
  115. data/README.markdown +0 -276
  116. data/Rakefile +0 -1
  117. data/doc/puppetfile.markdown +0 -87
  118. data/spec/rspec-system-r10k/puppetfile.rb +0 -24
  119. data/spec/rspec-system-r10k/tmpdir.rb +0 -32
  120. data/spec/system-provisioning/el.rb +0 -38
  121. data/spec/system/module/forge/install_spec.rb +0 -51
  122. data/spec/system/module/git/install_spec.rb +0 -117
  123. data/spec/system/module/svn/install_spec.rb +0 -51
  124. data/spec/system/module/svn/update_spec.rb +0 -38
  125. data/spec/system/spec_helper.rb +0 -60
  126. data/spec/system/system-helpers.rb +0 -4
  127. data/spec/system/version_spec.rb +0 -7
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YmQxYWU2Zjk4NzkwODMwNWYyZWMxMTA0NGZmMjg3NGFiNDM1OThlNA==
5
+ data.tar.gz: !binary |-
6
+ ZmRiYjU3NDk4ZTA0ZDdiYTYxMDc4YTU2ZTg4MzQ5MjFkYjNmZjVlNw==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ YjE4YmM1ZmFlNDA1NWVkODYwMGU4YzQzYjk2OTNhOWY0ZWIwMjFkYjZmZmFk
10
+ ZWE3ZTA1MzEzNzgxYzNhZmVhMmYzZTQ1YzUwNTRiMTQ1NWU4MmRhMWM4ODBk
11
+ YWMzMDE3ZmRiYWQzNDA0MzhmNjk0ZTBlYzBkNDdjN2IwYjJmMGM=
12
+ data.tar.gz: !binary |-
13
+ MjNiNGJhYmQ1YWNlYjc0MzVhZWNmYzUwNjM2ZWEwMzcwYjZjYjA3OGRhOTAw
14
+ ZDk4MTQ2ZjlmMWQ5ZDBjNzdiY2RjNjVmY2JiOWQ5MGVmNjRmNjliNWEzNjkx
15
+ YTQ4YjI1ZWYwZmE1ZTk2NWZiOTczNTUwZTA2OWRiNGZmMmM1NzM=
data/.gitignore CHANGED
@@ -3,4 +3,4 @@ Gemfile.local
3
3
  Gemfile.lock
4
4
  .bundle
5
5
  bundle
6
- /.rspec_system
6
+ coverage
@@ -1,6 +1,216 @@
1
1
  CHANGELOG
2
2
  =========
3
3
 
4
+ 1.4.0
5
+ -----
6
+
7
+ 2014/12/2
8
+
9
+ ### User notes
10
+
11
+ (GH-40) Display expected and actual module versions
12
+
13
+ When displaying the state of a deployment, modules would report a version but
14
+ would not indicate if that was the expected version or desired version. This has
15
+ been changed so that both the expected and actual module version information is
16
+ displayed. Because determining the actual version for modules can be slow the
17
+ `--detail` flag must be passed to display this information.
18
+
19
+ (GH-43) Using a relative `moduledir` in the Puppetfile is relative to the Puppetfile
20
+
21
+ The `moduledir` setting in the Puppetfile could be used to set a custom
22
+ directory for Puppetfile modules, but if a relative path was used it was
23
+ relative to the current working directory. As of 1.4.0 a relative `moduledir`
24
+ setting will be expanded to the Puppetfile, which should make it much easier to
25
+ use a directory other than 'modules' for the Puppetfile installed modules.
26
+
27
+ (GH-68) Add alias for `r10k deploy display`
28
+
29
+ The `r10k deploy display` subcommand had unfriendly syntax, and now has an
30
+ alias of `r10k deploy list`.
31
+
32
+ (GH-92) Support `mod 'owner/module'` for Git and SVN modules
33
+
34
+ The original implementation of Git and SVN based modules assumed that the module
35
+ name was only the name component, and did not include the owner component of the
36
+ module. Because of this the full module name was added to the path, which meant
37
+ that a Git module or SVN module called `foo/bar` would be created as
38
+ `$moduledir/foo/bar`, after which r10k would check for stale modules, see a
39
+ module called `foo`, and delete it.
40
+
41
+ This has now been corrected so that all modules may have an owner and name, and
42
+ only the name will be used when constructing the module path.
43
+
44
+ Issues also closed as part of GH-92:
45
+
46
+ * GH-78
47
+
48
+ (GH-96) Provide output from Git command failures
49
+
50
+ When r10k encounters an error while running a command, it will always log the
51
+ failed command and the output of the command. This should make it dramatically
52
+ easier to diagnose issues with the underlying commands used by r10k without
53
+ having to re-run the failing r10k command with a myriad of command line flags.
54
+
55
+ Issues also closed as part of GH-96:
56
+
57
+ * GH-46
58
+ * GH-94
59
+
60
+ (GH-121) Support for calling an arbitrary script after deployment
61
+
62
+ Users can now specify a `postrun` setting in `r10k.yaml` to run an arbitrary
63
+ command after an environment deployment finishes. The current implementation is
64
+ fairly simple and isn't passed additional information about the deployment and
65
+ is mainly meant to notify other services that the deployment has completed.
66
+ Future versions of r10k will provide more information to this command so that
67
+ more complex actions can be taken on success and failure.
68
+
69
+ (GH-155) Allow SVN credentials to be added for modules/environments, disallow interactive SVN
70
+
71
+ When interacting with SVN modules, r10k could run SVN commands that could try to
72
+ prompt the user for input but were not provided access to stdin. R10k is meant
73
+ to be non-interactive so credentials need to be provided in some manner, but
74
+ cannot be provided directly by the user.
75
+
76
+ As of 1.4.0 SVN environments and modules can supply a username and password to
77
+ be used when interacting with the SVN remote, and SVN commands are run with
78
+ `--non-interactive` to prevent commands from trying to grab stdin.
79
+
80
+ **Note**: SVN credentials are passed as command line options, so the SVN
81
+ credentials may be visible in the process table when r10k is running. If you
82
+ choose to supply SVN credentials make sure that the system running r10k is
83
+ appropriately secured.
84
+
85
+ (GH-169) Perform non-blocking reads on stderr in Subprocess
86
+
87
+ When using SSH with a Control Master, the first time an SSH connection is
88
+ launched it will persist and will hang onto stderr from the parent process.
89
+ R10k was using blocking IO to read from child processes and assumed that the
90
+ file descriptors would be closed when the launched process exited, and the
91
+ persistent SSH process would cause r10k to hang.
92
+
93
+ The subprocess code has been updated to perform nonblocking reads of stderr;
94
+ when the child process exits it assumes that even if stderr is held open nothing
95
+ else should be written to it, drains the buffered pipe content and returns with
96
+ that.
97
+
98
+ This is working around buggy behavior in SSH, but this problem doesn't look like
99
+ it'll go away so the best course of action is to incorporate this fix into
100
+ downstream.
101
+
102
+ (GH-180) Don't leak FDs when executing subcommands
103
+
104
+ R10k was not explicitly closing all file descriptors, and on Ruby 1.8.7 these
105
+ would not be closed by the garbage collector, causing file descriptors to leak.
106
+ This has been fixed and all file descriptors should be closed after each
107
+ subprocess is invoked.
108
+
109
+ Major thanks to Jeremy Asher for discovering and fixing this.
110
+
111
+ (GH-193) Don't purge environments if environment sources can't be fetched
112
+
113
+ The original behavior for deploying environments with r10k was to fetch sources,
114
+ deploy environments from those sources, and then clean up any orphaned
115
+ environments. If a source had been fetched before but could not be reached then
116
+ r10k would use the previously fetched branch information to update environments.
117
+ In normal cases this would provide a reasonably robust failure mode.
118
+
119
+ However, this meant that if no sources had been be fetched or the source remote
120
+ information was typoed, r10k would have no source information, could enumerate
121
+ no environments, and then enter HULK SMASH mode where it would delete all
122
+ unmanaged environments - AKA everything. This is an uncommon failure mode but
123
+ could bite environments that were setting up r10k for the first time.
124
+
125
+ To resolve this issue, r10k will try to fetch all sources and if any source
126
+ fails to be fetched then r10k will abort the entire deployment. This means that
127
+ r10k will fail very early before any changes have been made which is a safe time
128
+ to fail. If the errors were transitory then r10k can be run again, and if the
129
+ failures are permanent then it's hard to safely update anything and extremely
130
+ dangerous to try to delete any environments.
131
+
132
+ (GH-202) Different environments cannot manage the same path
133
+
134
+ R10k allowed for multiple sources to create environments but did not have
135
+ semantics for environments from different sources managing the same path. If
136
+ this happened, the resulting behavior would be undefined and could do any number
137
+ of strange things. The approach to this was by convention and prefixing was
138
+ recommended to avoid this, but it's still not a great approach.
139
+
140
+ This was resolved by looking for environment collisions before deploying; if
141
+ collisions exist then r10k will abort the deployment.
142
+
143
+ Note: The commit that fixed this referenced GH-123 instead of GH-202.
144
+
145
+ (GH-214) Rescue SyntaxError and LoadError when evaluating Puppetfiles
146
+
147
+ Since Puppetfiles are just a Ruby DSL it's possible to have multiple Puppetfiles
148
+ that are aggregated by using `require` or `load`. However these methods raise
149
+ exceptions that don't descend from `StandardError`, so the normal error handling
150
+ would not catch them, so a malformed Puppetfile could catastrophically crash
151
+ r10k.
152
+
153
+ Because the Puppetfile is not an actual source file in the conventional sense we
154
+ can recover from these errors and continue, so r10k will now recover from these
155
+ errors. If a SyntaxError or LoadError is raised while evaluating a Puppetfile,
156
+ r10k will rescue them and wrap them in an R10K::Error and then raise that, which
157
+ can be caught and handled as a normal, non-critical exception.
158
+
159
+ (GH-221) Only deploy modules once for each environment deploy
160
+
161
+ If an environment was deployed for the first time and `--puppetfile` was
162
+ specified, the initial creation would create the environment and then deploy
163
+ modules, and then the modules would be deployed again because `--puppetfile` was
164
+ separate code. The deploy logic has been refactored to consider `--puppetfile`
165
+ being passed or the environment being created to be equivalent and will only
166
+ deploy modules once.
167
+
168
+ ### Developer notes
169
+
170
+ `R10K::Environment::Base#sync` is no longer recursive; callers are expected to
171
+ handle recursive updates if needed.
172
+
173
+ The `R10K::Action` namespace has been added to provide an API to r10k
174
+ functionality. These should be used by any code that wants to interact with r10k
175
+ and should provide an alternative to shelling out to r10k or using `R10K::CLI`
176
+ directly. The individual action objects should be called through
177
+ `R10K::Action::Runner` so that application setup and teardown is handled.
178
+
179
+ ### Thanks
180
+
181
+ Thanks to the following contributors for their work on this release:
182
+
183
+ * [Robert Nelson](https://github.com/rnelson0) for his work on documenting
184
+ workflows and best practices with r10k and adding convenience aliases for
185
+ `r10k deploy display`
186
+ * [Wolf Noble](https://github.com/rmnwolf) for homogenizing markdown file
187
+ extensions
188
+ * [Thomas Bartelmess](https://github.com/tbartelmess) for updating the
189
+ required version of cri
190
+ * [Theo Chatzimichos](https://github.com/tampakrap) for correcting the license
191
+ format to conform to SPDX
192
+ * [Richard Raseley](https://github.com/richardraseley) for writing a
193
+ quickstart guide for r10k
194
+ * [Matthew Haughton](https://github.com/3flex) for fixing documentation typos
195
+ * [Markus Frosch](https://github.com/lazyfrosch) for fixing a regression in
196
+ how duplicate environments are checked for, before the regression was ever
197
+ released. Good catch!
198
+ * [Jeremy Asher](https://github.com/jeremyasher) for fixing file descriptor
199
+ leaks and hanging on open file descriptors in the Subprocess module. Great
200
+ sleuthing on this!
201
+ * [Guzman Braso](https://github.com/guzmanbraso) for adding Debian support
202
+ and fixing some bugs in the quickstart documentation.
203
+ * [David Schmitt](https://github.com/DavidS) for fixing markdown syntax errors
204
+ so that link URLs would render properly in GitHub
205
+ * [Christophe Bliard](https://github.com/cbliard) for fixing the Puppetfile
206
+ moduledir setting to treat relative paths as relative to the Puppetfile
207
+ * [Christoph Föhrdes](https://github.com/cfoehrdes) For fixing a copy/paste
208
+ error in the Puppetfile documentation
209
+
210
+ In addition to those who contributed to the code base, thanks to all those that
211
+ reported and commented on issues; user input makes it much easier to make r10k a
212
+ better project!
213
+
4
214
  1.3.5
5
215
  -----
6
216
 
@@ -0,0 +1,105 @@
1
+ Contributing
2
+ ============
3
+
4
+ ## Bug reports and feature requests
5
+
6
+ Bug reports and feature requests may be filed on the [GitHub issue
7
+ tracker][github-issue-tracker]. When filing a bug report or feature request,
8
+ please spend a moment to look for existing issue reports and update those with
9
+ additional information if possible.
10
+
11
+ [github-issue-tracker]: https://github.com/adrienthebo/r10k/issues
12
+
13
+ ### Bug reports
14
+
15
+ When filing a bug report, include as much relevant detailed information as
16
+ possible. Try to include the following:
17
+
18
+ * A descriptive summary of the bug
19
+ * When the bug first occurred
20
+ * What sort of events may have triggered the bug
21
+ * The expected behavior
22
+ * The actual behavior
23
+ * Steps to reproduce
24
+
25
+ If if you're seeing errors or crashes you can run R10K with the `-v debug2` to
26
+ greatly increase the log level and `--trace` to print any stack traces that may
27
+ be caught.
28
+
29
+ Including a reproduction environment with something like Vagrant is tremendously
30
+ helpful and can greatly speed up the time it takes to fix your issue!
31
+
32
+ ### Feature requests
33
+
34
+ When filing a feature request, include information about how important the
35
+ feature is, how it would generally be used in your environment, and how often
36
+ this feature would be used by other users as well. Please keep in mind that
37
+ each added feature incurs additional maintenance costs, so feature requests
38
+ should strive to solve a frequent pain point for users or generally make r10k a
39
+ more effective tool for a large number of r10k users.
40
+
41
+ The policy towards feature requests in r10k has been greatly shaped by Brian
42
+ Granger's post on [features and scope in open source software][features-and-scope].
43
+
44
+ Try to include the following:
45
+
46
+ * A descriptive summary of the feature
47
+ * How you expect to use this feature
48
+ * How important this feature is for your environment
49
+ * How useful this feature would be for other users
50
+ * Any potential caveats this may have or any issues this feature may have
51
+
52
+ [features-and-scope]: http://brianegranger.com/?p=249 "Features and Scope in Open Source Software"
53
+
54
+ ## Documentation
55
+
56
+ Contributing fixes and improvements to the core documentation is a great way to
57
+ help improve R10K. Improvements to the FAQ, example code, and so forth can go a
58
+ long way towards making R10K more approachable for new users and existing users
59
+ alike. For more information about the submission process please see the section
60
+ on [code contributions][#code-contributions].
61
+
62
+ ## Code contributions
63
+
64
+ This documentation is based on the Project Hydra
65
+ [CONTRIBUTING](https://github.com/projecthydra/hydra-head/blob/master/CONTRIBUTING.md)
66
+ guide.
67
+
68
+ ### Making changes
69
+
70
+ * Fork the repository on GitHub
71
+ * Create a topic branch from where you want to base your work.
72
+ * For new features, base your code off of 'master'.
73
+ * For critical bugfixes, base your code off of the appropriate maintenance
74
+ branch series, eg '1.2.x' or '1.3.x'
75
+ * To create a new topic branch; `git checkout -b fix/master/my_contribution master`
76
+ * Please avoid working directly on the 'master' branch.
77
+ * Make commits of logical units.
78
+ * Your commit should include a high level description of your work in HISTORY.textile
79
+ * Check for unnecessary whitespace with `git diff --check` before committing.
80
+
81
+ ```
82
+ [code/subsystem] (GH-#) Present tense short summary (80 characters or less)
83
+
84
+ More detailed description, if necessary. It should be wrapped to 80
85
+ characters. Try to be as descriptive as you can, even if you think that
86
+ the commit content is obvious, it may not be obvious to others. You
87
+ should add such description also if it's already present in bug tracker,
88
+ it should not be necessary to visit a webpage to check the history.
89
+ ```
90
+
91
+ * Make sure you have added the necessary tests for your changes.
92
+ * Run _all_ the tests to assure nothing else was accidentally broken.
93
+
94
+ ### Submitting changes
95
+
96
+ * Push your changes to a topic branch in your fork of the repository.
97
+ * Submit a pull request from your fork to the project.
98
+ * Expect to have some further discussion of your submission prior to it being merged.
99
+
100
+ Please note - code review is an essential part of the code review and submission
101
+ process. In order to keep the code base clean and maintainable questions may be
102
+ asked on implementation decisions and you may be asked to make additional
103
+ changes to the contribution. Remember - feedback is never personal and should be
104
+ given to benefit both the submitter as well as the project receiving the
105
+ contribution.
data/Gemfile CHANGED
@@ -2,12 +2,8 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
- group(:system) do
6
- gem 'rake'
7
- gem 'rspec-system', '~> 2.8.0'
8
- gem 'rspec-system-serverspec', '~> 2.0.1'
9
- gem 'net-ssh', '2.7.0'
10
- gem 'vagrant', :git => 'git://github.com/mitchellh/vagrant', :tag => 'v1.4.1'
5
+ group :development do
6
+ gem 'simplecov', '~> 0.9.1' if RUBY_VERSION > '1.8.7'
11
7
  end
12
8
 
13
9
  if File.exists? "#{__FILE__}.local"
@@ -0,0 +1,97 @@
1
+ r10k
2
+ ====
3
+
4
+ Puppet environment and module deployment
5
+
6
+ [![Build Status](https://travis-ci.org/adrienthebo/r10k.png?branch=master)](https://travis-ci.org/adrienthebo/r10k)
7
+
8
+ Description
9
+ -----------
10
+
11
+ [librarian-puppet]: https://github.com/rodjek/librarian-puppet
12
+ [workflow]: http://puppetlabs.com/blog/git-workflow-and-puppet-environments/
13
+
14
+ R10k provides a general purpose toolset for deploying Puppet environments and
15
+ modules. It implements the [Puppetfile][librarian-puppet] format and provides a native
16
+ implementation of Puppet [dynamic environments][workflow].
17
+
18
+ Requirements
19
+ ------------
20
+
21
+ R10k supports the following Ruby versions:
22
+
23
+ - 1.8.7 (POSIX minimum version)
24
+ - 1.9.3 (Windows minimum version)
25
+ - 2.0.0
26
+ - 2.1.0
27
+
28
+ R10k requires additional components, depending on how you plan on managing
29
+ environments and modules.
30
+
31
+ - Installing modules from the Puppet Forge requires Puppet 3.0.0+ or later.
32
+ Puppet 2.7 may work, but is generally not recommended as Puppet 2.7 is EOL.
33
+ - Git is required for creating environments and modules from Git
34
+ - SVN is required for creating environments and modules from SVN
35
+
36
+ Installation
37
+ ------------
38
+
39
+ ### Rubygems
40
+
41
+ For general use, you should install r10k from Ruby gems:
42
+
43
+ gem install r10k
44
+ r10k help
45
+
46
+ ### Puppet Enterprise
47
+
48
+ Puppet Enterprise bundles a copy of Ruby, so if you do not want to use the
49
+ system version of Ruby with r10k, you need to use the bundled PE gem command for
50
+ installation:
51
+
52
+ /opt/puppet/bin/gem install r10k
53
+ r10k help
54
+
55
+ ### Bundler
56
+
57
+ If you have more specific needs or plan on modifying r10k you can run it out of
58
+ a git repository using Bundler for dependencies:
59
+
60
+ git clone git://github.com/adrienthebo/r10k
61
+ cd r10k
62
+ bundle install
63
+ bundle exec r10k help
64
+
65
+ Usage
66
+ -----
67
+
68
+ R10k has two primary roles: installing Puppet modules using a standalone
69
+ Puppetfile, and managing Git and SVN based dynamic environments. For more
70
+ information see the topic specific documentation:
71
+
72
+ * [Puppetfile Documentation](doc/puppetfile.mkd)
73
+ * [Environment Deployment Documentation](doc/dynamic-environments.mkd)
74
+ * [Quickstart](doc/dynamic-environments/quickstart.mkd)
75
+ * [Common Patterns](doc/common-patterns.mkd)
76
+ * [Workflow Guide](doc/workflow-guide.mkd)
77
+
78
+ For more general questions, see the [FAQ](doc/faq.mkd).
79
+
80
+ Getting help
81
+ ------------
82
+
83
+ * IRC: r10k has a dedicated channel, `#r10k`, on Freenode where r10k questions
84
+ can be directed. Questions about r10k can frequently be asked in `#puppet` as well.
85
+ * Mailing lists: [puppet-users](https://groups.google.com/forum/#!forum/puppet-users)
86
+ * Q&A: [Puppet Ask](https://ask.puppetlabs.com/questions/)
87
+
88
+
89
+ More information
90
+ ----------------
91
+
92
+ The original impetus for r10k is explained at http://somethingsinistral.net/blog/rethinking-puppet-deployment/
93
+
94
+ Contributors
95
+ ------------
96
+
97
+ Please see the CHANGELOG for a listing of the (very awesome) contributors.