puppet-armature 0.4.0 → 0.4.1
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.
- checksums.yaml +4 -4
- data/docs/puppetfile-syntax.md +39 -10
- data/lib/armature/environments.rb +1 -1
- data/lib/armature/puppetfile.rb +9 -2
- data/lib/armature/repo/forge.rb +1 -1
- data/lib/armature/version.rb +1 -1
- data/puppet-armature.gemspec +9 -2
- metadata +9 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c583eeec96331a7050861894eead4b88bdd0a4d
|
4
|
+
data.tar.gz: 1a69219101f220fbb501c3fc9a241881c193cd3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4278d3ff34d1bb711b47cd5088eb7f48c05c2c57a62c4f111d370d44c7f9b25044d4adca2a01b84f197884efb20e41ef3fe34eb00d41653786afa5bf0f491aef
|
7
|
+
data.tar.gz: 5210242988bb7fb870f7375b1a1dcdf0e0b3c74750d40136804c79531623bd1e265edcd2a097d0dc0fed2956d6363225e6ea141b4ed55a8969b540ddc11dbbfa
|
data/docs/puppetfile-syntax.md
CHANGED
@@ -1,25 +1,57 @@
|
|
1
1
|
# Puppetfile syntax
|
2
2
|
|
3
|
-
The Puppetfile is just ruby.
|
3
|
+
The Puppetfile is just ruby. There are a few important declarations:
|
4
4
|
|
5
|
-
### `
|
6
|
-
|
5
|
+
### `forge 'https://forge.puppet.com'`
|
6
|
+
|
7
|
+
This specifies what “forge” to use. You don't need to specify this unless you
|
8
|
+
have a caching proxy, or your own Forge-like web site.
|
9
|
+
|
10
|
+
### `mod 'owner-name', 'version'`
|
11
|
+
|
12
|
+
Install a module from the Forge. This will use whatever “forge” was last set
|
13
|
+
with the `forge` function.
|
14
|
+
|
15
|
+
* **owner-name:** This is the name of the Forge user and the name of the
|
16
|
+
module. The module name is what's used in your Puppet code.
|
17
|
+
* **version:** The version of the module to install. If you don't specify a
|
18
|
+
version, or use `:latest`, this will check the Forge for the latest version
|
19
|
+
of the module every time this environment is deployed.
|
20
|
+
|
21
|
+
This uses the same syntax as suggested by the Forge.
|
22
|
+
|
23
|
+
### `mod 'name', :git=>'url', :tag=>'tag'`
|
24
|
+
|
25
|
+
Install a module with git.
|
7
26
|
|
8
27
|
* **name:** The name of the module. You use this in your Puppet code to
|
9
28
|
reference the module's classes and defined types.
|
10
29
|
* **url:** The URL of the git repo holding the module.
|
11
|
-
|
12
|
-
|
30
|
+
|
31
|
+
You may optionally use one of the following parameters. If you don't specify
|
32
|
+
one, it will default to the master branch.
|
33
|
+
|
34
|
+
* `:tag => 'tag'` This assumes that the tag will never change.
|
35
|
+
* `:branch => 'branch'` This will check for updates to the branch on every
|
36
|
+
deploy.
|
37
|
+
* `:commit => 'SHA'`
|
38
|
+
|
39
|
+
You can also use `:ref` to specify any of the above, or another type of git
|
40
|
+
ref. Using this will cause armature to check for updates on every deploy.
|
13
41
|
|
14
42
|
## Example
|
15
43
|
|
16
44
|
~~~ ruby
|
45
|
+
mod 'puppetlabs-ntp', '7.3.0'
|
46
|
+
mod 'puppetlabs-stdlib'
|
47
|
+
|
17
48
|
mod 'autosign',
|
18
|
-
:git
|
49
|
+
:git => 'git://github.com/danieldreier/puppet-autosign.git',
|
50
|
+
:commit => '0e1367db3fe43a62b38d96a373db8b465cb8fdb3'
|
19
51
|
|
20
52
|
mod 'aws',
|
21
53
|
:git => 'git://github.com/puppetlabs/puppetlabs-aws.git',
|
22
|
-
:
|
54
|
+
:tag => '1.4.0'
|
23
55
|
~~~
|
24
56
|
|
25
57
|
## Compatibility
|
@@ -28,6 +60,3 @@ Armature does not support the full syntax of either
|
|
28
60
|
[r10k](https://github.com/puppetlabs/r10k/blob/master/doc/puppetfile.mkd) or
|
29
61
|
[librarian-puppet](http://librarian-puppet.com). It will likely support more of
|
30
62
|
r10k's syntax at some point.
|
31
|
-
|
32
|
-
It does provide a `forge` function which accepts any arguments and is ignored.
|
33
|
-
This is only for compatility with the Puppetfile I'm using.
|
@@ -55,7 +55,7 @@ module Armature
|
|
55
55
|
if @fix_environment_names && ! self.class.valid_environment_name?(name)
|
56
56
|
old = name
|
57
57
|
name = old.gsub(/[^A-Za-z0-9_]/, "_")
|
58
|
-
@logger.
|
58
|
+
@logger.warn("Changing invalid environment name \"#{old}\" to \"#{name}\"")
|
59
59
|
end
|
60
60
|
|
61
61
|
self.class.assert_valid_environment_name(name)
|
data/lib/armature/puppetfile.rb
CHANGED
@@ -27,7 +27,12 @@ module Armature
|
|
27
27
|
raise "Module #{name} declared twice"
|
28
28
|
end
|
29
29
|
|
30
|
-
|
30
|
+
is_forge = options.is_a?(Symbol) \
|
31
|
+
|| options.is_a?(String) \
|
32
|
+
|| options == {} \
|
33
|
+
|| options == nil
|
34
|
+
|
35
|
+
if is_forge
|
31
36
|
_mod_forge(full_name, name, options)
|
32
37
|
elsif options[:git]
|
33
38
|
_mod_git(name, options)
|
@@ -36,9 +41,11 @@ module Armature
|
|
36
41
|
end
|
37
42
|
end
|
38
43
|
|
39
|
-
def _mod_forge(full_name, name, version
|
44
|
+
def _mod_forge(full_name, name, version=:latest)
|
40
45
|
if version == nil || version == {}
|
41
46
|
version = "latest"
|
47
|
+
else
|
48
|
+
version = version.to_s
|
42
49
|
end
|
43
50
|
|
44
51
|
repo = Repo::Forge.from_url(@cache, @forge_url, full_name)
|
data/lib/armature/repo/forge.rb
CHANGED
data/lib/armature/version.rb
CHANGED
data/puppet-armature.gemspec
CHANGED
@@ -4,17 +4,24 @@ spec = Gem::Specification.new do |s|
|
|
4
4
|
s.name = 'puppet-armature'
|
5
5
|
s.version = Armature::VERSION
|
6
6
|
s.author = 'Daniel Parks'
|
7
|
-
s.email = '
|
7
|
+
s.email = 'os-armature@demonhorse.net'
|
8
8
|
s.homepage = Armature::HOMEPAGE
|
9
9
|
s.license = 'BSD-2-Clause'
|
10
10
|
s.platform = Gem::Platform::RUBY
|
11
11
|
s.summary = 'Deploy Puppet environments and manage modules'
|
12
|
-
s.description =
|
12
|
+
s.description = <<-EOF
|
13
|
+
Armature sets up Puppet environments for each branch in your control repo,
|
14
|
+
then installs the modules specified in the Puppetfile for each environment.
|
15
|
+
|
16
|
+
It is designed as a much faster replacement for r10k, though it does not
|
17
|
+
have all of r10k's features.
|
18
|
+
EOF
|
13
19
|
s.files = `git ls-files`.split("\n")
|
14
20
|
s.require_paths << 'lib'
|
15
21
|
s.has_rdoc = false
|
16
22
|
s.bindir = 'bin'
|
17
23
|
s.executables << 'armature'
|
24
|
+
s.required_ruby_version = '>= 2.0.0'
|
18
25
|
s.add_runtime_dependency('gli','2.14.0')
|
19
26
|
s.add_runtime_dependency('logging','~> 2')
|
20
27
|
s.add_development_dependency('minitest','~> 5.9')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppet-armature
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Parks
|
@@ -52,10 +52,13 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '5.9'
|
55
|
-
description:
|
56
|
-
|
57
|
-
|
58
|
-
|
55
|
+
description: |2
|
56
|
+
Armature sets up Puppet environments for each branch in your control repo,
|
57
|
+
then installs the modules specified in the Puppetfile for each environment.
|
58
|
+
|
59
|
+
It is designed as a much faster replacement for r10k, though it does not
|
60
|
+
have all of r10k's features.
|
61
|
+
email: os-armature@demonhorse.net
|
59
62
|
executables:
|
60
63
|
- armature
|
61
64
|
extensions: []
|
@@ -101,7 +104,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
101
104
|
requirements:
|
102
105
|
- - ">="
|
103
106
|
- !ruby/object:Gem::Version
|
104
|
-
version:
|
107
|
+
version: 2.0.0
|
105
108
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
109
|
requirements:
|
107
110
|
- - ">="
|