Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Carlos Ramos Carreño
erp5
Commits
92edee8f
Commit
92edee8f
authored
Jan 18, 2013
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master' into slapos
parents
6b74b122
600234ad
Changes
14
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
146 additions
and
149 deletions
+146
-149
component/imagemagick/buildout.cfg
component/imagemagick/buildout.cfg
+2
-2
setup.py
setup.py
+2
-2
slapos/recipe/postgres/__init__.py
slapos/recipe/postgres/__init__.py
+0
-81
slapos/recipe/postgres/backup.py
slapos/recipe/postgres/backup.py
+113
-0
slapos/recipe/request.py
slapos/recipe/request.py
+4
-2
software/maarch/software.cfg
software/maarch/software.cfg
+2
-2
software/postgres/instance.cfg.in
software/postgres/instance.cfg.in
+1
-12
software/postgres/software.cfg
software/postgres/software.cfg
+1
-8
software/wordpress/common.cfg
software/wordpress/common.cfg
+0
-19
software/wordpress/development.cfg
software/wordpress/development.cfg
+1
-1
software/wordpress/software.cfg
software/wordpress/software.cfg
+18
-1
stack/lapp/README.txt
stack/lapp/README.txt
+0
-3
stack/lapp/buildout.cfg
stack/lapp/buildout.cfg
+1
-4
stack/lapp/postgres/instance-postgres.cfg.in
stack/lapp/postgres/instance-postgres.cfg.in
+1
-12
No files found.
component/imagemagick/buildout.cfg
View file @
92edee8f
...
...
@@ -28,8 +28,8 @@ filename = imagemagick-6.6.6-1-no-gsx-gsc-probe.patch
[imagemagick]
recipe = hexagonit.recipe.cmmi
url = http://ftp.vim.org/ImageMagick/ImageMagick-6.
7.8-8
.tar.bz2
md5sum =
4e5c8f102f3e7401587c924f5b4bca15
url = http://ftp.vim.org/ImageMagick/ImageMagick-6.
8.1-9
.tar.bz2
md5sum =
cde56988f9d2208d9d61815cc23665b4
depends =
${libtiff:version}
${librsvg:version}
...
...
setup.py
View file @
92edee8f
...
...
@@ -137,8 +137,8 @@ setup(name=name,
'onetimeupload = slapos.recipe.onetimeupload:Recipe'
,
'pbs = slapos.recipe.pbs:Recipe'
,
'postgres = slapos.recipe.postgres:Recipe'
,
'postgres.export = slapos.recipe.postgres:ExportRecipe'
,
'postgres.import = slapos.recipe.postgres:ImportRecipe'
,
'postgres.export = slapos.recipe.postgres
.backup
:ExportRecipe'
,
'postgres.import = slapos.recipe.postgres
.backup
:ImportRecipe'
,
'proactive = slapos.recipe.proactive:Recipe'
,
'publish = slapos.recipe.publish:Recipe'
,
'publishurl = slapos.recipe.publishurl:Recipe'
,
...
...
slapos/recipe/postgres/__init__.py
View file @
92edee8f
...
...
@@ -228,84 +228,3 @@ class Recipe(GenericBaseRecipe):
self
.
createExecutable
(
name
,
content
=
content
)
class
ExportRecipe
(
GenericBaseRecipe
):
"""
\
This recipe creates an exporter script for using with the resilient stack.
Required options:
backup-directory
folder that will contain the dump file.
bin
path to the 'pg_dump' binary.
dbname
name of the database to dump.
pgdata-directory
path to postgres configuration and data.
wrapper
full path of the exporter script to create.
"""
def
install
(
self
):
wrapper
=
self
.
options
[
'wrapper'
]
self
.
createBackupScript
(
wrapper
)
return
[
wrapper
]
def
createBackupScript
(
self
,
wrapper
):
"""
\
Create a script to backup the database in 'custom' format.
"""
content
=
textwrap
.
dedent
(
"""
\
#!/bin/sh
umask 077
%(bin)s/pg_dump
\
\
--host=%(pgdata-directory)s
\
\
--format=custom
\
\
--file=%(backup-directory)s/database.dump
\
\
%(dbname)s
"""
%
self
.
options
)
self
.
createExecutable
(
wrapper
,
content
=
content
)
class
ImportRecipe
(
GenericBaseRecipe
):
"""
\
This recipe creates an importer script for using with the resilient stack.
Required options:
backup-directory
folder that contains the dump file.
bin
path to the 'pg_restore' binary.
dbname
name of the database to restore.
pgdata-directory
path to postgres configuration and data.
wrapper
full path of the importer script to create.
"""
def
install
(
self
):
wrapper
=
self
.
options
[
'wrapper'
]
self
.
createRestoreScript
(
wrapper
)
return
[
wrapper
]
def
createRestoreScript
(
self
,
wrapper
):
"""
\
Create a script to restore the database from 'custom' format.
"""
content
=
textwrap
.
dedent
(
"""
\
#!/bin/sh
%(bin)s/pg_restore
\
\
--host=%(pgdata-directory)s
\
\
--dbname=%(dbname)s
\
\
--clean
\
\
--no-owner
\
\
--no-acl
\
\
%(backup-directory)s/database.dump
"""
%
self
.
options
)
self
.
createExecutable
(
wrapper
,
content
=
content
)
slapos/recipe/postgres/backup.py
0 → 100644
View file @
92edee8f
##############################################################################
#
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import
textwrap
from
slapos.recipe.librecipe
import
GenericBaseRecipe
class
ExportRecipe
(
GenericBaseRecipe
):
"""
\
This recipe creates an exporter script for using with the resilient stack.
Required options:
backup-directory
folder that will contain the dump file.
bin
path to the 'pg_dump' binary.
dbname
name of the database to dump.
pgdata-directory
path to postgres configuration and data.
wrapper
full path of the exporter script to create.
"""
def
install
(
self
):
wrapper
=
self
.
options
[
'wrapper'
]
self
.
createBackupScript
(
wrapper
)
return
[
wrapper
]
def
createBackupScript
(
self
,
wrapper
):
"""
\
Create a script to backup the database in 'custom' format.
"""
content
=
textwrap
.
dedent
(
"""
\
#!/bin/sh
umask 077
%(bin)s/pg_dump
\
\
--host=%(pgdata-directory)s
\
\
--format=custom
\
\
--file=%(backup-directory)s/database.dump
\
\
%(dbname)s
"""
%
self
.
options
)
self
.
createExecutable
(
wrapper
,
content
=
content
)
class
ImportRecipe
(
GenericBaseRecipe
):
"""
\
This recipe creates an importer script for using with the resilient stack.
Required options:
backup-directory
folder that contains the dump file.
bin
path to the 'pg_restore' binary.
dbname
name of the database to restore.
pgdata-directory
path to postgres configuration and data.
wrapper
full path of the importer script to create.
"""
def
install
(
self
):
wrapper
=
self
.
options
[
'wrapper'
]
self
.
createRestoreScript
(
wrapper
)
return
[
wrapper
]
def
createRestoreScript
(
self
,
wrapper
):
"""
\
Create a script to restore the database from 'custom' format.
"""
content
=
textwrap
.
dedent
(
"""
\
#!/bin/sh
%(bin)s/pg_restore
\
\
--host=%(pgdata-directory)s
\
\
--dbname=%(dbname)s
\
\
--clean
\
\
--no-owner
\
\
--no-acl
\
\
%(backup-directory)s/database.dump
"""
%
self
.
options
)
self
.
createExecutable
(
wrapper
,
content
=
content
)
slapos/recipe/request.py
View file @
92edee8f
...
...
@@ -179,7 +179,9 @@ class RequestOptional(Recipe):
"""
def
install
(
self
):
if
self
.
_raise_request_exception_formatted
:
self
.
logger
.
warning
(
'Optional request failed:'
)
self
.
logger
.
warning
(
'Optional request failed.'
)
if
not
isinstance
(
self
.
_raise_request_exception
,
slapmodule
.
NotFoundError
):
# full traceback for optional 'not found' is too verbose and confusing
self
.
logger
.
warning
(
self
.
_raise_request_exception_formatted
)
elif
self
.
failed
is
not
None
:
# Check instance status to know if instance has been deployed
...
...
software/maarch/software.cfg
View file @
92edee8f
...
...
@@ -52,10 +52,10 @@ command =
#----------------
#--
#-- Main application part
#--
XXX provide a better URL
#--
[application]
url = http://downloads.sourceforge.net/project/maarch/Maarch%20Entreprise/MaarchEntreprise-1.3.zip
?r=http%3A%2F%2Fwww.maarch.org%2Ftelecharger&ts=1347961624&use_mirror=ignum
url = http://downloads.sourceforge.net/project/maarch/Maarch%20Entreprise/MaarchEntreprise-1.3.zip
md5sum = 5c2c859dee9d0dde3ba959474fd5fc86
...
...
software/postgres/instance.cfg.in
View file @
92edee8f
[buildout]
parts =
symlinks
publish
postgres-instance
postgres-promise
...
...
@@ -38,20 +37,10 @@ port = 5432
dbname = db
# pgdata_directory is created by initdb, and should not exist beforehand.
pgdata-directory = $${directories:var}/data
bin = $
${directories:bin}
bin = $
{postgresql:location}/bin
services = $${directories:services}
#----------------
#--
#-- Creates symlinks from the instance to the software release.
[symlinks]
recipe = cns.recipe.symlink
symlink_target = $${directories:bin}
symlink_base = ${postgresql:location}/bin
#----------------
#--
#-- Deploy promise scripts.
...
...
software/postgres/software.cfg
View file @
92edee8f
...
...
@@ -5,7 +5,6 @@ extends =
../../component/postgresql/buildout.cfg
parts =
eggs
slapos-cookbook
instance
postgresql92
...
...
@@ -18,16 +17,10 @@ parts =
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in
output = ${buildout:directory}/instance.cfg
md5sum =
f2f335b7b0d915d38fa76eaacff56158
md5sum =
dfba09a7cccefc5d92d455aaed2c1835
mode = 0644
[eggs]
recipe = zc.recipe.egg
eggs =
cns.recipe.symlink
[versions]
Jinja2 = 2.6
Werkzeug = 0.8.3
...
...
software/wordpress/common.cfg
deleted
100644 → 0
View file @
6b74b122
[buildout]
extends =
../../stack/lamp/buildout.cfg
[application]
url = http://wordpress.org/wordpress-3.5.tar.gz
md5sum = 105b5baff67344528bb5d8b71c050b0d
[application-template]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/wp-config.php.in
md5sum = 0d62b28125ca3c780db0b547199953f2
download-only = True
filename = template.in
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[application-configuration]
location = wp-config.php
software/wordpress/development.cfg
View file @
92edee8f
...
...
@@ -7,7 +7,7 @@
[buildout]
extends =
../../component/git/buildout.cfg
common
.cfg
software
.cfg
parts +=
...
...
software/wordpress/software.cfg
View file @
92edee8f
[buildout]
extends = common.cfg
extends =
../../stack/lamp/buildout.cfg
[application]
url = http://wordpress.org/wordpress-3.5.tar.gz
md5sum = 105b5baff67344528bb5d8b71c050b0d
[application-template]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/wp-config.php.in
md5sum = 0d62b28125ca3c780db0b547199953f2
download-only = True
filename = template.in
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[application-configuration]
location = wp-config.php
stack/lapp/README.txt
View file @
92edee8f
...
...
@@ -7,9 +7,6 @@ This fork of the LAMP stack provides:
- a Postgres instance, with an empty database and a 'postgres' superuser.
Log rotation is handled by Postgres itself.
- symlinks to all the postgres binaries, usable through unix socket
with no further authentication, or through ipv4/ipv6 with password
- a psycopg2 (postgres driver) egg to be used by further configuration recipes
- a hook (custom-application-deployment) for configuring the PHP application
...
...
stack/lapp/buildout.cfg
View file @
92edee8f
...
...
@@ -87,7 +87,7 @@ mode = 0644
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/postgres/instance-postgres.cfg.in
output = ${buildout:directory}/instance-postgres.cfg
md5sum =
42b92fb4905e2903caca327feddb5141
md5sum =
6e9e587ddb52fb9a3817fda7d77e4cab
mode = 0644
[instance-postgres-import]
...
...
@@ -162,7 +162,6 @@ eggs =
${lxml-python:egg}
${psycopg2:egg}
slapos.toolbox
cns.recipe.symlink
[versions]
...
...
@@ -171,7 +170,6 @@ Werkzeug = 0.8.3
apache-libcloud = 0.11.4
async = 0.6.1
buildout-versions = 1.7
cns.recipe.symlink = 0.2.3
gitdb = 0.5.4
hexagonit.recipe.cmmi = 1.6
inotifyx = 0.2.0
...
...
@@ -224,7 +222,6 @@ psutil = 0.6.1
pyflakes = 0.5.0
# Required by:
# cns.recipe.symlink==0.2.3
# slapos.cookbook==0.70.1-dev
# slapos.core==0.33.2-dev
# slapos.toolbox==0.32.1-dev
...
...
stack/lapp/postgres/instance-postgres.cfg.in
View file @
92edee8f
...
...
@@ -181,9 +181,8 @@ dbname = db
# pgdata_directory is created by initdb, and should not exist beforehand.
pgdata-directory = $${rootdirectory:var}/data
backup-directory = $${basedirectory:backup}/postgres
bin = $
${rootdirectory:bin}
bin = $
{postgresql:location}/bin
services = $${basedirectory:services}
dependency-symlinks = $${symlinks:recipe}
[ca-stunnel]
<= certificate-authority
...
...
@@ -194,16 +193,6 @@ key-file = $${stunnel:key-file}
cert-file = $${stunnel:cert-file}
#----------------
#--
#-- Creates symlinks from the instance to the software release.
[symlinks]
recipe = cns.recipe.symlink
symlink_target = $${rootdirectory:bin}
symlink_base = ${postgresql:location}/bin
#----------------
#--
#-- Deploy slapmonitor.
...
...
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