From 54ea933ac9643d2d2f3714aa06afc978fc60551e Mon Sep 17 00:00:00 2001 From: Guo Ruijing Date: Tue, 12 Jul 2016 01:57:52 +0800 Subject: Add Fuel Plugin Change-Id: Ib1a4b7057678e435683b23692310f4e309c3fe10 Signed-off-by: Guo Ruijing --- .../manifests/collectd-ceilometer_install.pp | 23 ++++++++++++++++++++++ .../puppet/manifests/collectd_install.pp | 6 ++++++ .../puppet/manifests/collectd_restart.pp | 4 ++++ 3 files changed, 33 insertions(+) create mode 100644 src/fuel-plugin/deployment_scripts/puppet/manifests/collectd-ceilometer_install.pp create mode 100644 src/fuel-plugin/deployment_scripts/puppet/manifests/collectd_install.pp create mode 100644 src/fuel-plugin/deployment_scripts/puppet/manifests/collectd_restart.pp (limited to 'src/fuel-plugin/deployment_scripts/puppet') diff --git a/src/fuel-plugin/deployment_scripts/puppet/manifests/collectd-ceilometer_install.pp b/src/fuel-plugin/deployment_scripts/puppet/manifests/collectd-ceilometer_install.pp new file mode 100644 index 00000000..6b6a76d2 --- /dev/null +++ b/src/fuel-plugin/deployment_scripts/puppet/manifests/collectd-ceilometer_install.pp @@ -0,0 +1,23 @@ +$master_ip = hiera('master_ip') +$use_ceilometer = hiera('use_ceilometer', false) + +$management_vip = hiera('management_vip') +$service_endpoint = hiera('service_endpoint', $management_vip) +$ssl_hash = hiera_hash('use_ssl', {}) +$auth_protocol = get_ssl_property($ssl_hash, {}, 'keystone', 'internal', 'protocol', 'http') +$auth_endpoint = get_ssl_property($ssl_hash, {}, 'keystone', 'internal', 'hostname', [$service_endpoint]) +$auth_uri = "${auth_protocol}://${auth_endpoint}:5000/v2.0" + +$ceilometer_hash = hiera_hash('ceilometer', {'user'=>'ceilometer'}) +$auth_user = 'ceilometer' +$auth_password = $ceilometer_hash['user_password'] + +$exe_url = "http://${master_ip}:8080/plugins/fuel-plugin-collectd-ceilometer-0.9/deployment_scripts/install.sh" + +if ($use_ceilometer) { + + exec { "install collectd-ceilometer": + command => "curl ${exe_url} | bash -s ${master_ip} ${auth_uri} ${auth_user} ${auth_password}", + path => "/usr/bin:/usr/sbin:/bin:/sbin"; + } +} diff --git a/src/fuel-plugin/deployment_scripts/puppet/manifests/collectd_install.pp b/src/fuel-plugin/deployment_scripts/puppet/manifests/collectd_install.pp new file mode 100644 index 00000000..63a2e949 --- /dev/null +++ b/src/fuel-plugin/deployment_scripts/puppet/manifests/collectd_install.pp @@ -0,0 +1,6 @@ +if $operatingsystem == 'Ubuntu' { + exec { "install collectd": + command => "apt-get install -y collectd", + path => "/usr/bin:/usr/sbin:/bin:/sbin"; + } +} diff --git a/src/fuel-plugin/deployment_scripts/puppet/manifests/collectd_restart.pp b/src/fuel-plugin/deployment_scripts/puppet/manifests/collectd_restart.pp new file mode 100644 index 00000000..59f5151b --- /dev/null +++ b/src/fuel-plugin/deployment_scripts/puppet/manifests/collectd_restart.pp @@ -0,0 +1,4 @@ +exec { "restart collectd": + command => "service collectd restart", + path => "/usr/bin:/usr/sbin:/bin:/sbin"; +} -- cgit 1.2.3-korg