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
Lisa Casino
slapos
Commits
1daa1179
Commit
1daa1179
authored
Nov 15, 2012
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rearrange sections, minimize diffs, comments
parent
728d2e39
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
728 additions
and
509 deletions
+728
-509
stack/lamp/apache/instance-apache-backup.cfg.in
stack/lamp/apache/instance-apache-backup.cfg.in
+118
-77
stack/lamp/apache/instance-apache-import.cfg
stack/lamp/apache/instance-apache-import.cfg
+106
-74
stack/lamp/apache/instance-apache-php.cfg.in
stack/lamp/apache/instance-apache-php.cfg.in
+119
-80
stack/lamp/buildout.cfg
stack/lamp/buildout.cfg
+3
-3
stack/lamp/mariadb/instance-mariadb.cfg.in
stack/lamp/mariadb/instance-mariadb.cfg.in
+168
-127
stack/resilient/buildout.cfg
stack/resilient/buildout.cfg
+2
-2
stack/resilient/instance-pull-backup.cfg.in
stack/resilient/instance-pull-backup.cfg.in
+129
-90
stack/resilient/pbsready.cfg.in
stack/resilient/pbsready.cfg.in
+83
-56
No files found.
stack/lamp/apache/instance-apache-backup.cfg.in
View file @
1daa1179
...
@@ -16,32 +16,92 @@ eggs-directory = ${buildout:eggs-directory}
...
@@ -16,32 +16,92 @@ eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
offline = true
[urls]
recipe = slapos.cookbook:publish
url = http://[$${apache-proxy:ip}]:$${apache-proxy:port}/
ssh-public-key = $${sshkeys-dropbear:public-key-value}
ssh-url = ssh://nobody@[$${dropbear-server:host}]:$${dropbear-server:port}/$${rdiff-backup-server:path}
[apache-proxy]
#----------------
recipe = slapos.cookbook:apacheproxy
#--
url = $${slap-parameter:proxy-url}
#-- Creation of all needed directories.
pid-file = $${basedirectory:run}/apache.pid
lock-file = $${basedirectory:run}/apache.lock
ip = $${slap-network-information:global-ipv6}
port = 8080
error-log = $${directory:httpd-log}/error.log
access-log = $${directory:httpd-log}/access.log
httpd-conf = $${rootdirectory:etc}/apache.conf
wrapper = $${basedirectory:services}/apache
promise = $${basedirectory:promises}/apache
[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
httpd-binary = ${apache:location}/bin/httpd
[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
htdocs = $${rootdirectory:srv}/www
logrotate-entries = $${rootdirectory:etc}/logrotate.d
logrotate-backup = $${basedirectory:backup}/logrotate
cronstamps = $${rootdirectory:etc}/cronstamps
cron-entries = $${rootdirectory:etc}/cron.d
crontabs = $${rootdirectory:etc}/crontabs
ssh = $${rootdirectory:etc}/ssh
sshkeys = $${rootdirectory:srv}/sshkeys
httpd-log = $${basedirectory:log}/apache
#----------------
#--
#-- 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
#----------------
#--
#-- sshkeys
[sshkeys-directory]
[sshkeys-directory]
recipe = slapos.cookbook:mkdirectory
recipe = slapos.cookbook:mkdirectory
requests = $${directory:sshkeys}/requests
/
requests = $${directory:sshkeys}/requests
keys = $${directory:sshkeys}/keys
/
keys = $${directory:sshkeys}/keys
[sshkeys-authority]
[sshkeys-authority]
recipe = slapos.cookbook:sshkeys_authority
recipe = slapos.cookbook:sshkeys_authority
...
@@ -60,6 +120,11 @@ public-key = $${dropbear-server:rsa-keyfile}.pub
...
@@ -60,6 +120,11 @@ public-key = $${dropbear-server:rsa-keyfile}.pub
private-key = $${dropbear-server:rsa-keyfile}
private-key = $${dropbear-server:rsa-keyfile}
wrapper = $${basedirectory:services}/sshd
wrapper = $${basedirectory:services}/sshd
#----------------
#--
#-- Dropbear.
[dropbear-server]
[dropbear-server]
recipe = slapos.cookbook:dropbear
recipe = slapos.cookbook:dropbear
host = $${slap-network-information:global-ipv6}
host = $${slap-network-information:global-ipv6}
...
@@ -75,6 +140,11 @@ dropbear-binary = ${dropbear:location}/sbin/dropbear
...
@@ -75,6 +140,11 @@ dropbear-binary = ${dropbear:location}/sbin/dropbear
recipe = slapos.cookbook:dropbear.add_authorized_key
recipe = slapos.cookbook:dropbear.add_authorized_key
key = $${slap-parameter:authorized-key}
key = $${slap-parameter:authorized-key}
#----------------
#--
#-- rdiff
[rdiff-backup-server]
[rdiff-backup-server]
recipe = slapos.cookbook:pbs
recipe = slapos.cookbook:pbs
client = false
client = false
...
@@ -82,18 +152,26 @@ path = $${directory:htdocs}
...
@@ -82,18 +152,26 @@ path = $${directory:htdocs}
wrapper = $${rootdirectory:bin}/rdiffbackup-server
wrapper = $${rootdirectory:bin}/rdiffbackup-server
rdiffbackup-binary = ${buildout:bin-directory}/rdiff-backup
rdiffbackup-binary = ${buildout:bin-directory}/rdiff-backup
[logrotate]
recipe = slapos.cookbook:logrotate
#----------------
# Binaries
#--
logrotate-binary = ${logrotate:location}/usr/sbin/logrotate
#-- Apache Proxy.
gzip-binary = ${gzip:location}/bin/gzip
gunzip-binary = ${gzip:location}/bin/gunzip
[apache-proxy]
# Directories
recipe = slapos.cookbook:apacheproxy
wrapper = $${rootdirectory:bin}/logrotate
url = $${slap-parameter:proxy-url}
conf = $${rootdirectory:etc}/logrotate.conf
pid-file = $${basedirectory:run}/apache.pid
logrotate-entries = $${directory:logrotate-entries}
lock-file = $${basedirectory:run}/apache.lock
backup = $${directory:logrotate-backup}
ip = $${slap-network-information:global-ipv6}
state-file = $${rootdirectory:srv}/logrotate.status
port = 8080
error-log = $${directory:httpd-log}/error.log
access-log = $${directory:httpd-log}/access.log
httpd-conf = $${rootdirectory:etc}/apache.conf
wrapper = $${basedirectory:services}/apache
promise = $${basedirectory:promises}/apache
httpd-binary = ${apache:location}/bin/httpd
[logrotate-entry-apache]
[logrotate-entry-apache]
<= logrotate
<= logrotate
...
@@ -106,51 +184,14 @@ sharedscripts = true
...
@@ -106,51 +184,14 @@ sharedscripts = true
notifempty = true
notifempty = true
create = true
create = true
[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-entry-logrotate]
<= cron
recipe = slapos.cookbook:cron.d
name = logrotate
frequency = 0 0 * * *
command = $${logrotate:wrapper}
[rootdirectory]
#----------------
recipe = slapos.cookbook:mkdirectory
#--
etc = $${buildout:directory}/etc/
#-- Publish instance parameters.
var = $${buildout:directory}/var/
srv = $${buildout:directory}/srv/
bin = $${buildout:directory}/bin/
tmp = $${buildout:directory}/tmp/
[basedirectory]
[urls]
recipe = slapos.cookbook:mkdirectory
recipe = slapos.cookbook:publish
log = $${rootdirectory:var}/log/
url = http://[$${apache-proxy:ip}]:$${apache-proxy:port}/
services = $${rootdirectory:etc}/run/
ssh-public-key = $${sshkeys-dropbear:public-key-value}
run = $${rootdirectory:var}/run/
ssh-url = ssh://nobody@[$${dropbear-server:host}]:$${dropbear-server:port}/$${rdiff-backup-server:path}
backup = $${rootdirectory:srv}/backup/
promises = $${rootdirectory:etc}/promise/
[directory]
recipe = slapos.cookbook:mkdirectory
htdocs = $${rootdirectory:srv}/www/
logrotate-entries = $${rootdirectory:etc}/logrotate.d/
logrotate-backup = $${basedirectory:backup}/logrotate/
cronstamps = $${rootdirectory:etc}/cronstamps/
cron-entries = $${rootdirectory:etc}/cron.d/
crontabs = $${rootdirectory:etc}/crontabs/
ssh = $${rootdirectory:etc}/ssh/
sshkeys = $${rootdirectory:srv}/sshkeys
httpd-log = $${basedirectory:log}/apache/
stack/lamp/apache/instance-apache-import.cfg
View file @
1daa1179
...
@@ -13,6 +13,7 @@ parts =
...
@@ -13,6 +13,7 @@ parts =
dropbear-server
dropbear-server
dropbear-server-pbs-authorized-key
dropbear-server-pbs-authorized-key
[apache-proxy]
[apache-proxy]
recipe = slapos.cookbook:apacheproxy
recipe = slapos.cookbook:apacheproxy
url = $${slap-parameter:proxy-url}
url = $${slap-parameter:proxy-url}
...
@@ -29,10 +30,103 @@ promise = $${basedirectory:promises}/apache
...
@@ -29,10 +30,103 @@ promise = $${basedirectory:promises}/apache
httpd-binary = ${apache:location}/bin/httpd
httpd-binary = ${apache:location}/bin/httpd
#----------------
#--
#-- Creation of all needed directories.
[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
htdocs = $${rootdirectory:srv}/www
logrotate-entries = $${rootdirectory:etc}/logrotate.d
logrotate-backup = $${basedirectory:backup}/logrotate
cronstamps = $${rootdirectory:etc}/cronstamps
cron-entries = $${rootdirectory:etc}/cron.d
crontabs = $${rootdirectory:etc}/crontabs
ssh = $${rootdirectory:etc}/ssh
sshkeys = $${rootdirectory:srv}/sshkeys
httpd-log = $${basedirectory:log}/apache
#----------------
#--
#-- 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-apache]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name = apache
log = $${apache-proxy:error-log} $${apache-proxy:access-log}
frequency = daily
rotate-num = 30
sharedscripts = true
notifempty = true
create = true
#----------------
#--
#-- sshkeys
[sshkeys-directory]
[sshkeys-directory]
recipe = slapos.cookbook:mkdirectory
recipe = slapos.cookbook:mkdirectory
requests = $${directory:sshkeys}/requests
/
requests = $${directory:sshkeys}/requests
keys = $${directory:sshkeys}/keys
/
keys = $${directory:sshkeys}/keys
[sshkeys-authority]
[sshkeys-authority]
recipe = slapos.cookbook:sshkeys_authority
recipe = slapos.cookbook:sshkeys_authority
...
@@ -51,6 +145,11 @@ public-key = $${dropbear-server:rsa-keyfile}.pub
...
@@ -51,6 +145,11 @@ public-key = $${dropbear-server:rsa-keyfile}.pub
private-key = $${dropbear-server:rsa-keyfile}
private-key = $${dropbear-server:rsa-keyfile}
wrapper = $${basedirectory:services}/sshd
wrapper = $${basedirectory:services}/sshd
#----------------
#--
#-- Dropbear.
[dropbear-server]
[dropbear-server]
recipe = slapos.cookbook:dropbear
recipe = slapos.cookbook:dropbear
host = $${slap-network-information:global-ipv6}
host = $${slap-network-information:global-ipv6}
...
@@ -66,6 +165,11 @@ dropbear-binary = ${dropbear:location}/sbin/dropbear
...
@@ -66,6 +165,11 @@ dropbear-binary = ${dropbear:location}/sbin/dropbear
recipe = slapos.cookbook:dropbear.add_authorized_key
recipe = slapos.cookbook:dropbear.add_authorized_key
key = $${slap-parameter:authorized-key}
key = $${slap-parameter:authorized-key}
#----------------
#--
#-- rdiff
[rdiff-backup-server]
[rdiff-backup-server]
recipe = slapos.cookbook:pbs
recipe = slapos.cookbook:pbs
client = false
client = false
...
@@ -73,75 +177,3 @@ path = $${directory:htdocs}
...
@@ -73,75 +177,3 @@ path = $${directory:htdocs}
wrapper = $${rootdirectory:bin}/rdiffbackup-server
wrapper = $${rootdirectory:bin}/rdiffbackup-server
rdiffbackup-binary = ${buildout:bin-directory}/rdiff-backup
rdiffbackup-binary = ${buildout:bin-directory}/rdiff-backup
[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-apache]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name = apache
log = $${apache-proxy:error-log} $${apache-proxy:access-log}
frequency = daily
rotate-num = 30
sharedscripts = true
notifempty = true
create = true
[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-entry-logrotate]
<= cron
recipe = slapos.cookbook:cron.d
name = logrotate
frequency = 0 0 * * *
command = $${logrotate:wrapper}
[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
htdocs = $${rootdirectory:srv}/www/
logrotate-entries = $${rootdirectory:etc}/logrotate.d/
logrotate-backup = $${basedirectory:backup}/logrotate/
cronstamps = $${rootdirectory:etc}/cronstamps/
cron-entries = $${rootdirectory:etc}/cron.d/
crontabs = $${rootdirectory:etc}/crontabs/
ssh = $${rootdirectory:etc}/ssh/
sshkeys = $${rootdirectory:srv}/sshkeys
httpd-log = $${basedirectory:log}/apache/
stack/lamp/apache/instance-apache-php.cfg.in
View file @
1daa1179
...
@@ -20,46 +20,96 @@ develop-eggs-directory = ${buildout:develop-eggs-directory}
...
@@ -20,46 +20,96 @@ develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
offline = true
# Creation of all needed directories
#----------------
#--
#-- Creation of all needed directories.
[rootdirectory]
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc
/
etc = $${buildout:directory}/etc
var = $${buildout:directory}/var
/
var = $${buildout:directory}/var
srv = $${buildout:directory}/srv
/
srv = $${buildout:directory}/srv
bin = $${buildout:directory}/bin
/
bin = $${buildout:directory}/bin
tmp = $${buildout:directory}/tmp
/
tmp = $${buildout:directory}/tmp
[basedirectory]
[basedirectory]
recipe = slapos.cookbook:mkdirectory
recipe = slapos.cookbook:mkdirectory
log = $${rootdirectory:var}/log
/
log = $${rootdirectory:var}/log
services = $${rootdirectory:etc}/run
/
services = $${rootdirectory:etc}/run
run = $${rootdirectory:var}/run
/
run = $${rootdirectory:var}/run
backup = $${rootdirectory:srv}/backup
/
backup = $${rootdirectory:srv}/backup
promises = $${rootdirectory:etc}/promise
/
promises = $${rootdirectory:etc}/promise
[directory]
[directory]
recipe = slapos.cookbook:mkdirectory
recipe = slapos.cookbook:mkdirectory
ca-dir = $${rootdirectory:srv}/ssl
/
ca-dir = $${rootdirectory:srv}/ssl
httpd-log = $${basedirectory:log}/apache
/
httpd-log = $${basedirectory:log}/apache
php-ini-dir = $${rootdirectory:etc}/php
/
php-ini-dir = $${rootdirectory:etc}/php
tmp-php = $${rootdirectory:tmp}/php
/
tmp-php = $${rootdirectory:tmp}/php
logrotate-entries = $${rootdirectory:etc}/logrotate.d
/
logrotate-entries = $${rootdirectory:etc}/logrotate.d
logrotate-backup = $${basedirectory:backup}/logrotate
/
logrotate-backup = $${basedirectory:backup}/logrotate
stunnel-conf = $${rootdirectory:etc}/stunnel
/
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
[cadirectory]
[cadirectory]
recipe = slapos.cookbook:mkdirectory
recipe = slapos.cookbook:mkdirectory
requests = $${directory:ca-dir}/requests/
requests = $${directory:ca-dir}/requests
private = $${directory:ca-dir}/private/
private = $${directory:ca-dir}/private
certs = $${directory:ca-dir}/certs/
certs = $${directory:ca-dir}/certs
newcerts = $${directory:ca-dir}/newcerts/
newcerts = $${directory:ca-dir}/newcerts
crl = $${directory:ca-dir}/crl/
crl = $${directory:ca-dir}/crl
#----------------
#--
#-- 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
#----------------
#--
#-- Deploy stunnel.
# Deploy stunnel
[stunnel]
[stunnel]
recipe = slapos.cookbook:stunnel
recipe = slapos.cookbook:stunnel
client = true
client = true
...
@@ -76,8 +126,22 @@ pid-file = $${basedirectory:run}/stunnel.pid
...
@@ -76,8 +126,22 @@ pid-file = $${basedirectory:run}/stunnel.pid
wrapper = $${rootdirectory:bin}/raw_stunnel
wrapper = $${rootdirectory:bin}/raw_stunnel
post-rotate-script = $${rootdirectory:bin}/stunnel_post_rotate
post-rotate-script = $${rootdirectory:bin}/stunnel_post_rotate
[logrotate-entry-stunnel]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name = stunnel
log = $${stunnel:log-file}
frequency = daily
rotate-num = 30
notifempty = true
create = true
post = $${stunnel:post-rotate-script}
#----------------
#--
#-- Certificate stuff.
# Certificate stuffs
[certificate-authority]
[certificate-authority]
recipe = slapos.cookbook:certificate_authority
recipe = slapos.cookbook:certificate_authority
openssl-binary = ${openssl:location}/bin/openssl
openssl-binary = ${openssl:location}/bin/openssl
...
@@ -98,7 +162,10 @@ key-file = $${stunnel:key-file}
...
@@ -98,7 +162,10 @@ key-file = $${stunnel:key-file}
cert-file = $${stunnel:cert-file}
cert-file = $${stunnel:cert-file}
# Request MariaDB instance and parse its URL
#----------------
#--
#-- Request MariaDB instance and parse its URL.
[request-mariadb]
[request-mariadb]
<= slap-connection
<= slap-connection
recipe = slapos.cookbook:request
recipe = slapos.cookbook:request
...
@@ -114,7 +181,10 @@ recipe = slapos.cookbook:urlparse
...
@@ -114,7 +181,10 @@ recipe = slapos.cookbook:urlparse
url = $${request-mariadb:connection-url}
url = $${request-mariadb:connection-url}
# Deploy Apache + PHP application
#----------------
#--
#-- Deploy Apache + PHP application.
[apache-php]
[apache-php]
recipe = slapos.cookbook:apachephp
recipe = slapos.cookbook:apachephp
source = ${application:location}
source = ${application:location}
...
@@ -142,21 +212,6 @@ mysql-database = $${mariadb-urlparse:path}
...
@@ -142,21 +212,6 @@ mysql-database = $${mariadb-urlparse:path}
mysql-host = $${stunnel:local-host}
mysql-host = $${stunnel:local-host}
mysql-port = $${stunnel:local-port}
mysql-port = $${stunnel:local-port}
# Deploy logrotate, cron, configure it
[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-apache]
[logrotate-entry-apache]
<= logrotate
<= logrotate
recipe = slapos.cookbook:logrotate.d
recipe = slapos.cookbook:logrotate.d
...
@@ -168,40 +223,11 @@ sharedscripts = true
...
@@ -168,40 +223,11 @@ sharedscripts = true
notifempty = true
notifempty = true
create = true
create = true
[logrotate-entry-stunnel]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name = stunnel
log = $${stunnel:log-file}
frequency = daily
rotate-num = 30
notifempty = true
create = true
post = $${stunnel:post-rotate-script}
[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}
#----------------
#--
#-- Request frontend.
# Request frontend
[request-frontend]
[request-frontend]
<= slap-connection
<= slap-connection
recipe = slapos.cookbook:requestoptional
recipe = slapos.cookbook:requestoptional
...
@@ -215,7 +241,10 @@ return = site_url
...
@@ -215,7 +241,10 @@ return = site_url
config-custom_domain = $${slap-parameter:domain}
config-custom_domain = $${slap-parameter:domain}
# Deploy slapmonitor
#----------------
#--
#-- Deploy slapmonitor.
[slapmonitor]
[slapmonitor]
recipe = slapos.cookbook:slapmonitor
recipe = slapos.cookbook:slapmonitor
pid-file = $${basedirectory:run}/apache.pid
pid-file = $${basedirectory:run}/apache.pid
...
@@ -238,14 +267,20 @@ slapreport-path = ${buildout:bin-directory}/slapreport
...
@@ -238,14 +267,20 @@ slapreport-path = ${buildout:bin-directory}/slapreport
path = $${basedirectory:services}/slapreport
path = $${basedirectory:services}/slapreport
# Publish all instance parameters (url of instance)
#----------------
#--
#-- Publish all instance parameters (url of instance).
[publish-connection-informations]
[publish-connection-informations]
recipe = slapos.cookbook:publish
recipe = slapos.cookbook:publish
backend_url = $${apache-php:url}
backend_url = $${apache-php:url}
url = $${request-frontend:connection-site_url}
url = $${request-frontend:connection-site_url}
# Deploy promises scripts
#----------------
#--
#-- Deploy promises scripts.
[promise]
[promise]
recipe = slapos.cookbook:check_port_listening
recipe = slapos.cookbook:check_port_listening
path = $${basedirectory:promises}/apache
path = $${basedirectory:promises}/apache
...
@@ -266,6 +301,9 @@ url = $${request-frontend:connection-site_url}
...
@@ -266,6 +301,9 @@ url = $${request-frontend:connection-site_url}
dash_path = ${dash:location}/bin/dash
dash_path = ${dash:location}/bin/dash
curl_path = ${curl:location}/bin/curl
curl_path = ${curl:location}/bin/curl
[slap-parameter]
[slap-parameter]
# Default value if no domain is specified
# Default value if no domain is specified
domain =
domain =
...
@@ -274,3 +312,4 @@ logbox-ip =
...
@@ -274,3 +312,4 @@ logbox-ip =
logbox-port =
logbox-port =
logbox-user =
logbox-user =
logbox-passwd =
logbox-passwd =
stack/lamp/buildout.cfg
View file @
1daa1179
...
@@ -75,14 +75,14 @@ mode = 0644
...
@@ -75,14 +75,14 @@ mode = 0644
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/apache/instance-apache-php.cfg.in
url = ${:_profile_base_location_}/apache/instance-apache-php.cfg.in
output = ${buildout:directory}/instance-apache-php.cfg
output = ${buildout:directory}/instance-apache-php.cfg
md5sum =
a5dd222b3faa4e1ef2df9b3b9bb47966
md5sum =
dec36ec4fe54d87f4a5e5b8573f72fb7
mode = 0644
mode = 0644
[instance-apache-backup]
[instance-apache-backup]
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/apache/instance-apache-backup.cfg.in
url = ${:_profile_base_location_}/apache/instance-apache-backup.cfg.in
output = ${buildout:directory}/instance-apache-backup.cfg
output = ${buildout:directory}/instance-apache-backup.cfg
md5sum =
cfb77ac8785e0d125a785f69a5339014
md5sum =
48f969d82319a9d145570f5f0fd27672
mode = 0644
mode = 0644
[template-resilient-lamp]
[template-resilient-lamp]
...
@@ -105,7 +105,7 @@ mode = 0644
...
@@ -105,7 +105,7 @@ mode = 0644
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/mariadb/instance-mariadb.cfg.in
url = ${:_profile_base_location_}/mariadb/instance-mariadb.cfg.in
output = ${buildout:directory}/instance-mariadb.cfg
output = ${buildout:directory}/instance-mariadb.cfg
md5sum =
fa9dc10efbcf61119f4cbab37c741322
md5sum =
aa33c843f04753a34154467522f0c65e
mode = 0644
mode = 0644
[template-mariadb-import]
[template-mariadb-import]
...
...
stack/lamp/mariadb/instance-mariadb.cfg.in
View file @
1daa1179
...
@@ -16,107 +16,74 @@ parts =
...
@@ -16,107 +16,74 @@ parts =
gzip-binary = ${gzip:location}/bin/gzip
gzip-binary = ${gzip:location}/bin/gzip
# Define egg directories to be the one from Software Release
# (/opt/slapgrid/...)
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
[urls]
recipe = slapos.cookbook:publish
url = mysqls://$${mariadb:user}:$${mariadb:password}@[$${stunnel:remote-host}]:$${stunnel:remote-port}/$${mariadb:database}
ip = $${slap-network-information:global-ipv6}
[mariadb]
#----------------
recipe = slapos.cookbook:mysql
#--
#-- Creation of all needed directories.
# Options
[rootdirectory]
rec
overing = false
rec
ipe = slapos.cookbook:mkdirectory
user = user
etc = $${buildout:directory}/etc
port = 3306
var = $${buildout:directory}/var
ip = $${slap-network-information:local-ipv4}
srv = $${buildout:directory}/srv
database = db
bin = $${buildout:directory}/bin
# Paths
[basedirectory]
wrapper = $${basedirectory:services}/mariadb
recipe = slapos.cookbook:mkdirectory
update-wrapper = $${basedirectory:services}/mariadb_update
log = $${rootdirectory:var}/log
logrotate-post = $${rootdirectory:bin}/mariadb_post_logrotate
services = $${rootdirectory:etc}/run
data-directory = $${directory:mariadb-data}
run = $${rootdirectory:var}/run
pid-file = $${basedirectory:run}/mariadb.pid
script = $${rootdirectory:etc}/script
socket = $${basedirectory:run}/mariadb.sock
backup = $${rootdirectory:srv}/backup
error-log = $${basedirectory:log}/mariadb_error.log
promises = $${rootdirectory:etc}/promise
conf-file = $${rootdirectory:etc}/mariadb.cnf
promise = $${basedirectory:promises}/mysql
# Binary information
[directory]
mysql-base-directory = ${mariadb:location}
recipe = slapos.cookbook:mkdirectory
mysql-binary = ${mariadb:location}/bin/mysql
cron-entries = $${rootdirectory:etc}/cron.d
mysql-install-binary = ${mariadb:location}/scripts/mysql_install_db
crontabs = $${rootdirectory:etc}/crontabs
mysql-upgrade-binary = ${mariadb:location}/bin/mysql_upgrade
cronstamps = $${rootdirectory:etc}/cronstamps
mysqld-binary = ${mariadb:location}/bin/mysqld
ca-dir = $${rootdirectory:srv}/ssl
mariadb-data = $${rootdirectory:srv}/mariadb
logrotate-backup = $${basedirectory:backup}/logrotate
stunnel-conf = $${rootdirectory:etc}/stunnel
logrotate-entries = $${rootdirectory:etc}/logrotate.d
[slapmonitor]
#----------------
recipe = slapos.cookbook:slapmonitor
#--
pid-file = $${basedirectory:run}/mariadb.pid
#-- Deploy cron.
database-path = $${basedirectory:log}/slapmonitor.db
shell-path = ${dash:location}/bin/dash
slapmonitor-path = ${buildout:bin-directory}/slapmonitor
path = $${basedirectory:services}/slapmonitor
[slapreport]
[cron]
recipe = slapos.cookbook:slapreport
recipe = slapos.cookbook:cron
pid-file = $${basedirectory:run}/mariadb.pid
dcrond-binary = ${dcron:location}/sbin/crond
consumption-log-path = $${basedirectory:log}/instance_consumption.log
cron-entries = $${directory:cron-entries}
database-path = $${basedirectory:log}/slapmonitor.db
crontabs = $${directory:crontabs}
logbox-ip = 87.98.152.12
cronstamps = $${directory:cronstamps}
logbox-port = 5122
catcher = $${cron-simplelogger:wrapper}
logbox-user = admin
binary = $${basedirectory:services}/crond
logbox-passwd = passer
shell-path = ${dash:location}/bin/dash
slapreport-path = ${buildout:bin-directory}/slapreport
path = $${basedirectory:services}/slapreport
[certificate-authority]
[cron-simplelogger]
recipe = slapos.cookbook:certificate_authority
recipe = slapos.cookbook:simplelogger
openssl-binary = ${openssl:location}/bin/openssl
wrapper = $${rootdirectory:bin}/cron_simplelogger
ca-dir = $${directory:ca-dir}
log = $${basedirectory:log}/crond.log
requests-directory = $${cadirectory:requests}
wrapper = $${basedirectory:services}/ca
ca-private = $${cadirectory:private}
ca-certs = $${cadirectory:certs}
ca-newcerts = $${cadirectory:newcerts}
ca-crl = $${cadirectory:crl}
[cadirectory]
recipe = slapos.cookbook:mkdirectory
requests = $${directory:ca-dir}/requests/
private = $${directory:ca-dir}/private/
certs = $${directory:ca-dir}/certs/
newcerts = $${directory:ca-dir}/newcerts/
crl = $${directory:ca-dir}/crl/
[ca-stunnel]
#----------------
<= certificate-authority
#--
recipe = slapos.cookbook:certificate_authority.request
#-- Deploy logrotate.
executable = $${stunnel:wrapper}
wrapper = $${basedirectory:services}/stunnel
key-file = $${stunnel:key-file}
cert-file = $${stunnel:cert-file}
[stunnel]
[cron-entry-logrotate]
recipe = slapos.cookbook:stunnel
<= cron
stunnel-binary = ${stunnel:location}/bin/stunnel
recipe = slapos.cookbook:cron.d
wrapper = $${rootdirectory:bin}/stunnel
name = logrotate
log-file = $${basedirectory:log}/stunnel.log
frequency = 0 0 * * *
config-file = $${directory:stunnel-conf}/stunnel.conf
command = $${logrotate:wrapper}
key-file = $${directory:stunnel-conf}/stunnel.key
cert-file = $${directory:stunnel-conf}/stunnel.crt
pid-file = $${basedirectory:run}/stunnel.pid
local-host = $${mariadb:ip}
local-port = $${mariadb:port}
remote-host = $${slap-network-information:global-ipv6}
remote-port = 6446
client = false
post-rotate-script = $${rootdirectory:bin}/stunnel_post_rotate
[logrotate]
[logrotate]
recipe = slapos.cookbook:logrotate
recipe = slapos.cookbook:logrotate
...
@@ -164,53 +131,127 @@ rotate-num = 30
...
@@ -164,53 +131,127 @@ rotate-num = 30
notifempty = true
notifempty = true
create = true
create = true
[cron]
#----------------
recipe = slapos.cookbook:cron
#--
dcrond-binary = ${dcron:location}/sbin/crond
#-- Deploy stunnel.
cron-entries = $${directory:cron-entries}
crontabs = $${directory:crontabs}
cronstamps = $${directory:cronstamps}
catcher = $${cron-simplelogger:wrapper}
binary = $${basedirectory:services}/crond
[cron-simplelogger]
[stunnel]
recipe = slapos.cookbook:simplelogger
recipe = slapos.cookbook:stunnel
wrapper = $${rootdirectory:bin}/cron_simplelogger
stunnel-binary = ${stunnel:location}/bin/stunnel
log = $${basedirectory:log}/crond.log
wrapper = $${rootdirectory:bin}/stunnel
log-file = $${basedirectory:log}/stunnel.log
config-file = $${directory:stunnel-conf}/stunnel.conf
key-file = $${directory:stunnel-conf}/stunnel.key
cert-file = $${directory:stunnel-conf}/stunnel.crt
pid-file = $${basedirectory:run}/stunnel.pid
local-host = $${mariadb:ip}
local-port = $${mariadb:port}
remote-host = $${slap-network-information:global-ipv6}
remote-port = 6446
client = false
post-rotate-script = $${rootdirectory:bin}/stunnel_post_rotate
[cron-entry-logrotate]
<= cron
recipe = slapos.cookbook:cron.d
name = logrotate
frequency = 0 0 * * *
command = $${logrotate:wrapper}
[rootdirectory]
#----------------
recipe = slapos.cookbook:mkdirectory
#--
etc = $${buildout:directory}/etc/
#-- Certificate stuff.
var = $${buildout:directory}/var/
srv = $${buildout:directory}/srv/
bin = $${buildout:directory}/bin/
[basedirectory]
[certificate-authority]
recipe = slapos.cookbook:mkdirectory
recipe = slapos.cookbook:certificate_authority
log = $${rootdirectory:var}/log/
openssl-binary = ${openssl:location}/bin/openssl
services = $${rootdirectory:etc}/run/
ca-dir = $${directory:ca-dir}
run = $${rootdirectory:var}/run/
requests-directory = $${cadirectory:requests}
script = $${rootdirectory:etc}/script/
wrapper = $${basedirectory:services}/ca
backup = $${rootdirectory:srv}/backup/
ca-private = $${cadirectory:private}
promises = $${rootdirectory:etc}/promise/
ca-certs = $${cadirectory:certs}
ca-newcerts = $${cadirectory:newcerts}
ca-crl = $${cadirectory:crl}
[directory]
[
ca
directory]
recipe = slapos.cookbook:mkdirectory
recipe = slapos.cookbook:mkdirectory
cron-entries = $${rootdirectory:etc}/cron.d/
requests = $${directory:ca-dir}/requests/
crontabs = $${rootdirectory:etc}/crontabs/
private = $${directory:ca-dir}/private/
cronstamps = $${rootdirectory:etc}/cronstamps/
certs = $${directory:ca-dir}/certs/
ca-dir = $${rootdirectory:srv}/ssl/
newcerts = $${directory:ca-dir}/newcerts/
mariadb-data = $${rootdirectory:srv}/mariadb/
crl = $${directory:ca-dir}/crl/
logrotate-backup = $${basedirectory:backup}/logrotate/
stunnel-conf = $${rootdirectory:etc}/stunnel/
[ca-stunnel]
logrotate-entries = $${rootdirectory:etc}/logrotate.d/
<= certificate-authority
recipe = slapos.cookbook:certificate_authority.request
executable = $${stunnel:wrapper}
wrapper = $${basedirectory:services}/stunnel
key-file = $${stunnel:key-file}
cert-file = $${stunnel:cert-file}
#----------------
#--
#-- Creates a MariaDB configuration file, and a database.
[mariadb]
recipe = slapos.cookbook:mysql
# Options
recovering = false
user = user
port = 3306
ip = $${slap-network-information:local-ipv4}
database = db
# Paths
wrapper = $${basedirectory:services}/mariadb
update-wrapper = $${basedirectory:services}/mariadb_update
logrotate-post = $${rootdirectory:bin}/mariadb_post_logrotate
data-directory = $${directory:mariadb-data}
pid-file = $${basedirectory:run}/mariadb.pid
socket = $${basedirectory:run}/mariadb.sock
error-log = $${basedirectory:log}/mariadb_error.log
conf-file = $${rootdirectory:etc}/mariadb.cnf
promise = $${basedirectory:promises}/mysql
# Binary information
mysql-base-directory = ${mariadb:location}
mysql-binary = ${mariadb:location}/bin/mysql
mysql-install-binary = ${mariadb:location}/scripts/mysql_install_db
mysql-upgrade-binary = ${mariadb:location}/bin/mysql_upgrade
mysqld-binary = ${mariadb:location}/bin/mysqld
#----------------
#--
#-- Deploy slapmonitor.
[slapmonitor]
recipe = slapos.cookbook:slapmonitor
pid-file = $${basedirectory:run}/mariadb.pid
database-path = $${basedirectory:log}/slapmonitor.db
shell-path = ${dash:location}/bin/dash
slapmonitor-path = ${buildout:bin-directory}/slapmonitor
path = $${basedirectory:services}/slapmonitor
[slapreport]
recipe = slapos.cookbook:slapreport
pid-file = $${basedirectory:run}/mariadb.pid
database-path = $${basedirectory:log}/slapmonitor.db
consumption-log-path = $${basedirectory:log}/instance_consumption.log
logbox-ip = 87.98.152.12
logbox-port = 5122
logbox-user = admin
logbox-passwd = passer
shell-path = ${dash:location}/bin/dash
slapreport-path = ${buildout:bin-directory}/slapreport
path = $${basedirectory:services}/slapreport
#----------------
#--
#-- Publish instance parameters.
[urls]
recipe = slapos.cookbook:publish
url = mysqls://$${mariadb:user}:$${mariadb:password}@[$${stunnel:remote-host}]:$${stunnel:remote-port}/$${mariadb:database}
ip = $${slap-network-information:global-ipv6}
[slap-parameter]
[slap-parameter]
#Default value if no ssh parameters specified
#Default value if no ssh parameters specified
...
...
stack/resilient/buildout.cfg
View file @
1daa1179
...
@@ -18,7 +18,7 @@ parts =
...
@@ -18,7 +18,7 @@ parts =
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/pbsready.cfg.in
url = ${:_profile_base_location_}/pbsready.cfg.in
output = ${buildout:directory}/pbsready.cfg
output = ${buildout:directory}/pbsready.cfg
md5sum =
1b01d26fa5de74240e1d66b987067cdc
md5sum =
d001110c9860b31ca8b01d9a37b8ecfa
mode = 0644
mode = 0644
[pbsready-import]
[pbsready-import]
...
@@ -39,7 +39,7 @@ mode = 0644
...
@@ -39,7 +39,7 @@ mode = 0644
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-pull-backup.cfg.in
url = ${:_profile_base_location_}/instance-pull-backup.cfg.in
output = ${buildout:directory}/instance-pull-backup.cfg
output = ${buildout:directory}/instance-pull-backup.cfg
md5sum =
dd91dd7c1845f120eb5b1987c2689b4
0
md5sum =
18b88cd012e886fbaa457b03928c2d1
0
mode = 0644
mode = 0644
[template-replicated]
[template-replicated]
...
...
stack/resilient/instance-pull-backup.cfg.in
View file @
1daa1179
...
@@ -3,9 +3,9 @@
...
@@ -3,9 +3,9 @@
parts =
parts =
connection-dict
connection-dict
pbs
pbs
logrotate
cron
cron
cron-entry-logrotate
cron-entry-logrotate
logrotate
sshkeys-authority
sshkeys-authority
sshkeys-dropbear
sshkeys-dropbear
...
@@ -13,14 +13,51 @@ eggs-directory = ${buildout:eggs-directory}
...
@@ -13,14 +13,51 @@ eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
offline = true
[connection-dict]
recipe = slapos.cookbook:publish
#----------------
ssh-key = $${sshkeys-dropbear:public-key-value}
#--
notification-url = http://[$${notifier:host}]:$${notifier:port}/notify
#-- Creation of all needed directories.
feeds-url = http://[$${notifier:host}]:$${notifier:port}/get/
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc
home = $${buildout:directory}/home
srv = $${buildout:directory}/srv
bin = $${buildout:directory}/bin
tmp = $${buildout:directory}/tmp
var = $${buildout:directory}/var
[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
ssh-home = $${rootdirectory:home}/ssh
notifier = $${rootdirectory:etc}/notifier
[directory]
recipe = slapos.cookbook:mkdirectory
logrotate-entries = $${rootdirectory:etc}/logrotate.d
logrotate-backup = $${basedirectory:backup}/logrotate
cronstamps = $${rootdirectory:etc}/cronstamps
cron-entries = $${rootdirectory:etc}/cron.d
crontabs = $${rootdirectory:etc}/crontabs
cronoutput = $${basedirectory:log}/cron-ouput
pbs-backup = $${basedirectory:backup}/pbs
sshkeys = $${rootdirectory:srv}/sshkeys
pbs-wrappers = $${rootdirectory:bin}/pbs
dot-ssh = $${basedirectory:ssh-home}/.ssh
notifier-feeds = $${basedirectory:notifier}/feeds
notifier-callbacks = $${basedirectory:notifier}/callbacks
## sets up the equeue for the notifier
#----------------
#--
#-- Set up the equeue and notifier.
[equeue]
[equeue]
recipe = slapos.cookbook:equeue
recipe = slapos.cookbook:equeue
socket = $${basedirectory:run}/equeue.sock
socket = $${basedirectory:run}/equeue.sock
...
@@ -29,7 +66,8 @@ database = $${rootdirectory:srv}/equeue.db
...
@@ -29,7 +66,8 @@ database = $${rootdirectory:srv}/equeue.db
wrapper = $${basedirectory:services}/equeue
wrapper = $${basedirectory:services}/equeue
equeue-binary = ${buildout:bin-directory}/equeue
equeue-binary = ${buildout:bin-directory}/equeue
# notifier.notify adds the [exporter, notifier] to the execution queue
# notifier.notify.callback sets up a callback
[notifier]
[notifier]
recipe = slapos.cookbook:notifier
recipe = slapos.cookbook:notifier
feeds = $${directory:notifier-feeds}
feeds = $${directory:notifier-feeds}
...
@@ -42,40 +80,20 @@ wrapper = $${basedirectory:services}/notifier
...
@@ -42,40 +80,20 @@ wrapper = $${basedirectory:services}/notifier
server-binary = ${buildout:bin-directory}/pubsubserver
server-binary = ${buildout:bin-directory}/pubsubserver
notifier-binary = ${buildout:bin-directory}/pubsubnotifier
notifier-binary = ${buildout:bin-directory}/pubsubnotifier
[logrotate-entry-equeue]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name = equeue
log = $${equeue:log}
frequency = daily
rotate-num = 30
## Dropbear Client to provide ssh
[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 = pbs
type = rsa
executable = $${dropbear-client:wrapper}
public-key = $${dropbear-client:identity-file}.pub
private-key = $${dropbear-client:identity-file}
wrapper = $${rootdirectory:bin}/do_backup
#----------------
#--
#-- The pull-backup-server contains every backup (incremental)
#-- to prevent a corrupt dump from destroying everything.
## The pull-backup-server contains every backup (incremental).
## to prevent a corrupt dump from destroying everything.
[pbs]
[pbs]
<= notifier
<= notifier
recipe = slapos.cookbook:pbs
recipe = slapos.cookbook:pbs
...
@@ -91,10 +109,9 @@ notifier-url = http://[$${notifier:host}]:$${notifier:port}/
...
@@ -91,10 +109,9 @@ notifier-url = http://[$${notifier:host}]:$${notifier:port}/
slave-instance-list = $${slap-parameter:slave_instance_list}
slave-instance-list = $${slap-parameter:slave_instance_list}
[cron-simplelogger]
#----------------
recipe = slapos.cookbook:simplelogger
#--
wrapper = $${rootdirectory:bin}/cron_simplelogger
#-- Deploy cron.
log = $${basedirectory:log}/crond.log
[cron]
[cron]
recipe = slapos.cookbook:cron
recipe = slapos.cookbook:cron
...
@@ -105,6 +122,16 @@ cronstamps = $${directory:cronstamps}
...
@@ -105,6 +122,16 @@ cronstamps = $${directory:cronstamps}
catcher = $${cron-simplelogger:wrapper}
catcher = $${cron-simplelogger:wrapper}
binary = $${basedirectory:services}/crond
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-entry-logrotate]
<= cron
<= cron
recipe = slapos.cookbook:cron.d
recipe = slapos.cookbook:cron.d
...
@@ -115,7 +142,7 @@ command = $${logrotate:wrapper}
...
@@ -115,7 +142,7 @@ command = $${logrotate:wrapper}
[logrotate]
[logrotate]
recipe = slapos.cookbook:logrotate
recipe = slapos.cookbook:logrotate
# Binaries
# Binaries
logrotate-binary = ${logrotate:location}/sbin/logrotate
logrotate-binary = ${logrotate:location}/
usr/
sbin/logrotate
gzip-binary = ${gzip:location}/bin/gzip
gzip-binary = ${gzip:location}/bin/gzip
gunzip-binary = ${gzip:location}/bin/gunzip
gunzip-binary = ${gzip:location}/bin/gunzip
# Directories
# Directories
...
@@ -125,15 +152,7 @@ logrotate-entries = $${directory:logrotate-entries}
...
@@ -125,15 +152,7 @@ logrotate-entries = $${directory:logrotate-entries}
backup = $${directory:logrotate-backup}
backup = $${directory:logrotate-backup}
state-file = $${rootdirectory:srv}/logrotate.status
state-file = $${rootdirectory:srv}/logrotate.status
[logrotate-entry-equeue]
[logrotate-entry-cron]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name = equeue
log = $${equeue:log}
frequency = daily
rotate-num = 30
[logrotate-entry-equeue]
<= logrotate
<= logrotate
recipe = slapos.cookbook:logrotate.d
recipe = slapos.cookbook:logrotate.d
name = cron
name = cron
...
@@ -142,41 +161,61 @@ frequency = daily
...
@@ -142,41 +161,61 @@ frequency = daily
rotate-num = 30
rotate-num = 30
[rootdirectory]
#----------------
recipe = slapos.cookbook:mkdirectory
#--
bin = $${buildout:directory}/bin/
#-- sshkeys
etc = $${buildout:directory}/etc/
home = $${buildout:directory}/home/
srv = $${buildout:directory}/srv/
tmp = $${buildout:directory}/tmp/
var = $${buildout:directory}/var/
[
base
directory]
[
sshkeys-
directory]
recipe = slapos.cookbook:mkdirectory
recipe = slapos.cookbook:mkdirectory
log = $${rootdirectory:var}/log/
requests = $${directory:sshkeys}/requests
services = $${rootdirectory:etc}/run/
keys = $${directory:sshkeys}/keys
run = $${rootdirectory:var}/run/
backup = $${rootdirectory:srv}/backup/
promises = $${rootdirectory:etc}/promise/
ssh-home = $${rootdirectory:home}/ssh
notifier = $${rootdirectory:etc}/notifier/
[directory]
[sshkeys-authority]
recipe = slapos.cookbook:mkdirectory
recipe = slapos.cookbook:sshkeys_authority
cronstamps = $${rootdirectory:etc}/cronstamps/
request-directory = $${sshkeys-directory:requests}
cron-entries = $${rootdirectory:etc}/cron.d/
keys-directory = $${sshkeys-directory:keys}
crontabs = $${rootdirectory:etc}/crontabs/
wrapper = $${basedirectory:services}/sshkeys_authority
cronoutput = $${basedirectory:log}/cron-ouput/
keygen-binary = ${dropbear:location}/bin/dropbearkey
pbs-backup = $${basedirectory:backup}/pbs/
logrotate-entries = $${rootdirectory:etc}/logrotate.d/
logrotate-backup = $${basedirectory:backup}/logrotate/
sshkeys = $${rootdirectory:srv}/sshkeys
pbs-wrappers = $${rootdirectory:bin}/pbs/
dot-ssh = $${basedirectory:ssh-home}/.ssh/
notifier-feeds = $${basedirectory:notifier}/feeds/
notifier-callbacks = $${basedirectory:notifier}/callbacks/
[sshkeys-dropbear]
<= sshkeys-authority
recipe = slapos.cookbook:sshkeys_authority.request
name = pbs
type = rsa
executable = $${dropbear-client:wrapper}
public-key = $${dropbear-client:identity-file}.pub
private-key = $${dropbear-client:identity-file}
wrapper = $${rootdirectory:bin}/do_backup
#----------------
#--
#-- Dropbear.
[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
#----------------
#--
#-- Slave instance list (empty default).
# Default values
[slap-parameter]
[slap-parameter]
slave_instance_list = []
slave_instance_list = []
#----------------
#--
#-- Publish instance parameters.
[connection-dict]
recipe = slapos.cookbook:publish
ssh-key = $${sshkeys-dropbear:public-key-value}
notification-url = http://[$${notifier:host}]:$${notifier:port}/notify
feeds-url = http://[$${notifier:host}]:$${notifier:port}/get/
stack/resilient/pbsready.cfg.in
View file @
1daa1179
...
@@ -18,7 +18,30 @@ parts =
...
@@ -18,7 +18,30 @@ parts =
dropbear-server-pbs-authorized-key
dropbear-server-pbs-authorized-key
notifier
notifier
# adds the resiliency script for the bully algorithm
#----------------
#--
#-- Creation of all needed directories.
[basedirectory]
script = $${rootdirectory:etc}/script/
services = $${rootdirectory:etc}/run/
cache = $${rootdirectory:var}/cache/
notifier = $${rootdirectory:etc}/notifier/
[directory]
backup = $${basedirectory:backup}/$${slap-parameter:namebase}
ssh = $${rootdirectory:etc}/ssh/
sshkeys = $${rootdirectory:srv}/sshkeys
notifier-feeds = $${basedirectory:notifier}/feeds/
notifier-callbacks = $${basedirectory:notifier}/callbacks/
script = $${basedirectory:script}
#----------------
#--
#-- resiliency script for the bully algorithm
[resiliency]
[resiliency]
recipe = slapos.cookbook:addresiliency
recipe = slapos.cookbook:addresiliency
script = $${basedirectory:script}
script = $${basedirectory:script}
...
@@ -26,15 +49,66 @@ run = $${basedirectory:services}
...
@@ -26,15 +49,66 @@ run = $${basedirectory:services}
bin = $${rootdirectory:bin}
bin = $${rootdirectory:bin}
# XXX don't run bully automatically, yet
# XXX don't run bully automatically, yet
# sets up an rdiff-backup server (with a dropbear server for ssh)
#----------------
#--
#-- sets up an rdiff-backup server (with a dropbear server for ssh)
[urls]
[urls]
ssh-public-key = $${sshkeys-dropbear:public-key-value}
ssh-public-key = $${sshkeys-dropbear:public-key-value}
ssh-url = ssh://nobody@[$${dropbear-server:host}]:$${dropbear-server:port}/$${rdiff-backup-server:path}
ssh-url = ssh://nobody@[$${dropbear-server:host}]:$${dropbear-server:port}/$${rdiff-backup-server:path}
[rdiff-backup-server]
recipe = slapos.cookbook:pbs
client = false
path = $${directory:backup}
wrapper = $${rootdirectory:bin}/rdiffbackup-server
rdiffbackup-binary = ${buildout:bin-directory}/rdiff-backup
#----------------
#--
#-- Set up the equeue and notifier.
[equeue]
recipe = slapos.cookbook:equeue
socket = $${basedirectory:run}/equeue.sock
log = $${basedirectory:log}/equeue.log
database = $${rootdirectory:srv}/equeue.db
wrapper = $${basedirectory:services}/equeue
equeue-binary = ${buildout:bin-directory}/equeue
# notifier.notify adds the [exporter, notifier] to the execution queue
# notifier.notify.callback sets up a callback
[notifier]
recipe = slapos.cookbook:notifier
feeds = $${directory:notifier-feeds}
callbacks = $${directory:notifier-callbacks}
id-file = $${rootdirectory:etc}/notifier.id
equeue-socket = $${equeue:socket}
host = $${slap-network-information:global-ipv6}
port = 8080
wrapper = $${basedirectory:services}/notifier
server-binary = ${buildout:bin-directory}/pubsubserver
notifier-binary = ${buildout:bin-directory}/pubsubnotifier
[logrotate-entry-equeue]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name = equeue
log = $${equeue:log}
frequency = daily
rotate-num = 30
#----------------
#--
#-- sshkeys
[sshkeys-directory]
[sshkeys-directory]
recipe = slapos.cookbook:mkdirectory
recipe = slapos.cookbook:mkdirectory
requests = $${directory:sshkeys}/requests
/
requests = $${directory:sshkeys}/requests
keys = $${directory:sshkeys}/keys
/
keys = $${directory:sshkeys}/keys
[sshkeys-authority]
[sshkeys-authority]
recipe = slapos.cookbook:sshkeys_authority
recipe = slapos.cookbook:sshkeys_authority
...
@@ -53,6 +127,11 @@ public-key = $${dropbear-server:rsa-keyfile}.pub
...
@@ -53,6 +127,11 @@ public-key = $${dropbear-server:rsa-keyfile}.pub
private-key = $${dropbear-server:rsa-keyfile}
private-key = $${dropbear-server:rsa-keyfile}
wrapper = $${basedirectory:services}/sshd
wrapper = $${basedirectory:services}/sshd
#----------------
#--
#-- Dropbear.
[dropbear-server]
[dropbear-server]
recipe = slapos.cookbook:dropbear
recipe = slapos.cookbook:dropbear
host = $${slap-network-information:global-ipv6}
host = $${slap-network-information:global-ipv6}
...
@@ -68,57 +147,5 @@ dropbear-binary = ${dropbear:location}/sbin/dropbear
...
@@ -68,57 +147,5 @@ dropbear-binary = ${dropbear:location}/sbin/dropbear
recipe = slapos.cookbook:dropbear.add_authorized_key
recipe = slapos.cookbook:dropbear.add_authorized_key
key = $${slap-parameter:authorized-key}
key = $${slap-parameter:authorized-key}
[rdiff-backup-server]
recipe = slapos.cookbook:pbs
client = false
path = $${directory:backup}
wrapper = $${rootdirectory:bin}/rdiffbackup-server
rdiffbackup-binary = ${buildout:bin-directory}/rdiff-backup
## Sets up the execution queue for the notifier
[logrotate-entry-equeue]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name = equeue
log = $${equeue:log}
frequency = daily
rotate-num = 30
[equeue]
recipe = slapos.cookbook:equeue
socket = $${basedirectory:run}/equeue.sock
log = $${basedirectory:log}/equeue.log
database = $${rootdirectory:srv}/equeue.db
wrapper = $${basedirectory:services}/equeue
equeue-binary = ${buildout:bin-directory}/equeue
## notifier.notify adds the [exporter, notifier] to the execution queue
## notifier.notify.callback sets up a callback
[notifier]
recipe = slapos.cookbook:notifier
feeds = $${directory:notifier-feeds}
callbacks = $${directory:notifier-callbacks}
id-file = $${rootdirectory:etc}/notifier.id
equeue-socket = $${equeue:socket}
host = $${slap-network-information:global-ipv6}
port = 8080
wrapper = $${basedirectory:services}/notifier
server-binary = ${buildout:bin-directory}/pubsubserver
notifier-binary = ${buildout:bin-directory}/pubsubnotifier
[basedirectory]
script = $${rootdirectory:etc}/script/
services = $${rootdirectory:etc}/run/
cache = $${rootdirectory:var}/cache/
notifier = $${rootdirectory:etc}/notifier/
[directory]
backup = $${basedirectory:backup}/$${slap-parameter:namebase}
ssh = $${rootdirectory:etc}/ssh/
sshkeys = $${rootdirectory:srv}/sshkeys
notifier-feeds = $${basedirectory:notifier}/feeds/
notifier-callbacks = $${basedirectory:notifier}/callbacks/
script = $${basedirectory:script}
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