foreman_setup 2.1.1 → 3.0.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: 9b9cc710f0e82f4ecab86bbacd07dfcacccd83b5
4
- data.tar.gz: 823acf599dadbe230cdb565505482e293a1c50fd
3
+ metadata.gz: aee3bba2d86b044aed9a80f8471885ce2beb96d2
4
+ data.tar.gz: 76c68952a31762eb7acd279cd385fadb00b6cdc2
5
5
  SHA512:
6
- metadata.gz: 51199abe56dc7e84a91285c726d5bf7141dd86c05d91a8f9512cbaa9d74e75c2614f86f4784f3a0d15106d719d889a1f5a697e092f2be61377301bbe1d5462d2
7
- data.tar.gz: 188033f46c605cc7474a35511d9c8a98b4f238213d643b709cd069abb55f841603984b5d9194d6145fe9f89a1a09f4c647667e7f782dd2988e63557e15d4ffb8
6
+ metadata.gz: 5386c649e2c6c846357bc9684d1742c256f571880060899ba406f597983a4f26bb967854805a436ad188adbcb6477ba30cb3bf9dcb0cc091b7177367d31fb2b7
7
+ data.tar.gz: f645970ef34860882d09ed6dd0e3b377fa8f3cf6fdddc2450588efd48553da85bc1927fbf19e87ac0f1a54ce4022ad80d4d711bd5669068077b78f100bc2c842
data/CHANGES.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## v3.0.0
4
+ * show katello-installer commands if Katello is loaded
5
+ * fix Foreman 1.9 compatibility due to template changes
6
+ * this version (3.x) drops support for Foreman 1.8 and earlier
7
+
3
8
  ## v2.1.1
