From 1ae367f6b10c4eee4ed84f240fa0d63e4994d6ee Mon Sep 17 00:00:00 2001 From: Jonathan Harker Date: Wed, 28 Jan 2015 15:47:07 -0500 Subject: [PATCH] Split out jeepyb module Change-Id: I905d92050b0ba1dd8e11a1f194ef24e36995a61e Depends-On: Ie4fa3ea41e7b56bf3fd1b4aa6b9cb31244842725 --- modules.env | 1 + modules/jeepyb/manifests/init.pp | 55 --------------- modules/jeepyb/manifests/openstackwatch.pp | 68 ------------------- .../jeepyb/templates/openstackwatch.ini.erb | 36 ---------- 4 files changed, 1 insertion(+), 159 deletions(-) delete mode 100644 modules/jeepyb/manifests/init.pp delete mode 100644 modules/jeepyb/manifests/openstackwatch.pp delete mode 100644 modules/jeepyb/templates/openstackwatch.ini.erb diff --git a/modules.env b/modules.env index 5b2bbd3902..1b7f94aaea 100644 --- a/modules.env +++ b/modules.env @@ -65,6 +65,7 @@ INTEGRATION_MODULES["https://git.openstack.org/openstack-infra/puppet-elastic_re INTEGRATION_MODULES["https://git.openstack.org/openstack-infra/puppet-gerrit"]="origin/master" INTEGRATION_MODULES["https://git.openstack.org/openstack-infra/puppet-gerritbot"]="origin/master" INTEGRATION_MODULES["https://git.openstack.org/openstack-infra/puppet-graphite"]="origin/master" +INTEGRATION_MODULES["https://git.openstack.org/openstack-infra/puppet-jeepyb"]="origin/master" INTEGRATION_MODULES["https://git.openstack.org/openstack-infra/puppet-packagekit"]="origin/master" INTEGRATION_MODULES["https://git.openstack.org/openstack-infra/puppet-ssl_cert_check"]="origin/master" INTEGRATION_MODULES["https://git.openstack.org/openstack-infra/puppet-statusbot"]="origin/master" diff --git a/modules/jeepyb/manifests/init.pp b/modules/jeepyb/manifests/init.pp deleted file mode 100644 index d013c936dd..0000000000 --- a/modules/jeepyb/manifests/init.pp +++ /dev/null @@ -1,55 +0,0 @@ -# == Class: jeepyb -# -class jeepyb ( - $git_source_repo = 'https://git.openstack.org/openstack-infra/jeepyb', -) { - include mysql::python - - if ! defined(Package['python-paramiko']) { - package { 'python-paramiko': - ensure => present, - } - } - - package { 'gcc': - ensure => present, - } - - # A lot of things need yaml, be conservative requiring this package to avoid - # conflicts with other modules. - case $::osfamily { - 'Debian': { - if ! defined(Package['python-yaml']) { - package { 'python-yaml': - ensure => present, - } - } - } - 'RedHat': { - if ! defined(Package['PyYAML']) { - package { 'PyYAML': - ensure => present, - } - } - } - default: { - fail("Unsupported osfamily: ${::osfamily} The 'jeepyb' module only supports osfamily Debian or RedHat.") - } - } - - vcsrepo { '/opt/jeepyb': - ensure => latest, - provider => git, - revision => 'master', - source => $git_source_repo, - } - - exec { 'install_jeepyb' : - command => 'pip install /opt/jeepyb', - path => '/usr/local/bin:/usr/bin:/bin/', - refreshonly => true, - require => Class['mysql::python'], - subscribe => Vcsrepo['/opt/jeepyb'], - logoutput => true, - } -} diff --git a/modules/jeepyb/manifests/openstackwatch.pp b/modules/jeepyb/manifests/openstackwatch.pp deleted file mode 100644 index feed6bc198..0000000000 --- a/modules/jeepyb/manifests/openstackwatch.pp +++ /dev/null @@ -1,68 +0,0 @@ -# == Class: jeepyb::openstackwatch - -class jeepyb::openstackwatch( - $swift_username = '', - $swift_password = '', - $swift_auth_url = '', - $auth_version = '', - $projects = [], - $mode = 'multiple', - $container = 'rss', - $feed = '', - $json_url = '', - $minute = '18', - $hour = '*', -) { - include jeepyb - - group { 'openstackwatch': - ensure => present, - } - - user { 'openstackwatch': - ensure => present, - managehome => true, - comment => 'OpenStackWatch User', - shell => '/bin/bash', - gid => 'openstackwatch', - require => Group['openstackwatch'], - } - - if $swift_password != '' { - 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('jeepyb/openstackwatch.ini.erb'), - owner => 'root', - group => 'openstackwatch', - mode => '0640', - require => User['openstackwatch'], - } - - if ! defined(Package['python-pyrss2gen']) { - package { 'python-pyrss2gen': - ensure => present, - } - } - - if ! defined(Package['python-swiftclient']) { - package { 'python-swiftclient': - ensure => latest, - provider => pip, - require => Class['pip'], - } - } -} diff --git a/modules/jeepyb/templates/openstackwatch.ini.erb b/modules/jeepyb/templates/openstackwatch.ini.erb deleted file mode 100644 index de290b2287..0000000000 --- a/modules/jeepyb/templates/openstackwatch.ini.erb +++ /dev/null @@ -1,36 +0,0 @@ -# -*- 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. -output_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 = <%= swift_username %> - -# password or api key -password = <%= swift_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 = <%= swift_auth_url %> - -# auth version (1.0 for Rackspace clouds, 2.0 for keystone backend clusters) -auth_version = <%= auth_version %> - -# vim: ft=dosini