Fix Some Bugs on Puppet Midonet

- Pin version of package elasticsearh
- Send proper format to midonet config
- Check for duplicate midonet.conf file creation

Change-Id: I8b13dcb1c82be3fa6d61daad1ddcad664420f2e2
This commit is contained in:
Alex Ruiz Estradera 2016-12-13 16:37:34 +01:00
parent 3185bc745d
commit a6f5b2bdd8
5 changed files with 13 additions and 10 deletions

View File

@ -22,7 +22,7 @@ mod 'deric/zookeeper' , '0.6.1'
mod 'locp/cassandra' , '1.25.2'
mod 'puppetlabs/concat'
mod 'TubeMogul/curator'
mod 'elasticsearch/elasticsearch'
mod 'elasticsearch/elasticsearch' , '0.13.2'
mod 'elasticsearch/logstash'
mod 'electrical/file_concat'
mod 'richardc/datacat'

View File

@ -47,11 +47,14 @@ class midonet::analytics::quickstart (
path => '/etc/midonet',
owner => 'root',
mode => '0755',
} ->
}
file { 'set_config':
ensure => present,
path => $config_path,
content => template('midonet/analytics/midonet.conf.erb'),
if !defined(File['set_config']) {
file { 'set_config':
ensure => present,
path => $config_path,
content => template('midonet/analytics/midonet.conf.erb'),
require => File['midonet folder']
}
}
}

View File

@ -126,7 +126,7 @@ class midonet::cluster::run (
exec { '/bin/bash /tmp/mn-cluster_config.sh': }
file { 'cluster_config':
file { 'set_config':
ensure => present,
path => $cluster_config_path,
content => template('midonet/cluster/midonet.conf.erb'),

View File

@ -21,7 +21,7 @@ describe 'midonet::cluster::run' do
end
it { is_expected.to contain_exec('/bin/bash /tmp/mn-cluster_config.sh') }
it { is_expected.to contain_file('/tmp/mn-cluster_config.sh').with_ensure('present') }
it { is_expected.to contain_file('cluster_config').with(
it { is_expected.to contain_file('set_config').with(
'ensure' => 'present',
'path' => '/etc/midonet/midonet.conf',
) }

View File

@ -44,13 +44,13 @@ cluster.auth {
keystone.tenant_name = "<%= @keystone_tenant_name %>"
keystone.admin_token = "<%= @keystone_admin_token %>"
keystone.host = "<%= @keystone_host %>"
keystone.port = "<%= @keystone_port %>"
keystone.port = <%= @keystone_port %>
keystone.protocol = "<%= @keystone_protocol %>"
keystone.domain_name = "<%= @keystone_domain_name %>"
keystone.domain_id = "<%= @keystone_domain_id %>"
keystone.user_name = "<%= @keystone_user_name %>"
keystone.user_password = "<%= @keystone_user_password %>"
keystone.version = "<%= @keystone_keystone_version %>"
keystone.version = <%= @keystone_keystone_version %>
}
cluster.rest_api {
http_host = <%= @cluster_host %>