Skip to content

Commit

Permalink
pull standalone fulcrum perl into its own file
Browse files Browse the repository at this point in the history
  • Loading branch information
antmoth committed Oct 2, 2024
1 parent e5c1af8 commit a1a44d2
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 36 deletions.
37 changes: 37 additions & 0 deletions manifests/profile/fulcrum/perl.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# The perl profile is needed for monitor_pl to work, but it pulls in a
# ton of stuff. We should probably allow for different haproxy http checks
# for a service, and eliminate the perl/monitor_pl dependency here.

class nebula::profile::fulcrum::perl (
Hash $hosts = {}
) {

include nebula::profile::www_lib::perl

create_resources('host',$hosts)

include nebula::profile::www_lib::apache::base
include nebula::profile::www_lib::apache::fulcrum

cron {
default:
user => 'root',
;

'purge apache access logs 1/2':
hour => 1,
minute => 7,
command => '/usr/bin/find /var/log/apache2 -type f -mtime +14 -name "*log*" -exec /bin/rm {} \; > /dev/null 2>&1',
;

'purge apache access logs 2/2':
hour => 1,
minute => 17,
command => '/usr/bin/find /var/log/apache2 -type f -mtime +2 -name "*log*" ! -name "*log*gz" -exec /usr/bin/pigz {} \; > /dev/null 2>&1',
require => Package['pigz'],
;
}

ensure_packages(['pigz'])

}
38 changes: 2 additions & 36 deletions manifests/role/fulcrum/standalone.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
#
# This is desiged to manage a Debian Server that hosts the Fulcrum project, with all of the dependencies and services included.

class nebula::role::fulcrum::standalone (
String $private_address_template = '192.168.0.%s',
String $shibboleth_config_source = 'puppet:///shibboleth-fulcrum',
Hash $hosts = {}
) {
class nebula::role::fulcrum::standalone {

include nebula::role::minimum
include nebula::profile::ruby
Expand All @@ -21,37 +17,7 @@
include nebula::profile::fulcrum::app
include nebula::profile::fulcrum::logrotate
include nebula::profile::fulcrum::redis

# The perl profile is needed for monitor_pl to work, but it pulls in a
# ton of stuff. We should probably allow for different haproxy http checks
# for a service, and eliminate the perl/monitor_pl dependency here.
include nebula::profile::www_lib::perl

create_resources('host',$hosts)

include nebula::profile::www_lib::apache::base
include nebula::profile::www_lib::apache::fulcrum

cron {
default:
user => 'root',
;

'purge apache access logs 1/2':
hour => 1,
minute => 7,
command => '/usr/bin/find /var/log/apache2 -type f -mtime +14 -name "*log*" -exec /bin/rm {} \; > /dev/null 2>&1',
;

'purge apache access logs 2/2':
hour => 1,
minute => 17,
command => '/usr/bin/find /var/log/apache2 -type f -mtime +2 -name "*log*" ! -name "*log*gz" -exec /usr/bin/pigz {} \; > /dev/null 2>&1',
require => Package['pigz'],
;
}

ensure_packages(['pigz'])
include nebula::profile::fulcrum::perl

include nebula::profile::fulcrum::solr
include nebula::profile::fulcrum::mysql
Expand Down

0 comments on commit a1a44d2

Please sign in to comment.