Merge "Fix building ironic bootstrap"
This commit is contained in:
commit
0e307b2693
|
@ -9,7 +9,9 @@ class osnailyfacter::provision::build_image(
|
||||||
}
|
}
|
||||||
$cluster_id = $data['cluster']['id']
|
$cluster_id = $data['cluster']['id']
|
||||||
|
|
||||||
if $data['ironic']['enabled'] == 'true' {
|
if $data['ironic']['enabled'] == true {
|
||||||
|
# TODO(vsaienko): Use the same system packages for fuel image and ironic bootstrap, but exclude
|
||||||
|
# not needed for ironic like nailgun-agent, etc...
|
||||||
$ironic_packages = [
|
$ironic_packages = [
|
||||||
'openssh-server',
|
'openssh-server',
|
||||||
'ntp',
|
'ntp',
|
||||||
|
@ -21,9 +23,7 @@ class osnailyfacter::provision::build_image(
|
||||||
'squashfs-tools',
|
'squashfs-tools',
|
||||||
'linux-firmware',
|
'linux-firmware',
|
||||||
'msmtp-mta',
|
'msmtp-mta',
|
||||||
'hpsa-dkms',
|
|
||||||
'i40e-dkms',
|
'i40e-dkms',
|
||||||
'linux-firmware-nonfree',
|
|
||||||
'xz-utils',
|
'xz-utils',
|
||||||
'linux-headers-generic',
|
'linux-headers-generic',
|
||||||
]
|
]
|
||||||
|
@ -35,25 +35,25 @@ class osnailyfacter::provision::build_image(
|
||||||
$out_dir = "/var/www/nailgun/bootstrap/ironic/${cluster_id}/"
|
$out_dir = "/var/www/nailgun/bootstrap/ironic/${cluster_id}/"
|
||||||
$out_params = "--output-dir ${out_dir}"
|
$out_params = "--output-dir ${out_dir}"
|
||||||
|
|
||||||
$extra_params = "--extra-dir /usr/share/ironic-fa-bootstrap-configs/ --no-compress --no-default-extra-dirs --no-default-packages"
|
$ironic_extra_params = "--extra-dir /usr/share/ironic-fa-bootstrap-configs/ --no-compress --no-default-extra-dirs --no-default-packages"
|
||||||
$log_params = '--log-file /var/log/fuel-ironic-bootstrap-image-build.log'
|
$ironic_log_params = '--log-file /var/log/fuel-ironic-bootstrap-image-build.log'
|
||||||
|
|
||||||
exec { 'generate_image_with_ironic':
|
exec { 'generate_image_with_ironic':
|
||||||
command => "fuel-bootstrap build ${package_list} ${ssh_params} ${out_params} ${extra_params} ${log_params}",
|
command => "fuel-bootstrap build ${package_list} ${ssh_params} ${out_params} ${ironic_extra_params} ${ironic_log_params}",
|
||||||
path => ['/bin', '/usr/bin'],
|
|
||||||
unless => "test -e /var/www/nailgun/bootstrap/ironic/${cluster_id}/vmlinuz",
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
$build_dir = '--image_build_dir /var/lib/fuel/ibp'
|
|
||||||
$log_params = "--log-file /var/log/fuel-agent-env-${cluster_id}.log"
|
|
||||||
$extra_params = '--data_driver nailgun_build_image'
|
|
||||||
|
|
||||||
exec { 'generate_image_with_fuel':
|
|
||||||
command => "fa_build_image ${build_dir} ${log_params} ${extra_params} --input_data_file ${data_file}",
|
|
||||||
path => ['/bin', '/usr/bin'],
|
path => ['/bin', '/usr/bin'],
|
||||||
timeout => 1800,
|
timeout => 1800,
|
||||||
unless => "test -e /var/www/nailgun/bootstrap/ironic/${cluster_id}/vmlinuz",
|
unless => "test -e /var/www/nailgun/bootstrap/ironic/${cluster_id}/vmlinuz",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$build_dir = '--image_build_dir /var/lib/fuel/ibp'
|
||||||
|
$log_params = "--log-file /var/log/fuel-agent-env-${cluster_id}.log"
|
||||||
|
$extra_params = '--data_driver nailgun_build_image'
|
||||||
|
|
||||||
|
exec { 'generate_image_with_fuel':
|
||||||
|
command => "fa_build_image ${build_dir} ${log_params} ${extra_params} --input_data_file ${data_file}",
|
||||||
|
path => ['/bin', '/usr/bin'],
|
||||||
|
timeout => 1800,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue