Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Eric Zheng
slapos
Commits
f7561e36
Commit
f7561e36
authored
Apr 12, 2017
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stack/resilience: Use logrotate stack instead repeat sections
Simple Don't repeat yourself.
parent
a08983de
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
111 deletions
+19
-111
stack/resilient/buildout.hash.cfg
stack/resilient/buildout.hash.cfg
+3
-3
stack/resilient/pbsready-export.cfg.in
stack/resilient/pbsready-export.cfg.in
+1
-22
stack/resilient/pbsready-import.cfg.in
stack/resilient/pbsready-import.cfg.in
+1
-23
stack/resilient/pbsready.cfg.in
stack/resilient/pbsready.cfg.in
+14
-63
No files found.
stack/resilient/buildout.hash.cfg
View file @
f7561e36
...
@@ -15,15 +15,15 @@
...
@@ -15,15 +15,15 @@
# not need these here).
# not need these here).
[pbsready]
[pbsready]
filename = pbsready.cfg.in
filename = pbsready.cfg.in
md5sum =
809f4b0b3c4976b3dae8d579f6daa615
md5sum =
2adb49f45d27cbcb7430c98c2224d76a
[pbsready-import]
[pbsready-import]
filename = pbsready-import.cfg.in
filename = pbsready-import.cfg.in
md5sum =
1a31882707732f224e014c1b744df17
7
md5sum =
a8f77b42782ec5e1fb49b5ae9891c75
7
[pbsready-export]
[pbsready-export]
filename = pbsready-export.cfg.in
filename = pbsready-export.cfg.in
md5sum =
1b38292c42702f91f620cb99d1a88952
md5sum =
bb463da1461d02d575717f1d1572bf97
[template-pull-backup]
[template-pull-backup]
filename = instance-pull-backup.cfg.in
filename = instance-pull-backup.cfg.in
...
...
stack/resilient/pbsready-export.cfg.in
View file @
f7561e36
[buildout]
[buildout]
extends = {{ pbsready_template_path }}
extends = {{ pbsready_template_path }}
# Explicitely define extended parts from pbsready
parts +=
# then add local parts
parts =
logrotate
logrotate-entry-cron
logrotate-entry-equeue
logrotate-entry-resilient
cron
cron-entry-logrotate
cron-entry-notifier-status-feed
notifier-feed-status-promise
notifier-stalled-promise
resilient-sshkeys-authority
sshd-raw-server
sshd-graceful
sshkeys-sshd
sshd-promise
resilient-sshkeys-sshd-promise
sshd-pbs-authorized-key
notifier
notifier-exporter-promise
notifier-exporter-promise
cron-entry-backup
cron-entry-backup
[resilient-directory]
[resilient-directory]
...
...
stack/resilient/pbsready-import.cfg.in
View file @
f7561e36
[buildout]
[buildout]
extends = ${pbsready:output}
extends = ${pbsready:output}
# Explicitely define extended parts from pbsready
parts +=
# then add local parts
parts =
logrotate
logrotate-entry-cron
logrotate-entry-equeue
logrotate-entry-notifier
logrotate-entry-resilient
cron
cron-entry-logrotate
cron-entry-notifier-status-feed
notifier-feed-status-promise
notifier-stalled-promise
resilient-sshkeys-authority
sshd-raw-server
sshd-graceful
sshkeys-sshd
sshd-promise
resilient-sshkeys-sshd-promise
sshd-pbs-authorized-key
notifier
resiliency-takeover-script
resiliency-takeover-script
resilient-web-takeover-cgi-script
resilient-web-takeover-cgi-script
resilient-web-takeover-httpd-wrapper
resilient-web-takeover-httpd-wrapper
...
...
stack/resilient/pbsready.cfg.in
View file @
f7561e36
[buildout]
[buildout]
parts =
parts +=
logrotate
logrotate-entry-cron
logrotate-entry-cron
logrotate-entry-equeue
logrotate-entry-equeue
logrotate-entry-notifier
logrotate-entry-notifier
logrotate-entry-resilient
logrotate-entry-resilient
cron
cron
cron-entry-logrotate
cron-entry-notifier-status-feed
cron-entry-notifier-status-feed
notifier-feed-status-promise
notifier-feed-status-promise
notifier-stalled-promise
notifier-stalled-promise
resilient-sshkeys-authority
resilient-sshkeys-authority
sshd-raw-server
sshd-graceful
sshd-graceful
sshkeys-sshd
sshkeys-sshd
sshd-promise
sshd-promise
...
@@ -20,6 +19,9 @@ parts =
...
@@ -20,6 +19,9 @@ parts =
notifier
notifier
extends =
${monitor2-template:rendered}
#----------------
#----------------
#--
#--
#-- Creation of all needed directories.
#-- Creation of all needed directories.
...
@@ -62,80 +64,29 @@ monitor-resilient = $${monitor-directory:private}/resilient
...
@@ -62,80 +64,29 @@ monitor-resilient = $${monitor-directory:private}/resilient
#----------------
#----------------
#--
#--
#-- Deploy cron.
#-- Deploy cron.
# cron and cron-simplelogger are deployed by logrotate.
[cron]
recipe = slapos.cookbook:cron
dcrond-binary = ${dcron:location}/sbin/crond
cron-entries = $${directory:cron-entries}
crontabs = $${directory:crontabs}
cronstamps = $${directory:cronstamps}
catcher = $${cron-simplelogger:wrapper}
binary = $${basedirectory:services}/crond
[cron-simplelogger]
recipe = slapos.cookbook:simplelogger
wrapper = $${rootdirectory:bin}/cron_simplelogger
log = $${basedirectory:log}/crond.log
#----------------
#----------------
#--
#--
#-- Deploy logrotate.
#-- Deploy logrotate.
[cron-entry-logrotate]
<= cron
recipe = slapos.cookbook:cron.d
name = logrotate
frequency = 0 0 * * *
command = $${logrotate:wrapper}
[logrotate]
recipe = slapos.cookbook:logrotate
# Binaries
logrotate-binary = ${logrotate:location}/usr/sbin/logrotate
gzip-binary = ${gzip:location}/bin/gzip
gunzip-binary = ${gzip:location}/bin/gunzip
# Directories
wrapper = $${rootdirectory:bin}/logrotate
conf = $${rootdirectory:etc}/logrotate.conf
logrotate-entries = $${directory:logrotate-entries}
backup = $${directory:logrotate-backup}
state-file = $${rootdirectory:srv}/logrotate.status
[logrotate-entry-cron]
<= logrotate
recipe =slapos.cookbook:logrotate.d
name = crond
log = $${cron-simplelogger:log}
frequency = daily
rotate-num = 30
notifempty = true
create = true
[logrotate-entry-equeue]
[logrotate-entry-equeue]
<= logrotate
<= logrotate-entry-base
recipe = slapos.cookbook:logrotate.d
name = equeue
name = equeue
log = $${equeue:log} $${sshd-server:log}
log = $${equeue:log} $${sshd-server:log}
frequency = daily
frequency = daily
rotate-num = 30
rotate-num = 30
[logrotate-entry-notifier]
[logrotate-entry-notifier]
recipe = collective.recipe.template
<= logrotate-entry-base
mode = 600
name = notifier
input = inline:
log = $${notifier:feeds}/*
$${notifier:feeds}/* {
rotate-num = 5
rotate 5
frequency = weekly
weekly
nocompress = 1
nocompress
missingok
olddir $${directory:logrotate-backup}
}
output = $${logrotate:logrotate-entries}/notifier
[logrotate-entry-resilient]
[logrotate-entry-resilient]
<= logrotate
<= logrotate-entry-base
recipe = slapos.cookbook:logrotate.d
name = resilient_log
name = resilient_log
log = $${basedirectory:log}/resilient.log
log = $${basedirectory:log}/resilient.log
frequency = weekly
frequency = weekly
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment