Add scheduling

Dramatically reduce the puppet run time and use of resources
by not running everything on every run.
This will probably need tuning over time...
This commit is contained in:
Wile E. Coyote 2018-11-17 09:07:16 +00:00
parent 38f0e3e9ad
commit b144dd44e1
4 changed files with 36 additions and 0 deletions

View file

@ -128,6 +128,7 @@ class rhizo_base::freeswitch::common {
'freeswitch-mod-voicemail', 'freeswitch-mod-voicemail-ivr',
'freeswitch-mod-xml-cdr',
'freeswitch-sysvinit', 'libfreeswitch1']:
schedule => 'onceweek',
ensure => installed,
require => Class['rhizo_base::apt'],
}
@ -191,6 +192,7 @@ class rhizo_base::freeswitch::common {
}
vcsrepo { '/usr/share/freeswitch/sounds/rccn':
schedule => 'repo',
ensure => latest,
revision => 'master',
provider => git,

View file

@ -187,6 +187,28 @@ class rhizo_base {
}
}
schedule { 'onceday':
period => daily,
repeat => 1,
}
schedule { 'onceweek':
period => weekly,
repeat => 1,
}
schedule { 'weekly':
weekday => 'Sunday',
}
schedule { 'offpeak':
range => '1 - 4.30',
}
schedule { 'repo':
range => '1 - 2',
}
#Rizhomatica scripts
file { '/home/rhizomatica/bin':
ensure => directory,
@ -230,6 +252,7 @@ class rhizo_base {
}
vcsrepo { '/var/rhizomatica':
schedule => 'repo',
ensure => latest,
provider => git,
source => 'https://github.com/Rhizomatica/rccn.git',
@ -242,6 +265,7 @@ class rhizo_base {
}
vcsrepo { '/var/meas_web':
schedule => 'repo',
ensure => latest,
provider => git,
source => 'https://github.com/whyteks/meas_web.git',
@ -377,11 +401,13 @@ class rhizo_base {
if $operatingsystem == 'Debian' {
python::pip { 'twisted':
schedule => 'onceweek',
ensure => '13.1.0',
pkgname => 'Twisted',
}
python::pip { 'corepost':
schedule => 'onceweek',
ensure => 'present',
pkgname => 'CorePost',
}
@ -390,21 +416,25 @@ class rhizo_base {
python::pip { 'riak':
ensure => '2.0.3',
pkgname => 'riak',
schedule => 'onceweek',
}
python::pip { 'gsm0338':
ensure => '1.0.0',
pkgname => 'gsm0338',
schedule => 'onceweek',
}
python::pip { 'python-ESL':
ensure => 'present',
pkgname => 'python-ESL',
schedule => 'onceweek',
}
python::pip { 'csvkit':
ensure => 'present',
pkgname => 'csvkit',
schedule => 'onceweek',
}
file { '/usr/lib/python2.7/dist-packages':

View file

@ -46,6 +46,7 @@ class rhizo_base::openbsc::ubuntu inherits rhizo_base::openbsc::common {
'libosmonetif2', 'libosmosim0',
'libosmotrau0']:
ensure => purged,
schedule => 'weekly',
}
}

View file

@ -25,6 +25,7 @@ class rhizo_base::packages::common {
package { ['mosh', 'git', 'openvpn', 'lm-sensors', 'runit', 'sqlite3',
'libffi-dev', 'apcupsd', 'expect', 'gawk', 'swig', 'g++',
'python-smpplib', 'libcdk5', 'websocketd', 'osmo-meas' ]:
schedule => 'weekly',
ensure => installed,
require => Class['rhizo_base::apt'],
}
@ -44,6 +45,7 @@ class rhizo_base::packages::ubuntu inherits rhizo_base::packages::common {
'php5.6-curl', 'php5.6-cli', 'php5.6-gd', 'python-corepost', 'php5.6-xml',
'python-yaml', 'python-formencode', 'python-unidecode',
'python-dateutil']:
schedule => 'weekly',
ensure => installed,
require => Class['rhizo_base::apt'],
}
@ -65,6 +67,7 @@ class rhizo_base::packages::debian inherits rhizo_base::packages::common {
'python-yaml', 'python-formencode', 'python-unidecode',
'python-dateutil', 'sudo', 'apt-transport-https',
'sngrep' ]:
schedule => 'weekly',
ensure => installed,
require => Class['rhizo_base::apt'],
}