4
9
  * fix kickstart template name for RHEL (#8452)
5
10
 
data/README.md CHANGED
@@ -16,6 +16,14 @@ installation.
16
16
  RPM users can install the "ruby193-rubygem-foreman_setup" or
17
17
  "rubygem-foreman_setup" packages.
18
18
 
19
+ ## Compatibility
20
+
21
+ | Foreman Version | Plugin Version |
22
+ | --------------- | --------------:|
23
+ | <= 1.4 | ~> 1.0 |
24
+ | >= 1.5 | ~> 2.0 |
25
+ | >= 1.9 | ~> 3.0 |
26
+
19
27
  # Areas this should help
20
28
 
21
29
  * take input of subnet and domain information
@@ -93,7 +93,7 @@ module ForemanSetup
93
93
  url.save!
94
94
 
95
95
  # Build default PXE menu
96
- status, msg = ConfigTemplate.build_pxe_default(self)
96
+ status, msg = ProvisioningTemplate.build_pxe_default(self)
97
97
  warning msg unless status == 200
98
98
 
99
99
  @provisioner.hostgroup.medium ||= @provisioner.host.os.media.first
@@ -162,7 +162,7 @@ module ForemanSetup
162
162
  {'provision' => provision_tmpl_name, 'PXELinux' => tmpl_name, 'iPXE' => ipxe_tmpl_name, 'finish' => finish_tmpl_name}.each do |kind_name, tmpl_name|
163
163
  next if tmpl_name.blank?
164
164
  kind = TemplateKind.find_by_name(kind_name)
165
- tmpls = ConfigTemplate.where('name LIKE ?', "#{tmpl_name}%").where(:template_kind_id => kind.id)
165
+ tmpls = ProvisioningTemplate.where('name LIKE ?', "#{tmpl_name}%").where(:template_kind_id => kind.id)
166
166
  tmpls.any? || raise("cannot find template for #{@provisioner.host.os}")
167
167
 
168
168
  # prefer foreman_bootdisk templates
@@ -172,7 +172,7 @@ module ForemanSetup
172
172
  tmpl.save!
173
173
 
174
174
  unless @provisioner.host.os.os_default_templates.where(:template_kind_id => kind.id).any?
175
- @provisioner.host.os.os_default_templates.build(:template_kind_id => kind.id, :config_template_id => tmpl.id)
175
+ @provisioner.host.os.os_default_templates.build(:template_kind_id => kind.id, :provisioning_template_id => tmpl.id)
176
176
  end
177
177
  end
178
178
 
@@ -9,41 +9,60 @@
9
9
  <h4><%= _("Install provisioning with DHCP") %></h4>
10
10
  <div>
11
11
  <pre>
12
- foreman-installer \
13
- --enable-foreman-proxy \
14
- --foreman-proxy-tftp=true \
15
- --foreman-proxy-tftp-servername=<%= provisioner.provision_interface_data[:ip] %> \
16
- --foreman-proxy-dhcp=true \
17
- --foreman-proxy-dhcp-interface=<%= provisioner.provision_interface %> \
18
- --foreman-proxy-dhcp-gateway=<%= provisioner.subnet.gateway %> \
19
- --foreman-proxy-dhcp-range="<%= provisioner.subnet.from %> <%= provisioner.subnet.to %>" \
20
- --foreman-proxy-dhcp-nameservers="<%= provisioner.subnet.dns_primary %><%= ("," + provisioner.subnet.dns_secondary) unless provisioner.subnet.dns_secondary.blank? %>" \
21
- --foreman-proxy-dns=true \
22
- --foreman-proxy-dns-interface=<%= provisioner.provision_interface %> \
23
- --foreman-proxy-dns-zone=<%= provisioner.domain.name %> \
24
- --foreman-proxy-dns-reverse=<%= provisioner.rdns_zone %> \
25
- <%= provisioner.dns_forwarders.map { |f| " --foreman-proxy-dns-forwarders=#{f} \\" }.join("\n") %>
26
- --foreman-proxy-foreman-base-url=<%= Setting[:foreman_url] %> \
27
- --foreman-proxy-oauth-consumer-key=<%= Setting[:oauth_consumer_key] %> \
28
- --foreman-proxy-oauth-consumer-secret=<%= Setting[:oauth_consumer_secret] %>
12
+ <% if defined? Katello %>
13
+ <% command = 'katello-installer' %>
14
+ <% parameter = 'capsule' %>
15
+ <% else %>
16
+ <% command = 'foreman-installer' %>
17
+ <% parameter = 'foreman-proxy' %>
18
+ <% end%>
19
+ <%= command %> \
20
+ --enable-<%= parameter %> \
21
+ <%= parameter %>-tftp=true \
22
+ <%= parameter %>-tftp-servername=<%= provisioner.provision_interface_data[:ip] %> \
23
+ <%= parameter %>-dhcp=true \
24
+ <%= parameter %>-dhcp-interface=<%= provisioner.provision_interface %> \
25
+ <%= parameter %>-dhcp-gateway=<%= provisioner.subnet.gateway %> \
26
+ <%= parameter %>-dhcp-range="<%= provisioner.subnet.from %> <%= provisioner.subnet.to %>" \
27
+ <%= parameter %>-dhcp-nameservers="<%= provisioner.subnet.dns_primary %><%= ("," + provisioner.subnet.dns_secondary) unless provisioner.subnet.dns_secondary.blank? %>" \
28
+ <%= parameter %>-dns=true \
29
+ <%= parameter %>-dns-interface=<%= provisioner.provision_interface %> \
30
+ <%= parameter %>-dns-zone=<%= provisioner.domain.name %> \
31
+ <%= parameter %>-dns-reverse=<%= provisioner.rdns_zone %> \
32
+ <%= provisioner.dns_forwarders.map { |f| " #{parameter}-dns-forwarders=#{f} \\" }.join("\n") %>
33
+ <% if defined? Katello %>
34
+ <%= parameter %>-parent-fqdn=<%= Setting[:foreman_url] %> \
35
+ <%= parameter %>-foreman-oauth-key=<%= Setting[:oauth_consumer_key] %> \
36
+ <%= parameter %>-foreman-oauth-secret=<%= Setting[:oauth_consumer_secret] %>
37
+ <% else %>
38
+ <%= parameter %>-foreman-base-url=<%= Setting[:foreman_url] %> \
39
+ <%= parameter %>-oauth-consumer-key=<%= Setting[:oauth_consumer_key] %> \
40
+ <%= parameter %>-oauth-consumer-secret=<%= Setting[:oauth_consumer_secret] %>
41
+ <% end %>
29
42
  </pre>
30
43
  </div>
31
44
 
32
45
  <h4><%= _("Install provisioning without DHCP") %></h4>
33
46
  <div>
34
47
  <pre>
35
- foreman-installer \
36
- --enable-foreman-proxy \
37
- --foreman-proxy-tftp=true \
38
- --foreman-proxy-tftp-servername=<%= provisioner.provision_interface_data[:ip] %> \
39
- --foreman-proxy-dns=true \
40
- --foreman-proxy-dns-interface=<%= provisioner.provision_interface %> \
41
- --foreman-proxy-dns-zone=<%= provisioner.domain.name %> \
42
- --foreman-proxy-dns-reverse=<%= provisioner.rdns_zone %> \
43
- <%= provisioner.dns_forwarders.map { |f| " --foreman-proxy-dns-forwarders=#{f} \\" }.join("\n") %>
44
- --foreman-proxy-foreman-base-url=<%= Setting[:foreman_url] %> \
45
- --foreman-proxy-oauth-consumer-key=<%= Setting[:oauth_consumer_key] %> \
46
- --foreman-proxy-oauth-consumer-secret=<%= Setting[:oauth_consumer_secret] %>
48
+ <%= command %> \
49
+ --enable-<%= parameter %> \
50
+ <%= parameter %>-tftp=true \
51
+ <%= parameter %>-tftp-servername=<%= provisioner.provision_interface_data[:ip] %> \
52
+ <%= parameter %>-dns=true \
53
+ <%= parameter %>-dns-interface=<%= provisioner.provision_interface %> \
54
+ <%= parameter %>-dns-zone=<%= provisioner.domain.name %> \
55
+ <%= parameter %>-dns-reverse=<%= provisioner.rdns_zone %> \
56
+ <%= provisioner.dns_forwarders.map { |f| " #{parameter}-dns-forwarders=#{f} \\" }.join("\n") %>
57
+ <% if defined? Katello %>
58
+ <%= parameter %>-parent-fqdn=<%= Setting[:foreman_url] %> \
59
+ <%= parameter %>-foreman-oauth-key=<%= Setting[:oauth_consumer_key] %> \
60
+ <%= parameter %>-foreman-oauth-secret=<%= Setting[:oauth_consumer_secret] %>
61
+ <% else %>
62
+ <%= parameter %>-foreman-base-url=<%= Setting[:foreman_url] %> \
63
+ <%= parameter %>-oauth-consumer-key=<%= Setting[:oauth_consumer_key] %> \
64
+ <%= parameter %>-oauth-consumer-secret=<%= Setting[:oauth_consumer_secret] %>
65
+ <% end %>
47
66
  </pre>
48
67
  </div>
49
68
 
@@ -15,7 +15,7 @@ module ForemanSetup
15
15
 
16
16
  initializer 'foreman_setup.register_plugin', :after=> :finisher_hook do |app|
17
17
  Foreman::Plugin.register :foreman_setup do
18
- requires_foreman '> 1.4'
18
+ requires_foreman '>= 1.9.0'
19
19
 
20
20
  menu :top_menu, :provisioners, :url_hash => {:controller=> :'foreman_setup/provisioners', :action=>:index},
21
21
  :caption=> N_('Provisioning setup'),
@@ -27,6 +27,10 @@ module ForemanSetup
27
27
  :step2, :step2_update, :step3, :step4, :step4_update, :step5] }, :resource_type => "ForemanSetup::Provisioner"
28
28
  end
29
29
  role "Provisioning setup", [:edit_provisioning]
30
+
31
+ # we deliberately replace some text on the dashboard page, so this breaks
32
+ # the test. The setup button ought to be moved somewhere else.
33
+ tests_to_skip('DashboardTest' => ['dashboard page']) if respond_to? :tests_to_skip
30
34
  end
31
35
  end
32
36
 
@@ -1,3 +1,3 @@
1
1
  module ForemanSetup
2
- VERSION = '2.1.1'
2
+ VERSION = '3.0.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_setup
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominic Cleal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-20 00:00:00.000000000 Z
11
+ date: 2015-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deface
@@ -111,8 +111,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  version: '0'
112
112
  requirements: []
113
113
  rubyforge_project:
114
- rubygems_version: 2.2.1
114
+ rubygems_version: 2.2.2
115
115
  signing_key:
116
116
  specification_version: 4
117
117
  summary: Helps set up Foreman for provisioning
118
118
  test_files: []
119
+ has_rdoc: