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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Douglas
slapos
Commits
1a31d960
Commit
1a31d960
authored
Jan 08, 2013
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed script generation; initial README
parent
9e03b171
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
105 additions
and
13 deletions
+105
-13
stack/lamp/buildout.cfg
stack/lamp/buildout.cfg
+3
-3
stack/lamp/mariadb/instance-mariadb-export.cfg.in
stack/lamp/mariadb/instance-mariadb-export.cfg.in
+7
-1
stack/lamp/mariadb/instance-mariadb-import.cfg.in
stack/lamp/mariadb/instance-mariadb-import.cfg.in
+6
-1
stack/lapp/README.txt
stack/lapp/README.txt
+2
-2
stack/lapp/buildout.cfg
stack/lapp/buildout.cfg
+3
-2
stack/lapp/postgres/instance-postgres-export.cfg.in
stack/lapp/postgres/instance-postgres-export.cfg.in
+6
-3
stack/lapp/postgres/instance-postgres-import.cfg.in
stack/lapp/postgres/instance-postgres-import.cfg.in
+4
-1
stack/resilient/README.txt
stack/resilient/README.txt
+74
-0
No files found.
stack/lamp/buildout.cfg
View file @
1a31d960
...
@@ -53,7 +53,7 @@ keep-compile-dir = false
...
@@ -53,7 +53,7 @@ keep-compile-dir = false
[application]
[application]
recipe = hexagonit.recipe.download
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
strip-top-level-dir = true
...
@@ -108,14 +108,14 @@ mode = 0644
...
@@ -108,14 +108,14 @@ mode = 0644
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/mariadb/instance-mariadb-import.cfg.in
url = ${:_profile_base_location_}/mariadb/instance-mariadb-import.cfg.in
output = ${buildout:directory}/instance-mariadb-import.cfg
output = ${buildout:directory}/instance-mariadb-import.cfg
md5sum =
ea43b8ed38a55a11b027fc283c0e718a
md5sum =
8009627bb669d1fee0df030daa8d3bdc
mode = 0644
mode = 0644
[instance-mariadb-export]
[instance-mariadb-export]
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/mariadb/instance-mariadb-export.cfg.in
url = ${:_profile_base_location_}/mariadb/instance-mariadb-export.cfg.in
output = ${buildout:directory}/instance-mariadb-export.cfg
output = ${buildout:directory}/instance-mariadb-export.cfg
md5sum =
685c8abf0f487c72273846002ec631a0
md5sum =
0513bf25fbb20cccd57f285c40d96498
mode = 0644
mode = 0644
...
...
stack/lamp/mariadb/instance-mariadb-export.cfg.in
View file @
1a31d960
...
@@ -2,7 +2,13 @@
...
@@ -2,7 +2,13 @@
extends = ${instance-mariadb:output}
extends = ${instance-mariadb:output}
${pbsready-export: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]
[exporter]
recipe = slapos.cookbook:mydumper
recipe = slapos.cookbook:mydumper
...
...
stack/lamp/mariadb/instance-mariadb-import.cfg.in
View file @
1a31d960
...
@@ -2,7 +2,12 @@
...
@@ -2,7 +2,12 @@
extends = ${instance-mariadb:output}
extends = ${instance-mariadb:output}
${pbsready-import: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]
[importer]
recipe = slapos.cookbook:mydumper
recipe = slapos.cookbook:mydumper
...
...
stack/lapp/README.txt
View file @
1a31d960
...
@@ -8,9 +8,9 @@ This fork of the LAMP stack provides:
...
@@ -8,9 +8,9 @@ This fork of the LAMP stack provides:
Log rotation is handled by Postgres itself.
Log rotation is handled by Postgres itself.
- symlinks to all the postgres binaries, usable through unix socket
- symlinks to all the postgres binaries, usable through unix socket
with no further authentication, or through ipv
6
with no further authentication, or through ipv
4/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
- a hook (custom-application-deployment) for configuring the PHP application
stack/lapp/buildout.cfg
View file @
1a31d960
...
@@ -39,6 +39,7 @@ extends =
...
@@ -39,6 +39,7 @@ extends =
[application]
[application]
recipe = hexagonit.recipe.download
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
strip-top-level-dir = true
...
@@ -93,14 +94,14 @@ mode = 0644
...
@@ -93,14 +94,14 @@ mode = 0644
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/postgres/instance-postgres-import.cfg.in
url = ${:_profile_base_location_}/postgres/instance-postgres-import.cfg.in
output = ${buildout:directory}/instance-postgres-import.cfg
output = ${buildout:directory}/instance-postgres-import.cfg
md5sum =
1989ba2164dd5f79793a04e0a02ea515
md5sum =
7edfa157ddccc27e99bf128fc1c2b9ee
mode = 0644
mode = 0644
[instance-postgres-export]
[instance-postgres-export]
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/postgres/instance-postgres-export.cfg.in
url = ${:_profile_base_location_}/postgres/instance-postgres-export.cfg.in
output = ${buildout:directory}/instance-postgres-export.cfg
output = ${buildout:directory}/instance-postgres-export.cfg
md5sum =
7bce31bc22a731a8fc6119aee96586f5
md5sum =
68080e5d861eb3474442211dd65c668b
mode = 0644
mode = 0644
...
...
stack/lapp/postgres/instance-postgres-export.cfg.in
View file @
1a31d960
...
@@ -4,9 +4,12 @@ extends = ${instance-postgres:output}
...
@@ -4,9 +4,12 @@ extends = ${instance-postgres:output}
parts +=
parts +=
urls
urls
postgres-instance
postgres-instance
postgres-promise
postgres-promise
# have to repeat the next one, as it's not inherited from pbsready-export
cron-entry-backup
[exporter]
[exporter]
...
...
stack/lapp/postgres/instance-postgres-import.cfg.in
View file @
1a31d960
...
@@ -4,7 +4,10 @@ extends = ${instance-postgres:output}
...
@@ -4,7 +4,10 @@ extends = ${instance-postgres:output}
parts +=
parts +=
postgres-instance
postgres-instance
# have to repeat the next one, as it's not inherited from pbsready-import
import-on-notification
[importer]
[importer]
recipe = slapos.cookbook:postgres.import
recipe = slapos.cookbook:postgres.import
...
...
stack/resilient/README.txt
0 → 100644
View file @
1a31d960
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
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