Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos-caddy
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
Guillaume Hervier
slapos-caddy
Commits
8cc9bebe
Commit
8cc9bebe
authored
May 07, 2014
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Buildout profile for abilian application
parent
a467c0f0
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
659 additions
and
0 deletions
+659
-0
component/unoconv/buildout.cfg
component/unoconv/buildout.cfg
+12
-0
software/abilian/extranet_spr/abilian-config.py
software/abilian/extranet_spr/abilian-config.py
+29
-0
software/abilian/extranet_spr/instance-environment.cfg.in
software/abilian/extranet_spr/instance-environment.cfg.in
+34
-0
software/abilian/extranet_spr/instance-extranet.cfg.in
software/abilian/extranet_spr/instance-extranet.cfg.in
+22
-0
software/abilian/extranet_spr/instance-postgres.cfg.in
software/abilian/extranet_spr/instance-postgres.cfg.in
+101
-0
software/abilian/extranet_spr/instance.cfg.in
software/abilian/extranet_spr/instance.cfg.in
+89
-0
software/abilian/extranet_spr/local-eggs/hexagonit.recipe.download-1.7nxd002.tar.gz
...spr/local-eggs/hexagonit.recipe.download-1.7nxd002.tar.gz
+0
-0
software/abilian/extranet_spr/software.cfg
software/abilian/extranet_spr/software.cfg
+341
-0
software/abilian/extranet_spr/template/staging.py.in
software/abilian/extranet_spr/template/staging.py.in
+31
-0
No files found.
component/unoconv/buildout.cfg
0 → 100644
View file @
8cc9bebe
[buildout]
parts =
unoconv-repository
[unoconv-repository]
recipe = slapos.recipe.build:gitclone
repository = https://github.com/dagwieers/unoconv.git
branch = master
git-executable = ${git:location}/bin/git
software/abilian/extranet_spr/abilian-config.py
0 → 100644
View file @
8cc9bebe
#!/usr/bin/env python
def
load_config
():
import
json
import
os
# python scripts
for
filepath
in
os
.
environ
.
get
(
'ABILIAN_CONFIG_EXTRA_PYTHON'
,
''
).
split
(
':'
):
execfile
(
filepath
)
# json parameters
for
filepath
in
os
.
environ
.
get
(
'ABILIAN_CONFIG_EXTRA_JSON'
,
''
).
split
(
':'
):
with
open
(
filepath
)
as
fin
:
for
key
,
value
in
json
.
load
(
fin
).
items
():
globals
()[
key
]
=
value
# convert unicode->str if required
for
key
,
value
in
globals
().
items
():
if
key
in
[
'SECRET_KEY'
]:
globals
()[
key
]
=
str
(
value
)
load_config
()
del
load_config
software/abilian/extranet_spr/instance-environment.cfg.in
0 → 100644
View file @
8cc9bebe
[buildout]
parts =
sh-instance-environment
[instance-environment]
UNO_PATH=${libreoffice-bin:location}/program
PGDATA=$${postgres-instance:pgdata-directory}
PGHOST=$${:PGDATA}
PGUSER=postgres
ABILIAN_CONFIG=${abilian-config:location}/${abilian-config:filename}
EXTRANET_INSTANCE_PATH=$${directories:extranet_spr-instance}
ABILIAN_CONFIG_EXTRA_PYTHON=$${config-staging-py:rendered}
ABILIAN_CONFIG_EXTRA_JSON=$${buildout:directory}/partition-parameters.json:$${json-extra-configuration:json-output}
LD_LIBRARY_PATH=${cairo:location}/lib:${glib:location}/lib:${pango:location}/lib
[sh-instance-environment]
recipe = collective.recipe.template
inline =
export UNO_PATH=$${instance-environment:UNO_PATH}
export PGDATA=$${instance-environment:PGDATA}
export PGHOST=$${instance-environment:PGHOST}
export PGUSER=$${instance-environment:PGUSER}
export ABILIAN_CONFIG=$${instance-environment:ABILIAN_CONFIG}
export EXTRANET_INSTANCE_PATH=$${instance-environment:EXTRANET_INSTANCE_PATH}
export ABILIAN_CONFIG_EXTRA_PYTHON=$${instance-environment:ABILIAN_CONFIG_EXTRA_PYTHON}
export ABILIAN_CONFIG_EXTRA_JSON=$${instance-environment:ABILIAN_CONFIG_EXTRA_JSON}
export LD_LIBRARY_PATH=$${instance-environment:LD_LIBRARY_PATH}
output = $${buildout:directory}/environment.sh
software/abilian/extranet_spr/instance-extranet.cfg.in
0 → 100644
View file @
8cc9bebe
[buildout]
parts =
extranet-symlinks
config-staging-py
[extranet-symlinks]
recipe = slapos.cookbook:symbolic.link
target-directory = $${directories:bin}
link-binary =
${buildout:directory}/bin/abilian
[config-staging-py]
recipe = slapos.recipe.template:jinja2
template = ${config-staging-py-template:location}/${config-staging-py-template:filename}
rendered = $${buildout:directory}/etc/staging.py
mode = 600
#context =
# section config config-staging
software/abilian/extranet_spr/instance-postgres.cfg.in
0 → 100644
View file @
8cc9bebe
[buildout]
parts =
postgres-instance
postgres-promise
postgres-symlinks
# Define egg directories to be the one from Software Release
# (/opt/slapgrid/...)
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
#----------------
#--
#-- Creates a Postgres cluster, configuration files, and a database.
[postgres-instance]
recipe = slapos.cookbook:postgres
# Options
ipv6 = $${instance-parameters:ipv6}
# listen to connections from anywhere
ipv6-netmask-bits = 0
ipv4 = $${instance-parameters:ipv4}
# listen to connections from anywhere
ipv4-netmask-bits = 0
ipv6-random = $${instance-parameters:ipv6-random}
superuser = postgres
password = $${gen-passwd:passwd}
port = 5432
dbname = db
# pgdata_directory is created by initdb, and should not exist beforehand.
pgdata-directory = $${directories:var}/data
bin = ${postgresql91:location}/bin
services = $${directories:services}
#----------------
#--
#-- Generates a random password and stores it in the filesystem
[gen-passwd]
recipe = slapos.cookbook:generate.password
storage-path = $${directories:srv}/postgres_passwd
bytes = 16
#----------------
#--
#-- Deploy promise scripts.
[postgres-promise]
recipe = slapos.cookbook:check_port_listening
path = $${directories:promises}/postgres
hostname = $${instance-parameters:ipv6-random}
port = $${postgres-instance:port}
[postgres-symlinks]
recipe = slapos.cookbook:symbolic.link
target-directory = $${directories:bin}
link-binary =
${postgresql91:location}/bin/createdb
${postgresql91:location}/bin/createuser
${postgresql91:location}/bin/dropdb
${postgresql91:location}/bin/dropuser
${postgresql91:location}/bin/psql
${postgresql91:location}/bin/pg_dump
${postgresql91:location}/bin/pg_dumpall
${postgresql91:location}/bin/pg_resetxlog
${postgresql91:location}/bin/pg_restore
${postgresql91:location}/bin/postgres
${postgresql91:location}/bin/reindexdb
${postgresql91:location}/bin/vacuumdb
#----------------
#--
#-- Publish instance parameters.
[publish]
recipe = slapos.cookbook:publish
url = $${postgres-instance:url}
#----------------
#--
#-- Fetches parameters defined in SlapOS Master for this instance
[instance-parameters]
recipe = slapos.cookbook:slapconfiguration
computer = $${slap-connection:computer-id}
partition = $${slap-connection:partition-id}
url = $${slap-connection:server-url}
key = $${slap-connection:key-file}
cert = $${slap-connection:cert-file}
software/abilian/extranet_spr/instance.cfg.in
0 → 100644
View file @
8cc9bebe
[buildout]
extends =
${instance-postgres:output}
${instance-extranet:output}
${instance-environment:output}
parts =
directories
sh-instance-environment
postgres-instance
postgres-promise
postgres-symlinks
extranet-symlinks
config-staging-py
json-configuration
json-extra-configuration
request-web-frontend
publish-connection-parameter
[json-configuration]
recipe = slapos.cookbook:slapconfiguration.jsondump
json-output = $${buildout:directory}/partition-parameters.json
computer = $${slap-connection:computer-id}
partition = $${slap-connection:partition-id}
url = $${slap-connection:server-url}
key = $${slap-connection:key-file}
cert = $${slap-connection:cert-file}
[json-extra-configuration]
recipe = slapos.cookbook:jsondump
json-output = $${buildout:directory}/abilian-config-extra.json
UNOCONV_LOCATION = ${unoconv-repository:location}/unoconv
BROKER_URL = redis://localhost:6379/2
CELERY_RESULT_BACKEND = redis://localhost:6379/2
#----------------
#-- Instance-level buildout profiles.
[instance]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in
output = ${buildout:directory}/instance.cfg
md5sum = d8b833a2054b82b6031a9420008b58fd
mode = 0644
[directories]
recipe = slapos.cookbook:mkdirectory
bin = $${buildout:directory}/bin
etc = $${buildout:directory}/etc
srv = $${buildout:directory}/srv
services = $${directories:etc}/service
promises = $${directories:etc}/promise
var = $${buildout:directory}/var
extranet_spr-instance = $${:var}/extranet_spr-instance
cache = $${:extranet_spr-instance}/cache
data = $${:extranet_spr-instance}/data
log = $${:extranet_spr-instance}/log
tmp = $${:extranet_spr-instance}/tmp
whoosh = $${:data}/whoosh
[request-web-frontend]
<= slap-connection
recipe = slapos.cookbook:requestoptional
name = Web Frontend
# XXX We have hardcoded SR URL here.
software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
slave = true
config = url
config-url = https://[$${instance-parameters:ipv6}]:5000/
return = site_url
[publish-connection-parameter]
recipe = slapos.cookbook:publish
url = $${request-web-frontend:connection-site_url}
name = test parameter
software/abilian/extranet_spr/local-eggs/hexagonit.recipe.download-1.7nxd002.tar.gz
0 → 100644
View file @
8cc9bebe
File added
software/abilian/extranet_spr/software.cfg
0 → 100644
View file @
8cc9bebe
[buildout]
extends =
../../../stack/slapos.cfg
../../../component/git/buildout.cfg
../../../component/pillow/buildout.cfg
../../../component/postgresql/buildout.cfg
../../../component/imagemagick/buildout.cfg
../../../component/poppler/buildout.cfg
../../../component/libreoffice-bin/buildout.cfg
../../../component/redis/buildout.cfg
../../../component/unoconv/buildout.cfg
../../../component/nginx/buildout.cfg
../../../component/gtk-2/buildout.cfg
../../../component/glib/buildout.cfg
parts =
slapos-cookbook
weasyprint-repository
flask-alembic-repository
flask-security-repository
progressbar-repository
abilian-core-repository
slapos-cookbook-repository
weasyprint-repository-check
flask-alembic-repository-check
flask-security-repository-check
progressbar-repository-check
abilian-core-repository-check
slapos-cookbook-repository-check
Extranet_SPR
postgresql91
freetype
cairo
glib
pillow-python
psycopg2
eggs
imagemagick
poppler
libreoffice-bin
redis
unoconv-repository
nginx
instance
instance-postgres
config-staging-py-template
abilian-config
find-links +=
${:_profile_base_location_}/local-eggs
develop =
${:parts-directory}/weasyprint-repository
${:parts-directory}/flask-alembic-repository
${:parts-directory}/flask-security-repository
${:parts-directory}/progressbar-repository
${:parts-directory}/abilian-core-repository
${:parts-directory}/slapos-cookbook-repository
/opt/slapgrid/src/systematic/extranet_spr
[git-repository]
recipe = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git
[git-repository-check]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = grep parts ${buildout:develop-eggs-directory}/${:egg-link}
[weasyprint-repository]
< = git-repository
repository = https://github.com/mmariani/WeasyPrint.git
branch = dlopen-v0.21
[weasyprint-repository-check]
< = git-repository-check
egg-link = WeasyPrint.egg-link
[flask-alembic-repository]
< = git-repository
repository = https://github.com/tobiasandtobias/flask-alembic.git
branch = master
[flask-alembic-repository-check]
< = git-repository-check
egg-link = Flask-Alembic.egg-link
[flask-security-repository]
< = git-repository
repository = https://github.com/abilian/flask-security.git
branch = master
[flask-security-repository-check]
< = git-repository-check
egg-link = Flask-Security.egg-link
[progressbar-repository]
< = git-repository
repository = https://github.com/mmariani/python-progressbar
branch = master
[progressbar-repository-check]
< = git-repository-check
egg-link = progressbar.egg-link
[abilian-core-repository]
< = git-repository
repository = https://github.com/abilian/abilian-core.git
branch = 0.1-maintenance
[abilian-core-repository-check]
< = git-repository-check
egg-link = Abilian-Core.egg-link
[slapos-cookbook-repository]
< = git-repository
repository = http://git.erp5.org/repos/slapos.git
branch = systematic
[slapos-cookbook-repository-check]
< = git-repository-check
egg-link = slapos.cookbook.egg-link
[eggs]
recipe = zc.recipe.egg
eggs =
${lxml-python:egg}
${psycopg2:egg}
${pillow-python:egg}
slapos.cookbook
collective.recipe.template
[Extranet_SPR]
# explicitly include the egg in order to
# generate the console entry points
recipe = zc.recipe.egg:scripts
eggs = Extranet_SPR
[redis]
# make test fails under debian/ovh (Opening port 21354: bind: Address already in use)
make-targets =
install
#----------------
#-- Postgres driver for Python recipes.
[psycopg2-env]
PATH = ${postgresql91:location}/bin:%(PATH)s
[psycopg2]
recipe = zc.recipe.egg:custom
egg = psycopg2
define = PSYCOPG_EXTENSIONS,PSYCOPG_DISPLAY_SIZE,PSYCOPG_NEW_BOOLEAN,HAVE_PQFREEMEM,HAVE_PQPROTOCOL3
environment = psycopg2-env
include-dirs =
${postgresql91:location}/include
library-dirs =
${postgresql91:location}/lib
rpath =
${postgresql91:location}/lib
[perl]
# We need to build Perl with -fPIC,
# in order to compile the Perl driver for Postgres.
configure-command =
sh Configure -des \
-Dprefix=${buildout:parts-directory}/${:_buildout_section_name_} \
-Dsiteprefix=${:siteprefix} \
-Accflags='-fPIC' \
-Dcflags=-I${gdbm:location}/include \
-Dldflags="-L${gdbm:location}/lib -Wl,-rpath=${gdbm:location}/lib" \
-Ui_db \
-Dnoextensions=ODBM_File \
-Dusethreads
# TODO must set UNO_PATH={libreoffice-bin:location}/program to run 'unoconv'
#----------------
#-- Instance-level buildout profiles.
[instance]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in
output = ${buildout:directory}/instance.cfg
#XXX md5sum =
mode = 0644
[instance-postgres]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-postgres.cfg.in
output = ${buildout:directory}/instance-postgres.cfg
#XXX md5sum =
mode = 0644
[instance-extranet]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-extranet.cfg.in
output = ${buildout:directory}/instance-extranet.cfg
#XXX md5sum =
mode = 0644
[instance-environment]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-environment.cfg.in
output = ${buildout:directory}/instance-environment.cfg
#XXX md5sum =
mode = 0644
[abilian-config]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/abilian-config.py
md5sum = e30bc5063632a1882ad8686147d2b0df
location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = abilian-config.py
download-only = true
mode = 0755
[config-staging-py-template]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/template/${:filename}
md5sum = e19779158ddec562003f96bda1c39be1
location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = staging.py.in
download-only = true
mode = 0644
[versions]
### Abilian
Flask = 0.9
Flask-Assets = 0.8
Flask-Babel = 0.8
Babel = 0.9.6
Flask-DebugToolbar = 0.8.0
Flask-Mail = 0.8.2
Flask-SQLAlchemy = 0.16
Flask-Script = 0.5.3
Flask-Testing = 0.4
Flask-Uploads = 0.1.3
Flask-WTF = 0.8.3
Flask-Markdown = 0.3
phonenumbers = 5.4b1
whoosh = 2.4.1
markdown = 2.3.1
feedparser = 5.1.3
requests = 1.2.0
iso8601 = 0.1.4
passlib = 1.6.1
py-bcrypt = 0.3
python-magic = 0.4.6
twill = 0.9.1
validate_email = 1.2
pydns = 2.3.6
docflow = 0.3.1
# Language detection. Langig seems better that guess-language.
langid = 1.1.4dev
#guess-language-spirit==0.5a4
#pyenchant==1.6.5
wtforms = 1.0.4
wtforms-alchemy = 0.7.15
WTForms-Components = 0.7.0
#psycopg2 = 2.4.6
SQLAlchemy = 0.8.6
# actually >=0.8,<0.9 but only buildout 2 can do that
redis = 2.7.2
alembic = 0.6.0
# SQLAlchemy-Utils: 0.8.4 introduced a broken import:
# "from sqlalchemy.orm.util import AliasedInsp "
# https://github.com/kvesteri/sqlalchemy-utils/commit/f786ca040cb8a12b270d8e6ae45f102713a54572
SQLAlchemy-Utils = 0.16.9
# flower: celery web ui
flower = 0.4.3
# More version freezing
html5lib = 0.999
bleach = 1.4
# webassets wants this version of dateutil
python-dateutil = 1.5
#: DEVELOPMENT
cov-core = 1.7
coverage = 3.6
coveralls = 0.2
fabric = 1.6.0
fabtools = 0.13.0
pytest-cov = 1.6
pytest = 2.4.2
Flask-LinkTester = 0.2.5
#: PRODUCTION
#newrelic==1.10.2.38
raven = 3.3.3
blinker = 1.2
xlrd = 0.9.2
gunicorn = 0.17.2
# pip > 1.4: does not install 'pre' release. Need to mark them
pytz = 2013b
closure = 20121212
progressbar = 2.3
celery = 3.0.21
Flask-Security = 1.6.5abilian0
software/abilian/extranet_spr/template/staging.py.in
0 → 100644
View file @
8cc9bebe
# coding=utf-8
"""
"""
from __future__ import absolute_import
DEBUG = True
TESTING = False
CSRF_ENABLED = True
SQL_QUERIES_COUNT_ALERT = 150
#SQLALCHEMY_DATABASE_URI =
SQLALCHEMY_ECHO = False
#SECRET_KEY =
#SALT =
WHOOSH_BASE = 'data/whoosh'
SITE_NAME = u'SPR'
MAIL_SENDER = u'sf@fermigier.com'
MAIL_FAIL_SILENTLY = False
PREFERRED_URL_SCHEME = 'https'
#UNOCONV_LOCATION =
# celery settings
#BROKER_URL =
#CELERY_RESULT_BACKEND =
CELERYD_CONCURRENCY = 2
CELERYD_PREFETCH_MULTIPLIER = 1
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