finger-puppet 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +1 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +34 -0
- data/LICENSE +165 -0
- data/README.md +138 -0
- data/Rakefile +1 -0
- data/bin/finger-puppet +30 -0
- data/features/finger-puppet.feature +184 -0
- data/features/step_definitions/finger-puppet_steps.rb +149 -0
- data/features/support/env.rb +11 -0
- data/features/support/repos/simple/Gemfile +5 -0
- data/features/support/repos/simple/manifests/nodes/.stub +0 -0
- data/features/support/repos/simple/manifests/site.pp +1 -0
- data/features/support/repos/simple/modules/test/manifests/init.pp +5 -0
- data/features/support/repos/simple/var/.stub +0 -0
- data/features/support/repos/simple/var/reports/.stub +0 -0
- data/features/support/repos/simple_26/manifests/nodes/.stub +0 -0
- data/features/support/repos/simple_26/manifests/site.pp +1 -0
- data/features/support/repos/simple_26/modules/test/files/checkout +0 -0
- data/features/support/repos/simple_26/modules/test/manifests/init.pp +5 -0
- data/features/support/repos/simple_26/var/.stub +0 -0
- data/features/support/repos/simple_26/var/reports/.stub +0 -0
- data/finger-puppet.gemspec +25 -0
- data/lib/finger-puppet.rb +204 -0
- data/lib/generators/git/description +1 -0
- data/lib/generators/git/hooks/pre-commit +29 -0
- data/lib/generators/git/hooks/pre-receive +0 -0
- data/lib/generators/git/info/exclude +6 -0
- data/lib/generators/puppet/.gitignore +2 -0
- data/lib/generators/puppet/Gemfile +6 -0
- data/lib/generators/puppet/README.md +27 -0
- data/lib/generators/puppet/etc/puppet.conf +2 -0
- data/lib/generators/puppet/manifests/nodes.pp +1 -0
- data/lib/generators/puppet/manifests/site.pp +8 -0
- data/lib/generators/puppet/modules/.gitkeep +0 -0
- data/lib/generators/puppet/var/.gitkeep +0 -0
- data/lib/generators/puppet/vendor/.gitkeep +0 -0
- data/man/finger-puppet.1 +328 -0
- data/man/finger-puppet.1.html +308 -0
- data/man/finger-puppet.1.ronn +214 -0
- metadata +178 -0
@@ -0,0 +1,214 @@
|
|
1
|
+
finger-puppet
|
2
|
+
====
|
3
|
+
|
4
|
+
## NAME ##
|
5
|
+
|
6
|
+
finger-puppet - Do Puppet runs locally from a Git checkout
|
7
|
+
|
8
|
+
## SYNOPSIS ##
|
9
|
+
|
10
|
+
* `finger-puppet` go [<puppet-options>]
|
11
|
+
* `finger-puppet` clone <repository> [directory]
|
12
|
+
* `finger-puppet` freeze [<project> <repository> --release=<release>]
|
13
|
+
* `finger-puppet` whoami [rfc2822-address]
|
14
|
+
* `finger-puppet` init <project>
|
15
|
+
* `finger-puppet` scaffold <project>
|
16
|
+
|
17
|
+
## DESCRIPTION ##
|
18
|
+
|
19
|
+
**finger-puppet** helps you run Puppet locally against a Git checkout.
|
20
|
+
|
21
|
+
finger-puppet supports a Puppet workflow where you quickly + iteratively develop your
|
22
|
+
Puppet manifests on a single machine, then push your changes up to a repository
|
23
|
+
to deploy to the rest of your infrastructure.
|
24
|
+
|
25
|
+
This workflow also complements a Capistrano or MCollective-style deployment,
|
26
|
+
where you remotely instruct finger-puppet to check out a copy of the latest manifests
|
27
|
+
and run them.
|
28
|
+
|
29
|
+
finger-puppet also has the ability to freeze Puppet in to the manifests repository,
|
30
|
+
letting you quickly test different versions of Puppet without waiting for
|
31
|
+
packages to appear, and reducing the dependencies on a system to run Puppet
|
32
|
+
down to just Ruby and git.
|
33
|
+
|
34
|
+
## COMMANDS ##
|
35
|
+
|
36
|
+
* `clone`:
|
37
|
+
Clone a git repository of Puppet manifests.
|
38
|
+
|
39
|
+
<repository> is the url of a git repository. Essentially invokes
|
40
|
+
`git clone`. If [directory] is specified, will clone the repository into
|
41
|
+
the specified directory.
|
42
|
+
|
43
|
+
* `freeze`:
|
44
|
+
Freeze an arbitrary git repository into the current git repository as a
|
45
|
+
submodule under `vendor/`.
|
46
|
+
|
47
|
+
With no arguments, `freeze` will freeze in Puppet + Facter, to the latest
|
48
|
+
commit on master. This is especially useful if you want to track the latest
|
49
|
+
development release of Puppet.
|
50
|
+
|
51
|
+
If <project> and <repository> are specified, a git repository is cloned
|
52
|
+
and set up as a submodule under `vendor/`.
|
53
|
+
|
54
|
+
If `--release` is specified, `freeze` will create and switch to a branch
|
55
|
+
matching a particular tag or revision. Use this to lock to a specific
|
56
|
+
version of Puppet.
|
57
|
+
|
58
|
+
Once the repository is frozen in, switch between tagged releases by `cd`ing
|
59
|
+
to the repository under vendor and running `git checkout <tag>`.
|
60
|
+
|
61
|
+
Any repository frozen under `vendor/` will be added to the Puppet load path
|
62
|
+
when using `finger-puppet go`.
|
63
|
+
|
64
|
+
* `go`:
|
65
|
+
Do a Puppet run. Assumes the current directory is a repository of Puppet
|
66
|
+
manifests.
|
67
|
+
|
68
|
+
<puppet-options> are any options you can pass to `puppet` on the command
|
69
|
+
line (e.g. `--debug`, `--verbose`, `--tags foobar`).
|
70
|
+
|
71
|
+
* `help`:
|
72
|
+
Display the man page.
|
73
|
+
|
74
|
+
* `init`:
|
75
|
+
Initialise a repo of scaffolded Puppet manifests. Generates scaffolding for
|
76
|
+
a repository of Puppet manifests, and `git init`s the repository.
|
77
|
+
|
78
|
+
* `scaffold`:
|
79
|
+
Generate scaffolding for a repository of Puppet manifests, primed for finger-puppet.
|
80
|
+
|
81
|
+
Called by `init`. You should never have to call this manually.
|
82
|
+
|
83
|
+
* `whoami`:
|
84
|
+
Sets `user.name` and `user.email` using `git config`. Useful if you have
|
85
|
+
multiple users working with the repository from the same UNIX account.
|
86
|
+
|
87
|
+
If no arguments are specified, will output the currently configured name
|
88
|
+
and email.
|
89
|
+
|
90
|
+
If an argument is specified, treat the argument as an RFC2822 formatted
|
91
|
+
email address, e.g. John Doe <john@example.org>. Sets `user.name` and
|
92
|
+
`user.email` with `git config`.
|
93
|
+
|
94
|
+
Modelled on `bzr whoami`.
|
95
|
+
|
96
|
+
## OPTIONS
|
97
|
+
|
98
|
+
* `--help|-h`:
|
99
|
+
Display the man page.
|
100
|
+
|
101
|
+
## RETURN VALUES ##
|
102
|
+
|
103
|
+
* **0**: Command completed successfully.
|
104
|
+
* **1**: Argument error.
|
105
|
+
* **2**: Subcommand error.
|
106
|
+
* **3**: Required frozen submodule doesn't exist.
|
107
|
+
|
108
|
+
## QUIRKS ##
|
109
|
+
|
110
|
+
1. Puppet's fileserver (`source => "puppet:///..."` on File resources) doesn't
|
111
|
+
behave as expected on Puppet < 2.6. If you are using Puppet < 2.6, all files
|
112
|
+
need to be templates.
|
113
|
+
|
114
|
+
## EXAMPLES ##
|
115
|
+
|
116
|
+
Initialise a finger-puppet-ready Puppet repository:
|
117
|
+
|
118
|
+
$ finger-puppet init barfoo
|
119
|
+
Initialized empty Git repository in barfoo/.git/
|
120
|
+
|
121
|
+
Clone a git repository of Puppet manifests:
|
122
|
+
|
123
|
+
$ finger-puppet clone git@github.com:exampledotorg/manifests.git
|
124
|
+
|
125
|
+
Clone a git repository of Puppet manifests into a specific directory:
|
126
|
+
|
127
|
+
$ finger-puppet clone git@github.com:exampledotorg/manifests.git another_clone
|
128
|
+
|
129
|
+
Graft a finger-puppet scaffold onto an existing repository of manifests:
|
130
|
+
|
131
|
+
$ finger-puppet scaffold another_clone
|
132
|
+
|
133
|
+
Freeze Puppet and Facter:
|
134
|
+
|
135
|
+
$ finger-puppet freeze
|
136
|
+
Cloning into vendor/puppet...
|
137
|
+
remote: Counting objects: 72007, done.
|
138
|
+
remote: Compressing objects: 100% (22120/22120), done.
|
139
|
+
remote: Total 72007 (delta 52640), reused 66470 (delta 48322)
|
140
|
+
Receiving objects: 100% (72007/72007), 12.13 MiB | 253 KiB/s, done.
|
141
|
+
Resolving deltas: 100% (52640/52640), done.
|
142
|
+
Cloning into vendor/facter...
|
143
|
+
remote: Counting objects: 4185, done.
|
144
|
+
remote: Compressing objects: 100% (1930/1930), done.
|
145
|
+
remote: Total 4185 (delta 2202), reused 3973 (delta 2095)
|
146
|
+
Receiving objects: 100% (4185/4185), 840.81 KiB | 174 KiB/s, done.
|
147
|
+
Resolving deltas: 100% (2202/2202), done.
|
148
|
+
Freezing complete.
|
149
|
+
|
150
|
+
Freeze some other repository:
|
151
|
+
|
152
|
+
$ finger-puppet freeze moonshine https://github.com/railsmachine/moonshine.git
|
153
|
+
Cloning into vendor/moonshine...
|
154
|
+
remote: Counting objects: 4122, done.
|
155
|
+
remote: Compressing objects: 100% (1976/1976), done.
|
156
|
+
remote: Total 4122 (delta 2190), reused 3730 (delta 1911)
|
157
|
+
Receiving objects: 100% (4122/4122), 543.59 KiB | 58 KiB/s, done.
|
158
|
+
Resolving deltas: 100% (2190/2190), done.
|
159
|
+
Freezing complete.
|
160
|
+
|
161
|
+
Freeze Puppet at a particular version:
|
162
|
+
|
163
|
+
$ finger-puppet freeze puppet git://github.com/puppetlabs/puppet.git --release=2.6.2
|
164
|
+
Cloning into /Users/auxesis/foobar/vendor/puppet...
|
165
|
+
remote: Counting objects: 72007, done.
|
166
|
+
remote: Compressing objects: 100% (22120/22120), done.
|
167
|
+
remote: Total 72007 (delta 52640), reused 66470 (delta 48322)
|
168
|
+
Receiving objects: 100% (72007/72007), 12.13 MiB | 238 KiB/s, done.
|
169
|
+
Resolving deltas: 100% (52640/52640), done.
|
170
|
+
Switched to a new branch '2.6.2'
|
171
|
+
Freezing complete.
|
172
|
+
|
173
|
+
Do a Puppet run:
|
174
|
+
|
175
|
+
$ finger-puppet go
|
176
|
+
You should probably be root when running this! Proceeding anyway...
|
177
|
+
Using frozen Puppet from vendor/puppet.
|
178
|
+
notice: Finished catalog run in 0.01 seconds
|
179
|
+
|
180
|
+
Do a Puppet run, and pass in arguments to Puppet:
|
181
|
+
|
182
|
+
$ finger-puppet go --noop --debug
|
183
|
+
You should probably be root when running this! Proceeding anyway...
|
184
|
+
Using frozen Puppet from vendor/puppet.
|
185
|
+
ruby -I vendor/facter/lib -I vendor/puppet/lib vendor/puppet/bin/puppet
|
186
|
+
--modulepath modules --confdir etc --vardir var manifests/site.pp --noop --debug
|
187
|
+
debug: Creating default schedules
|
188
|
+
debug: Failed to load library 'selinux' for feature 'selinux'
|
189
|
+
debug: Puppet::Type::File::ProviderMicrosoft_windows: feature microsoft_windows is missing
|
190
|
+
debug: Failed to load library 'ldap' for feature 'ldap'
|
191
|
+
debug: Failed to load library 'shadow' for feature 'libshadow'
|
192
|
+
...
|
193
|
+
|
194
|
+
Find out who the currently configured git user is:
|
195
|
+
|
196
|
+
$ finger-puppet whoami
|
197
|
+
Jane Doe <jane@example.org>
|
198
|
+
|
199
|
+
Set the git user:
|
200
|
+
|
201
|
+
$ finger-puppet whoami 'John Doe <john@example.org>'
|
202
|
+
|
203
|
+
|
204
|
+
## AUTHOR ##
|
205
|
+
|
206
|
+
Lindsay Holmwood <lindsay@holmwood.id.au>
|
207
|
+
|
208
|
+
## COPYRIGHT ##
|
209
|
+
|
210
|
+
Copyright Rails Machine LLC 2010-2011, released under the LGPL
|
211
|
+
|
212
|
+
## SEE ALSO ##
|
213
|
+
|
214
|
+
puppet(8)
|
metadata
ADDED
@@ -0,0 +1,178 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: finger-puppet
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 19
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 3
|
9
|
+
- 0
|
10
|
+
version: 0.3.0
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Anthony Somerset
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-10-28 00:00:00 +01:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: thor
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - "="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 35
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
- 13
|
33
|
+
- 4
|
34
|
+
version: 0.13.4
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: bundler
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 3
|
46
|
+
segments:
|
47
|
+
- 0
|
48
|
+
version: "0"
|
49
|
+
type: :runtime
|
50
|
+
version_requirements: *id002
|
51
|
+
- !ruby/object:Gem::Dependency
|
52
|
+
name: puppet
|
53
|
+
prerelease: false
|
54
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
55
|
+
none: false
|
56
|
+
requirements:
|
57
|
+
- - ">="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
hash: 3
|
60
|
+
segments:
|
61
|
+
- 0
|
62
|
+
version: "0"
|
63
|
+
type: :development
|
64
|
+
version_requirements: *id003
|
65
|
+
- !ruby/object:Gem::Dependency
|
66
|
+
name: cucumber
|
67
|
+
prerelease: false
|
68
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
69
|
+
none: false
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
hash: 3
|
74
|
+
segments:
|
75
|
+
- 0
|
76
|
+
version: "0"
|
77
|
+
type: :development
|
78
|
+
version_requirements: *id004
|
79
|
+
description: finger-puppet helps you run Puppet locally against a Git checkout. This is great for locally iterating your Puppet manifests very quickly, then pushng them up to a repository somewhere else to share the changes.
|
80
|
+
email:
|
81
|
+
- anthony@somersettechsolutions.co.uk
|
82
|
+
executables:
|
83
|
+
- finger-puppet
|
84
|
+
extensions: []
|
85
|
+
|
86
|
+
extra_rdoc_files: []
|
87
|
+
|
88
|
+
files:
|
89
|
+
- .gitignore
|
90
|
+
- Gemfile
|
91
|
+
- Gemfile.lock
|
92
|
+
- LICENSE
|
93
|
+
- README.md
|
94
|
+
- Rakefile
|
95
|
+
- bin/finger-puppet
|
96
|
+
- features/finger-puppet.feature
|
97
|
+
- features/step_definitions/finger-puppet_steps.rb
|
98
|
+
- features/support/env.rb
|
99
|
+
- features/support/repos/simple/Gemfile
|
100
|
+
- features/support/repos/simple/manifests/nodes/.stub
|
101
|
+
- features/support/repos/simple/manifests/site.pp
|
102
|
+
- features/support/repos/simple/modules/test/manifests/init.pp
|
103
|
+
- features/support/repos/simple/var/.stub
|
104
|
+
- features/support/repos/simple/var/reports/.stub
|
105
|
+
- features/support/repos/simple_26/manifests/nodes/.stub
|
106
|
+
- features/support/repos/simple_26/manifests/site.pp
|
107
|
+
- features/support/repos/simple_26/modules/test/files/checkout
|
108
|
+
- features/support/repos/simple_26/modules/test/manifests/init.pp
|
109
|
+
- features/support/repos/simple_26/var/.stub
|
110
|
+
- features/support/repos/simple_26/var/reports/.stub
|
111
|
+
- finger-puppet.gemspec
|
112
|
+
- lib/finger-puppet.rb
|
113
|
+
- lib/generators/git/description
|
114
|
+
- lib/generators/git/hooks/pre-commit
|
115
|
+
- lib/generators/git/hooks/pre-receive
|
116
|
+
- lib/generators/git/info/exclude
|
117
|
+
- lib/generators/puppet/.gitignore
|
118
|
+
- lib/generators/puppet/Gemfile
|
119
|
+
- lib/generators/puppet/README.md
|
120
|
+
- lib/generators/puppet/etc/puppet.conf
|
121
|
+
- lib/generators/puppet/manifests/nodes.pp
|
122
|
+
- lib/generators/puppet/manifests/site.pp
|
123
|
+
- lib/generators/puppet/modules/.gitkeep
|
124
|
+
- lib/generators/puppet/var/.gitkeep
|
125
|
+
- lib/generators/puppet/vendor/.gitkeep
|
126
|
+
- man/finger-puppet.1
|
127
|
+
- man/finger-puppet.1.html
|
128
|
+
- man/finger-puppet.1.ronn
|
129
|
+
has_rdoc: true
|
130
|
+
homepage: http://github.com/anthonysomerset/finger-puppet
|
131
|
+
licenses: []
|
132
|
+
|
133
|
+
post_install_message:
|
134
|
+
rdoc_options: []
|
135
|
+
|
136
|
+
require_paths:
|
137
|
+
- lib
|
138
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
139
|
+
none: false
|
140
|
+
requirements:
|
141
|
+
- - ">="
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
hash: 3
|
144
|
+
segments:
|
145
|
+
- 0
|
146
|
+
version: "0"
|
147
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
148
|
+
none: false
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
hash: 3
|
153
|
+
segments:
|
154
|
+
- 0
|
155
|
+
version: "0"
|
156
|
+
requirements: []
|
157
|
+
|
158
|
+
rubyforge_project: finger-puppet
|
159
|
+
rubygems_version: 1.4.2
|
160
|
+
signing_key:
|
161
|
+
specification_version: 3
|
162
|
+
summary: finger-puppet helps you run Puppet locally against a Git checkout.
|
163
|
+
test_files:
|
164
|
+
- features/finger-puppet.feature
|
165
|
+
- features/step_definitions/finger-puppet_steps.rb
|
166
|
+
- features/support/env.rb
|
167
|
+
- features/support/repos/simple/Gemfile
|
168
|
+
- features/support/repos/simple/manifests/nodes/.stub
|
169
|
+
- features/support/repos/simple/manifests/site.pp
|
170
|
+
- features/support/repos/simple/modules/test/manifests/init.pp
|
171
|
+
- features/support/repos/simple/var/.stub
|
172
|
+
- features/support/repos/simple/var/reports/.stub
|
173
|
+
- features/support/repos/simple_26/manifests/nodes/.stub
|
174
|
+
- features/support/repos/simple_26/manifests/site.pp
|
175
|
+
- features/support/repos/simple_26/modules/test/files/checkout
|
176
|
+
- features/support/repos/simple_26/modules/test/manifests/init.pp
|
177
|
+
- features/support/repos/simple_26/var/.stub
|
178
|
+
- features/support/repos/simple_26/var/reports/.stub
|