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
HongzheWang
slapos
Commits
b462220f
Commit
b462220f
authored
Jan 24, 2019
by
Guillaume Hervier
Committed by
Thomas Gambier
Mar 26, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stack/resilient: Use stack/logrotate instead of redoing it.
parent
b729670f
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
32 additions
and
81 deletions
+32
-81
software/slaprunner/buildout.hash.cfg
software/slaprunner/buildout.hash.cfg
+4
-4
software/slaprunner/instance-runner-export.cfg.in
software/slaprunner/instance-runner-export.cfg.in
+4
-0
software/slaprunner/instance-runner-import.cfg.in
software/slaprunner/instance-runner-import.cfg.in
+2
-2
software/slaprunner/instance-runner.cfg
software/slaprunner/instance-runner.cfg
+7
-1
software/slaprunner/instance.cfg
software/slaprunner/instance.cfg
+2
-1
software/slaprunner/software.cfg
software/slaprunner/software.cfg
+1
-0
stack/resilient/buildout.hash.cfg
stack/resilient/buildout.hash.cfg
+2
-2
stack/resilient/instance-pull-backup.cfg.in
stack/resilient/instance-pull-backup.cfg.in
+10
-69
stack/resilient/pbsready.cfg.in
stack/resilient/pbsready.cfg.in
+0
-2
No files found.
software/slaprunner/buildout.hash.cfg
View file @
b462220f
...
@@ -14,11 +14,11 @@
...
@@ -14,11 +14,11 @@
# not need these here).
# not need these here).
[template]
[template]
filename = instance.cfg
filename = instance.cfg
md5sum =
f0cab61c7b8478afb8b676fc725d50d5
md5sum =
c44a7481bb85e3258128afe3fcf23f44
[template-runner]
[template-runner]
filename = instance-runner.cfg
filename = instance-runner.cfg
md5sum =
7c48c89f33ad243f0dffb3eeef8c56e8
md5sum =
8882bc63d615d8a2cd6de3d32b1013e0
[template-runner-import-script]
[template-runner-import-script]
filename = template/runner-import.sh.jinja2
filename = template/runner-import.sh.jinja2
...
@@ -26,11 +26,11 @@ md5sum = ed6dc50713c14e2527b9958d98674eed
...
@@ -26,11 +26,11 @@ md5sum = ed6dc50713c14e2527b9958d98674eed
[instance-runner-import]
[instance-runner-import]
filename = instance-runner-import.cfg.in
filename = instance-runner-import.cfg.in
md5sum =
1ed9526a6e5ac9a80e5b3add2d0a88fe
md5sum =
238466e8045096c09534e1d01b1befd6
[instance-runner-export]
[instance-runner-export]
filename = instance-runner-export.cfg.in
filename = instance-runner-export.cfg.in
md5sum =
4b19026c50af55c8b7387aeaf624b47c
md5sum =
b992bb3391de9d6d422bfa8011d8ffc4
[template-resilient]
[template-resilient]
filename = instance-resilient.cfg.jinja2
filename = instance-resilient.cfg.jinja2
...
...
software/slaprunner/instance-runner-export.cfg.in
View file @
b462220f
...
@@ -76,6 +76,10 @@ instance-configuration =
...
@@ -76,6 +76,10 @@ instance-configuration =
httpdcors cors-domain ${slaprunner-httpd-cors:location} ${httpd-graceful-wrapper:output}
httpdcors cors-domain ${slaprunner-httpd-cors:location} ${httpd-graceful-wrapper:output}
configuration-file-path = ${buildout:directory}/knowledge0.cfg
configuration-file-path = ${buildout:directory}/knowledge0.cfg
[monitor-conf-parameters]
private-path-list +=
$${logrotate-directory:logrotate-backup}
# Extends publish section with resilient parameters
# Extends publish section with resilient parameters
[publish-connection-information]
[publish-connection-information]
<= resilient-publish-connection-parameter
<= resilient-publish-connection-parameter
...
...
software/slaprunner/instance-runner-import.cfg.in
View file @
b462220f
...
@@ -189,7 +189,7 @@ configuration-file-path = ${buildout:directory}/knowledge0.cfg
...
@@ -189,7 +189,7 @@ configuration-file-path = ${buildout:directory}/knowledge0.cfg
[monitor-conf-parameters]
[monitor-conf-parameters]
private-path-list +=
private-path-list +=
$
{
directory:logrotate-backup}
$
${logrotate-
directory:logrotate-backup}
[post-notification-run]
[post-notification-run]
recipe = slapos.cookbook:wrapper
recipe = slapos.cookbook:wrapper
...
...
software/slaprunner/instance-runner.cfg
View file @
b462220f
...
@@ -51,7 +51,9 @@ common-runner-parts =
...
@@ -51,7 +51,9 @@ common-runner-parts =
template-slapuser-script
template-slapuser-script
parts = $${:common-runner-parts}
parts = $${:common-runner-parts}
extends = ${monitor2-template:rendered}
extends =
${monitor2-template:rendered}
${template-logrotate-base:rendered}
eggs-directory = ${buildout:eggs-directory}
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
...
@@ -882,6 +884,10 @@ instance-configuration =
...
@@ -882,6 +884,10 @@ instance-configuration =
httpdcors cors-domain $${slaprunner-httpd-cors:location} $${httpd-graceful-wrapper:output}
httpdcors cors-domain $${slaprunner-httpd-cors:location} $${httpd-graceful-wrapper:output}
configuration-file-path = $${buildout:directory}/knowledge0.cfg
configuration-file-path = $${buildout:directory}/knowledge0.cfg
[monitor-conf-parameters]
private-path-list +=
$${logrotate-directory:logrotate-backup}
[monitor-check-webrunner-internal-instance]
[monitor-check-webrunner-internal-instance]
recipe = slapos.recipe.template:jinja2
recipe = slapos.recipe.template:jinja2
template = ${monitor-check-webrunner-internal-instance:location}/${monitor-check-webrunner-internal-instance:filename}
template = ${monitor-check-webrunner-internal-instance:location}/${monitor-check-webrunner-internal-instance:filename}
...
...
software/slaprunner/instance.cfg
View file @
b462220f
...
@@ -5,7 +5,8 @@ parts =
...
@@ -5,7 +5,8 @@ parts =
eggs-directory = ${buildout:eggs-directory}
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
extends = ${template-resilient-templates:output}
extends =
${template-resilient-templates:output}
[switch_softwaretype]
[switch_softwaretype]
recipe = slapos.cookbook:softwaretype
recipe = slapos.cookbook:softwaretype
...
...
software/slaprunner/software.cfg
View file @
b462220f
...
@@ -24,6 +24,7 @@ extends =
...
@@ -24,6 +24,7 @@ extends =
../../stack/slapos.cfg
../../stack/slapos.cfg
../../stack/flask.cfg
../../stack/flask.cfg
../../stack/resilient/buildout.cfg
../../stack/resilient/buildout.cfg
../../stack/logrotate/buildout.cfg
../../stack/monitor/buildout.cfg
../../stack/monitor/buildout.cfg
# stacks are listed from most generic to most specific,
# stacks are listed from most generic to most specific,
...
...
stack/resilient/buildout.hash.cfg
View file @
b462220f
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
# not need these here).
# not need these here).
[pbsready]
[pbsready]
filename = pbsready.cfg.in
filename = pbsready.cfg.in
md5sum =
367f8b8a09c3098844739f9b2856b912
md5sum =
516482f89d7a3ebe4458a404eb4a575b
[pbsready-import]
[pbsready-import]
filename = pbsready-import.cfg.in
filename = pbsready-import.cfg.in
...
@@ -26,7 +26,7 @@ md5sum = c6c11db5372150019debb1ce519b907d
...
@@ -26,7 +26,7 @@ md5sum = c6c11db5372150019debb1ce519b907d
[template-pull-backup]
[template-pull-backup]
filename = instance-pull-backup.cfg.in
filename = instance-pull-backup.cfg.in
md5sum =
4cff5dc82428256929ecbf21cd918c00
md5sum =
57b9b421d233402e6d5177c69cf9567e
[template-replicated]
[template-replicated]
filename = template-replicated.cfg.in
filename = template-replicated.cfg.in
...
...
stack/resilient/instance-pull-backup.cfg.in
View file @
b462220f
...
@@ -3,10 +3,7 @@
...
@@ -3,10 +3,7 @@
parts =
parts =
publish-connection-information
publish-connection-information
pbs
pbs
logrotate
logrotate-entry-notifier
logrotate-entry-notifier
cron
cron-entry-logrotate
pbs-sshkeys-authority
pbs-sshkeys-authority
sshkeys-openssh
sshkeys-openssh
resilient-genstatrss-wrapper
resilient-genstatrss-wrapper
...
@@ -19,7 +16,9 @@ parts =
...
@@ -19,7 +16,9 @@ parts =
monitor-base
monitor-base
monitor-check-resilient-feed-file
monitor-check-resilient-feed-file
extends = ${monitor2-template:rendered}
extends =
${monitor2-template:rendered}
${template-logrotate-base:rendered}
eggs-directory = ${buildout:eggs-directory}
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
offline = true
...
@@ -49,8 +48,6 @@ notifier = $${rootdirectory:etc}/notifier
...
@@ -49,8 +48,6 @@ notifier = $${rootdirectory:etc}/notifier
[directory]
[directory]
recipe = slapos.cookbook:mkdirectory
recipe = slapos.cookbook:mkdirectory
logrotate-entries = $${rootdirectory:etc}/logrotate.d
logrotate-backup = $${basedirectory:backup}/logrotate
cronstamps = $${rootdirectory:etc}/cronstamps
cronstamps = $${rootdirectory:etc}/cronstamps
cron-entries = $${rootdirectory:etc}/cron.d
cron-entries = $${rootdirectory:etc}/cron.d
crontabs = $${rootdirectory:etc}/crontabs
crontabs = $${rootdirectory:etc}/crontabs
...
@@ -151,69 +148,13 @@ name = resilient-pbs-status-feed
...
@@ -151,69 +148,13 @@ name = resilient-pbs-status-feed
frequency = */5 * * * *
frequency = */5 * * * *
command = $${pbs-resilient-status-feed:wrapper-path}
command = $${pbs-resilient-status-feed:wrapper-path}
#----------------
#--
#-- 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
#----------------
#--
#-- 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 = cron
log = $${cron-simplelogger:log}
frequency = daily
rotate-num = 30
[logrotate-entry-notifier]
[logrotate-entry-notifier]
recipe = collective.recipe.template
<= logrotate-entry-base
mode = 600
name = notifier
input = inline:
log = $${directory:notifier-feeds}/*
$${directory:notifier-feeds}/* {
rotate-num = 5
rotate 5
frequency = weekly
weekly
nocompress = true
nocompress
missingok
olddir $${directory:logrotate-backup}
}
output = $${logrotate:logrotate-entries}/notifier
#----------------
#----------------
#--
#--
...
@@ -324,7 +265,7 @@ password = $${slap-parameter:monitor-password}
...
@@ -324,7 +265,7 @@ password = $${slap-parameter:monitor-password}
[monitor-conf-parameters]
[monitor-conf-parameters]
private-path-list +=
private-path-list +=
$${directory:logrotate-backup}
$${
logrotate-
directory:logrotate-backup}
$${basedirectory:log}
$${basedirectory:log}
[monitor-check-resilient-feed-file]
[monitor-check-resilient-feed-file]
...
...
stack/resilient/pbsready.cfg.in
View file @
b462220f
...
@@ -56,8 +56,6 @@ notifier-status-items = $${basedirectory:notifier}/status-items
...
@@ -56,8 +56,6 @@ notifier-status-items = $${basedirectory:notifier}/status-items
cron-entries = $${rootdirectory:etc}/cron.d
cron-entries = $${rootdirectory:etc}/cron.d
crontabs = $${rootdirectory:etc}/crontabs
crontabs = $${rootdirectory:etc}/crontabs
cronstamps = $${rootdirectory:etc}/cronstamps
cronstamps = $${rootdirectory:etc}/cronstamps
logrotate-entries = $${rootdirectory:etc}/logrotate.d
logrotate-backup = $${basedirectory:backup}/logrotate
cgi-bin = $${rootdirectory:srv}/cgi-bin
cgi-bin = $${rootdirectory:srv}/cgi-bin
monitor-resilient = $${monitor-directory:private}/resilient
monitor-resilient = $${monitor-directory:private}/resilient
...
...
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