diff --git a/modules/jeepyb/manifests/openstackwatch.pp b/modules/jeepyb/manifests/openstackwatch.pp new file mode 100644 index 0000000000..988010ea7b --- /dev/null +++ b/modules/jeepyb/manifests/openstackwatch.pp @@ -0,0 +1,41 @@ +# == Class: jeepyb::openstackwatch + +class jeepyb::openstackwatch( + $projects = [], + $mode = 'multiple', + $container = 'rss', + $feed = '', + $json_url = '', + $minute = '18', + $hour = '*', +) { + include jeepyb + + user { 'openstackwatch': + ensure => present, + comment => 'OpenStackWatch User', + shell => '/bin/bash', + gid => 'openstackwatch', + } + + cron { 'openstackwatch': + ensure => present, + command => '/usr/local/bin/openstackwatch /home/openstackwatch/openstackwatch.ini', + minute => $minute, + hour => $hour, + user => 'openstackwatch', + require => [ + File['/home/openstackwatch/openstackwatch.ini'], + User['openstackwatch'], + Class['jeepyb'], + ], + } + + file { '/home/openstackwatch/openstackwatch.ini': + ensure => present, + content => template('openstackwatch.ini.erb'), + owner => 'root', + group => 'openstackwatch', + mode => '0640', + } +} diff --git a/modules/jeepyb/templates/openstackwatch.ini.erb b/modules/jeepyb/templates/openstackwatch.ini.erb new file mode 100644 index 0000000000..0d5203f73d --- /dev/null +++ b/modules/jeepyb/templates/openstackwatch.ini.erb @@ -0,0 +1,39 @@ +# -*- Mode: conf -*- + +[general] +# only show certain projects (don't forget the openstack/ as start) +projects = <%= projects.join(", ") %> + +# The Json URL where is the gerrit system. +json_url = <%= json_url %> + +# Allow different mode to output to swift, by default 'combined' will +# combined all rss in one and 'multiple' will upload all the projects +# in each rss file. +mode = <%= mode %> + +# username to your swift cluster +[swift] +# username/tenant for swift with 2.0 or just username with 1.0 (i.e: +# RAX). +# username = + +# passowrd or api key +# password = + +# container to upload (probably want to be public) +container = <%= container %> + +# auth_url of the cluster, for Rackspace this is : +# https://auth.api.rackspacecloud.com/v1.0 +# or Rackspace UK : +# https://lon.auth.api.rackspacecloud.com/v1.0 +# auth_url = https://lon.auth.api.rackspacecloud.com/v1.0 + +# auth version (1.0 for Rackspace clouds, 2.0 for keystone backend clusters) +# auth_version = 1.0 + +# the object name where to store the combined rss +uploaded_file = <%= feed %> + +# vim: ft=dosini diff --git a/modules/openstack_project/manifests/gerrit.pp b/modules/openstack_project/manifests/gerrit.pp index ce25f1b686..aa34d7b407 100644 --- a/modules/openstack_project/manifests/gerrit.pp +++ b/modules/openstack_project/manifests/gerrit.pp @@ -64,6 +64,17 @@ class openstack_project::gerrit ( sysadmins => $sysadmins, } + class { 'jeepyb::openstackwatch': + projects => [ + 'openstack/cinder', + 'openstack/keystone', + 'openstack-dev/devstack', + ], + container => 'rss', + feed => 'openstackwatch.xml', + json_url => 'https://review.openstack.org/query?q=status:open', + } + class { '::gerrit': vhost_name => $vhost_name, canonicalweburl => $canonicalweburl,