nailgun::astute: set the bootstrap profile in astuted.conf

In MOS 7.0 several bootstrap images and corresponding cobbler profiles
can exist. Astute needs to know which bootstrap profile should be used
to correctly reboot the nodes being (re-)provisioned.

Closes-Bug: #1479882
Depends-On: I844e30311938fcd2c0aea6f558862205ba2a9982

Change-Id: I3ca4c0a172f1b607048523a7c0cc70aa76a83ee1
This commit is contained in:
Alexey Sheplyakov 2015-07-31 07:36:58 +03:00
parent d1291ae756
commit b9ae3cbd24
3 changed files with 12 additions and 0 deletions

View File

@ -9,6 +9,9 @@ else {
$production = 'prod'
}
$bootstrap_settings = pick($::fuel_settings['BOOTSTRAP'], {})
$bootstrap_flavor = pick($bootstrap_settings['flavor'], 'centos')
if $production == 'prod'{
$env_path = "/usr"
$staticdir = "/usr/share/nailgun/static"
@ -47,6 +50,7 @@ node default {
rabbitmq_astute_user => $rabbitmq_astute_user,
rabbitmq_astute_password => $rabbitmq_astute_password,
version => '0.1.0',
bootstrap_flavor => $bootstrap_flavor,
}
package { "supervisor": } ->
class { "nailgun::supervisor":

View File

@ -4,9 +4,16 @@ class nailgun::astute(
$rabbitmq_astute_user = 'naily',
$rabbitmq_astute_password = 'naily',
$version,
$bootstrap_flavor = 'centos',
$gem_source = "http://rubygems.org/",
){
$bootstrap_profile = $bootstrap_flavor ? {
/(?i)centos/ => 'bootstrap',
/(?i)ubuntu/ => 'ubuntu_bootstrap',
default => 'bootstrap',
}
# exec { 'install-astute-gem':
# command => "gem install astute --source $gem_source --version $version --no-ri --no-rdoc",
# require => Exec['configure-rubygems'],

View File

@ -11,6 +11,7 @@ broker_queue: 'naily'
broker_publisher_queue: 'nailgun'
broker_exchange: 'nailgun'
iops: <%= @iops %>
bootstrap_profile: '<%= @bootstrap_profile %>'
#reboot_timeout: 120 # Wait for reboot request
#provisioning_timeout: 5400 # Timeout for target nodes to install OS
#dump_timeout: 3600 # Timeout for dump