Init support
- init.pp - unit tests for init - small fix in pxe - README update - example for ironic deployment Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
This commit is contained in:
parent
0359371efc
commit
f5c924daf8
11
README.md
11
README.md
|
@ -1,12 +1,5 @@
|
|||
puppet-ironic (Work in progress)
|
||||
===================================
|
||||
|
||||
ToDo:
|
||||
- init.pp + init unit tests
|
||||
- fix red hat packages
|
||||
- Gerrt <-> Launchpad (needs review)
|
||||
- move to Stackforge (needs review)
|
||||
- send mail to puppet-openstack ML (written)
|
||||
puppet-ironic
|
||||
=============
|
||||
|
||||
#### Table of Contents
|
||||
|
||||
|
|
|
@ -15,11 +15,67 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
# Deploy Ironic on a single node
|
||||
# Deploy Ironic
|
||||
#
|
||||
|
||||
class { 'ironic': }
|
||||
class { 'ironic::api': }
|
||||
class { 'ironic::conductor': }
|
||||
class { 'ironic::drivers::pxe': }
|
||||
class { 'ironic::drivers::ipmi': }
|
||||
$db_host = 'db'
|
||||
$db_username = 'nova'
|
||||
$db_name = 'nova'
|
||||
$db_password = 'password'
|
||||
$rabbit_user = 'nova'
|
||||
$rabbit_password = 'nova'
|
||||
$rabbit_vhost = '/'
|
||||
$rabbit_hosts = ['rabbitmq:5672']
|
||||
$rabbit_port = '5672'
|
||||
$glance_api_servers = 'glance:9292'
|
||||
$deploy_kernel = 'glance://deploy_kernel_uuid'
|
||||
$deploy_ramdisk = 'glance://deploy_ramdisk_uuid'
|
||||
|
||||
node db {
|
||||
|
||||
class { 'mysql::server':
|
||||
config_hash => {
|
||||
'bind_address' => '0.0.0.0'
|
||||
}
|
||||
}
|
||||
|
||||
class { 'mysql::ruby': }
|
||||
|
||||
class { 'nova::db::mysql':
|
||||
password => $db_password,
|
||||
dbname => $db_name,
|
||||
user => $db_username,
|
||||
host => $clientcert,
|
||||
allowed_hosts => ['controller'],
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
node controller {
|
||||
|
||||
class { 'nova':
|
||||
db_password => $db_password,
|
||||
db_name => $db_name,
|
||||
db_user => $db_username,
|
||||
db_host => $db_host,
|
||||
|
||||
rabbit_password => $rabbit_password,
|
||||
rabbit_userid => $rabbit_user,
|
||||
rabbit_virtual_host => $rabbit_vhost,
|
||||
rabbit_hosts => $rabbit_hosts,
|
||||
|
||||
glance_api_servers => $glance_api_servers,
|
||||
}
|
||||
|
||||
class { 'ironic::api': }
|
||||
|
||||
class { 'ironic::conductor': }
|
||||
|
||||
class { 'ironic::drivers::ipmi': }
|
||||
|
||||
class { 'ironic::drivers::pxe':
|
||||
deploy_kernel => $deploy_kernel,
|
||||
deploy_ramdisk => $deploy_ramdisk,
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -44,21 +44,6 @@
|
|||
# Should be an valid integer
|
||||
# Defaults to '0' for unlimited.
|
||||
#
|
||||
# [*pxe_config_template*]
|
||||
# (optional) Template file for PXE configuration.
|
||||
# Should be an valid template file
|
||||
# Defaults to undef.
|
||||
#
|
||||
# [*pxe_config_template*]
|
||||
# (optional) Template file for PXE configuration.
|
||||
# Should be an valid template file
|
||||
# Defaults to undef.
|
||||
#
|
||||
# [*pxe_config_template*]
|
||||
# (optional) Template file for PXE configuration.
|
||||
# Should be an valid template file
|
||||
# Defaults to undef.
|
||||
#
|
||||
# [*tftp_server*]
|
||||
# (optional) IP address of Ironic compute node's tftp server.
|
||||
# Should be an valid IP address
|
||||
|
|
|
@ -14,18 +14,293 @@
|
|||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# Ironic
|
||||
#
|
||||
# === Parameters
|
||||
# == Class: ironic
|
||||
#
|
||||
# Installs the ironic package and configures /etc/ironic/ironic.conf
|
||||
#
|
||||
# === Parameters:
|
||||
#
|
||||
# [*enabled*]
|
||||
# (required) Whether or not to enable the ironic service
|
||||
# true/false
|
||||
#
|
||||
# [*package_ensure*]
|
||||
# (optional) The state of the package
|
||||
# Defaults to 'present'
|
||||
#
|
||||
# [*verbose*]
|
||||
# (optional) Verbose logging
|
||||
# Defaults to False
|
||||
#
|
||||
# [*debug*]
|
||||
# (optional) Print debug messages in the logs
|
||||
# Defaults to False
|
||||
#
|
||||
# [*auth_strategy*]
|
||||
# (optional) Default protocol to use when connecting to glance
|
||||
# Defaults to 'keystone'. 'https' is the only other valid option for SSL
|
||||
#
|
||||
# [*control_exchange*]
|
||||
# (optional) What RPC queue/exchange to use
|
||||
# Defaults to openstack
|
||||
|
||||
# [*rpc_backend*]
|
||||
# (optional) what rpc/queuing service to use
|
||||
# Defaults to impl_kombu (rabbitmq)
|
||||
#
|
||||
# [*rabbit_password*]
|
||||
# [*rabbit_host*]
|
||||
# [*rabbit_port*]
|
||||
# [*rabbit_user*]
|
||||
# [*rabbit_virtual_host*]
|
||||
# (optional) Various rabbitmq settings
|
||||
#
|
||||
# [*rabbit_hosts*]
|
||||
# (optional) array of rabbitmq servers for HA.
|
||||
# A single IP address, such as a VIP, can be used for load-balancing
|
||||
# multiple RabbitMQ Brokers.
|
||||
# Defaults to false
|
||||
#
|
||||
# [*qpid_hostname*]
|
||||
# [*qpid_port*]
|
||||
# [*qpid_username*]
|
||||
# [*qpid_password*]
|
||||
# [*qpid_heartbeat*]
|
||||
# [*qpid_protocol*]
|
||||
# [*qpid_tcp_nodelay*]
|
||||
# [*qpid_reconnect*]
|
||||
# [*qpid_reconnect_timeout*]
|
||||
# [*qpid_reconnect_limit*]
|
||||
# [*qpid_reconnect_interval*]
|
||||
# [*qpid_reconnect_interval_min*]
|
||||
# [*qpid_reconnect_interval_max*]
|
||||
# (optional) various QPID options
|
||||
#
|
||||
# [*use_syslog*]
|
||||
# (optional) Use syslog for logging
|
||||
# Defaults to false
|
||||
#
|
||||
# [*log_facility*]
|
||||
# (optional) Syslog facility to receive log lines
|
||||
# Defaults to LOG_USER
|
||||
#
|
||||
# [*connection*]
|
||||
# (optional) Connection url for the ironic database.
|
||||
# Deprecates sql_connection
|
||||
# Defaults to: sqlite:////var/lib/ironic/ironic.sqlite
|
||||
#
|
||||
# [*max_retries*]
|
||||
# (optional) Database reconnection retry times.
|
||||
# Deprecates sql_max_retries
|
||||
# Defaults to: 10
|
||||
#
|
||||
# [*idle_timeout*]
|
||||
# (optional) Timeout before idle db connections are reaped.
|
||||
# Deprecates sql_idle_timeout
|
||||
# Defaults to: 3600
|
||||
#
|
||||
# [*retry_interval*]
|
||||
# (optional) Database reconnection interval in seconds.
|
||||
# Deprecates reconnect_interval
|
||||
# Defaults to: 10
|
||||
#
|
||||
# [*glance_api_servers*]
|
||||
# (optional) A list of the glance api servers available to ironic.
|
||||
# Should be an array with [hostname|ip]:port
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*glance_num_retries*]
|
||||
# (optional) Number retries when downloading an image from glance.
|
||||
# Defaults to 0
|
||||
#
|
||||
# [*glance_api_insecure*]
|
||||
# (optional) Allow to perform insecure SSL (https) requests to glance.
|
||||
# Defaults to false
|
||||
#
|
||||
|
||||
class ironic (
|
||||
$enabled = true
|
||||
$enabled = true,
|
||||
$package_ensure = 'present',
|
||||
$verbose = false,
|
||||
$debug = false,
|
||||
$auth_strategy = 'keystone',
|
||||
$control_exchange = 'openstack',
|
||||
$rpc_backend = 'ironic.openstack.common.rpc.impl_kombu',
|
||||
$rabbit_password = false,
|
||||
$rabbit_host = 'localhost',
|
||||
$rabbit_hosts = false,
|
||||
$rabbit_port = '5672',
|
||||
$rabbit_user = 'guest',
|
||||
$rabbit_virtual_host = '/',
|
||||
$qpid_hostname = 'localhost',
|
||||
$qpid_port = '5672',
|
||||
$qpid_username = 'guest',
|
||||
$qpid_password = 'guest',
|
||||
$qpid_heartbeat = 60,
|
||||
$qpid_protocol = 'tcp',
|
||||
$qpid_tcp_nodelay = true,
|
||||
$qpid_reconnect = true,
|
||||
$qpid_reconnect_timeout = 0,
|
||||
$qpid_reconnect_limit = 0,
|
||||
$qpid_reconnect_interval_min = 0,
|
||||
$qpid_reconnect_interval_max = 0,
|
||||
$qpid_reconnect_interval = 0,
|
||||
$use_syslog = false,
|
||||
$log_facility = 'LOG_USER',
|
||||
$sql_connection = 'sqlite:////var/lib/ironic/ovs.sqlite',
|
||||
$connection = 'sqlite:////var/lib/ironic/ovs.sqlite',
|
||||
$max_retries = '10',
|
||||
$sql_max_retries = '10',
|
||||
$sql_idle_timeout = '3600',
|
||||
$idle_timeout = '3600',
|
||||
$reconnect_interval = '10',
|
||||
$retry_interval = '10',
|
||||
$glance_api_servers = undef,
|
||||
$glance_num_retries = '0',
|
||||
$glance_api_insecure = false
|
||||
) {
|
||||
|
||||
include ironic::params
|
||||
|
||||
Package['ironic'] -> Ironic_config<||>
|
||||
|
||||
File {
|
||||
require => Package['ironic'],
|
||||
owner => 'root',
|
||||
group => 'ironic',
|
||||
mode => '0640',
|
||||
}
|
||||
|
||||
file { '/etc/ironic':
|
||||
ensure => directory,
|
||||
mode => '0750',
|
||||
}
|
||||
|
||||
file { '/etc/ironic/ironic.conf': }
|
||||
|
||||
package { 'ironic':
|
||||
ensure => $package_ensure,
|
||||
name => $::ironic::params::package_name,
|
||||
}
|
||||
|
||||
if $sql_connection {
|
||||
warning('sql_connection deprecated for connection')
|
||||
$connection_real = $sql_connection
|
||||
} else {
|
||||
$connection_real = $connection
|
||||
}
|
||||
|
||||
if $sql_max_retries {
|
||||
warning('sql_max_retries deprecated for max_retries')
|
||||
$max_retries_real = $sql_max_retries
|
||||
} else {
|
||||
$max_retries_real = $max_retries
|
||||
}
|
||||
|
||||
if $sql_idle_timeout {
|
||||
warning('sql_idle_timeout deprecated for idle_timeout')
|
||||
$idle_timeout_real = $sql_idle_timeout
|
||||
} else {
|
||||
$idle_timeout_real = $idle_timeout
|
||||
}
|
||||
|
||||
if $reconnect_interval {
|
||||
warning('reconnect_interval deprecated for retry_interval')
|
||||
$retry_interval_real = $reconnect_interval
|
||||
} else {
|
||||
$retry_interval_real = $retry_interval
|
||||
}
|
||||
|
||||
validate_re($connection_real, '(sqlite|mysql|postgresql):\/\/(\S+:\S+@\S+\/\S+)?')
|
||||
|
||||
case $connection_real {
|
||||
/mysql:\/\/\S+:\S+@\S+\/\S+/: {
|
||||
require 'mysql::python'
|
||||
}
|
||||
/postgresql:\/\/\S+:\S+@\S+\/\S+/: {
|
||||
$backend_package = 'python-psycopg2'
|
||||
}
|
||||
/sqlite:\/\//: {
|
||||
$backend_package = 'python-pysqlite2'
|
||||
}
|
||||
default: {
|
||||
fail("Invalid sql connection: ${connection_real}")
|
||||
}
|
||||
}
|
||||
|
||||
if is_array($glance_api_servers) {
|
||||
ironic_config {
|
||||
'glance/glance_api_servers': value => join($glance_api_servers, ',');
|
||||
}
|
||||
} elsif is_string($glance_api_servers) {
|
||||
ironic_config {
|
||||
'glance/glance_api_servers': value => $glance_api_servers;
|
||||
}
|
||||
}
|
||||
|
||||
ironic_config {
|
||||
'DEFAULT/verbose': value => $verbose;
|
||||
'DEFAULT/debug': value => $debug;
|
||||
'DEFAULT/auth_strategy': value => $auth_strategy;
|
||||
'DEFAULT/control_exchange': value => $control_exchange;
|
||||
'DEFAULT/rpc_backend': value => $rpc_backend;
|
||||
'database/connection': value => $connection_real;
|
||||
'database/idle_timeout': value => $idle_timeout_real;
|
||||
'database/retry_interval': value => $retry_interval_real;
|
||||
'database/max_retries': value => $max_retries_real;
|
||||
'glance/glance_num_retries': value => $glance_num_retries;
|
||||
'glance/glance_api_insecure': value => $glance_api_insecure;
|
||||
}
|
||||
|
||||
if $rpc_backend == 'ironic.openstack.common.rpc.impl_kombu' {
|
||||
if ! $rabbit_password {
|
||||
fail('When rpc_backend is rabbitmq, you must set rabbit password')
|
||||
}
|
||||
if $rabbit_hosts {
|
||||
ironic_config { 'DEFAULT/rabbit_hosts': value => join($rabbit_hosts, ',') }
|
||||
ironic_config { 'DEFAULT/rabbit_ha_queues': value => true }
|
||||
} else {
|
||||
ironic_config { 'DEFAULT/rabbit_host': value => $rabbit_host }
|
||||
ironic_config { 'DEFAULT/rabbit_port': value => $rabbit_port }
|
||||
ironic_config { 'DEFAULT/rabbit_hosts': value => "${rabbit_host}:${rabbit_port}" }
|
||||
ironic_config { 'DEFAULT/rabbit_ha_queues': value => false }
|
||||
}
|
||||
|
||||
ironic_config {
|
||||
'DEFAULT/rabbit_userid': value => $rabbit_user;
|
||||
'DEFAULT/rabbit_password': value => $rabbit_password;
|
||||
'DEFAULT/rabbit_virtual_host': value => $rabbit_virtual_host;
|
||||
}
|
||||
}
|
||||
|
||||
if $rpc_backend == 'ironic.openstack.common.rpc.impl_qpid' {
|
||||
ironic_config {
|
||||
'DEFAULT/qpid_hostname': value => $qpid_hostname;
|
||||
'DEFAULT/qpid_port': value => $qpid_port;
|
||||
'DEFAULT/qpid_username': value => $qpid_username;
|
||||
'DEFAULT/qpid_password': value => $qpid_password;
|
||||
'DEFAULT/qpid_heartbeat': value => $qpid_heartbeat;
|
||||
'DEFAULT/qpid_protocol': value => $qpid_protocol;
|
||||
'DEFAULT/qpid_tcp_nodelay': value => $qpid_tcp_nodelay;
|
||||
'DEFAULT/qpid_reconnect': value => $qpid_reconnect;
|
||||
'DEFAULT/qpid_reconnect_timeout': value => $qpid_reconnect_timeout;
|
||||
'DEFAULT/qpid_reconnect_limit': value => $qpid_reconnect_limit;
|
||||
'DEFAULT/qpid_reconnect_interval_min': value => $qpid_reconnect_interval_min;
|
||||
'DEFAULT/qpid_reconnect_interval_max': value => $qpid_reconnect_interval_max;
|
||||
'DEFAULT/qpid_reconnect_interval': value => $qpid_reconnect_interval;
|
||||
}
|
||||
}
|
||||
|
||||
if $use_syslog {
|
||||
ironic_config {
|
||||
'DEFAULT/use_syslog': value => true;
|
||||
'DEFAULT/syslog_log_facility': value => $log_facility;
|
||||
}
|
||||
} else {
|
||||
ironic_config {
|
||||
'DEFAULT/use_syslog': value => false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -17,3 +17,207 @@
|
|||
#
|
||||
# Unit tests for ironic
|
||||
#
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'ironic' do
|
||||
|
||||
let :params do
|
||||
{ :package_ensure => 'present',
|
||||
:verbose => false,
|
||||
:debug => false,
|
||||
:rabbit_host => '127.0.0.1',
|
||||
:rabbit_port => 5672,
|
||||
:rabbit_hosts => false,
|
||||
:rabbit_user => 'guest',
|
||||
:rabbit_password => 'guest',
|
||||
:rabbit_virtual_host => '/',
|
||||
:sql_connection => 'sqlite:////var/lib/ironic/ironic.sqlite',
|
||||
:connection => 'sqlite:////var/lib/ironic/ironic.sqlite',
|
||||
:sql_max_retries => '10',
|
||||
:max_retries => '10',
|
||||
:sql_idle_timeout => '3600',
|
||||
:idle_timeout => '3600',
|
||||
:reconnect_interval => '10',
|
||||
:retry_interval => '10',
|
||||
:glance_num_retries => '0',
|
||||
:glance_api_insecure => false
|
||||
}
|
||||
end
|
||||
|
||||
shared_examples_for 'ironic' do
|
||||
|
||||
context 'and if rabbit_host parameter is provided' do
|
||||
it_configures 'a ironic base installation'
|
||||
end
|
||||
|
||||
context 'and if rabbit_hosts parameter is provided' do
|
||||
before do
|
||||
params.delete(:rabbit_host)
|
||||
params.delete(:rabbit_port)
|
||||
end
|
||||
|
||||
context 'with one server' do
|
||||
before { params.merge!( :rabbit_hosts => ['127.0.0.1:5672'] ) }
|
||||
it_configures 'a ironic base installation'
|
||||
it_configures 'rabbit HA with a single virtual host'
|
||||
end
|
||||
|
||||
context 'with multiple servers' do
|
||||
before { params.merge!( :rabbit_hosts => ['rabbit1:5672', 'rabbit2:5672'] ) }
|
||||
it_configures 'a ironic base installation'
|
||||
it_configures 'rabbit HA with multiple hosts'
|
||||
end
|
||||
end
|
||||
|
||||
it_configures 'with syslog disabled'
|
||||
it_configures 'with syslog enabled'
|
||||
it_configures 'with syslog enabled and custom settings'
|
||||
end
|
||||
|
||||
shared_examples_for 'a ironic base installation' do
|
||||
|
||||
it { should include_class('ironic::params') }
|
||||
|
||||
it 'configures ironic configuration folder' do
|
||||
should contain_file('/etc/ironic/').with(
|
||||
:ensure => 'directory',
|
||||
:owner => 'root',
|
||||
:group => 'ironic',
|
||||
:mode => '0750',
|
||||
:require => 'Package[ironic]'
|
||||
)
|
||||
end
|
||||
|
||||
it 'configures ironic configuration file' do
|
||||
should contain_file('/etc/ironic/ironic.conf').with(
|
||||
:owner => 'root',
|
||||
:group => 'ironic',
|
||||
:mode => '0640',
|
||||
:require => 'Package[ironic]'
|
||||
)
|
||||
end
|
||||
|
||||
it 'installs ironic package' do
|
||||
should contain_package('ironic').with(
|
||||
:ensure => 'present',
|
||||
:name => platform_params[:common_package_name]
|
||||
)
|
||||
end
|
||||
|
||||
it 'configures credentials for rabbit' do
|
||||
should contain_ironic_config('DEFAULT/rabbit_userid').with_value( params[:rabbit_user] )
|
||||
should contain_ironic_config('DEFAULT/rabbit_password').with_value( params[:rabbit_password] )
|
||||
should contain_ironic_config('DEFAULT/rabbit_virtual_host').with_value( params[:rabbit_virtual_host] )
|
||||
end
|
||||
|
||||
it 'should perform default database configuration' do
|
||||
should contain_ironic_config('database/connection').with_value(params[:connection])
|
||||
should contain_ironic_config('database/max_retries').with_value(params[:max_retries])
|
||||
should contain_ironic_config('database/idle_timeout').with_value(params[:idle_timeout])
|
||||
should contain_ironic_config('database/retry_interval').with_value(params[:retry_interval])
|
||||
end
|
||||
|
||||
it 'configures glance connection' do
|
||||
should contain_ironic_config('glance/glance_num_retries').with_value(params[:glance_num_retries])
|
||||
should contain_ironic_config('glance/glance_api_insecure').with_value(params[:glance_api_insecure])
|
||||
end
|
||||
|
||||
it 'configures ironic.conf' do
|
||||
should contain_ironic_config('DEFAULT/verbose').with_value( params[:verbose] )
|
||||
should contain_ironic_config('DEFAULT/auth_strategy').with_value('keystone')
|
||||
should contain_ironic_config('DEFAULT/control_exchange').with_value('openstack')
|
||||
end
|
||||
end
|
||||
|
||||
shared_examples_for 'rabbit HA with a single virtual host' do
|
||||
it 'in ironic.conf' do
|
||||
should_not contain_ironic_config('DEFAULT/rabbit_host')
|
||||
should_not contain_ironic_config('DEFAULT/rabbit_port')
|
||||
should contain_ironic_config('DEFAULT/rabbit_hosts').with_value( params[:rabbit_hosts] )
|
||||
should contain_ironic_config('DEFAULT/rabbit_ha_queues').with_value(true)
|
||||
end
|
||||
end
|
||||
|
||||
shared_examples_for 'rabbit HA with multiple hosts' do
|
||||
it 'in ironic.conf' do
|
||||
should_not contain_ironic_config('DEFAULT/rabbit_host')
|
||||
should_not contain_ironic_config('DEFAULT/rabbit_port')
|
||||
should contain_ironic_config('DEFAULT/rabbit_hosts').with_value( params[:rabbit_hosts].join(',') )
|
||||
should contain_ironic_config('DEFAULT/rabbit_ha_queues').with_value(true)
|
||||
end
|
||||
end
|
||||
|
||||
shared_examples_for 'with syslog disabled' do
|
||||
it { should contain_ironic_config('DEFAULT/use_syslog').with_value(false) }
|
||||
end
|
||||
|
||||
shared_examples_for 'with syslog enabled' do
|
||||
before do
|
||||
params.merge!(
|
||||
:use_syslog => 'true'
|
||||
)
|
||||
end
|
||||
|
||||
it do
|
||||
should contain_ironic_config('DEFAULT/use_syslog').with_value(true)
|
||||
should contain_ironic_config('DEFAULT/syslog_log_facility').with_value('LOG_USER')
|
||||
end
|
||||
end
|
||||
|
||||
shared_examples_for 'with syslog enabled and custom settings' do
|
||||
before do
|
||||
params.merge!(
|
||||
:use_syslog => 'true',
|
||||
:log_facility => 'LOG_LOCAL0'
|
||||
)
|
||||
end
|
||||
|
||||
it do
|
||||
should contain_ironic_config('DEFAULT/use_syslog').with_value(true)
|
||||
should contain_ironic_config('DEFAULT/syslog_log_facility').with_value('LOG_LOCAL0')
|
||||
end
|
||||
end
|
||||
|
||||
shared_examples_for 'with one glance server' do
|
||||
before do
|
||||
params.merge!(:glance_api_servers => '10.0.0.1:9292')
|
||||
end
|
||||
it 'should configure one glance server' do
|
||||
should contain_ironic_config('glance/glance_api_servers').with_value(p[:glance_api_servers])
|
||||
end
|
||||
end
|
||||
|
||||
shared_examples_for 'with two glance servers' do
|
||||
before do
|
||||
params.merge!(:glance_api_servers => ['10.0.0.1:9292','10.0.0.2:9292'])
|
||||
end
|
||||
it 'should configure one glance server' do
|
||||
should contain_ironic_config('glance/glance_api_servers').with_value(p[:glance_api_servers].join(','))
|
||||
end
|
||||
end
|
||||
|
||||
context 'on Debian platforms' do
|
||||
let :facts do
|
||||
{ :osfamily => 'Debian' }
|
||||
end
|
||||
|
||||
let :platform_params do
|
||||
{ :common_package_name => 'ironic-common' }
|
||||
end
|
||||
|
||||
it_configures 'ironic'
|
||||
end
|
||||
|
||||
context 'on RedHat platforms' do
|
||||
let :facts do
|
||||
{ :osfamily => 'RedHat' }
|
||||
end
|
||||
|
||||
let :platform_params do
|
||||
{ :common_package_name => 'openstack-ironic' }
|
||||
end
|
||||
|
||||
it_configures 'ironic'
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue