From b1c66830c2fa87d07b79fb6706a2eb644d39d471 Mon Sep 17 00:00:00 2001 From: Georg Kunz Date: Sun, 12 Feb 2017 01:33:05 +0100 Subject: Extending Gluon puppet manifests * correctly reading etcd data from hieradata * template for proton.conf config file Change-Id: I62728f84a932d1dfef54b548a1e97b22bf06fcd8 Signed-off-by: Georg Kunz --- deploy/puppet/gluon/manifests/config.pp | 8 ++++++++ deploy/puppet/gluon/manifests/init.pp | 8 ++++++-- deploy/puppet/gluon/manifests/params.pp | 2 ++ deploy/puppet/gluon/templates/proton.conf.erb | 16 ++++++++++++++++ 4 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 deploy/puppet/gluon/templates/proton.conf.erb diff --git a/deploy/puppet/gluon/manifests/config.pp b/deploy/puppet/gluon/manifests/config.pp index 4cfad19..1f92843 100644 --- a/deploy/puppet/gluon/manifests/config.pp +++ b/deploy/puppet/gluon/manifests/config.pp @@ -8,4 +8,12 @@ class gluon::config { content => template('gluon/proton-shim.conf.erb'), } + file { '/etc/proton/proton.conf': + ensure => 'file', + owner => 'proton', + group => 'proton', + mode => '640', + content => template('gluon/proton.conf.erb'), + } + } diff --git a/deploy/puppet/gluon/manifests/init.pp b/deploy/puppet/gluon/manifests/init.pp index ec1e036..0225533 100644 --- a/deploy/puppet/gluon/manifests/init.pp +++ b/deploy/puppet/gluon/manifests/init.pp @@ -1,11 +1,15 @@ class gluon inherits ::gluon::params { + $bind_ip = $::gluon::params::bind_ip + $port = $::gluon::params::port + $odl_bind_ip = hiera(opendaylight::odl_bind_ip, $::gluon::params::odl_bind_ip) $odl_rest_port = hiera(opendaylight::odl_rest_port, $::gluon::params::odl_rest_port) $odl_username = hiera(opendaylight::username, $::gluon::params::odl_username) $odl_password = hiera(opendaylight::password, $::gluon::params::odl_password) - $etcd_bind_ip = hiera(etcd::bind_ip, $::gluon::params::etcd_bind_ip) - $etcd_client_port = hiera(etcd::client_port, $::gluon::params::etcd_client_port) + + $etcd_bind_ip = hiera(tripleo::profile::base::etcd::bind_ip, $::gluon::params::etcd_bind_ip) + $etcd_client_port = hiera(tripleo::profile::base::etcd::client_port, $::gluon::params::etcd_client_port) class { '::gluon::install': } -> class { '::gluon::config': } ~> diff --git a/deploy/puppet/gluon/manifests/params.pp b/deploy/puppet/gluon/manifests/params.pp index 2af3cb7..d5ea6f6 100644 --- a/deploy/puppet/gluon/manifests/params.pp +++ b/deploy/puppet/gluon/manifests/params.pp @@ -1,5 +1,7 @@ class gluon::params { + $bind_ip = '127.0.0.1' + $port = '2705' $odl_bind_ip = '0.0.0.0' $odl_rest_port = '8181' $odl_username = 'admin' diff --git a/deploy/puppet/gluon/templates/proton.conf.erb b/deploy/puppet/gluon/templates/proton.conf.erb new file mode 100644 index 0000000..f530782 --- /dev/null +++ b/deploy/puppet/gluon/templates/proton.conf.erb @@ -0,0 +1,16 @@ +[DEFAULT] +state_path = /var/lib/proton + + +[api] +# The listen IP for the proton API server +host = <%= scope.lookupvar('gluon::bind_ip') %> + +# The port for the proton API server +port = <%= scope.lookupvar('gluon::port') %> + +# IP of the etcd server +etcd_host = <%= scope.lookupvar('gluon::etcd_bind_ip') %> + +# Port of the etcd server +etcd_port = <%= scope.lookupvar('gluon::etcd_client_port') %> -- cgit 1.2.3-korg