Commit 1a31d960 authored by Marco Mariani's avatar Marco Mariani

fixed script generation; initial README

parent 9e03b171
......@@ -53,7 +53,7 @@ keep-compile-dir = false
[application]
recipe = hexagonit.recipe.download
#If provided tarball does not containt top directory this option shall be changed to false
# If the provided tarball does not contain top directory, this option should be changed to false
strip-top-level-dir = true
......@@ -108,14 +108,14 @@ mode = 0644
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/mariadb/instance-mariadb-import.cfg.in
output = ${buildout:directory}/instance-mariadb-import.cfg
md5sum = ea43b8ed38a55a11b027fc283c0e718a
md5sum = 8009627bb669d1fee0df030daa8d3bdc
mode = 0644
[instance-mariadb-export]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/mariadb/instance-mariadb-export.cfg.in
output = ${buildout:directory}/instance-mariadb-export.cfg
md5sum = 685c8abf0f487c72273846002ec631a0
md5sum = 0513bf25fbb20cccd57f285c40d96498
mode = 0644
......
......@@ -2,7 +2,13 @@
extends = ${instance-mariadb:output}
${pbsready-export:output}
parts += mariadb
parts +=
mariadb
# have to repeat the next one, as it's not inherited from pbsready-export
cron-entry-backup
[exporter]
recipe = slapos.cookbook:mydumper
......
......@@ -2,7 +2,12 @@
extends = ${instance-mariadb:output}
${pbsready-import:output}
parts += mariadb
parts +=
mariadb
# have to repeat the next one, as it's not inherited from pbsready-import
import-on-notification
[importer]
recipe = slapos.cookbook:mydumper
......
......@@ -8,9 +8,9 @@ This fork of the LAMP stack provides:
Log rotation is handled by Postgres itself.
- symlinks to all the postgres binaries, usable through unix socket
with no further authentication, or through ipv6
with no further authentication, or through ipv4/ipv6 with password
- a psycopg2 (postgres driver) egg
- a psycopg2 (postgres driver) egg to be used by further configuration recipes
- a hook (custom-application-deployment) for configuring the PHP application
......@@ -39,6 +39,7 @@ extends =
[application]
recipe = hexagonit.recipe.download
# If the provided tarball does not contain top directory, this option should be changed to false
strip-top-level-dir = true
......@@ -93,14 +94,14 @@ mode = 0644
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/postgres/instance-postgres-import.cfg.in
output = ${buildout:directory}/instance-postgres-import.cfg
md5sum = 1989ba2164dd5f79793a04e0a02ea515
md5sum = 7edfa157ddccc27e99bf128fc1c2b9ee
mode = 0644
[instance-postgres-export]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/postgres/instance-postgres-export.cfg.in
output = ${buildout:directory}/instance-postgres-export.cfg
md5sum = 7bce31bc22a731a8fc6119aee96586f5
md5sum = 68080e5d861eb3474442211dd65c668b
mode = 0644
......
......@@ -8,6 +8,9 @@ parts +=
postgres-instance
postgres-promise
# have to repeat the next one, as it's not inherited from pbsready-export
cron-entry-backup
[exporter]
recipe = slapos.cookbook:postgres.export
......
......@@ -6,6 +6,9 @@ extends = ${instance-postgres:output}
parts +=
postgres-instance
# have to repeat the next one, as it's not inherited from pbsready-import
import-on-notification
[importer]
recipe = slapos.cookbook:postgres.import
wrapper = $${rootdirectory:bin}/$${slap-parameter:namebase}-importer
......
Base resilient stack
====================
This stack is meant to be extended by SR profiles, or other stacks, that need to provide
automated backup/restore, election of backup candidates, and instance failover.
As reference implementations, both stack/lamp and stack/lapp define resilient behavior for
MySQL and Postgres respectively.
This involves three different software_types:
* pull-backup
* {something}_export
* {something}_import
where 'something' is the component that needs resiliency (can be postgres, mysql, erp5, and so on).
pull-backup
-----------
This software type is defined in
http://git.erp5.org/gitweb/slapos.git/blob/HEAD:/stack/resilient/instance-pull-backup.cfg.in?js=1
and there should be no reason to modify or extend it.
An instance of type 'pull-backup' will receive data from an 'export' instance and immediately populate an 'import' instance.
The backup data is automatically used to build an historical, incremental archive in srv/backup/pbs.
export
------
example:
http://git.erp5.org/gitweb/slapos.git/blob/HEAD:/stack/lapp/postgres/instance-postgres-export.cfg.in?js=1
This is the *active* instance - the one providing live data to the application.
A backup is run via the bin/exporter script: it will
1) run bin/{something}-backup
and 2) notify the pull-backup instance that data is ready.
The pull-backup, upon receiving the notification, will make a copy of the data and transmit it to the 'import' instances.
You should provide the bin/{something}-exporter script, see for instance
http://git.erp5.org/gitweb/slapos.git/blob/HEAD:/slapos/recipe/postgres/__init__.py?js=1#l207
http://git.erp5.org/gitweb/slapos.git/blob/HEAD:/slapos/recipe/mydumper.py?js=1#l71
By default, as defined in
http://git.erp5.org/gitweb/slapos.git/blob/HEAD:/stack/resilient/pbsready-export.cfg.in?js=1#l27
the bin/exporter script is run every 60 minutes.
import
------
example:
http://git.erp5.org/gitweb/slapos.git/blob/HEAD:/stack/lapp/postgres/instance-postgres-import.cfg.in?js=1
This is the *fallback* instance - the one that can be activated and thus become active.
Any number of import instances can be used. Deciding which one should take over can be done manually
or through a monitoring + election script.
You should provide the bin/{something}-importer script, see for instance
http://git.erp5.org/gitweb/slapos.git/blob/HEAD:/slapos/recipe/postgres/__init__.py?js=1#l233
http://git.erp5.org/gitweb/slapos.git/blob/HEAD:/slapos/recipe/mydumper.py?js=1#l71
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment