foreman_bootdisk 3.1.2 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +5 -0
- data/README.md +42 -0
- data/app/controllers/foreman_bootdisk/api/v2/disks_controller.rb +11 -4
- data/app/controllers/foreman_bootdisk/disks_controller.rb +10 -3
- data/app/helpers/concerns/foreman_bootdisk/hosts_helper_ext.rb +1 -0
- data/app/models/concerns/foreman_bootdisk/host_ext.rb +0 -4
- data/app/models/setting/bootdisk.rb +1 -0
- data/app/services/foreman_bootdisk/iso_generator.rb +104 -18
- data/app/views/foreman_bootdisk/disks/help.html.erb +5 -0
- data/config/routes.rb +1 -0
- data/lib/foreman_bootdisk/engine.rb +1 -1
- data/lib/foreman_bootdisk/version.rb +1 -1
- data/lib/tasks/bootdisk.rake +14 -2
- data/locale/de/LC_MESSAGES/foreman_bootdisk.mo +0 -0
- data/locale/de/foreman_bootdisk.po +91 -18
- data/locale/en/LC_MESSAGES/foreman_bootdisk.mo +0 -0
- data/locale/en/foreman_bootdisk.po +23 -2
- data/locale/en_GB/LC_MESSAGES/foreman_bootdisk.mo +0 -0
- data/locale/en_GB/foreman_bootdisk.po +75 -3
- data/locale/es/LC_MESSAGES/foreman_bootdisk.mo +0 -0
- data/locale/es/foreman_bootdisk.po +76 -4
- data/locale/foreman_bootdisk.pot +22 -1
- data/locale/fr/LC_MESSAGES/foreman_bootdisk.mo +0 -0
- data/locale/fr/foreman_bootdisk.po +75 -3
- data/locale/it/LC_MESSAGES/foreman_bootdisk.mo +0 -0
- data/locale/it/foreman_bootdisk.po +163 -0
- data/locale/ja/LC_MESSAGES/foreman_bootdisk.mo +0 -0
- data/locale/ja/foreman_bootdisk.po +163 -0
- data/locale/ko/LC_MESSAGES/foreman_bootdisk.mo +0 -0
- data/locale/ko/foreman_bootdisk.po +163 -0
- data/locale/pt_BR/LC_MESSAGES/foreman_bootdisk.mo +0 -0
- data/locale/pt_BR/foreman_bootdisk.po +75 -3
- data/locale/ru/LC_MESSAGES/foreman_bootdisk.mo +0 -0
- data/locale/ru/foreman_bootdisk.po +163 -0
- data/locale/sv_SE/LC_MESSAGES/foreman_bootdisk.mo +0 -0
- data/locale/sv_SE/foreman_bootdisk.po +76 -4
- data/locale/zh_CN/LC_MESSAGES/foreman_bootdisk.mo +0 -0
- data/locale/zh_CN/foreman_bootdisk.po +163 -0
- data/locale/zh_TW/LC_MESSAGES/foreman_bootdisk.mo +0 -0
- data/locale/zh_TW/foreman_bootdisk.po +163 -0
- metadata +14 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46d02f0f719544d09421d89d5f699baf68206f14
|
4
|
+
data.tar.gz: ac144ffdbc3e21e24ef67170fb893f25c1bc020c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6daa98d28068a4f6a03f0ce0464dff081882467e030be727101ce5b2a8635c985767824975cae9150d1dd1d68557738ec186e5bb08a39368fad75122af580ac9
|
7
|
+
data.tar.gz: 4b03b7f8a9616ff2952aa6b9bcdb03bfb772dd0b94d7ae8d3f8d5ec0fe795129be2dd96ae777faae3313d69eab7fd2b42204047b20ab118df9c15b579fcc3bd3
|
data/CHANGES.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## v3.2.0
|
4
|
+
* add full host image containing OS bootloader for hosts that fail to
|
5
|
+
chainload with isolinux and iPXE (#7046)
|
6
|
+
* partial it, zh_CN, zh_TW, ru, ja, ko translations added
|
7
|
+
|
3
8
|
## v3.1.2
|
4
9
|
* add help page
|
5
10
|
* rearrange README to be clearer about basic vs advanced config
|
data/README.md
CHANGED
@@ -94,6 +94,7 @@ TFTP settings are needed.
|
|
94
94
|
<th>DHCP required</th>
|
95
95
|
<th>DHCP reservation</th>
|
96
96
|
<th>Pre-register host</th>
|
97
|
+
<th>OS-specific</th>
|
97
98
|
</tr>
|
98
99
|
<tr>
|
99
100
|
<td>Per-host image</td>
|
@@ -101,6 +102,15 @@ TFTP settings are needed.
|
|
101
102
|
<td>No</td>
|
102
103
|
<td>No</td>
|
103
104
|
<td>Yes</td>
|
105
|
+
<td>No</td>
|
106
|
+
</tr>
|
107
|
+
<tr>
|
108
|
+
<td>Full host image</td>
|
109
|
+
<td>No</td>
|
110
|
+
<td>No</td>
|
111
|
+
<td>No</td>
|
112
|
+
<td>Yes</td>
|
113
|
+
<td>Yes</td>
|
104
114
|
</tr>
|
105
115
|
<tr>
|
106
116
|
<td>Generic image</td>
|
@@ -108,6 +118,7 @@ TFTP settings are needed.
|
|
108
118
|
<td>Yes</td>
|
109
119
|
<td>No</td>
|
110
120
|
<td>Yes</td>
|
121
|
+
<td>No</td>
|
111
122
|
</tr>
|
112
123
|
</table>
|
113
124
|
|
@@ -134,6 +145,32 @@ plugin and run:
|
|
134
145
|
|
135
146
|
See the hammer_cli_foreman_bootdisk documentation for more advanced usage.
|
136
147
|
|
148
|
+
### Per-host full images
|
149
|
+
|
150
|
+
A variant of the per-host image, this version doesn't chainload from Foreman,
|
151
|
+
but contains the initial OS bootloader. It can be useful for hosts that fail
|
152
|
+
to chainload correctly, but has the downsides that it may become out of date
|
153
|
+
if the host OS, bootloader or templates change, or build tokens are required
|
154
|
+
and expire.
|
155
|
+
|
156
|
+
To generate the image from the web interface, view the host page, click the
|
157
|
+
"Boot disk" button and select "Full host 'FQDN' image". This image may take
|
158
|
+
a while to generate, as it downloads the OS bootloaders which can be
|
159
|
+
considerable in size.
|
160
|
+
|
161
|
+
To generate from the command line on the Foreman server:
|
162
|
+
|
163
|
+
foreman-rake bootdisk:generate:full_host NAME=foo.example.com
|
164
|
+
|
165
|
+
Optionally set `OUTPUT=/path/foo.iso` to change the output destination.
|
166
|
+
|
167
|
+
To generate using the Hammer CLI, install the [hammer_cli_foreman_bootdisk](https://github.com/theforeman/hammer_cli_foreman_bootdisk)
|
168
|
+
plugin and run:
|
169
|
+
|
170
|
+
hammer bootdisk host --host client.example.com --full true
|
171
|
+
|
172
|
+
See the hammer_cli_foreman_bootdisk documentation for more advanced usage.
|
173
|
+
|
137
174
|
### Generic image
|
138
175
|
|
139
176
|
This provides a single ISO that can be used by all registered hosts, but since
|
@@ -187,6 +224,9 @@ new template and set the name in Administer>Settings>Bootdisk.
|
|
187
224
|
These templates are baked into the downloaded ISO files and generally don't
|
188
225
|
need to be modified.
|
189
226
|
|
227
|
+
Full host images boot directly into the OS PXELinux template via ISOLinux,
|
228
|
+
with no intermediate template or bootloader.
|
229
|
+
|
190
230
|
### Settings
|
191
231
|
|
192
232
|
Some more advanced settings are available under Administer>Settings>Bootdisk in
|
@@ -195,6 +235,8 @@ the Foreman UI.
|
|
195
235
|
* `bootdisk_ipxe_dir` points to the directory containing ipxe.lkrn
|
196
236
|
* `bootdisk_syslinux_dir` points to the directory containing syslinux images
|
197
237
|
* `bootdisk_mkiso_command` is the name of genisoimage/mkisofs on your OS
|
238
|
+
* `bootdisk_cache_media` controls whether to cache OS boot files from
|
239
|
+
installation media for full host images
|
198
240
|
|
199
241
|
# Issues
|
200
242
|
|
@@ -20,18 +20,25 @@ module ForemanBootdisk
|
|
20
20
|
api :GET, '/generic', N_('Download generic image')
|
21
21
|
def generic
|
22
22
|
tmpl = ForemanBootdisk::Renderer.new.generic_template_render
|
23
|
-
ForemanBootdisk::ISOGenerator.
|
23
|
+
ForemanBootdisk::ISOGenerator.generate(:ipxe => tmpl) do |iso|
|
24
24
|
send_data File.read(iso), :filename => "bootdisk_#{URI.parse(Setting[:foreman_url]).host}.iso"
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
28
|
api :GET, '/hosts/:host_id', N_('Download host image')
|
29
|
+
param :full, :bool, :required => false, :desc => N_('True for full, false for basic reusable image')
|
29
30
|
param :host_id, :identifier_dottable, :required => true
|
30
31
|
def host
|
31
32
|
host = @disk
|
32
|
-
|
33
|
-
|
34
|
-
|
33
|
+
if params[:full]
|
34
|
+
ForemanBootdisk::ISOGenerator.generate_full_host(host) do |iso|
|
35
|
+
send_data File.read(iso), :filename => "#{host.name}#{ForemanBootdisk::ISOGenerator.token_expiry(host)}.iso"
|
36
|
+
end
|
37
|
+
else
|
38
|
+
tmpl = host.bootdisk_template_render
|
39
|
+
ForemanBootdisk::ISOGenerator.generate(:ipxe => tmpl) do |iso|
|
40
|
+
send_data File.read(iso), :filename => "#{host.name}.iso"
|
41
|
+
end
|
35
42
|
end
|
36
43
|
end
|
37
44
|
|
@@ -2,7 +2,7 @@ require 'uri'
|
|
2
2
|
|
3
3
|
module ForemanBootdisk
|
4
4
|
class DisksController < ::ApplicationController
|
5
|
-
before_filter :find_by_name, :only => %w[host]
|
5
|
+
before_filter :find_by_name, :only => %w[host full_host]
|
6
6
|
|
7
7
|
def generic
|
8
8
|
begin
|
@@ -13,7 +13,7 @@ module ForemanBootdisk
|
|
13
13
|
return
|
14
14
|
end
|
15
15
|
|
16
|
-
ForemanBootdisk::ISOGenerator.
|
16
|
+
ForemanBootdisk::ISOGenerator.generate(:ipxe => tmpl) do |iso|
|
17
17
|
send_data File.read(iso), :filename => "bootdisk_#{URI.parse(Setting[:foreman_url]).host}.iso"
|
18
18
|
end
|
19
19
|
end
|
@@ -28,11 +28,18 @@ module ForemanBootdisk
|
|
28
28
|
return
|
29
29
|
end
|
30
30
|
|
31
|
-
ForemanBootdisk::ISOGenerator.
|
31
|
+
ForemanBootdisk::ISOGenerator.generate(:ipxe => tmpl) do |iso|
|
32
32
|
send_data File.read(iso), :filename => "#{host.name}.iso"
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
|
+
def full_host
|
37
|
+
host = @disk
|
38
|
+
ForemanBootdisk::ISOGenerator.generate_full_host(host) do |iso|
|
39
|
+
send_data File.read(iso), :filename => "#{host.name}#{ForemanBootdisk::ISOGenerator.token_expiry(host)}.iso"
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
36
43
|
def help
|
37
44
|
end
|
38
45
|
|
@@ -10,6 +10,7 @@ module ForemanBootdisk::HostsHelperExt
|
|
10
10
|
button_group(
|
11
11
|
select_action_button(_('Boot disk'), {},
|
12
12
|
display_bootdisk_link_if_authorized(_("Host '%s' image") % @host.name.split('.')[0], {:controller => 'foreman_bootdisk/disks', :action => 'host', :id => @host}, :class=>'btn'),
|
13
|
+
display_bootdisk_link_if_authorized(_("Full host '%s' image") % @host.name.split('.')[0], {:controller => 'foreman_bootdisk/disks', :action => 'full_host', :id => @host}, :class=>'btn'),
|
13
14
|
display_bootdisk_link_if_authorized(_("Generic image"), {:controller => 'foreman_bootdisk/disks', :action => 'generic'}, :class=>'btn'),
|
14
15
|
display_bootdisk_link_if_authorized(_("Help"), {:controller => 'foreman_bootdisk/disks', :action => 'help'}, :class=>'btn')
|
15
16
|
)
|
@@ -8,10 +8,6 @@ module ForemanBootdisk::HostExt
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def bootdisk_template_render
|
11
|
-
if (Gem::Version.new(SETTINGS[:version].notag) < Gem::Version.new('1.5')) && Setting[:safemode_render]
|
12
|
-
raise(::Foreman::Exception.new(N_('Bootdisk is not supported with safemode rendering, please disable safemode_render under Adminster>Settings')))
|
13
|
-
end
|
14
|
-
|
15
11
|
@host = self
|
16
12
|
pxe_render(bootdisk_template.template)
|
17
13
|
end
|
@@ -13,6 +13,7 @@ class Setting::Bootdisk< ::Setting
|
|
13
13
|
self.set('bootdisk_host_template', N_('iPXE template to use for host-specific boot disks'), 'Boot disk iPXE - host'),
|
14
14
|
self.set('bootdisk_generic_host_template', N_('iPXE template to use for generic host boot disks'), 'Boot disk iPXE - generic host'),
|
15
15
|
self.set('bootdisk_mkiso_command', N_('Command to generate ISO image, use genisoimage or mkisofs'), 'genisoimage'),
|
16
|
+
self.set('bootdisk_cache_media', N_('Installation media files will be cached for full host images'), true),
|
16
17
|
].compact.each { |s| self.create s.update(:category => "Setting::Bootdisk") }
|
17
18
|
end
|
18
19
|
|
@@ -1,36 +1,73 @@
|
|
1
|
+
require 'net/http'
|
2
|
+
require 'uri'
|
3
|
+
|
1
4
|
# Generates an iPXE ISO hybrid image
|
2
5
|
#
|
3
6
|
# requires syslinux, ipxe/ipxe-bootimgs, genisoimage, isohybrid
|
4
7
|
class ForemanBootdisk::ISOGenerator
|
5
|
-
|
8
|
+
def self.generate_full_host(host, &block)
|
9
|
+
raise ::Foreman::Exception.new(N_('Host is not in build mode, so the template cannot be rendered')) unless host.build?
|
10
|
+
|
11
|
+
tmpl = host.send(:generate_pxe_template)
|
12
|
+
raise ::Foreman::Exception.new(N_('Unable to generate disk template: %s'), host.errors.full_messages.to_sentence) if tmpl == false
|
13
|
+
|
14
|
+
# pxe_files and filename conversion is utterly bizarre
|
15
|
+
# aim to convert filenames to something usable under ISO 9660, update the template to match
|
16
|
+
# and then still ensure that the fetch() process stores them under the same name
|
17
|
+
files = host.operatingsystem.pxe_files(host.medium, host.architecture, host)
|
18
|
+
files.map! do |bootfile_info|
|
19
|
+
bootfile_info.map do |f|
|
20
|
+
suffix = f[1].split('/').last
|
21
|
+
iso_suffix = iso9660_filename(suffix)
|
22
|
+
iso_f0 = iso9660_filename(f[0].to_s) + '_' + iso_suffix
|
23
|
+
tmpl.gsub!(f[0].to_s + '-' + suffix, iso_f0)
|
24
|
+
Rails.logger.debug("Boot file #{iso_f0}, source #{f[1]}")
|
25
|
+
[iso_f0, f[1]]
|
26
|
+
end
|
27
|
+
end
|
6
28
|
|
7
|
-
|
8
|
-
@script = script
|
29
|
+
generate({ :isolinux => tmpl, :files => files }, &block)
|
9
30
|
end
|
10
31
|
|
11
|
-
def generate(&block)
|
32
|
+
def self.generate(opts = {}, &block)
|
33
|
+
opts[:isolinux] = <<-EOS if opts[:isolinux].nil? && opts[:ipxe]
|
34
|
+
default ipxe
|
35
|
+
label ipxe
|
36
|
+
kernel /ipxe
|
37
|
+
initrd /script
|
38
|
+
EOS
|
39
|
+
|
12
40
|
Dir.mktmpdir('bootdisk') do |wd|
|
13
41
|
Dir.mkdir(File.join(wd, 'build'))
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
42
|
+
|
43
|
+
if opts[:isolinux]
|
44
|
+
unless File.exists?(File.join(Setting[:bootdisk_syslinux_dir], 'isolinux.bin'))
|
45
|
+
raise ::Foreman::Exception.new(N_("Please ensure the ipxe-bootimgs and syslinux packages are installed."))
|
46
|
+
end
|
47
|
+
FileUtils.cp(File.join(Setting[:bootdisk_syslinux_dir], 'isolinux.bin'), File.join(wd, 'build', 'isolinux.bin'))
|
48
|
+
File.open(File.join(wd, 'build', 'isolinux.cfg'), 'w') do |file|
|
49
|
+
file.write(opts[:isolinux])
|
50
|
+
end
|
21
51
|
end
|
22
52
|
|
23
|
-
|
24
|
-
|
25
|
-
|
53
|
+
if opts[:ipxe]
|
54
|
+
unless File.exists?(File.join(Setting[:bootdisk_ipxe_dir], 'ipxe.lkrn'))
|
55
|
+
raise ::Foreman::Exception.new(N_("Please ensure the ipxe-bootimgs and syslinux packages are installed."))
|
56
|
+
end
|
57
|
+
FileUtils.cp(File.join(Setting[:bootdisk_ipxe_dir], 'ipxe.lkrn'), File.join(wd, 'build', 'ipxe'))
|
58
|
+
File.open(File.join(wd, 'build', 'script'), 'w') { |file| file.write(opts[:ipxe]) }
|
26
59
|
end
|
27
60
|
|
28
|
-
|
29
|
-
|
30
|
-
|
61
|
+
if opts[:files]
|
62
|
+
opts[:files].each do |bootfile_info|
|
63
|
+
for file, source in bootfile_info do
|
64
|
+
fetch(File.join(wd, 'build', file), source)
|
65
|
+
end
|
66
|
+
end if opts[:files].respond_to? :each
|
67
|
+
end
|
31
68
|
|
32
69
|
iso = File.join(wd, 'output.iso')
|
33
|
-
unless system("#{Setting[:bootdisk_mkiso_command]} -o #{iso} -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table #{File.join(wd, 'build')}")
|
70
|
+
unless system("#{Setting[:bootdisk_mkiso_command]} -o #{iso} -iso-level 2 -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table #{File.join(wd, 'build')}")
|
34
71
|
raise ::Foreman::Exception.new(N_("ISO build failed"))
|
35
72
|
end
|
36
73
|
|
@@ -42,4 +79,53 @@ EOF
|
|
42
79
|
yield iso
|
43
80
|
end
|
44
81
|
end
|
82
|
+
|
83
|
+
def self.token_expiry(host)
|
84
|
+
expiry = host.token.try(:expires)
|
85
|
+
return '' if Setting[:token_duration] == 0 || expiry.blank?
|
86
|
+
'_' + expiry.strftime('%Y%m%d_%H%M')
|
87
|
+
end
|
88
|
+
|
89
|
+
private
|
90
|
+
|
91
|
+
def self.fetch(path, uri)
|
92
|
+
dir = File.dirname(path)
|
93
|
+
FileUtils.mkdir_p(dir) unless File.exist?(dir)
|
94
|
+
|
95
|
+
use_cache = !!Setting[:bootdisk_cache_media]
|
96
|
+
write_cache = false
|
97
|
+
File.open(path, 'w') do |file|
|
98
|
+
file.binmode
|
99
|
+
|
100
|
+
if use_cache && !(contents = Rails.cache.fetch(uri, :raw => true)).nil?
|
101
|
+
Rails.logger.info("Retrieved #{uri} from local cache (use foreman-rake tmp:cache:clear to empty)")
|
102
|
+
file.write(contents)
|
103
|
+
else
|
104
|
+
Rails.logger.info("Fetching #{uri}")
|
105
|
+
write_cache = use_cache
|
106
|
+
uri = URI(uri)
|
107
|
+
Net::HTTP.start(uri.host, uri.port) do |http|
|
108
|
+
request = Net::HTTP::Get.new uri
|
109
|
+
|
110
|
+
http.request request do |response|
|
111
|
+
response.read_body do |chunk|
|
112
|
+
file.write chunk
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
if write_cache
|
120
|
+
Rails.logger.debug("Caching contents of #{uri}")
|
121
|
+
Rails.cache.write(uri, File.read(path), :raw => true)
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
# isolinux supports up to ISO 9660 level 2 filenames
|
126
|
+
def self.iso9660_filename(name)
|
127
|
+
dir = File.dirname(name)
|
128
|
+
file = File.basename(name).upcase.tr_s('^A-Z0-9_', '_')[0..30]
|
129
|
+
dir == '.' ? file : File.join(dir.upcase.tr_s('^A-Z0-9_', '_')[0..30], file)
|
130
|
+
end
|
45
131
|
end
|
@@ -17,6 +17,11 @@
|
|
17
17
|
<%= _("Once chainloaded, the OS bootloader and installer are downloaded directly from the installation media configured in Foreman, and the provisioning script (kickstart/preseed) is downloaded from Foreman.") %>
|
18
18
|
</p>
|
19
19
|
|
20
|
+
<h2><%= _('Full host image') %></h2>
|
21
|
+
<p>
|
22
|
+
<%= _('A variant of the per-host image which contains the OS bootloader embedded inside the disk. This may be useful if chainloading fails on certain hardware, but has the downside that the image must be regenerated for any change in the OS, bootloader or templates.') %>
|
23
|
+
</p>
|
24
|
+
|
20
25
|
<h2><%= _('Generic image') %></h2>
|
21
26
|
<p>
|
22
27
|
<%= _('Generic images are a reusable disk image that works for any host registered in Foreman. It requires a basic DHCP and DNS service to function and contact the server, but does not require DHCP reservations or static IP addresses.') %>
|
data/config/routes.rb
CHANGED
@@ -32,7 +32,7 @@ module ForemanBootdisk
|
|
32
32
|
requires_foreman '>= 1.6'
|
33
33
|
|
34
34
|
security_block :bootdisk do |map|
|
35
|
-
permission :download_bootdisk, {:'foreman_bootdisk/disks' => [:generic, :host, :help],
|
35
|
+
permission :download_bootdisk, {:'foreman_bootdisk/disks' => [:generic, :host, :full_host, :help],
|
36
36
|
:'foreman_bootdisk/api/v2/disks' => [:generic, :host]}
|
37
37
|
end
|
38
38
|
|
data/lib/tasks/bootdisk.rake
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'date'
|
2
|
+
|
1
3
|
namespace :bootdisk do
|
2
4
|
namespace :generate do
|
3
5
|
desc 'Generate a static boot disk for a specific host. NAME=fqdn, OUTPUT path'
|
@@ -5,18 +7,28 @@ namespace :bootdisk do
|
|
5
7
|
host = Host::Base.find_by_name(ENV['NAME']) || raise("cannot find host '#{ENV['NAME']}', specify NAME=fqdn")
|
6
8
|
tmpl = host.bootdisk_template_render
|
7
9
|
|
8
|
-
ForemanBootdisk::ISOGenerator.
|
10
|
+
ForemanBootdisk::ISOGenerator.generate(:ipxe => tmpl) do |image|
|
9
11
|
output = ENV['OUTPUT'] || "#{host.name}.iso"
|
10
12
|
FileUtils.cp image, output
|
11
13
|
puts "Wrote #{output}"
|
12
14
|
end
|
13
15
|
end
|
14
16
|
|
17
|
+
desc 'Generate a full boot disk for a specific host with the OS bootloader included. NAME=fqdn, OUTPUT path'
|
18
|
+
task :full_host => :environment do
|
19
|
+
host = Host::Base.find_by_name(ENV['NAME']) || raise("cannot find host '#{ENV['NAME']}', specify NAME=fqdn")
|
20
|
+
ForemanBootdisk::ISOGenerator.generate_full_host(host) do |image|
|
21
|
+
output = ENV['OUTPUT'] || "#{host.name}_#{Date.today.strftime('%Y%m%d')}.iso"
|
22
|
+
FileUtils.cp image, output
|
23
|
+
puts "Wrote #{output}"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
15
27
|
desc 'Generate a generic boot disk. OUTPUT=path'
|
16
28
|
task :generic => :environment do
|
17
29
|
tmpl = ForemanBootdisk::Renderer.new.generic_template_render
|
18
30
|
|
19
|
-
ForemanBootdisk::ISOGenerator.
|
31
|
+
ForemanBootdisk::ISOGenerator.generate(:ipxe => tmpl) do |image|
|
20
32
|
output = ENV['OUTPUT'] || "bootdisk_#{URI.parse(Setting[:foreman_url]).host}.iso"
|
21
33
|
FileUtils.cp image, output
|
22
34
|
puts "Wrote #{output}"
|
Binary file
|
@@ -3,15 +3,16 @@
|
|
3
3
|
# This file is distributed under the same license as foreman_bootdisk.
|
4
4
|
#
|
5
5
|
# Translators:
|
6
|
+
# Ettore Atalan <atalanttore@googlemail.com>, 2014
|
6
7
|
# Paul Puschmann, 2014
|
7
8
|
# simon11 <simon.stieger.98@live.de>, 2014
|
8
9
|
msgid ""
|
9
10
|
msgstr ""
|
10
|
-
"Project-Id-Version: foreman_bootdisk 3.1.
|
11
|
+
"Project-Id-Version: foreman_bootdisk 3.1.2\n"
|
11
12
|
"Report-Msgid-Bugs-To: \n"
|
12
|
-
"POT-Creation-Date: 2014-
|
13
|
-
"PO-Revision-Date: 2014-
|
14
|
-
"Last-Translator:
|
13
|
+
"POT-Creation-Date: 2014-09-21 15:30+0100\n"
|
14
|
+
"PO-Revision-Date: 2014-09-22 11:21+0000\n"
|
15
|
+
"Last-Translator: Ettore Atalan <atalanttore@googlemail.com>\n"
|
15
16
|
"Language-Team: German (http://www.transifex.com/projects/p/foreman/language/de/)\n"
|
16
17
|
"MIME-Version: 1.0\n"
|
17
18
|
"Content-Type: text/plain; charset=UTF-8\n"
|
@@ -19,34 +20,65 @@ msgstr ""
|
|
19
20
|
"Language: de\n"
|
20
21
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
21
22
|
|
23
|
+
msgid ""
|
24
|
+
"A variant of the per-host image which contains the OS bootloader embedded "
|
25
|
+
"inside the disk. This may be useful if chainloading fails on certain "
|
26
|
+
"hardware, but has the downside that the image must be regenerated for any "
|
27
|
+
"change in the OS, bootloader or templates."
|
28
|
+
msgstr ""
|
29
|
+
|
30
|
+
msgid ""
|
31
|
+
"All images are usable as either ISOs or as disk images, including being "
|
32
|
+
"written to a USB disk with `dd`."
|
33
|
+
msgstr ""
|
34
|
+
|
35
|
+
msgid "Back"
|
36
|
+
msgstr "Zurück"
|
37
|
+
|
22
38
|
msgid "Boot disk"
|
23
|
-
msgstr "
|
39
|
+
msgstr "Startmedium"
|
24
40
|
|
25
41
|
msgid "Boot disks"
|
26
|
-
msgstr ""
|
42
|
+
msgstr "Startmedien"
|
27
43
|
|
28
44
|
msgid ""
|
29
45
|
"Bootdisk is not supported with safemode rendering, please disable "
|
30
46
|
"safemode_render under Adminster>Settings"
|
31
|
-
msgstr "
|
47
|
+
msgstr "Startmedium mit Safemode-Abbildung wird nicht unterstützt, bitte deaktiviere safemode_render unter Verwalten > Einstellungen"
|
32
48
|
|
33
49
|
msgid "Command to generate ISO image, use genisoimage or mkisofs"
|
34
|
-
msgstr "Kommando zur Erstellung von ISO-
|
50
|
+
msgstr "Kommando zur Erstellung von ISO-Abbildern, verwende genisoimage oder mkisofs"
|
35
51
|
|
36
52
|
msgid "Download generic image"
|
37
|
-
msgstr ""
|
53
|
+
msgstr "Generisches Abbild herunterladen"
|
38
54
|
|
39
55
|
msgid "Download host image"
|
40
|
-
msgstr ""
|
56
|
+
msgstr "Host-Abbild herunterladen"
|
41
57
|
|
42
58
|
msgid "Failed to render boot disk template: %s"
|
43
|
-
msgstr "Fehler beim Abbilden der
|
59
|
+
msgstr "Fehler beim Abbilden der Startmedium-Vorlage: %s"
|
60
|
+
|
61
|
+
msgid "Full host '%s' image"
|
62
|
+
msgstr "Vollständiges Host \"%s\"-Abbild"
|
63
|
+
|
64
|
+
msgid "Full host image"
|
65
|
+
msgstr "Vollständiges Host-Abbild"
|
44
66
|
|
45
67
|
msgid "Generic image"
|
46
|
-
msgstr "Generisches
|
68
|
+
msgstr "Generisches Abbild"
|
69
|
+
|
70
|
+
msgid ""
|
71
|
+
"Generic images are a reusable disk image that works for any host registered "
|
72
|
+
"in Foreman. It requires a basic DHCP and DNS service to function and "
|
73
|
+
"contact the server, but does not require DHCP reservations or static IP "
|
74
|
+
"addresses."
|
75
|
+
msgstr ""
|
76
|
+
|
77
|
+
msgid "Help"
|
78
|
+
msgstr "Hilfe"
|
47
79
|
|
48
80
|
msgid "Host '%s' image"
|
49
|
-
msgstr "Host '%s'
|
81
|
+
msgstr "Host '%s'-Abbild"
|
50
82
|
|
51
83
|
msgid "Host has no IP address defined"
|
52
84
|
msgstr "Host hat keine IP-Adresse definiert"
|
@@ -57,20 +89,42 @@ msgstr "Host hat keine Domäne definiert"
|
|
57
89
|
msgid "Host has no subnet defined"
|
58
90
|
msgstr "Host hat kein Subnetz definiert"
|
59
91
|
|
92
|
+
msgid "Host image"
|
93
|
+
msgstr "Host-Abbild"
|
94
|
+
|
95
|
+
msgid "Host is not in build mode, so the template cannot be rendered"
|
96
|
+
msgstr ""
|
97
|
+
|
60
98
|
msgid "ISO build failed"
|
61
99
|
msgstr "ISO-Erstellung fehlgeschlagen"
|
62
100
|
|
63
101
|
msgid "ISO hybrid conversion failed"
|
64
102
|
msgstr "ISO hybrid Konvertierung fehlgeschlagen"
|
65
103
|
|
104
|
+
msgid "Installation media files will be cached for full host images"
|
105
|
+
msgstr ""
|
106
|
+
|
107
|
+
msgid ""
|
108
|
+
"Once chainloaded, the OS bootloader and installer are downloaded directly "
|
109
|
+
"from the installation media configured in Foreman, and the provisioning "
|
110
|
+
"script (kickstart/preseed) is downloaded from Foreman."
|
111
|
+
msgstr ""
|
112
|
+
|
66
113
|
msgid "Path to directory containing iPXE images"
|
67
|
-
msgstr "Pfad zum Verzeichnis mit iPXE
|
114
|
+
msgstr "Pfad zum Verzeichnis mit iPXE-Abbildern"
|
68
115
|
|
69
116
|
msgid "Path to directory containing syslinux images"
|
70
|
-
msgstr "Pfad zum Verzeichnis mit syslinux
|
117
|
+
msgstr "Pfad zum Verzeichnis mit syslinux-Abbildern"
|
118
|
+
|
119
|
+
msgid ""
|
120
|
+
"Per-host images contain data about a particular host registered in Foreman "
|
121
|
+
"and set up fully static networking, avoiding the requirement for DHCP. "
|
122
|
+
"After networking is configured, they chainload from Foreman, picking up the "
|
123
|
+
"current OS configuration and build state from the server."
|
124
|
+
msgstr ""
|
71
125
|
|
72
126
|
msgid "Please ensure the ipxe-bootimgs and syslinux packages are installed."
|
73
|
-
msgstr "Bitte
|
127
|
+
msgstr "Bitte stellen Sie sicher, dass die Pakete ipxe-bootimgs und syslinux installiert sind."
|
74
128
|
|
75
129
|
msgid ""
|
76
130
|
"Plugin for Foreman that creates iPXE-based boot disks to provision hosts "
|
@@ -83,11 +137,30 @@ msgstr "Subnetz (%s) hat keinen Gateway definiert"
|
|
83
137
|
msgid "Subnet (%s) has no primary DNS server defined"
|
84
138
|
msgstr "Subnetz (%s) hat keinen primären DNS-Server definiert"
|
85
139
|
|
140
|
+
msgid ""
|
141
|
+
"The OS install continues using the installation media configured in Foreman,"
|
142
|
+
" and it will typically configure static networking, depending on how the OS "
|
143
|
+
"iPXE template is configured."
|
144
|
+
msgstr ""
|
145
|
+
|
146
|
+
msgid "True for full, false for basic reusable image"
|
147
|
+
msgstr ""
|
148
|
+
|
86
149
|
msgid "Unable to find template specified by %s setting"
|
87
150
|
msgstr "Konnte Vorlage mit der %s-Einstellung nicht finden"
|
88
151
|
|
152
|
+
msgid "Unable to generate disk template: %s"
|
153
|
+
msgstr ""
|
154
|
+
|
155
|
+
msgid ""
|
156
|
+
"Various types of boot disks can be created to provision hosts without the "
|
157
|
+
"need for PXE services. Boot disks can be attached to the host (physical or "
|
158
|
+
"virtual) which boots from the disk, contacts Foreman and begins the OS "
|
159
|
+
"installation."
|
160
|
+
msgstr ""
|
161
|
+
|
89
162
|
msgid "iPXE template to use for generic host boot disks"
|
90
|
-
msgstr "iPXE Vorlage zur Verwendung für generische
|
163
|
+
msgstr "iPXE Vorlage zur Verwendung für generische Host-Startmedien"
|
91
164
|
|
92
165
|
msgid "iPXE template to use for host-specific boot disks"
|
93
|
-
msgstr "iPXE Vorlage zur Verwendung für
|
166
|
+
msgstr "iPXE Vorlage zur Verwendung für Host-spezifische Startmedien"
|