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
Romain Courteaud
slapos
Commits
1505c512
Commit
1505c512
authored
Nov 16, 2011
by
Antoine Catton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch lamp stack to pull backup server.
parent
dc839285
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
409 additions
and
44 deletions
+409
-44
stack/lamp/buildout.cfg
stack/lamp/buildout.cfg
+63
-18
stack/lamp/instance-apache-php.cfg
stack/lamp/instance-apache-php.cfg
+3
-4
stack/lamp/instance-backuped.cfg
stack/lamp/instance-backuped.cfg
+45
-7
stack/lamp/instance-mariadb-pbsready-export.cfg
stack/lamp/instance-mariadb-pbsready-export.cfg
+27
-0
stack/lamp/instance-mariadb-pbsready-import.cfg
stack/lamp/instance-mariadb-pbsready-import.cfg
+45
-0
stack/lamp/instance-mariadb-pbsready.cfg
stack/lamp/instance-mariadb-pbsready.cfg
+76
-0
stack/lamp/instance-mariadb.cfg
stack/lamp/instance-mariadb.cfg
+18
-13
stack/lamp/instance-pull-backup.cfg
stack/lamp/instance-pull-backup.cfg
+129
-0
stack/lamp/instance.cfg
stack/lamp/instance.cfg
+3
-2
No files found.
stack/lamp/buildout.cfg
View file @
1505c512
...
@@ -7,16 +7,32 @@ parts =
...
@@ -7,16 +7,32 @@ parts =
mariadb
mariadb
mydumper
mydumper
mysql-python
mysql-python
duplicity
rdiff-backup
dropbear
eggs
eggs
instance-recipe-egg
instance-recipe-egg
template
template
template-apache-php
template-apache-php
template-mariadb
template-mariadb
template-mariadb-remote-backuped
template-mariadb-pbsready
template-mariadb-pseudo-replicating
template-mariadb-pbsready-import
template-mariadb-pbsready-export
allow-hosts =
*.nexedi.org
*.python.org
*.sourceforge.net
alastairs-place.net
dist.repoze.org
effbot.org
github.com
peak.telecommunity.com
psutil.googlecode.com
www.dabeaz.com
launchpad.net
extends =
extends =
../shacache-client.cfg
../../component/mariadb/buildout.cfg
../../component/mariadb/buildout.cfg
../../component/apache/buildout.cfg
../../component/apache/buildout.cfg
../../component/apache-php/buildout.cfg
../../component/apache-php/buildout.cfg
...
@@ -29,14 +45,19 @@ extends =
...
@@ -29,14 +45,19 @@ extends =
../../component/sqlite3/buildout.cfg
../../component/sqlite3/buildout.cfg
../../component/lxml-python/buildout.cfg
../../component/lxml-python/buildout.cfg
../../component/zlib/buildout.cfg
../../component/zlib/buildout.cfg
../../component/
duplicity
/buildout.cfg
../../component/
rdiff-backup
/buildout.cfg
../../component/gzip/buildout.cfg
../../component/gzip/buildout.cfg
../../component/stunnel/buildout.cfg
../../component/stunnel/buildout.cfg
../../component/mydumper/buildout.cfg
../../component/mydumper/buildout.cfg
../../component/mysql-python/buildout.cfg
../../component/mysql-python/buildout.cfg
../../component/dropbear/buildout.cfg
versions = versions
versions = versions
[mariadb]
# Compile dir is for plugins, there's no plugin in LAMP
keep-compile-dir = false
[instance-recipe]
[instance-recipe]
egg = slapos.cookbook
egg = slapos.cookbook
module = lamp.request
module = lamp.request
...
@@ -55,42 +76,56 @@ strip-top-level-dir = true
...
@@ -55,42 +76,56 @@ strip-top-level-dir = true
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
url = ${:_profile_base_location_}/instance.cfg
output = ${buildout:directory}/template.cfg
output = ${buildout:directory}/template.cfg
md5sum =
5cc5d92298e8b36067c9b7721561b81f
md5sum =
f4e4cf75225685e1787c0bc6d1c16910
mode = 0644
mode = 0644
[template-apache-php]
[template-apache-php]
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-apache-php.cfg
url = ${:_profile_base_location_}/instance-apache-php.cfg
output = ${buildout:directory}/template-apache-php.cfg
output = ${buildout:directory}/template-apache-php.cfg
md5sum =
b7a9c86166c49443ecc4db276ef09dec
md5sum =
c6142b3d1606d2c98fedefb81f5a5638
mode = 0644
mode = 0644
[template-backuped]
[template-backuped]
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-backuped.cfg
url = ${:_profile_base_location_}/instance-backuped.cfg
output = ${buildout:directory}/template-backuped.cfg
output = ${buildout:directory}/template-backuped.cfg
md5sum =
e5cdaa121a6d66d119278e4cf90e7bb0
md5sum =
4190baa5e3f87a02e8721aeac3b70942
mode = 0644
mode = 0644
[template-mariadb]
[template-mariadb]
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-mariadb.cfg
url = ${:_profile_base_location_}/instance-mariadb.cfg
output = ${buildout:directory}/template-mariadb.cfg
output = ${buildout:directory}/template-mariadb.cfg
md5sum = 52237e8921b070d0de3bb2f6716d40c7
md5sum = d0670508b0c38879a2c7965ad5b2ab57
mode = 0644
[template-mariadb-pbsready]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-mariadb-pbsready.cfg
output = ${buildout:directory}/template-mariadb-pbsready.cfg
md5sum = cfc87bb3bb1d4aa4ffd11e4b6dfcabe7
mode = 0644
[template-mariadb-pbsready-import]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-mariadb-pbsready-import.cfg
output = ${buildout:directory}/template-mariadb-pbsready-import.cfg
md5sum = 483796d0e0ebdc86fb6fe6589bb8ed7e
mode = 0644
mode = 0644
[template-mariadb-
remote-backuped
]
[template-mariadb-
pbsready-export
]
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-mariadb-
remote-backuped
.cfg
url = ${:_profile_base_location_}/instance-mariadb-
pbsready-export
.cfg
output = ${buildout:directory}/template-mariadb-
remote-backuped
.cfg
output = ${buildout:directory}/template-mariadb-
pbsready-export
.cfg
md5sum =
222bb187b5628536a20a809f3faf31f8
md5sum =
112f259b613eefa94f8cc83a0e2aa9f3
mode = 0644
mode = 0644
[template-
mariadb-pseudo-replicating
]
[template-
pull-backup
]
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-
mariadb-pseudo-replicating
.cfg
url = ${:_profile_base_location_}/instance-
pull-backup
.cfg
output = ${buildout:directory}/template-
mariadb-pseudo-replicating
.cfg
output = ${buildout:directory}/template-
pull-backup
.cfg
md5sum =
e9f1d5f6dd5f7995d0be06863d196de9
md5sum =
46bd46a0b46f39937ab3d604eeb20441
mode = 0644
mode = 0644
[eggs]
[eggs]
...
@@ -99,5 +134,15 @@ eggs =
...
@@ -99,5 +134,15 @@ eggs =
${lxml-python:egg}
${lxml-python:egg}
[versions]
[versions]
s
lapos.cookbook =
s
etuptools = 0.6c12dev-r88795
zc.buildout = 1.6.0-dev-SlapOS-002
zc.buildout = 1.6.0-dev-SlapOS-002
slapos.core =
slapos.cookbook =
collective.recipe.template = 1.8
hexagonit.recipe.cmmi = 1.5.0
hexagonit.recipe.download = 1.5.0
plone.recipe.command = 1.1
netaddr = 0.7.5
xml-marshaller = 0.9.7
stack/lamp/instance-apache-php.cfg
View file @
1505c512
...
@@ -145,13 +145,13 @@ dcrond-binary = ${dcron:location}/sbin/crond
...
@@ -145,13 +145,13 @@ dcrond-binary = ${dcron:location}/sbin/crond
cron-entries = $${directory:cron-entries}
cron-entries = $${directory:cron-entries}
crontabs = $${directory:crontabs}
crontabs = $${directory:crontabs}
cronstamps = $${directory:cronstamps}
cronstamps = $${directory:cronstamps}
catcher = $${cron-simplelogger:
binary
}
catcher = $${cron-simplelogger:
wrapper
}
binary = $${basedirectory:services}/crond
binary = $${basedirectory:services}/crond
[cron-simplelogger]
[cron-simplelogger]
recipe = slapos.cookbook:simplelogger
recipe = slapos.cookbook:simplelogger
binary
= $${rootdirectory:bin}/cron_simplelogger
wrapper
= $${rootdirectory:bin}/cron_simplelogger
output = $${directory:cronoutput}
log = $${basedirectory:log}/crond.log
[cron-entry-logrotate]
[cron-entry-logrotate]
<= cron
<= cron
...
@@ -189,4 +189,3 @@ stunnel-conf = $${rootdirectory:etc}/stunnel/
...
@@ -189,4 +189,3 @@ stunnel-conf = $${rootdirectory:etc}/stunnel/
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/
cronoutput = $${basedirectory:log}/cron-ouput/
stack/lamp/instance-backuped.cfg
View file @
1505c512
...
@@ -6,6 +6,9 @@ extends =
...
@@ -6,6 +6,9 @@ extends =
parts =
parts =
request-mariadb
request-mariadb
request-mariadb-pseudo-replicating
request-mariadb-pseudo-replicating
request-pull-backup-server
request-pull-backup-server-mariadb
request-pull-backup-server-mariadb-backup
url
url
apache-php
apache-php
stunnel
stunnel
...
@@ -17,16 +20,51 @@ parts =
...
@@ -17,16 +20,51 @@ parts =
cron
cron
cron-entry-logrotate
cron-entry-logrotate
[request-pull-backup-server]
<= slap-connection
recipe = slapos.cookbook:request
name = PBS (Pull Backup Server)
software-url = $${slap-connection:software-release-url}
software-type = pull-backup
return = ssh-key
slave = false
[request-mariadb]
[request-mariadb]
software-type = mariadb-remote-backuped
software-type = mariadb-pbsready-export
config = backup-url
config = authorized-key
config-backup-url = $${slap-parameter:backup-url}
config-authorized-key = $${request-pull-backup-server:connection-ssh-key}
return = url ssh-public-key ssh-url
[request-mariadb-pseudo-replicating]
[request-mariadb-pseudo-replicating]
<= slap-connection
<= slap-connection
recipe = slapos.cookbook:request
recipe = slapos.cookbook:request
name = MariaDB (
pseudo-replicate
)
name = MariaDB (
backup
)
software-url = $${slap-connection:software-release-url}
software-url = $${slap-connection:software-release-url}
software-type = mariadb-pseudo-replicating
software-type = mariadb-pbsready-import
config = backup-url
return = url ssh-public-key ssh-url
config-backup-url = $${slap-parameter:backup-url}
config = authorized-key
config-authorized-key = $${request-pull-backup-server:connection-ssh-key}
[request-pull-backup-server-mariadb]
<= request-pull-backup-server
slap-connection
name = PBS pulling from MariaDB (backuped)
config = url name type server-key frequency
config-url = $${request-mariadb:connection-ssh-url}
config-name = $${slap-connection:computer-id}-$${slap-connection:partition-id}-mariadb
config-type = pull
config-server-key = $${request-mariadb:connection-ssh-public-key}
config-frequency = 15 0 * * *
slave = true
[request-pull-backup-server-mariadb-backup]
<= request-pull-backup-server
slap-connection
name = PBS pushing on MariaDB (ready to use backup)
config = url name type server-key frequency
config-url = $${request-mariadb-pseudo-replicating:connection-ssh-url}
config-name = $${slap-connection:computer-id}-$${slap-connection:partition-id}-mariadb
config-type = push
config-server-key = $${request-mariadb-pseudo-replicating:connection-ssh-public-key}
config-frequency = 45 0 * * *
slave = true
stack/lamp/instance-mariadb-
remote-backuped
.cfg
→
stack/lamp/instance-mariadb-
pbsready-export
.cfg
View file @
1505c512
[buildout]
[buildout]
extends =
extends = ${template-mariadb-pbsready:output}
${template-mariadb:output}
parts =
parts += cron-entry-mariadb-backup
url
mariadb
duplicity
stunnel
certificate-authority
ca-stunnel
logrotate
logrotate-entry-mariadb
logrotate-entry-stunnel
cron
cron-entry-logrotate
cron-entry-mariadb-backup
cron-entry-duplicity
[mydumper]
[mydumper]
recipe = slapos.cookbook:mydumper
recipe = slapos.cookbook:mydumper
...
@@ -33,39 +19,9 @@ lock-file = $${basedirectory:run}/mysql-backup.lock
...
@@ -33,39 +19,9 @@ lock-file = $${basedirectory:run}/mysql-backup.lock
binary = $${mydumper:wrapper}
binary = $${mydumper:wrapper}
wrapper = $${rootdirectory:bin}/mydumper
wrapper = $${rootdirectory:bin}/mydumper
[duplicity]
recipe = slapos.cookbook:duplicity
remote-backup = $${slap-parameter:backup-url}
local-directory = $${mydumper:backup-directory}
duplicity-binary = ${buildout:bin-directory}/duplicity
wrapper = $${rootdirectory:bin}/raw_duplicity
recover = false
cache = $${directory:duplicity-cache}
[duplicity-locked]
recipe = slapos.cookbook:lockfile
lock-file = $${mydumper-locked:lock-file}
binary = $${duplicity:wrapper}
wrapper = $${rootdirectory:bin}/duplicity
wait = true
[cron-entry-duplicity]
<= cron
recipe = slapos.cookbook:cron.d
name = remote_backup
frequency = 30 * * * *
command = $${duplicity-locked:wrapper}
[cron-entry-mariadb-backup]
[cron-entry-mariadb-backup]
<= cron
<= cron
recipe = slapos.cookbook:cron.d
recipe = slapos.cookbook:cron.d
name = backup
name = backup
frequency = 0 * * * *
frequency = 0 * * * *
command = $${mydumper-locked:wrapper}
command = $${mydumper-locked:wrapper}
[basedirectory]
cache = $${rootdirectory:var}/cache/
[directory]
mariadb-backup = $${basedirectory:backup}/mariadb/
duplicity-cache = $${basedirectory:cache}/duplicity/
stack/lamp/instance-mariadb-p
seudo-replicating
.cfg
→
stack/lamp/instance-mariadb-p
bsready-import
.cfg
View file @
1505c512
[buildout]
[buildout]
extends = ${template-mariadb-pbsready:output}
parts =
parts =
url
url
s
mariadb
mariadb
duplicity-recover
mydumper-import
stunnel
stunnel
certificate-authority
certificate-authority
ca-stunnel
ca-stunnel
logrotate
logrotate
logrotate-entry-mariadb
logrotate-entry-mariadb
logrotate-entry-stunnel
logrotate-entry-stunnel
logrotate-entry-cron
cron
cron
cron-entry-logrotate
cron-entry-logrotate
cron-entry-duplicity-recover
sshkeys-authority
dropbear-server
sshkeys-dropbear
dropbear-server-pbs-authorized-key
cron-entry-mariadb-import
cron-entry-mariadb-import
extends = ${template-mariadb:output}
[duplicity-recover]
recipe = slapos.cookbook:duplicity
remote-backup = $${slap-parameter:backup-url}
local-directory = $${directory:duplicity-recover}
duplicity-binary = ${buildout:bin-directory}/duplicity
wrapper = $${rootdirectory:bin}/raw_duplicity
cache = $${directory:duplicity-cache}
recover = true
[duplicity-recover-locked]
recipe = slapos.cookbook:lockfile
lock-file = $${mydumper-import-locked:lock-file}
wrapper = $${rootdirectory:bin}/duplicity
binary = $${duplicity-recover:wrapper}
wait = true
[mydumper-import]
[mydumper-import]
recipe = slapos.cookbook:mydumper
recipe = slapos.cookbook:mydumper
wrapper = $${rootdirectory:bin}/raw_myloader
wrapper = $${rootdirectory:bin}/raw_myloader
backup-directory = $${directory:
duplicity-recover
}
backup-directory = $${directory:
mariadb-backup
}
socket = $${mariadb:socket}
socket = $${mariadb:socket}
user = root
user = root
myloader-binary = ${mydumper:location}/bin/myloader
myloader-binary = ${mydumper:location}/bin/myloader
...
@@ -50,23 +37,9 @@ wrapper = $${rootdirectory:bin}/myloader
...
@@ -50,23 +37,9 @@ wrapper = $${rootdirectory:bin}/myloader
binary = $${mydumper-import:wrapper}
binary = $${mydumper-import:wrapper}
wait = true
wait = true
[cron-entry-duplicity-recover]
<= cron
recipe = slapos.cookbook:cron.d
name = duplicity_recover
frequency = 30 * * * *
command = $${duplicity-recover-locked:wrapper}
[cron-entry-mariadb-import]
[cron-entry-mariadb-import]
<= cron
<= cron
recipe = slapos.cookbook:cron.d
recipe = slapos.cookbook:cron.d
name = mariadb_import
name = mariadb_import
frequency = 0 * * * *
frequency = 0 * * * *
command = $${mydumper-import-locked:wrapper}
command = $${mydumper-import-locked:wrapper}
[basedirectory]
cache = $${rootdirectory:var}/cache/
[directory]
duplicity-recover = $${rootdirectory:srv}/recovering
duplicity-cache = $${basedirectory:cache}/duplicity
stack/lamp/instance-mariadb-pbsready.cfg
0 → 100644
View file @
1505c512
[buildout]
extends = ${template-mariadb:output}
parts =
urls
mariadb
stunnel
certificate-authority
ca-stunnel
logrotate
logrotate-entry-mariadb
logrotate-entry-stunnel
logrotate-entry-cron
cron
cron-entry-logrotate
sshkeys-authority
dropbear-server
sshkeys-dropbear
dropbear-server-pbs-authorized-key
[urls]
ssh-public-key = $${sshkeys-dropbear:public-key-value}
ssh-url = ssh://nobody@[$${dropbear-server:host}]:$${dropbear-server:port}/$${rdiff-backup-server:path}
[sshkeys-directory]
recipe = slapos.cookbook:mkdirectory
requests = $${directory:sshkeys}/requests/
keys = $${directory:sshkeys}/keys/
[sshkeys-authority]
recipe = slapos.cookbook:sshkeys_authority
request-directory = $${sshkeys-directory:requests}
keys-directory = $${sshkeys-directory:keys}
wrapper = $${basedirectory:services}/sshkeys_authority
keygen-binary = ${dropbear:location}/bin/dropbearkey
[sshkeys-dropbear]
<= sshkeys-authority
recipe = slapos.cookbook:sshkeys_authority.request
name = dropbear
type = rsa
executable = $${dropbear-server:wrapper}
public-key = $${dropbear-server:rsa-keyfile}.pub
private-key = $${dropbear-server:rsa-keyfile}
wrapper = $${basedirectory:services}/sshd
[dropbear-server]
recipe = slapos.cookbook:dropbear
host = $${slap-network-information:global-ipv6}
port = 2222
home = $${directory:ssh}
wrapper = $${rootdirectory:bin}/raw_sshd
shell = $${rdiff-backup-server:wrapper}
rsa-keyfile = $${directory:ssh}/server_key.rsa
dropbear-binary = ${dropbear:location}/sbin/dropbear
[dropbear-server-pbs-authorized-key]
<= dropbear-server
recipe = slapos.cookbook:dropbear.add_authorized_key
key = $${slap-parameter:authorized-key}
[rdiff-backup-server]
recipe = slapos.cookbook:rdiffbackup
client = false
path = $${directory:mariadb-backup}
wrapper = $${rootdirectory:bin}/rdiffbackup-server
rdiffbackup-binary = ${buildout:bin-directory}/rdiff-backup
[basedirectory]
cache = $${rootdirectory:var}/cache/
[directory]
mariadb-backup = $${basedirectory:backup}/mariadb/
ssh = $${rootdirectory:etc}/ssh/
sshkeys = $${rootdirectory:srv}/sshkeys
stack/lamp/instance-mariadb.cfg
View file @
1505c512
[buildout]
[buildout]
parts =
parts =
url
url
s
mariadb
mariadb
stunnel
stunnel
certificate-authority
certificate-authority
...
@@ -8,6 +8,7 @@ parts =
...
@@ -8,6 +8,7 @@ parts =
logrotate
logrotate
logrotate-entry-mariadb
logrotate-entry-mariadb
logrotate-entry-stunnel
logrotate-entry-stunnel
logrotate-entry-cron
cron
cron
cron-entry-logrotate
cron-entry-logrotate
...
@@ -17,14 +18,9 @@ eggs-directory = ${buildout:eggs-directory}
...
@@ -17,14 +18,9 @@ eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
offline = true
[url]
[urls]
recipe = slapos.cookbook:publishurl
recipe = slapos.cookbook:publish
scheme = mysqls
url = mysqls://$${mariadb:user}:$${mariadb:password}@[$${stunnel:remote-host}]:$${stunnel:remote-port}/$${mariadb:database}
username = $${mariadb:user}
password = $${mariadb:password}
host = $${stunnel:remote-host}
port = $${stunnel:remote-port}
path = $${mariadb:database}
[mariadb]
[mariadb]
recipe = slapos.cookbook:mysql
recipe = slapos.cookbook:mysql
...
@@ -131,19 +127,29 @@ rotate-num = 30
...
@@ -131,19 +127,29 @@ rotate-num = 30
notifempty = true
notifempty = true
create = true
create = true
[logrotate-entry-cron]
<= logrotate
recipe =slapos.cookbook:logrotate.d
name = crond
log = $${cron-simplelogger:log}
frequency = daily
rotate-num = 30
notifempty = true
create = true
[cron]
[cron]
recipe = slapos.cookbook:cron
recipe = slapos.cookbook:cron
dcrond-binary = ${dcron:location}/sbin/crond
dcrond-binary = ${dcron:location}/sbin/crond
cron-entries = $${directory:cron-entries}
cron-entries = $${directory:cron-entries}
crontabs = $${directory:crontabs}
crontabs = $${directory:crontabs}
cronstamps = $${directory:cronstamps}
cronstamps = $${directory:cronstamps}
catcher = $${cron-simplelogger:
binary
}
catcher = $${cron-simplelogger:
wrapper
}
binary = $${basedirectory:services}/crond
binary = $${basedirectory:services}/crond
[cron-simplelogger]
[cron-simplelogger]
recipe = slapos.cookbook:simplelogger
recipe = slapos.cookbook:simplelogger
binary
= $${rootdirectory:bin}/cron_simplelogger
wrapper
= $${rootdirectory:bin}/cron_simplelogger
output = $${directory:cronoutput}
log = $${basedirectory:log}/crond.log
[cron-entry-logrotate]
[cron-entry-logrotate]
<= cron
<= cron
...
@@ -172,7 +178,6 @@ recipe = slapos.cookbook:mkdirectory
...
@@ -172,7 +178,6 @@ recipe = slapos.cookbook:mkdirectory
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/
cronoutput = $${basedirectory:log}/cron/
ca-dir = $${rootdirectory:srv}/ssl/
ca-dir = $${rootdirectory:srv}/ssl/
mariadb-data = $${rootdirectory:srv}/mariadb/
mariadb-data = $${rootdirectory:srv}/mariadb/
logrotate-backup = $${basedirectory:backup}/logrotate/
logrotate-backup = $${basedirectory:backup}/logrotate/
...
...
stack/lamp/instance-pull-backup.cfg
0 → 100644
View file @
1505c512
[buildout]
parts =
connection-dict
rdiff-backup
cron
cron-entry-logrotate
logrotate
sshkeys-authority
sshkeys-dropbear
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[connection-dict]
recipe = slapos.cookbook:publish
ssh-key = $${sshkeys-dropbear:public-key-value}
[dropbear-client]
recipe = slapos.cookbook:dropbear.client
dbclient-binary = ${dropbear:location}/bin/dbclient
wrapper = $${rootdirectory:bin}/ssh
home = $${basedirectory:ssh-home}
identity-file = $${basedirectory:ssh-home}/id_rsa
[sshkeys-directory]
recipe = slapos.cookbook:mkdirectory
requests = $${directory:sshkeys}/requests/
keys = $${directory:sshkeys}/keys/
[sshkeys-authority]
recipe = slapos.cookbook:sshkeys_authority
request-directory = $${sshkeys-directory:requests}
keys-directory = $${sshkeys-directory:keys}
keygen-binary = ${dropbear:location}/bin/dropbearkey
wrapper = $${basedirectory:services}/sshkeys_authority
[sshkeys-dropbear]
<= sshkeys-authority
recipe = slapos.cookbook:sshkeys_authority.request
name = rdiff-backup
type = rsa
executable = $${dropbear-client:wrapper}
public-key = $${dropbear-client:identity-file}.pub
private-key = $${dropbear-client:identity-file}
wrapper = $${rootdirectory:bin}/do_backup
[rdiff-backup]
recipe = slapos.cookbook:rdiffbackup
client = true
rdiffbackup-binary = ${buildout:bin-directory}/rdiff-backup
sshclient-binary = $${dropbear-client:wrapper}
known-hosts = $${directory:dot-ssh}/known_hosts
promises-directory = $${basedirectory:promises}
directory = $${directory:backups}
cron-entries = $${cron:cron-entries}
wrappers-directory = $${directory:pbs-wrappers}
[cron-simplelogger]
recipe = slapos.cookbook:simplelogger
wrapper = $${rootdirectory:bin}/cron_simplelogger
log = $${basedirectory:log}/crond.log
[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-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}/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
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc/
var = $${buildout:directory}/var/
srv = $${buildout:directory}/srv/
bin = $${buildout:directory}/bin/
tmp = $${buildout:directory}/tmp/
[basedirectory]
recipe = slapos.cookbook:mkdirectory
log = $${rootdirectory:var}/log/
services = $${rootdirectory:etc}/run/
run = $${rootdirectory:var}/run/
backup = $${rootdirectory:srv}/backup/
promises = $${rootdirectory:etc}/promise/
[directory]
recipe = slapos.cookbook:mkdirectory
cronstamps = $${rootdirectory:etc}/cronstamps/
cron-entries = $${rootdirectory:etc}/cron.d/
crontabs = $${rootdirectory:etc}/crontabs/
cronoutput = $${basedirectory:log}/cron-ouput/
rdiff-backup-backup = $${basedirectory:backup}/rdiff-backup/
logrotate-entries = $${rootdirectory:etc}/logrotate.d/
logrotate-backup = $${basedirectory:backup}/logrotate/
rdiff-backup = $${rootdirectory:etc}/rdiff-backup/
sshkeys = $${rootdirectory:srv}/sshkeys
backups = $${basedirectory:backup}/backups/
pbs-wrappers = $${rootdirectory:bin}/rdiff-backup/
dot-ssh = $${basedirectory:ssh-home}/.ssh/
[basedirectory]
ssh-home = $${rootdirectory:home}/ssh
[rootdirectory]
home = $${buildout:directory}/home/
stack/lamp/instance.cfg
View file @
1505c512
...
@@ -11,5 +11,6 @@ recipe = slapos.cookbook:softwaretype
...
@@ -11,5 +11,6 @@ recipe = slapos.cookbook:softwaretype
default = ${template-apache-php:output}
default = ${template-apache-php:output}
backuped = ${template-backuped:output}
backuped = ${template-backuped:output}
mariadb = ${template-mariadb:output}
mariadb = ${template-mariadb:output}
mariadb-remote-backuped = ${template-mariadb-remote-backuped:output}
mariadb-pbsready-import = ${template-mariadb-pbsready-import:output}
mariadb-pseudo-replicating = ${template-mariadb-pseudo-replicating:output}
mariadb-pbsready-export = ${template-mariadb-pbsready-export:output}
pull-backup = ${template-pull-backup:output}
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