summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
b8f6485)
Install kernel and reboot compute nodes in post-deployment phase when
there is less chance to interfere with other tasks. Implement Michael's
suggestion to use reboot puppet module.
Change-Id: I83867e5e2752c39d2b69c950e3e475d43de04466
Signed-off-by: Michal Skalski <mskalski@mirantis.com>
--- /dev/null
+*.rpm
+*.deb
+fuel-plugin/.build/
+fuel-plugin/deployment_scripts/puppet/modules/reboot
-$fuel_settings = parseyaml(file('/etc/astute.yaml'))
+$kvm_settings = hiera('fuel-plugin-kvm')
if $operatingsystem == 'Ubuntu' {
if $operatingsystem == 'Ubuntu' {
- if $fuel_settings['fuel-plugin-kvm']['use_kvm'] {
+ if $kvm_settings['use_kvm'] {
package { 'linux-headers-4.4.6-rt14nfv':
ensure => "1.0.OPNFV",
package { 'linux-headers-4.4.6-rt14nfv':
ensure => "1.0.OPNFV",
+ notify => Reboot['after_run'],
} ->
package { 'linux-image-4.4.6-rt14nfv':
ensure => "1.0.OPNFV",
} ->
package { 'linux-image-4.4.6-rt14nfv':
ensure => "1.0.OPNFV",
- } ->
- exec {'reboot':
- command => "reboot",
- path => "/usr/bin:/usr/sbin:/bin:/sbin",
+ notify => Reboot['after_run'],
+ }
+ reboot { 'after_run':
+ apply => finished,
- id: kvm_install
type: puppet
version: 2.0.0
- id: kvm_install
type: puppet
version: 2.0.0
- groups: [compute]
- required_for: [firewall]
- requires: [tools]
+ role: [compute]
+ required_for: [post_deployment_end]
+ requires: [post_deployment_start]
parameters:
puppet_manifest: puppet/manifests/kvm-install.pp
puppet_modules: puppet/modules:/etc/puppet/modules
parameters:
puppet_manifest: puppet/manifests/kvm-install.pp
puppet_modules: puppet/modules:/etc/puppet/modules
BUILD_FOR=${BUILD_FOR:-ubuntu}
DIR="$(dirname `readlink -f $0`)"
BUILD_FOR=${BUILD_FOR:-ubuntu}
DIR="$(dirname `readlink -f $0`)"
+MODULES="${DIR}/deployment_scripts/puppet/modules"
+
+REBOOT_VER='1.2.1'
+REBOOT_URL="https://github.com/puppetlabs/puppetlabs-reboot/archive/${REBOOT_VER}.tar.gz"
function build_pkg {
case $1 in
function build_pkg {
case $1 in
do
build_pkg $system
done
do
build_pkg $system
done
+
+rm -rf ${MODULES}/reboot
+mkdir -p ${MODULES}/reboot
+wget -qO- ${REBOOT_URL} | tar -C ${MODULES}/reboot --strip-components=1 -zxvf -