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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Yusei Tahara
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 @@
# not need these here).
[pbsready]
filename = pbsready.cfg.in
md5sum =
809f4b0b3c4976b3dae8d579f6daa615
md5sum =
2adb49f45d27cbcb7430c98c2224d76a
[pbsready-import]
filename = pbsready-import.cfg.in
md5sum =
1a31882707732f224e014c1b744df17
7
md5sum =
a8f77b42782ec5e1fb49b5ae9891c75
7
[pbsready-export]
filename = pbsready-export.cfg.in
md5sum =
1b38292c42702f91f620cb99d1a88952
md5sum =
bb463da1461d02d575717f1d1572bf97
[template-pull-backup]
filename = instance-pull-backup.cfg.in
...
...
stack/resilient/pbsready-export.cfg.in
View file @
f7561e36
[buildout]
extends = {{ pbsready_template_path }}
# Explicitely define extended parts from pbsready
# 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
parts +=
notifier-exporter-promise
cron-entry-backup
[resilient-directory]
...
...
stack/resilient/pbsready-import.cfg.in
View file @
f7561e36
[buildout]
extends = ${pbsready:output}
# Explicitely define extended parts from pbsready
# 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
parts +=
resiliency-takeover-script
resilient-web-takeover-cgi-script
resilient-web-takeover-httpd-wrapper
...
...
stack/resilient/pbsready.cfg.in
View file @
f7561e36
[buildout]
parts =
logrotate
parts +=
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
...
...
@@ -20,6 +19,9 @@ parts =
notifier
extends =
${monitor2-template:rendered}
#----------------
#--
#-- Creation of all needed directories.
...
...
@@ -62,80 +64,29 @@ monitor-resilient = $${monitor-directory:private}/resilient
#----------------
#--
#-- Deploy cron.
[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
# cron and cron-simplelogger are deployed by 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
recipe = slapos.cookbook:logrotate.d
<= logrotate-entry-base
name = equeue
log = $${equeue:log} $${sshd-server:log}
frequency = daily
rotate-num = 30
[logrotate-entry-notifier]
recipe = collective.recipe.template
mode = 600
input = inline:
$${notifier:feeds}/* {
rotate 5
weekly
nocompress
missingok
olddir $${directory:logrotate-backup}
}
output = $${logrotate:logrotate-entries}/notifier
<= logrotate-entry-base
name = notifier
log = $${notifier:feeds}/*
rotate-num = 5
frequency = weekly
nocompress = 1
[logrotate-entry-resilient]
<= logrotate
recipe = slapos.cookbook:logrotate.d
<= logrotate-entry-base
name = resilient_log
log = $${basedirectory:log}/resilient.log
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