Get openstackwatch working using puppet.
Created an openstackwatch puppet manifest in modules/jeepyb. Created an openstackwatch puppet template in modules/jeepyb. Added a puppet class in modules/openstack_project/manifests/gerrit.pp. Change-Id: Id38cda4fdf9feee4f018bc5ccb0ebbf462311061 Reviewed-on: https://review.openstack.org/23584 Reviewed-by: Jeremy Stanley <fungi@yuggoth.org> Reviewed-by: Paul Belanger <paul.belanger@polybeacon.com> Reviewed-by: Khai Do <zaro0508@gmail.com> Reviewed-by: Elizabeth Krumbach <lyz@princessleia.com> Approved: Jeremy Stanley <fungi@yuggoth.org> Tested-by: Jenkins
This commit is contained in:
parent
1e08315e3c
commit
8cd5b67fe6
41
modules/jeepyb/manifests/openstackwatch.pp
Normal file
41
modules/jeepyb/manifests/openstackwatch.pp
Normal file
@ -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',
|
||||||
|
}
|
||||||
|
}
|
39
modules/jeepyb/templates/openstackwatch.ini.erb
Normal file
39
modules/jeepyb/templates/openstackwatch.ini.erb
Normal file
@ -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
|
@ -64,6 +64,17 @@ class openstack_project::gerrit (
|
|||||||
sysadmins => $sysadmins,
|
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':
|
class { '::gerrit':
|
||||||
vhost_name => $vhost_name,
|
vhost_name => $vhost_name,
|
||||||
canonicalweburl => $canonicalweburl,
|
canonicalweburl => $canonicalweburl,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user