Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #540 from rhelmer/bug749462-add-crontabber-config-…

…puppet

Bug749462 add crontabber config puppet
  • Loading branch information...
commit 9f3d35b4d596a7e0d7ae9664e4868b4cfbc5c9df 2 parents c2d07c5 + 617be92
@rhelmer rhelmer authored
View
1  .gitignore
@@ -18,6 +18,5 @@ docs/_build/
.coverage
cover/
.vagrant
-crontabber.ini
socorro/cron/crontabber.json
vagrantconfig_local.yaml
View
3  puppet/files/etc_crond/socorro
@@ -1,4 +1,7 @@
MAILTO="cron-socorro@example.com"
+PYTHONPATH="/data/socorro/application:/data/socorro/thirdparty"
+# crontabber is a cronjob manager for Socorro
+*/5 * * * * socorro /data/socorro/application/socorro/cron/crontabber.py --admin.conf=/etc/socorro/crontabber.ini > /var/log/socorro/crontabber.log 2>&1
# update info for /status page
*/5 * * * * socorro /data/socorro/application/scripts/crons/cron_status.sh
# run duplicate detection
View
0  puppet/files/etc-socorro/common.conf → puppet/files/etc_socorro/common.conf
File renamed without changes
View
81 puppet/files/etc_socorro/crontabber.ini
@@ -0,0 +1,81 @@
+[top_level]
+# name: database
+# doc: Location of file where job execution logs are stored
+# converter: str
+database=/home/socorro/persistent/crontabbers.json
+
+# name: database_class
+# doc: None
+# converter: configman.converters.class_converter
+database_class=socorro.external.postgresql.connection_context.ConnectionContext
+
+# name: database_host
+# doc: the hostname of the database
+# converter: str
+database_host=localhost
+
+# name: database_name
+# doc: the name of the database
+# converter: str
+database_name=breakpad
+
+# name: database_password
+# doc: the user's database password
+# converter: str
+database_password=secrets
+
+# name: database_port
+# doc: the port for the database
+# converter: int
+database_port=5432
+
+# name: database_user
+# doc: the name of the user within the database
+# converter: str
+database_user=breakpad_rw
+
+# name: jobs
+# doc: None
+# converter: class_list_converter
+jobs=InnerClassList
+
+# name: stderr_error_logging_level
+# doc: logging level for the logging to stderr (10 - DEBUG, 20 - INFO, 30 - WARNING, 40 - ERROR, 50 - CRITICAL)
+# converter: int
+stderr_error_logging_level=10
+
+# name: stderr_line_format_string
+# doc: python logging system format for logging to stderr
+# converter: str
+stderr_line_format_string={asctime} {levelname} - {threadName} - {message}
+
+# name: syslog_error_logging_level
+# doc: logging level for the log file (10 - DEBUG, 20 - INFO, 30 - WARNING, 40 - ERROR, 50 - CRITICAL)
+# converter: int
+syslog_error_logging_level=40
+
+# name: syslog_facility_string
+# doc: syslog facility string ("user", "local0", etc)
+# converter: str
+syslog_facility_string=user
+
+# name: syslog_host
+# doc: syslog hostname
+# converter: str
+syslog_host=localhost
+
+# name: syslog_line_format_string
+# doc: python logging system format for syslog entries
+# converter: str
+syslog_line_format_string=crontabber (pid {process}): {asctime} {levelname} - {threadName} - {message}
+
+# name: syslog_port
+# doc: syslog port
+# converter: int
+syslog_port=514
+
+# name: transaction_executor_class
+# doc: a class that will execute transactions
+# converter: configman.converters.class_converter
+transaction_executor_class=socorro.database.transaction_executor.TransactionExecutor
+
View
144 puppet/manifests/classes/socorro-base.pp
@@ -12,14 +12,14 @@
ensure => present,
source => "/home/socorro/dev/socorro/puppet/files/etc_profile.d/java.sh";
- '/etc/hosts':
- owner => root,
- group => root,
- mode => 644,
- ensure => present,
- source => "/home/socorro/dev/socorro/puppet/files/hosts";
-
- '/data':
+ '/etc/hosts':
+ owner => root,
+ group => root,
+ mode => 644,
+ ensure => present,
+ source => "/home/socorro/dev/socorro/puppet/files/hosts";
+
+ '/data':
owner => root,
group => root,
mode => 755,
@@ -29,47 +29,58 @@
owner => socorro,
group => socorro,
mode => 755,
- recurse=> false,
- ensure => directory;
+ recurse=> false,
+ ensure => directory;
'/etc/socorro':
owner => socorro,
group => socorro,
mode => 755,
- recurse=> false,
- ensure => directory;
+ recurse=> true,
+ ensure => directory,
+ source => "/home/socorro/dev/socorro/puppet/files/etc_socorro";
+
+ '/etc/cron.d':
+ owner => root,
+ group => root,
+ ensure => directory,
+ recurse => true,
+ require => File['/etc/socorro'],
+ source => "/home/socorro/dev/socorro/puppet/files/etc_crond";
- '/etc/socorro/socorrorc':
- ensure => link,
+ '/etc/socorro/socorrorc':
+ ensure => link,
require => Exec['socorro-install'],
- target=> "/data/socorro/application/scripts/crons/socorrorc";
+ target=> "/data/socorro/application/scripts/crons/socorrorc";
- '/etc/rsyslog.conf':
+ '/etc/rsyslog.conf':
require => Package[rsyslog],
- owner => root,
- group => root,
- mode => 644,
- ensure => present,
- notify => Service[rsyslog],
- source => "/home/socorro/dev/socorro/puppet/files/rsyslog.conf";
+ owner => root,
+ group => root,
+ mode => 644,
+ ensure => present,
+ notify => Service[rsyslog],
+ source => "/home/socorro/dev/socorro/puppet/files/rsyslog.conf";
# FIXME break this out to separate classes
- 'etc_supervisor':
+ 'etc_supervisor':
path => "/etc/supervisor/conf.d/",
recurse => true,
require => [Package['supervisor'], Exec['socorro-install']],
- #notify => Service[supervisor],
+ #notify => Service[supervisor],
source => "/home/socorro/dev/socorro/puppet/files/etc_supervisor";
'/var/log/socorro':
+ owner => socorro,
+ group => socorro,
mode => 644,
- recurse=> true,
- ensure => directory;
+ recurse=> true,
+ ensure => directory;
- '/home/socorro/persistent':
- owner => socorro,
- group => socorro,
- ensure => directory;
+ '/home/socorro/persistent':
+ owner => socorro,
+ group => socorro,
+ ensure => directory;
}
@@ -122,40 +133,40 @@
class socorro-python inherits socorro-base {
user { 'socorro':
- ensure => 'present',
- uid => '10000',
- shell => '/bin/bash',
+ ensure => 'present',
+ uid => '10000',
+ shell => '/bin/bash',
groups => 'admin',
- managehome => true;
+ managehome => true;
}
file {
'/home/socorro':
- require => User[socorro],
+ require => User[socorro],
owner => socorro,
group => socorro,
mode => 775,
- recurse=> false,
- ensure => directory;
+ recurse=> false,
+ ensure => directory;
}
file {
'/home/socorro/dev':
- require => File['/home/socorro'],
+ require => File['/home/socorro'],
owner => socorro,
group => socorro,
mode => 775,
- recurse=> false,
- ensure => directory;
+ recurse=> false,
+ ensure => directory;
}
# FIXME
# '/etc/logrotate.d/socorro':
# ensure => present,
-# source => $fqdn ? {
-# /sjc1.mozilla.com$/ => "puppet://$server/modules/socorro/stage/etc-logrotated/socorro",
-# default => "puppet://$server/modules/socorro/prod/etc-logrotated/socorro",
-# };
+# source => $fqdn ? {
+# /sjc1.mozilla.com$/ => "puppet://$server/modules/socorro/stage/etc-logrotated/socorro",
+# default => "puppet://$server/modules/socorro/prod/etc-logrotated/socorro",
+# };
package {
['python-psycopg2', 'python-simplejson', 'subversion', 'libpq-dev',
'python-virtualenv', 'python-dev']:
@@ -200,14 +211,6 @@
class socorro-web inherits socorro-base {
- file { '/var/log/httpd':
- owner => root,
- group => root,
- mode => 755,
- recurse=> true,
- ensure => directory;
- }
-
package {
'apache2':
ensure => latest,
@@ -235,13 +238,6 @@
class socorro-php inherits socorro-web {
file {
- '/var/log/httpd/crash-stats':
- require => Package[apache2],
- owner => root,
- group => root,
- mode => 755,
- ensure => directory;
-
'/etc/apache2/sites-available/crash-stats':
require => Package[apache2],
alias => 'crash-stats-vhost',
@@ -249,8 +245,8 @@
group => root,
mode => 644,
ensure => present,
- notify => Service[apache2],
- source => "/home/socorro/dev/socorro/puppet/files/etc_apache2_sites-available/crash-stats";
+ notify => Service[apache2],
+ source => "/home/socorro/dev/socorro/puppet/files/etc_apache2_sites-available/crash-stats";
'/var/log/socorro/kohana':
require => Package[apache2],
@@ -259,14 +255,14 @@
mode => 755,
ensure => directory;
- '/etc/php.ini':
+ '/etc/php.ini':
require => Package[apache2],
- owner => root,
- group => root,
- mode => 644,
- ensure => present,
- notify => Service[apache2],
- source => "/home/socorro/dev/socorro/puppet/files/php.ini";
+ owner => root,
+ group => root,
+ mode => 644,
+ ensure => present,
+ notify => Service[apache2],
+ source => "/home/socorro/dev/socorro/puppet/files/php.ini";
'/data/socorro/htdocs/application/logs':
require => Exec['socorro-install'],
@@ -276,10 +272,10 @@
# FIXME
# '/etc/logrotate.d/kohana':
# ensure => present,
-# source => $fqdn ? {
-# /sjc1.mozilla.com$/ => "puppet://$server/modules/socorro/stage/etc-logrotated/kohana",
-# default => "puppet://$server/modules/socorro/prod/etc-logrotated/kohana",
-# };
+# source => $fqdn ? {
+# /sjc1.mozilla.com$/ => "puppet://$server/modules/socorro/stage/etc-logrotated/kohana",
+# default => "puppet://$server/modules/socorro/prod/etc-logrotated/kohana",
+# };
}
@@ -333,8 +329,8 @@
package {
['memcached', 'libcrypt-ssleay-perl', 'php5-pgsql', 'php5-curl',
- 'php5-dev', 'php5-tidy', 'php-pear', 'php5-common', 'php5-cli',
- 'php5-memcache', 'php5', 'php5-gd', 'php5-mysql', 'php5-ldap',
+ 'php5-dev', 'php5-tidy', 'php-pear', 'php5-common', 'php5-cli',
+ 'php5-memcache', 'php5', 'php5-gd', 'php5-mysql', 'php5-ldap',
'phpunit']:
ensure => latest,
require => Exec['apt-get-update'];
View
0  scripts/crons/cron_aggregates.sh 100644 → 100755
File mode changed
View
0  scripts/crons/cron_bugzilla.sh 100644 → 100755
File mode changed
View
0  scripts/crons/cron_clean_tcbs.sh 100644 → 100755
File mode changed
View
0  scripts/crons/cron_daily_crashes.sh 100644 → 100755
File mode changed
View
0  scripts/crons/cron_daily_matviews.sh 100644 → 100755
File mode changed
View
0  scripts/crons/cron_duplicates.sh 100644 → 100755
File mode changed
View
0  scripts/crons/cron_fixbrokendumps.sh 100644 → 100755
File mode changed
View
0  scripts/crons/cron_ftpscraper.sh 100644 → 100755
File mode changed
View
0  scripts/crons/cron_modulelist.sh 100644 → 100755
File mode changed
View
0  scripts/crons/cron_reportsclean.sh 100644 → 100755
File mode changed
View
0  scripts/crons/cron_status.sh 100644 → 100755
File mode changed
View
0  scripts/crons/cron_submitter.sh 100644 → 100755
File mode changed
View
0  scripts/crons/cron_tcurl.sh 100644 → 100755
File mode changed
View
0  socorro/cron/crontabber.py 100644 → 100755
File mode changed
Please sign in to comment.
Something went wrong with that request. Please try again.