dtk-node-agent 0.9.1 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 287e026e95a6c9ef0b8997c0167c1e79b7a2166d
4
- data.tar.gz: 71fb63f38a0aaf46ad403ec087f5bb3c9bfac37f
3
+ metadata.gz: 8db191267189513117e4624e6fbac5b7e51fcbb3
4
+ data.tar.gz: d2ba3f2281f425abb2b0586471df8220fb3fdf4c
5
5
  SHA512:
6
- metadata.gz: 01fa85e3b4d1794db55b4a8683dbce50c81b4a3bff72e7e60c2c0cdcf5f84e779ece64d7e44778e021fa44291f34e6772a83d6079f12fdf39bf43153672177cd
7
- data.tar.gz: 1c936d40e35ef8a51be1c88f042eefdd1bf9cf75282d04ede9e1b04738d1dd19f74ebb5954ac50623470bcfb1c2dac04e77fb15a0b7a092228336796cd0f93e6
6
+ metadata.gz: 5346d1c4d7a668cae356dba258abc9ac2738d3f9106623d164752c1ef1a65604bd3bc2eb3b3f6aa1c27fce68c7c5fcde7ccb9af22c9f52e730ad443889cfa28c
7
+ data.tar.gz: 7c943b0420db1bd9f4a4a3f11f6eec46fe9d4713bdd22dca977e34e3dcc4919eec5e07d8ac638e01f35382b2504507dc2740dbd100b4a34789362044673c0419
data/README.md CHANGED
@@ -26,12 +26,14 @@ packer build template.json
26
26
  ```
27
27
  This will also copy images to all AWS regions.
28
28
 
29
- To get json output of new images, first, add .fog file on your home directory (with valid aws credentials) and then run following ruby script:
29
+ To get yaml output of new images, first, add .fog file on your home directory (with valid aws credentials) and then run following ruby script:
30
30
  ```
31
31
  ruby get_amis.rb <AMI_TIMESTAMPS>
32
32
  ```
33
33
  AMI_TIMESTAMPS can be one timestamp or array of timestamps separated with delimiter (,)
34
34
 
35
+ Note: Output of get_amis.rb script execution needs to be pasted instead of the old dtk.model.yaml inside aws:image_aws component module. Change needs to be pushed to server then and also to repo manager so everyone has access to new aws images
36
+
35
37
  ## License
36
38
 
37
39
  dtk-node-agent is copyright (C) 2010-2016 dtk contributors
@@ -72,7 +72,7 @@ module DTK
72
72
  shell "rpm -ivh #{CONFIG[:puppetlabs_el5_rpm_repo]}"
73
73
  @osarch == 'X86_64' ? (shell "rpm -ivh #{CONFIG[:rpm_forge_el5_X86_64_repo]}") : (shell "rpm -ivh #{CONFIG[:rpm_forge_el5_i686_repo]}")
74
74
  # 20xx is the major release naming pattern of Amazon Linux
75
- when "6", "n/a", "2015", "2014"
75
+ when "6", "n/a", "2015", "2014", "2016"
76
76
  shell "rpm -ivh #{CONFIG[:puppetlabs_el6_rpm_repo]}"
77
77
  @osarch == 'X86_64' ? (shell "rpm -ivh #{CONFIG[:rpm_forge_el6_X86_64_repo]}") : (shell "rpm -ivh #{CONFIG[:rpm_forge_el6_i686_repo]}")
78
78
  shell "yum-config-manager --disable rpmforge-release"
@@ -16,5 +16,5 @@
16
16
  # limitations under the License.
17
17
  #
18
18
  module DtkNodeAgent
19
- VERSION="0.9.1"
19
+ VERSION="0.10.0"
20
20
  end
@@ -0,0 +1,27 @@
1
+ require 'fileutils'
2
+
3
+ Puppet::Type.type(:r8_export_variable).provide(:default) do
4
+ desc "r8 export variable"
5
+
6
+ def create
7
+ name = resource[:name]
8
+ content = resource[:content]
9
+ if name =~ /(^.+)::(.+$)/
10
+ component = $1
11
+ attribute = $2
12
+ if content = (content == '***' ? scope.lookupvar(name) : content)
13
+ p = Thread.current[:exported_variables] ||= Hash.new
14
+ (p[component] ||= Hash.new)[attribute] = content
15
+ File.open('/tmp/dtk_exported_variables', 'w') { |f| f.write(Marshal.dump(p)) }
16
+ end
17
+ end
18
+ end
19
+
20
+ def destroy
21
+ FileUtils.rm_rf("/tmp/dtk_exported_variables")
22
+ end
23
+
24
+ def exists?
25
+
26
+ end
27
+ end
@@ -0,0 +1,19 @@
1
+ Puppet::Type.newtype(:r8_export_variable) do
2
+ @doc = "r8 export variable content"
3
+
4
+ ensurable
5
+
6
+ newparam(:name) do
7
+ desc "component and attribute name in dot notation"
8
+
9
+ validate do |value|
10
+ unless value =~ /.*::.*/
11
+ raise ArgumentError, "name attribute: #{value} is in invalid format, should be in <component>::<attribute> format"
12
+ end
13
+ end
14
+ end
15
+
16
+ newparam(:content) do
17
+ desc "variable content to store in specific attribute"
18
+ end
19
+ end
@@ -0,0 +1,9 @@
1
+ define r8::export_variable(
2
+ $content = undef,
3
+ ) {
4
+ r8_export_variable { $name:
5
+ name => $name,
6
+ content => $content,
7
+ ensure => present,
8
+ }
9
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dtk-node-agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rich PELAVIN
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-18 00:00:00.000000000 Z
11
+ date: 2016-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: puppet
@@ -182,8 +182,10 @@ files:
182
182
  - lib/config/install.config
183
183
  - lib/dtk-node-agent/installer.rb
184
184
  - lib/dtk-node-agent/version.rb
185
+ - puppet_additions/modules/r8/lib/puppet/provider/r8_export_variable/default.rb
185
186
  - puppet_additions/modules/r8/lib/puppet/type/r8_export_file.rb
186
- - puppet_additions/modules/r8/manifests/export_variable.rb
187
+ - puppet_additions/modules/r8/lib/puppet/type/r8_export_variable.rb
188
+ - puppet_additions/modules/r8/manifests/export_variable.pp
187
189
  - puppet_additions/puppet_lib_base/puppet/indirector/catalog/r8_storeconfig_backend.rb
188
190
  - puppet_additions/puppet_lib_base/puppet/indirector/r8_storeconfig_backend.rb
189
191
  - puppet_additions/puppet_lib_base/puppet/indirector/resource/r8_storeconfig_backend.rb
@@ -1,11 +0,0 @@
1
- define "r8::export_variable", :content => Puppet::Parser::AST::Leaf::Undef.new({:value => '***'}) do
2
- if @name =~ /(^.+)::(.+$)/
3
- component = $1
4
- attribute = $2
5
- if content = (@content == '***' ? scope.lookupvar(@name) : @content)
6
- p = Thread.current[:exported_variables] ||= Hash.new
7
- (p[component] ||= Hash.new)[attribute] = content
8
- File.open('/tmp/dtk_exported_variables', 'w') { |f| f.write(Marshal.dump(p)) }
9
- end
10
- end
11
- end