summaryrefslogtreecommitdiffstats
path: root/deploy/puppet/gluon
diff options
context:
space:
mode:
authorGeorg Kunz <georg.kunz@ericsson.com>2017-02-12 01:33:05 +0100
committerGeorg Kunz <georg.kunz@ericsson.com>2017-02-12 20:11:51 +0100
commitb1c66830c2fa87d07b79fb6706a2eb644d39d471 (patch)
tree9f3b9fde8211c87868f7a1d7aa797336e63c7dea /deploy/puppet/gluon
parentd31cfcc80428088cc4ddbabd721e01ff6265a8fc (diff)
Extending Gluon puppet manifests
* correctly reading etcd data from hieradata * template for proton.conf config file Change-Id: I62728f84a932d1dfef54b548a1e97b22bf06fcd8 Signed-off-by: Georg Kunz <georg.kunz@ericsson.com>
Diffstat (limited to 'deploy/puppet/gluon')
-rw-r--r--deploy/puppet/gluon/manifests/config.pp8
-rw-r--r--deploy/puppet/gluon/manifests/init.pp8
-rw-r--r--deploy/puppet/gluon/manifests/params.pp2
-rw-r--r--deploy/puppet/gluon/templates/proton.conf.erb16
4 files changed, 32 insertions, 2 deletions
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') %>