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
Dmitry Blinov
slapos
Commits
5ca33bc8
Commit
5ca33bc8
authored
Apr 05, 2013
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'erp5-component' into erp5
parents
9efa1ae1
b11c026a
Changes
22
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
1033 additions
and
46 deletions
+1033
-46
CHANGES.txt
CHANGES.txt
+10
-0
component/cloud9/buildout.cfg
component/cloud9/buildout.cfg
+1
-1
component/coreutils/buildout.cfg
component/coreutils/buildout.cfg
+2
-2
component/gettext/buildout.cfg
component/gettext/buildout.cfg
+2
-2
component/haproxy/buildout.cfg
component/haproxy/buildout.cfg
+2
-2
component/openssl/buildout.cfg
component/openssl/buildout.cfg
+1
-0
component/postgresql/buildout.cfg
component/postgresql/buildout.cfg
+4
-4
component/ruby/buildout.cfg
component/ruby/buildout.cfg
+7
-2
component/sqlite3/buildout.cfg
component/sqlite3/buildout.cfg
+2
-2
setup.py
setup.py
+2
-1
slapos/recipe/apache_frontend/template/apache.conf.in
slapos/recipe/apache_frontend/template/apache.conf.in
+2
-1
slapos/recipe/apachephp/__init__.py
slapos/recipe/apachephp/__init__.py
+3
-0
slapos/recipe/apachephpconfigure/__init__.py
slapos/recipe/apachephpconfigure/__init__.py
+132
-0
slapos/recipe/apachephpconfigure/runner.py
slapos/recipe/apachephpconfigure/runner.py
+28
-0
slapos/recipe/request.py
slapos/recipe/request.py
+1
-1
software/slaprunner/software.cfg
software/slaprunner/software.cfg
+8
-8
software/tt-rss/instance-custom.cfg.in
software/tt-rss/instance-custom.cfg.in
+16
-0
software/tt-rss/script/tt-rss.sql
software/tt-rss/script/tt-rss.sql
+513
-0
software/tt-rss/software.cfg
software/tt-rss/software.cfg
+49
-0
software/tt-rss/template/config.php.in
software/tt-rss/template/config.php.in
+197
-0
stack/lamp/apache/instance-apache-php.cfg.in
stack/lamp/apache/instance-apache-php.cfg.in
+4
-0
stack/lamp/buildout.cfg
stack/lamp/buildout.cfg
+47
-20
No files found.
CHANGES.txt
View file @
5ca33bc8
Changes
Changes
=======
=======
0.76.0 (2013-04-03)
-------------------
* Add 'generic' phpconfigure recipe, allowing to configure any PHP-based app. [Cedric de Saint Martin]
* apache_frontend: Have more useful access_log in apache frontend. [Cedric de Saint Martin]
* apache_frontend: Add "SSLProxyEngine On" to http apache frontend vhost to be able to proxy https -> http. [Cedric de Saint Martin]
* Add first preliminary version of nginx-based reverse proxy. [Cedric de Saint Martin]
* Request-optional is not verbose anymore (again) if it failed. [Cedric de Saint Martin]
* Add possibility to fetch web ip and port from apache recipe. [Cedric de Saint Martin]
0.75.0 (2013-03-26)
0.75.0 (2013-03-26)
-------------------
-------------------
...
...
component/cloud9/buildout.cfg
View file @
5ca33bc8
...
@@ -51,7 +51,7 @@ md5sum = 5dc8cc28447ed3747b8a53c768d872aa
...
@@ -51,7 +51,7 @@ md5sum = 5dc8cc28447ed3747b8a53c768d872aa
# NODE_PATH=${:destination}/node_modules ${nodejs:node_location} ${:cloud9_js_location}
# NODE_PATH=${:destination}/node_modules ${nodejs:node_location} ${:cloud9_js_location}
recipe = plone.recipe.command
recipe = plone.recipe.command
stop-on-error = true
stop-on-error = true
commit =
9158bbf9e886e3b96e91239249aca66e420aa8d1
commit =
f7d102bc225c922f116d2cea52a746d64343ea59
repository = https://github.com/ajaxorg/cloud9.git
repository = https://github.com/ajaxorg/cloud9.git
location = ${buildout:parts-directory}/${:_buildout_section_name_}
location = ${buildout:parts-directory}/${:_buildout_section_name_}
environment = export GIT_SSL_NO_VERIFY=true; export PATH=${git:location}/bin:${nodejs:location}/bin:${node-sm:location}/node_modules/sm/bin:$PATH; export CPPFLAGS="-I${libxml2:location}/include -I${nodejs:location}/include"; export LDFLAGS="-L${libxml2:location}/lib -Wl,-rpath=${libxml2:location}/lib"; export HOME=${:location};
environment = export GIT_SSL_NO_VERIFY=true; export PATH=${git:location}/bin:${nodejs:location}/bin:${node-sm:location}/node_modules/sm/bin:$PATH; export CPPFLAGS="-I${libxml2:location}/include -I${nodejs:location}/include"; export LDFLAGS="-L${libxml2:location}/lib -Wl,-rpath=${libxml2:location}/lib"; export HOME=${:location};
...
...
component/coreutils/buildout.cfg
View file @
5ca33bc8
...
@@ -6,8 +6,8 @@ parts =
...
@@ -6,8 +6,8 @@ parts =
[coreutils]
[coreutils]
recipe = hexagonit.recipe.cmmi
recipe = hexagonit.recipe.cmmi
url = http://ftp.gnu.org/gnu/coreutils/coreutils-8.2
0
.tar.xz
url = http://ftp.gnu.org/gnu/coreutils/coreutils-8.2
1
.tar.xz
md5sum =
3d69af8f561fce512538a9fe85f147ff
md5sum =
065ba41828644eca5dd8163446de5d64
configure-options =
configure-options =
--prefix=${buildout:parts-directory}/${:_buildout_section_name_} --enable-install-program=tr,basename,uname,cat,cp,ls
--prefix=${buildout:parts-directory}/${:_buildout_section_name_} --enable-install-program=tr,basename,uname,cat,cp,ls
environment =
environment =
...
...
component/gettext/buildout.cfg
View file @
5ca33bc8
...
@@ -8,8 +8,8 @@ extends =
...
@@ -8,8 +8,8 @@ extends =
[gettext]
[gettext]
recipe = hexagonit.recipe.cmmi
recipe = hexagonit.recipe.cmmi
url = http://ftp.gnu.org/pub/gnu/gettext/gettext-0.18.2.tar.gz
url = http://ftp.gnu.org/pub/gnu/gettext/gettext-0.18.2.
1.
tar.gz
md5sum = 0
c86e5af70c195ab8bd651d17d783928
md5sum = 0
34c8103b14654ebd300fadac44d6f14
configure-options =
configure-options =
--disable-static
--disable-static
...
...
component/haproxy/buildout.cfg
View file @
5ca33bc8
...
@@ -9,8 +9,8 @@ parts = haproxy
...
@@ -9,8 +9,8 @@ parts = haproxy
[haproxy]
[haproxy]
recipe = hexagonit.recipe.cmmi
recipe = hexagonit.recipe.cmmi
url = http://haproxy.1wt.eu/download/1.4/src/haproxy-1.4.2
2
.tar.gz
url = http://haproxy.1wt.eu/download/1.4/src/haproxy-1.4.2
3
.tar.gz
md5sum =
a0b007c76f6a78524f3b3dd5e704979c
md5sum =
6535d5e58037ada4b58b439cebe03c79
configure-command = true
configure-command = true
# If the system is running on Linux 2.6, we use "linux26" as the TARGET,
# If the system is running on Linux 2.6, we use "linux26" as the TARGET,
# otherwise use "generic".
# otherwise use "generic".
...
...
component/openssl/buildout.cfg
View file @
5ca33bc8
...
@@ -45,6 +45,7 @@ configure-options =
...
@@ -45,6 +45,7 @@ configure-options =
--libdir=lib
--libdir=lib
shared no-idea no-mdc2 no-rc5 zlib
shared no-idea no-mdc2 no-rc5 zlib
-Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${buildout:parts-directory}/${:_buildout_section_name_}/lib
-Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${buildout:parts-directory}/${:_buildout_section_name_}/lib
&& make depend
# it seems that parallel build sometimes fails for openssl.
# it seems that parallel build sometimes fails for openssl.
make-options =
make-options =
...
...
component/postgresql/buildout.cfg
View file @
5ca33bc8
...
@@ -14,8 +14,8 @@ parts = postgresql
...
@@ -14,8 +14,8 @@ parts = postgresql
[postgresql91]
[postgresql91]
recipe = hexagonit.recipe.cmmi
recipe = hexagonit.recipe.cmmi
url = http://ftp.postgresql.org/pub/source/v9.1.
7/postgresql-9.1.7
.tar.bz2
url = http://ftp.postgresql.org/pub/source/v9.1.
9/postgresql-9.1.9
.tar.bz2
md5sum =
eaf7b67493d59d1a60767ffdfbd65ce9
md5sum =
6b5ea53dde48fcd79acfc8c196b83535
configure-options = --with-openssl --with-perl
configure-options = --with-openssl --with-perl
environment =
environment =
CPPFLAGS=-I${zlib:location}/include -I${readline:location}/include -I${openssl:location}/include -I${ncurses:location}/lib
CPPFLAGS=-I${zlib:location}/include -I${readline:location}/include -I${openssl:location}/include -I${ncurses:location}/lib
...
@@ -24,8 +24,8 @@ environment =
...
@@ -24,8 +24,8 @@ environment =
[postgresql92]
[postgresql92]
recipe = hexagonit.recipe.cmmi
recipe = hexagonit.recipe.cmmi
url = http://ftp.postgresql.org/pub/source/v9.2.
2/postgresql-9.2.2
.tar.bz2
url = http://ftp.postgresql.org/pub/source/v9.2.
4/postgresql-9.2.4
.tar.bz2
md5sum =
1cc388988e69bf75c6b55d59070100f6
md5sum =
6ee5bb53b97da7c6ad9cb0825d3300dd
configure-options = --with-openssl
configure-options = --with-openssl
environment =
environment =
CPPFLAGS=-I${zlib:location}/include -I${readline:location}/include -I${openssl:location}/include -I${ncurses:location}/lib
CPPFLAGS=-I${zlib:location}/include -I${readline:location}/include -I${openssl:location}/include -I${ncurses:location}/lib
...
...
component/ruby/buildout.cfg
View file @
5ca33bc8
[buildout]
[buildout]
extends =
extends =
../gdbm/buildout.cfg
../openssl/buildout.cfg
../zlib/buildout.cfg
../readline/buildout.cfg
../ncurses/buildout.cfg
../libyaml/buildout.cfg
../libyaml/buildout.cfg
parts = ruby
parts = ruby
...
@@ -12,8 +17,8 @@ md5sum = bc0c715c69da4d1d8bd57069c19f6c0e
...
@@ -12,8 +17,8 @@ md5sum = bc0c715c69da4d1d8bd57069c19f6c0e
configure-options =
configure-options =
--enable-shared --enable-rpath
--enable-shared --enable-rpath
environment =
environment =
C
FLAGS=-I${libyam
l:location}/include
C
PPFLAGS=-I${zlib:location}/include -I${readline:location}/include -I${libyaml:location}/include -I${ncurses:location}/include -I${ncurses:location}/include/ncursesw -I${gdbm:location}/include -I${openss
l:location}/include
LDFLAGS=-L${
libyaml:location}/lib -Wl,-rpath=${libyam
l:location}/lib
LDFLAGS=-L${
zlib:location}/lib -L${libyaml:location}/lib -L${readline:location}/lib -L${ncurses:location}/lib -L${gdbm:location}/lib -L${openssl:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${libyaml:location}/lib -Wl,-rpath=${ncurses:location}/lib -Wl,-rpath=${readline:location}/lib -Wl,-rpath=${gdbm:location}/lib -Wl,-rpath=${openss
l:location}/lib
[ruby-1.9]
[ruby-1.9]
<= ruby-1.9.3
<= ruby-1.9.3
...
...
component/sqlite3/buildout.cfg
View file @
5ca33bc8
...
@@ -5,8 +5,8 @@ parts =
...
@@ -5,8 +5,8 @@ parts =
[sqlite3]
[sqlite3]
recipe = hexagonit.recipe.cmmi
recipe = hexagonit.recipe.cmmi
url = http://www.sqlite.org/
sqlite-autoconf-3071502
.tar.gz
url = http://www.sqlite.org/
2013/sqlite-autoconf-3071601
.tar.gz
md5sum =
bcb0ab0b5b30116b2531cfeef3c861b4
md5sum =
8860d1a1ed26d40f07e3c7ae035b644a
configure-options =
configure-options =
--disable-static
--disable-static
--enable-readline
--enable-readline
...
...
setup.py
View file @
5ca33bc8
...
@@ -28,7 +28,7 @@ from setuptools import setup, find_packages
...
@@ -28,7 +28,7 @@ from setuptools import setup, find_packages
import
glob
import
glob
import
os
import
os
version
=
'0.7
5
.1.dev'
version
=
'0.7
6
.1.dev'
name
=
'slapos.cookbook'
name
=
'slapos.cookbook'
long_description
=
open
(
"README.txt"
).
read
()
+
"
\
n
"
+
\
long_description
=
open
(
"README.txt"
).
read
()
+
"
\
n
"
+
\
open
(
"CHANGES.txt"
).
read
()
+
"
\
n
"
open
(
"CHANGES.txt"
).
read
()
+
"
\
n
"
...
@@ -73,6 +73,7 @@ setup(name=name,
...
@@ -73,6 +73,7 @@ setup(name=name,
'apache.zope.backend = slapos.recipe.apache_zope_backend:Recipe'
,
'apache.zope.backend = slapos.recipe.apache_zope_backend:Recipe'
,
'apacheperl = slapos.recipe.apacheperl:Recipe'
,
'apacheperl = slapos.recipe.apacheperl:Recipe'
,
'apachephp = slapos.recipe.apachephp:Recipe'
,
'apachephp = slapos.recipe.apachephp:Recipe'
,
'apachephpconfigure = slapos.recipe.apachephpconfigure:Recipe'
,
'apacheproxy = slapos.recipe.apacheproxy:Recipe'
,
'apacheproxy = slapos.recipe.apacheproxy:Recipe'
,
'certificate_authority = slapos.recipe.certificate_authority:Recipe'
,
'certificate_authority = slapos.recipe.certificate_authority:Recipe'
,
'certificate_authority.request = slapos.recipe.certificate_authority:Request'
,
'certificate_authority.request = slapos.recipe.certificate_authority:Request'
,
...
...
slapos/recipe/apache_frontend/template/apache.conf.in
View file @
5ca33bc8
...
@@ -22,7 +22,7 @@ ServerTokens Prod
...
@@ -22,7 +22,7 @@ ServerTokens Prod
# Log configuration
# Log configuration
ErrorLog "%(error_log)s"
ErrorLog "%(error_log)s"
LogLevel
warn
LogLevel
info
LogFormat "%%h %%{REMOTE_USER}i %%{Host}i %%l %%u %%t \"%%r\" %%>s %%b \"%%{Referer}i\" \"%%{User-Agent}i\"" combined
LogFormat "%%h %%{REMOTE_USER}i %%{Host}i %%l %%u %%t \"%%r\" %%>s %%b \"%%{Referer}i\" \"%%{User-Agent}i\"" combined
LogFormat "%%h %%{REMOTE_USER}i %%{Host}i %%l %%u %%t \"%%r\" %%>s %%b" common
LogFormat "%%h %%{REMOTE_USER}i %%{Host}i %%l %%u %%t \"%%r\" %%>s %%b" common
CustomLog "%(access_log)s" common
CustomLog "%(access_log)s" common
...
@@ -130,6 +130,7 @@ Header append Vary User-Agent
...
@@ -130,6 +130,7 @@ Header append Vary User-Agent
<VirtualHost *:%(plain_http_port)s>
<VirtualHost *:%(plain_http_port)s>
RewriteEngine On
RewriteEngine On
SSLProxyEngine on
ProxyPreserveHost On
ProxyPreserveHost On
# Include configuration file not operated by slapos. This file won't be erased
# Include configuration file not operated by slapos. This file won't be erased
...
...
slapos/recipe/apachephp/__init__.py
View file @
5ca33bc8
...
@@ -101,6 +101,9 @@ class Recipe(GenericBaseRecipe):
...
@@ -101,6 +101,9 @@ class Recipe(GenericBaseRecipe):
mysql_ip
=
self
.
options
[
'mysql-host'
],
mysql_ip
=
self
.
options
[
'mysql-host'
],
mysql_port
=
self
.
options
[
'mysql-port'
],
mysql_port
=
self
.
options
[
'mysql-port'
],
secret_key
=
secret_key
,
secret_key
=
secret_key
,
ip
=
'[%s]'
%
self
.
options
[
'ip'
],
port
=
self
.
options
[
'port'
],
# XXX-Cedric: add frontend url.
)
)
directory
,
file_
=
os
.
path
.
split
(
self
.
options
[
'configuration'
])
directory
,
file_
=
os
.
path
.
split
(
self
.
options
[
'configuration'
])
...
...
slapos/recipe/apachephpconfigure/__init__.py
0 → 100644
View file @
5ca33bc8
##############################################################################
#
# Copyright (c) 2012 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.
#
##############################################################################
from
slapos.recipe.librecipe
import
GenericBaseRecipe
import
zc.buildout
import
sys
import
zc.recipe.egg
class
Recipe
(
GenericBaseRecipe
):
def
install
(
self
):
"""
Taken out from the old "lamp" recipe. Allows do configure a LAMP instance.
"""
self
.
path_list
=
[]
document_root
=
self
.
options
[
'htdocs'
]
url
=
self
.
options
.
get
(
'url'
,
''
)
mysql_conf
=
{
'mysql_host'
:
self
.
options
[
'mysql-host'
],
'mysql_port'
:
self
.
options
[
'mysql-port'
],
'mysql_user'
:
self
.
options
[
'mysql-username'
],
'mysql_password'
:
self
.
options
[
'mysql-password'
],
'mysql_database'
:
self
.
options
[
'mysql-database'
],
}
self
.
configureInstallation
(
document_root
,
url
,
mysql_conf
)
return
self
.
path_list
def
configureInstallation
(
self
,
document_root
,
url
,
mysql_conf
):
"""Start process which can launch python scripts, move or remove files or
directories when installing software.
"""
if
not
self
.
options
.
has_key
(
'delete'
)
and
not
self
.
options
.
has_key
(
'rename'
)
and
not
\
self
.
options
.
has_key
(
'chmod'
)
and
not
self
.
options
.
has_key
(
'script'
)
and
not
self
.
options
.
has_key
(
'sql-script'
):
return
""
delete
=
[]
chmod
=
[]
data
=
[]
rename
=
[]
rename_list
=
""
argument
=
[
self
.
options
[
'lampconfigure'
],
"-H"
,
mysql_conf
[
'mysql_host'
],
"-P"
,
mysql_conf
[
'mysql_port'
],
"-p"
,
mysql_conf
[
'mysql_password'
],
"-u"
,
mysql_conf
[
'mysql_user'
]]
if
not
self
.
options
.
has_key
(
'file_token'
):
argument
=
argument
+
[
"-d"
,
mysql_conf
[
'mysql_database'
],
"--table"
,
self
.
options
[
'table_name'
].
strip
(),
"--cond"
,
self
.
options
.
get
(
'constraint'
,
'1'
).
strip
()]
else
:
argument
=
argument
+
[
"-f"
,
self
.
options
[
'file_token'
].
strip
()]
argument
+=
[
"-t"
,
document_root
]
if
self
.
options
.
has_key
(
'delete'
):
delete
=
[
"delete"
]
for
fname
in
self
.
options
[
'delete'
].
split
(
','
):
delete
.
append
(
fname
.
strip
())
if
self
.
options
.
has_key
(
'rename'
):
for
fname
in
self
.
options
[
'rename'
].
split
(
','
):
if
fname
.
find
(
"=>"
)
<
0
:
old_name
=
fname
fname
=
[]
fname
.
append
(
old_name
)
fname
.
append
(
old_name
+
'-'
+
mysql_conf
[
'mysql_user'
])
else
:
fname
=
fname
.
split
(
"=>"
)
cmd
=
[
"rename"
]
if
self
.
options
.
has_key
(
'rename_chmod'
):
cmd
+=
[
"--chmod"
,
self
.
options
[
'rename_chmod'
].
strip
()]
rename
.
append
(
cmd
+
[
fname
[
0
].
strip
(),
fname
[
1
].
strip
()])
rename_list
+=
fname
[
0
]
+
" to "
+
fname
[
1
]
+
" "
if
self
.
options
.
has_key
(
'chmod'
):
chmod
=
[
"chmod"
,
self
.
options
[
'mode'
].
strip
()]
for
fname
in
self
.
options
[
'chmod'
].
split
(
','
):
chmod
.
append
(
fname
.
strip
())
if
self
.
options
.
has_key
(
'script'
)
and
\
self
.
options
[
'script'
].
strip
().
endswith
(
".py"
):
data
=
[
"run"
,
self
.
options
[
'script'
].
strip
(),
"-v"
,
mysql_conf
[
'mysql_database'
],
url
,
document_root
]
if
self
.
options
.
has_key
(
'sql-script'
):
data
=
[
"sql"
,
self
.
options
[
'sql-script'
].
strip
(),
"-v"
,
mysql_conf
[
'mysql_database'
],
url
,
document_root
]
# TODO factor
if
delete
!=
[]:
print
"Creating lampconfigure with 'delete' arguments"
command
=
argument
+
delete
if
rename
!=
[]:
for
parameters
in
rename
:
print
"Creating lampconfigure with 'rename' arguments"
command
=
argument
+
rename
if
chmod
!=
[]:
print
"Creating lampconfigure with 'chmod' arguments"
command
=
argument
+
chmod
if
data
!=
[]:
print
"Creating lampconfigure with 'run' arguments"
command
=
argument
+
data
configureinstall_wrapper_path
=
self
.
createPythonScript
(
self
.
options
[
'configureinstall-location'
],
__name__
+
'.runner.executeRunner'
,
[
argument
,
delete
,
rename
,
chmod
,
data
]
)
#TODO finish to port this and remove upper one
#configureinstall_wrapper_path = self.createPythonScript(
# self.options['configureinstall-location'],
# 'slapos.lamp.run',
# [command]
#)
self
.
path_list
.
append
(
configureinstall_wrapper_path
)
return
rename_list
slapos/recipe/apachephpconfigure/runner.py
0 → 100644
View file @
5ca33bc8
import
subprocess
def
executeRunner
(
args
):
"""Start the instance configure. this may run a python script, move or/and rename
file or directory when dondition is filled. the condition may be when file exist or when an entry
exist into database.
"""
arguments
,
delete
,
rename
,
chmod
,
data
=
args
if
delete
!=
[]:
print
"Calling lampconfigure with 'delete' arguments"
result
=
subprocess
.
Popen
(
arguments
+
delete
)
result
.
wait
()
if
rename
!=
[]:
for
parameters
in
rename
:
print
"Calling lampconfigure with 'rename' arguments"
result
=
subprocess
.
Popen
(
arguments
+
parameters
)
result
.
wait
()
if
chmod
!=
[]:
print
"Calling lampconfigure with 'chmod' arguments"
result
=
subprocess
.
Popen
(
arguments
+
chmod
)
result
.
wait
()
if
data
!=
[]:
print
"Calling lampconfigure with 'run' arguments"
print
arguments
+
data
result
=
subprocess
.
Popen
(
arguments
+
data
)
result
.
wait
()
return
slapos/recipe/request.py
View file @
5ca33bc8
...
@@ -195,7 +195,7 @@ class RequestOptional(Recipe):
...
@@ -195,7 +195,7 @@ class RequestOptional(Recipe):
self
.
logger
.
warning
(
'Optional request failed.'
)
self
.
logger
.
warning
(
'Optional request failed.'
)
if
not
isinstance
(
self
.
_raise_request_exception
,
slapmodule
.
NotFoundError
):
if
not
isinstance
(
self
.
_raise_request_exception
,
slapmodule
.
NotFoundError
):
# full traceback for optional 'not found' is too verbose and confusing
# full traceback for optional 'not found' is too verbose and confusing
self
.
logger
.
warnin
g
(
self
.
_raise_request_exception_formatted
)
self
.
logger
.
debu
g
(
self
.
_raise_request_exception_formatted
)
elif
self
.
failed
is
not
None
:
elif
self
.
failed
is
not
None
:
# Check instance status to know if instance has been deployed
# Check instance status to know if instance has been deployed
try
:
try
:
...
...
software/slaprunner/software.cfg
View file @
5ca33bc8
...
@@ -61,26 +61,26 @@ slapos.core = 0.34
...
@@ -61,26 +61,26 @@ slapos.core = 0.34
slapos.libnetworkcache = 0.13.3
slapos.libnetworkcache = 0.13.3
slapos.recipe.build = 0.11.5
slapos.recipe.build = 0.11.5
slapos.recipe.template = 2.4.2
slapos.recipe.template = 2.4.2
slapos.toolbox = 0.3
3.1
slapos.toolbox = 0.3
4.0
smmap = 0.8.2
smmap = 0.8.2
xml-marshaller = 0.9.7
xml-marshaller = 0.9.7
z3c.recipe.scripts = 1.0.1
z3c.recipe.scripts = 1.0.1
# Required by:
# Required by:
# slapos.core==0.34
# slapos.core==0.34
# slapos.toolbox==0.3
3.1
# slapos.toolbox==0.3
4.0
Flask = 0.9
Flask = 0.9
# Required by:
# Required by:
# slapos.toolbox==0.3
3.1
# slapos.toolbox==0.3
4.0
GitPython = 0.3.2.RC1
GitPython = 0.3.2.RC1
# Required by:
# Required by:
# slapos.toolbox==0.3
3.1
# slapos.toolbox==0.3
4.0
atomize = 0.1.1
atomize = 0.1.1
# Required by:
# Required by:
# slapos.toolbox==0.3
3.1
# slapos.toolbox==0.3
4.0
feedparser = 5.1.3
feedparser = 5.1.3
# Required by:
# Required by:
...
@@ -92,11 +92,11 @@ hexagonit.recipe.download = 1.6nxd002
...
@@ -92,11 +92,11 @@ hexagonit.recipe.download = 1.6nxd002
netifaces = 0.8
netifaces = 0.8
# Required by:
# Required by:
# slapos.toolbox==0.3
3.1
# slapos.toolbox==0.3
4.0
paramiko = 1.9.0
paramiko = 1.9.0
# Required by:
# Required by:
# slapos.toolbox==0.3
3.1
# slapos.toolbox==0.3
4.0
psutil = 0.6.1
psutil = 0.6.1
# Required by:
# Required by:
...
@@ -108,7 +108,7 @@ pyflakes = 0.5.0
...
@@ -108,7 +108,7 @@ pyflakes = 0.5.0
# slapos.cookbook==0.71.1
# slapos.cookbook==0.71.1
# slapos.core==0.34
# slapos.core==0.34
# slapos.libnetworkcache==0.13.3
# slapos.libnetworkcache==0.13.3
# slapos.toolbox==0.3
3.1
# slapos.toolbox==0.3
4.0
# supervisor==3.0b1
# supervisor==3.0b1
# zc.buildout==1.6.0-dev-SlapOS-010
# zc.buildout==1.6.0-dev-SlapOS-010
# zope.interface==4.0.3
# zope.interface==4.0.3
...
...
software/tt-rss/instance-custom.cfg.in
0 → 100644
View file @
5ca33bc8
[buildout]
# Run a SQL script to populate DB at first run
[tt-rss-init]
recipe = slapos.cookbook:apachephpconfigure
table_name = db.ttrss_users
#constraint = `pn_id`>0
lampconfigure = ${buildout:bin-directory}/lampconfigure
htdocs = $${apache-php:htdocs}
mysql-username = $${apache-php:mysql-username}
mysql-password = $${apache-php:mysql-password}
mysql-database = $${apache-php:mysql-database}
mysql-host = $${apache-php:mysql-host}
mysql-port = $${apache-php:mysql-port}
configureinstall-location = $${basedirectory:scripts}/configureInstall
sql-script = ${sql-script:location}/${sql-script:filename}
\ No newline at end of file
software/tt-rss/script/tt-rss.sql
0 → 100644
View file @
5ca33bc8
This diff is collapsed.
Click to expand it.
software/tt-rss/software.cfg
0 → 100644
View file @
5ca33bc8
[buildout]
extends =
../../stack/lamp/buildout.cfg
[application]
recipe = slapos.recipe.build:download-unpacked
url = https://github.com/gothfox/Tiny-Tiny-RSS/archive/1.7.5.tar.gz
#md5sum = a81cea71701404cebf64c07b7ac6c948
strip-top-level-dir = true
[application-template]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/template/config.php.in
#md5sum = Student may put here md5sum of this file, this is good idea
filename = template.in
mode = 0644
location = ${buildout:parts-directory}/${:_buildout_section_name_}
[application-configuration]
location = config.php
[sql-script]
recipe = slapos.recipe.download
location = ${buildout:parts-directory}/${:_buildout_section_name_}
url = ${:_profile_base_location_}/script/tt-rss.sql
#md5sum = c4d5f87d8f02cad3f20e679160195f48
filename = tt-rss.sql
mode = 0744
# XXX Should disappear and be integrated into apachephpconfigure
[configure-script]
recipe = slapos.recipe.download
location = ${buildout:parts-directory}/${:_buildout_section_name_}
url = ${:_profile_base_location_}/configure-tt-rss.py
#md5sum = c4d5f87d8f02cad3f20e679160195f48
filename = configure-tt-rss.py
mode = 0744
[custom-application-deployment-template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-custom.cfg.in
output = ${buildout:directory}/instance-custom.cfg
#md5sum = 283cb53ff8cd34635703e771062db919
mode = 0644
[custom-application-deployment]
path = ${custom-application-deployment-template:output}
part-list = tt-rss-init
software/tt-rss/template/config.php.in
0 → 100644
View file @
5ca33bc8
<?php
// *******************************************
// *** Database configuration (important!) ***
// *******************************************
define
(
'DB_TYPE'
,
"mysql"
);
// or mysql
define
(
'DB_HOST'
,
"%(mysql_host)s"
);
define
(
'DB_USER'
,
"%(mysql_user)s"
);
define
(
'DB_NAME'
,
"%(mysql_database)s"
);
define
(
'DB_PASS'
,
"%(mysql_password)s"
);
define
(
'MYSQL_CHARSET'
,
'UTF8'
);
// Connection charset for MySQL. If you have a legacy database and/or experience
// garbage unicode characters with this option, try setting it to a blank string.
// ***********************************
// *** Basic settings (important!) ***
// ***********************************
//FIXME set frontend URL
define
(
'SELF_URL_PATH'
,
'http://%(ip)s:%(port)s'
);
// Full URL of your tt-rss installation. This should be set to the
// location of tt-rss directory, e.g. http://yourserver/tt-rss/
// You need to set this option correctly otherwise several features
// including PUSH, bookmarklets and browser integration will not work properly.
define
(
'SINGLE_USER_MODE'
,
true
);
// Operate in single user mode, disables all functionality related to
// multiple users.
define
(
'SIMPLE_UPDATE_MODE'
,
false
);
// Enables fallback update mode where tt-rss tries to update feeds in
// background while tt-rss is open in your browser.
// If you don't have a lot of feeds and don't want to or can't run
// background processes while not running tt-rss, this method is generally
// viable to keep your feeds up to date.
// Still, there are more robust (and recommended) updating methods
// available, you can read about them here: http://tt-rss.org/wiki/UpdatingFeeds
// *****************************
// *** Files and directories ***
// *****************************
//FIXME
define
(
'PHP_EXECUTABLE'
,
'/usr/bin/php'
);
// Path to PHP executable, used for various command-line tt-rss programs
define
(
'LOCK_DIRECTORY'
,
'lock'
);
// Directory for lockfiles, must be writable to the user you run
// daemon process or cronjobs under.
define
(
'CACHE_DIR'
,
'cache'
);
// Local cache directory for RSS feed content.
define
(
'ICONS_DIR'
,
"feed-icons"
);
define
(
'ICONS_URL'
,
"feed-icons"
);
// Local and URL path to the directory, where feed favicons are stored.
// Unless you really know what you're doing, please keep those relative
// to tt-rss main directory.
// **********************
// *** Authentication ***
// **********************
// Please see PLUGINS below to configure various authentication modules.
define
(
'AUTH_AUTO_CREATE'
,
true
);
// Allow authentication modules to auto-create users in tt-rss internal
// database when authenticated successfully.
define
(
'AUTH_AUTO_LOGIN'
,
true
);
// Automatically login user on remote or other kind of externally supplied
// authentication, otherwise redirect to login form as normal.
// If set to true, users won't be able to set application language
// and settings profile.
// *********************
// *** Feed settings ***
// *********************
define
(
'FORCE_ARTICLE_PURGE'
,
0
);
// When this option is not 0, users ability to control feed purging
// intervals is disabled and all articles (which are not starred)
// older than this amount of days are purged.
// *** PubSubHubbub settings ***
define
(
'PUBSUBHUBBUB_HUB'
,
''
);
// URL to a PubSubHubbub-compatible hub server. If defined, "Published
// articles" generated feed would automatically become PUSH-enabled.
define
(
'PUBSUBHUBBUB_ENABLED'
,
false
);
// Enable client PubSubHubbub support in tt-rss. When disabled, tt-rss
// won't try to subscribe to PUSH feed updates.
// *********************
// *** Sphinx search ***
// *********************
define
(
'SPHINX_ENABLED'
,
false
);
// Enable fulltext search using Sphinx (http://www.sphinxsearch.com)
// Please see http://tt-rss.org/wiki/SphinxSearch for more information.
define
(
'SPHINX_INDEX'
,
'ttrss'
);
// Index name in Sphinx configuration. You can specify multiple indexes
// as a comma-separated string.
// ***********************************
// *** Self-registrations by users ***
// ***********************************
define
(
'ENABLE_REGISTRATION'
,
false
);
// Allow users to register themselves. Please be vary that allowing
// random people to access your tt-rss installation is a security risk
// and potentially might lead to data loss or server exploit. Disabled
// by default.
define
(
'REG_NOTIFY_ADDRESS'
,
'user@your.domain.dom'
);
// Email address to send new user notifications to.
define
(
'REG_MAX_USERS'
,
10
);
// Maximum amount of users which will be allowed to register on this
// system. 0 - no limit.
// **********************************
// *** Cookies and login sessions ***
// **********************************
define
(
'SESSION_COOKIE_LIFETIME'
,
86400
*
30
);
// Default lifetime of a session (e.g. login) cookie. In seconds,
// 0 means cookie will be deleted when browser closes.
// Setting this to zero will affect several user preferences
// like widescreen mode not saving.
define
(
'SESSION_EXPIRE_TIME'
,
86400
*
30
);
// Hard expiration limit for sessions. Should be
// greater or equal to SESSION_COOKIE_LIFETIME
define
(
'SESSION_CHECK_ADDRESS'
,
1
);
// Check client IP address when validating session:
// 0 - disable checking
// 1 - check first 3 octets of an address (recommended)
// 2 - check first 2 octets of an address
// 3 - check entire address
// *********************************
// *** Email and digest settings ***
// *********************************
define
(
'SMTP_FROM_NAME'
,
'Tiny Tiny RSS'
);
define
(
'SMTP_FROM_ADDRESS'
,
'noreply@your.domain.dom'
);
// Name, address and subject for sending outgoing mail. This applies
// to password reset notifications, digest emails and any other mail.
define
(
'DIGEST_SUBJECT'
,
'[tt-rss] New headlines for last 24 hours'
);
// Subject line for email digests
define
(
'SMTP_HOST'
,
''
);
// SMTP Host to send outgoing mail. Blank - use system MTA.
define
(
'SMTP_PORT'
,
''
);
// SMTP port to sent outgoing mail. Default is 25.
define
(
'SMTP_LOGIN'
,
''
);
define
(
'SMTP_PASSWORD'
,
''
);
// These two options enable SMTP authentication when sending
// outgoing mail. Only used with SMTP_HOST
// ***************************************
// *** Other settings (less important) ***
// ***************************************
define
(
'CHECK_FOR_NEW_VERSION'
,
false
);
// Check for new versions of tt-rss automatically.
define
(
'ENABLE_GZIP_OUTPUT'
,
false
);
// Selectively gzip output to improve wire performance. This requires
// PHP Zlib extension on the server.
// Enabling this can break tt-rss in several httpd/php configurations,
// if you experience weird errors and tt-rss failing to start, blank pages
// after login, or content encoding errors, disable it.
define
(
'PLUGINS'
,
'auth_remote, auth_internal, note'
);
// Comma-separated list of plugins to load automatically for all users.
// System plugins have to be specified here. Please enable at least one
// authentication plugin here (auth_*).
// Users may enable other user plugins from Preferences/Plugins but may not
// disable plugins specified in this list.
define
(
'CONFIG_VERSION'
,
26
);
// Expected config version. Please update this option in config.php
// if necessary (after migrating all new options from this file).
// vim:ft=php
?>
stack/lamp/apache/instance-apache-php.cfg.in
View file @
5ca33bc8
[buildout]
[buildout]
extends = ${custom-application-deployment:path}
parts =
parts =
certificate-authority
certificate-authority
...
@@ -13,6 +14,8 @@ parts =
...
@@ -13,6 +14,8 @@ parts =
frontend-promise
frontend-promise
content-promise
content-promise
publish-connection-informations
publish-connection-informations
${custom-application-deployment:part-list}
eggs-directory = ${buildout:eggs-directory}
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
...
@@ -35,6 +38,7 @@ tmp = $${buildout:directory}/tmp
...
@@ -35,6 +38,7 @@ tmp = $${buildout:directory}/tmp
recipe = slapos.cookbook:mkdirectory
recipe = slapos.cookbook:mkdirectory
log = $${rootdirectory:var}/log
log = $${rootdirectory:var}/log
services = $${rootdirectory:etc}/service
services = $${rootdirectory:etc}/service
scripts = $${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
...
...
stack/lamp/buildout.cfg
View file @
5ca33bc8
...
@@ -74,7 +74,7 @@ mode = 0644
...
@@ -74,7 +74,7 @@ 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 =
af0d52de4c10d5a3a64f7c92283ad959
md5sum =
296ba845c8ffe75fbc6352dd0e8ce836
mode = 0644
mode = 0644
[instance-apache-import]
[instance-apache-import]
...
@@ -95,7 +95,7 @@ context = key templateapache instance-apache-php:output
...
@@ -95,7 +95,7 @@ context = key templateapache instance-apache-php:output
import-list = file parts template-parts:destination
import-list = file parts template-parts:destination
file replicated template-replicated:destination
file replicated template-replicated:destination
md5sum =
4704f2788f096c7494694db72a9f6193
md5sum =
24c5d0db063e5343a3cb0db9d5fbc738
mode = 0644
mode = 0644
[instance-resilient]
[instance-resilient]
...
@@ -135,6 +135,19 @@ md5sum = 0352896921ca1766b64f0b54f0f8c27e
...
@@ -135,6 +135,19 @@ md5sum = 0352896921ca1766b64f0b54f0f8c27e
mode = 0644
mode = 0644
#----------------
#--
#-- Optional part allowing applications using this stack to run a custom
#-- instance.cfg at the end of Apache/PHP instance deployment.
#-- To use it in your application, just override those two parameters, like:
[custom-application-deployment]
# path = /path/to/instance-custom.cfg
# part-list = part1 part2
# See software/maarch/software.cfg for an example.
path =
part-list =
#----------------
#----------------
#-- Dummy parts in case no application configuration file is needed
#-- Dummy parts in case no application configuration file is needed
...
@@ -145,13 +158,25 @@ location =
...
@@ -145,13 +158,25 @@ location =
[application-configuration]
[application-configuration]
location =
location =
#----------------
[custom-application-deployment]
# Optional part allowing applications using this stack to run a custom
# instance.cfg at the end of Apache/PHP instance deployment.
# To use it in your application, just override those two parameters, like:
# path = /path/to/instance-custom.cfg
# part-list =
# part1
# part2
# See software/tt-rss/software.cfg for an example.
path =
part-list =
[eggs]
[eggs]
recipe = zc.recipe.egg
recipe = zc.recipe.egg
eggs =
eggs =
${lxml-python:egg}
${lxml-python:egg}
slapos.toolbox
slapos.toolbox
[lampconfigure]
[networkcache]
[networkcache]
# Romain Courteaud + Sebastien Robin + Alain Takoudjou
# Romain Courteaud + Sebastien Robin + Alain Takoudjou
...
@@ -287,42 +312,42 @@ signature-certificate-list =
...
@@ -287,42 +312,42 @@ signature-certificate-list =
[versions]
[versions]
Jinja2 = 2.6
Jinja2 = 2.6
MySQL-python = 1.2.4
Werkzeug = 0.8.3
Werkzeug = 0.8.3
apache-libcloud = 0.12.
1
apache-libcloud = 0.12.
3
async = 0.6.1
async = 0.6.1
buildout-versions = 1.7
buildout-versions = 1.7
gitdb = 0.5.4
gitdb = 0.5.4
hexagonit.recipe.cmmi = 1.6
hexagonit.recipe.cmmi = 1.6
inotifyx = 0.2.0
inotifyx = 0.2.0
lxml = 3.1.
0
lxml = 3.1.
1
meld3 = 0.6.10
meld3 = 0.6.10
netaddr = 0.7.10
netaddr = 0.7.10
plone.recipe.command = 1.1
pycrypto = 2.6
pycrypto = 2.6
pytz = 201
2j
pytz = 201
3b
rdiff-backup = 1.0.5
rdiff-backup = 1.0.5
slapos.cookbook = 0.7
4
.0
slapos.cookbook = 0.7
6
.0
slapos.recipe.build = 0.11.6
slapos.recipe.build = 0.11.6
slapos.recipe.download = 1.0.dev-r4053
slapos.recipe.download = 1.0.dev-r4053
slapos.recipe.template = 2.4.2
slapos.recipe.template = 2.4.2
slapos.toolbox = 0.3
3.1
slapos.toolbox = 0.3
4.0
smmap = 0.8.2
smmap = 0.8.2
# Required by:
# Required by:
# slapos.core==0.35.1
# slapos.core==0.35.1
# slapos.toolbox==0.3
3.1
# slapos.toolbox==0.3
4.0
Flask = 0.9
Flask = 0.9
# Required by:
# Required by:
# slapos.toolbox==0.3
3.1
# slapos.toolbox==0.3
4.0
GitPython = 0.3.2.RC1
GitPython = 0.3.2.RC1
# Required by:
# Required by:
# slapos.toolbox==0.3
3.1
# slapos.toolbox==0.3
4.0
atomize = 0.1.1
atomize = 0.1.1
# Required by:
# Required by:
# slapos.toolbox==0.3
3.1
# slapos.toolbox==0.3
4.0
feedparser = 5.1.3
feedparser = 5.1.3
# Required by:
# Required by:
...
@@ -330,11 +355,11 @@ feedparser = 5.1.3
...
@@ -330,11 +355,11 @@ feedparser = 5.1.3
netifaces = 0.8
netifaces = 0.8
# Required by:
# Required by:
# slapos.toolbox==0.3
3.1
# slapos.toolbox==0.3
4.0
paramiko = 1.10.0
paramiko = 1.10.0
# Required by:
# Required by:
# slapos.toolbox==0.3
3.1
# slapos.toolbox==0.3
4.0
psutil = 0.6.1
psutil = 0.6.1
# Required by:
# Required by:
...
@@ -342,16 +367,17 @@ psutil = 0.6.1
...
@@ -342,16 +367,17 @@ psutil = 0.6.1
pyflakes = 0.6.1
pyflakes = 0.6.1
# Required by:
# Required by:
# slapos.cookbook==0.74.0
# hexagonit.recipe.download==1.6nxd002
# slapos.cookbook==0.76.0
# slapos.core==0.35.1
# slapos.core==0.35.1
# slapos.toolbox==0.3
3.1
# slapos.toolbox==0.3
4.0
# supervisor==3.0b1
# supervisor==3.0b1
# zc.buildout==1.6.0-dev-SlapOS-010
# zc.buildout==1.6.0-dev-SlapOS-010
# zope.interface==4.0.5
# zope.interface==4.0.5
setuptools = 0.6c12dev-r88846
setuptools = 0.6c12dev-r88846
# Required by:
# Required by:
# slapos.toolbox==0.3
3.1
# slapos.toolbox==0.3
4.0
slapos.core = 0.35.1
slapos.core = 0.35.1
# Required by:
# Required by:
...
@@ -363,9 +389,10 @@ supervisor = 3.0b1
...
@@ -363,9 +389,10 @@ supervisor = 3.0b1
unittest2 = 0.5.1
unittest2 = 0.5.1
# Required by:
# Required by:
# slapos.toolbox==0.3
3.1
# slapos.toolbox==0.3
4.0
xml-marshaller = 0.9.7
xml-marshaller = 0.9.7
# Required by:
# Required by:
# slapos.core==0.35.1
# slapos.core==0.35.1
zope.interface = 4.0.5
zope.interface = 4.0.5
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