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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Romain Courteaud
slapos
Commits
7ce4fdd6
Commit
7ce4fdd6
authored
Jul 18, 2013
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into erp5-component
parents
20d297c6
619d6d39
Changes
30
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
803 additions
and
83 deletions
+803
-83
CHANGES.txt
CHANGES.txt
+20
-5
component/coreutils/buildout.cfg
component/coreutils/buildout.cfg
+11
-1
component/dash/buildout.cfg
component/dash/buildout.cfg
+11
-1
component/dcron/buildout.cfg
component/dcron/buildout.cfg
+13
-1
component/dropbear/buildout.cfg
component/dropbear/buildout.cfg
+11
-1
component/ffmpeg/buildout.cfg
component/ffmpeg/buildout.cfg
+11
-1
component/ffmpeg/libtheora-png_sizeof.patch
component/ffmpeg/libtheora-png_sizeof.patch
+14
-0
component/grep/buildout.cfg
component/grep/buildout.cfg
+10
-1
component/rdiff-backup/buildout.cfg
component/rdiff-backup/buildout.cfg
+10
-1
setup.py
setup.py
+1
-1
slapos/recipe/README.kvm.txt
slapos/recipe/README.kvm.txt
+2
-2
slapos/recipe/erp5_promise/__init__.py
slapos/recipe/erp5_promise/__init__.py
+17
-13
slapos/recipe/haproxy/__init__.py
slapos/recipe/haproxy/__init__.py
+6
-2
slapos/recipe/haproxy/template/haproxy-listen-snippet.cfg.in
slapos/recipe/haproxy/template/haproxy-listen-snippet.cfg.in
+1
-1
slapos/recipe/publish.py
slapos/recipe/publish.py
+8
-6
slapos/recipe/request.py
slapos/recipe/request.py
+9
-3
slapos/recipe/tidstorage/__init__.py
slapos/recipe/tidstorage/__init__.py
+6
-2
software/backupserver/instance-pullrdiffbackup.cfg.in
software/backupserver/instance-pullrdiffbackup.cfg.in
+151
-0
software/backupserver/instance.cfg.in
software/backupserver/instance.cfg.in
+44
-0
software/backupserver/software.cfg
software/backupserver/software.cfg
+296
-0
software/backupserver/template-backup-script.sh.in
software/backupserver/template-backup-script.sh.in
+17
-0
software/backupserver/template-crontab-line.in
software/backupserver/template-crontab-line.in
+2
-0
software/backupserver/template-crontab.in
software/backupserver/template-crontab.in
+3
-0
software/backupserver/template-dcron-service.sh.in
software/backupserver/template-dcron-service.sh.in
+11
-0
software/cloudooo/instance-cloudoo-input-schema.json
software/cloudooo/instance-cloudoo-input-schema.json
+27
-0
software/cloudooo/instance-cloudoo-output-schema.json
software/cloudooo/instance-cloudoo-output-schema.json
+11
-0
software/cloudooo/instance-cloudoo.cfg.in
software/cloudooo/instance-cloudoo.cfg.in
+50
-33
software/cloudooo/instance.cfg.in
software/cloudooo/instance.cfg.in
+12
-0
software/cloudooo/software.cfg
software/cloudooo/software.cfg
+16
-8
stack/cloudooo.cfg
stack/cloudooo.cfg
+2
-0
No files found.
CHANGES.txt
View file @
7ce4fdd6
Changes
=======
0.78.1 (2013-05-31)
0.78.4.dev (2013-07-18)
-----------------------
0.78.3 (2013-07-18)
-------------------
* slapos.cookbook:publish: Add support to publish information for slaves. [Cedric Le Ninivin]
0.78.2 (2013-07-18)
-------------------
* Fix slapos.cookbook:request: Add backward compatiblity about getInstanceGuid(). [Cedric de Saint Martin]
* slapos.cookbook:check_* promises: Add timeout to curl that is not otherwise killed by slapos promise subsystem. [Cedric de Saint Martin]
* Cloudooo: Allow any environment variables. [Yusei Tahara]
* ERP5: disable MariaDB query cache completely by 'query_cache_type = 0' for ERP5. [Kazuhiko Shiozaki]
* ERP5: enable haproxy admin socket and install haproxyctl script. [Kazuhiko Shiozaki]
* ERP5: increase the maximum number of open file descriptors before starting mysqld. [Kazuhiko Shiozaki]
* python 2.7: updated to 2.7.5 [Cedric de Saint Martin]
0.78.1 (2013-05-31)
-------------------
* Add boinc recipe: Allow to deploy an empty BOINC project. [Alain Takoudjou]
* Add boinc.app recipe: Allow to deploy and update a BOINC application into existing BOINC server instance . [Alain Takoudjou]
* Add boinc.client recipe: Allow to deploy a BOINC Client instance on SlapOS. [Alain Takoudjou]
...
...
@@ -15,10 +34,6 @@ Changes
* Add trac recipe: for deploying Trac and manage project with support of SVN and GIT. [Alain Takoudjou]
* Add bonjourgrid recipe: for deploying BonjourGrid Master and submit BOINC or Condor project. [Alain Takoudjou]
* Add bonjourgrid.client recipe: for deploying BonjourGrid Worker instance and execute BOINC or Condor Jobs. [Alain Takoudjou]
* Cloudooo: Allow any environment variables. [Yusei Tahara]
* ERP5: disable MariaDB query cache completely by 'query_cache_type = 0' for ERP5. [Kazuhiko Shiozaki]
* ERP5: enable haproxy admin socket and install haproxyctl script. [Kazuhiko Shiozaki]
* ERP5: increase the maximum number of open file descriptors before starting mysqld. [Kazuhiko Shiozaki]
0.78.0 (2013-04-28)
-------------------
...
...
component/coreutils/buildout.cfg
View file @
7ce4fdd6
...
...
@@ -2,7 +2,7 @@
extends =
../xz-utils/buildout.cfg
parts =
coreutils
coreutils
-output
[coreutils]
recipe = slapos.recipe.cmmi
...
...
@@ -13,3 +13,13 @@ configure-options =
environment =
PATH=${xz-utils:location}/bin:%(PATH)s
LDFLAGS =-Wl,--as-needed
[coreutils-output]
# Shared binary location to ease migration
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = ${:test} -x ${:test} -a -x ${:cat} -a -x ${:rm}
test = ${coreutils:location}/bin/test
cat = ${coreutils:location}/bin/cat
rm = ${coreutils:location}/bin/rm
component/dash/buildout.cfg
View file @
7ce4fdd6
[buildout]
extends =
../coreutils/buildout.cfg
parts = dash
parts = dash
-output
[dash]
recipe = slapos.recipe.cmmi
...
...
@@ -10,3 +12,11 @@ configure-options =
--disable-static
--disable-fnmatch
--disable-glob
[dash-output]
# Shared binary location to ease migration
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = ${coreutils-output:test} -x ${:dash}
dash = ${dash:location}/bin/dash
component/dcron/buildout.cfg
View file @
7ce4fdd6
[buildout]
parts = dcron
extends =
../coreutils/buildout.cfg
parts = dcron-output
[dcron-patch-nonroot]
recipe = hexagonit.recipe.download
...
...
@@ -18,3 +21,12 @@ patches =
patch-options = -p1
make-options =
PREFIX=${buildout:parts-directory}/${:_buildout_section_name_}
[dcron-output]
# Shared binary location to ease migration
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = ${coreutils-output:test} -x ${:crond} -a -x ${:crontab}
crond = ${dcron:location}/sbin/crond
crontab = ${dcron:location}/bin/crontab
component/dropbear/buildout.cfg
View file @
7ce4fdd6
...
...
@@ -7,9 +7,10 @@
[buildout]
extends =
../zlib/buildout.cfg
../coreutils/buildout.cfg
parts =
dropbear
dropbear
-output
[dropbear-userspace-patch]
recipe = hexagonit.recipe.download
...
...
@@ -63,3 +64,12 @@ patches=
patch-options=
-p1
[dropbear-output]
# Shared binary location to ease migration
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = ${coreutils-output:test} -x ${:ssh} -a -x ${:keygen}
ssh = ${dropbear:location}/bin/dbclient
keygen = ${dropbear:location}/bin/dropbearkey
component/ffmpeg/buildout.cfg
View file @
7ce4fdd6
...
...
@@ -2,6 +2,7 @@
extends =
../bzip2/buildout.cfg
../libpng/buildout.cfg
../patch/buildout.cfg
../pkgconfig/buildout.cfg
../zlib/buildout.cfg
...
...
@@ -28,16 +29,25 @@ environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${libogg:location}/lib/pkgconfig
[libtheora-png_sizeof.patch]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
filename = libtheora-png_sizeof.patch
md5sum = eaa1454081b50f05b59495a12f52b0d5
download-only = true
[libtheora]
recipe = slapos.recipe.cmmi
url = http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2
md5sum = 292ab65cedd5021d6b7ddd117e07cd8e
depends =
${libpng:so_version}
patches = ${libtheora-png_sizeof.patch:location}/${libtheora-png_sizeof.patch:filename}
patch-options = -p1
configure-options =
--disable-static
environment =
PATH=${pkgconfig:location}/bin:%(PATH)s
PATH=${p
atch:location}/bin:${p
kgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${libogg:location}/lib/pkgconfig:${libpng:location}/lib/pkgconfig:${libvorbis:location}/lib/pkgconfig
[yasm]
...
...
component/ffmpeg/libtheora-png_sizeof.patch
0 → 100644
View file @
7ce4fdd6
--- libtheora-1.1.1/examples/png2theora.c.orig 2009-08-23 03:14:04.000000000 +0900
+++ libtheora-1.1.1/examples/png2theora.c 2013-07-16 12:40:07.629087870 +0900
@@ -462,9 +462,9 @@
png_set_strip_alpha(png_ptr);
row_data = (png_bytep)png_malloc(png_ptr,
- 3*height*width*png_sizeof(*row_data));
+ 3*height*width*sizeof(*row_data));
row_pointers = (png_bytep *)png_malloc(png_ptr,
- height*png_sizeof(*row_pointers));
+ height*sizeof(*row_pointers));
for(y = 0; y < height; y++) {
row_pointers[y] = row_data + y*(3*width);
}
component/grep/buildout.cfg
View file @
7ce4fdd6
[buildout]
extends =
../pcre/buildout.cfg
../coreutils/buildout.cfg
../xz-utils/buildout.cfg
parts =
grep
grep
-output
[grep]
recipe = slapos.recipe.cmmi
...
...
@@ -13,3 +14,11 @@ environment =
PATH=${xz-utils:location}/bin:%(PATH)s
CPPFLAGS=-I${pcre:location}/include
LDFLAGS=-L${pcre:location}/lib -Wl,-rpath=${pcre:location}/lib
[grep-output]
# Shared binary location to ease migration
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = ${coreutils-output:test} -x ${:grep}
grep = ${grep:location}/bin/grep
component/rdiff-backup/buildout.cfg
View file @
7ce4fdd6
[buildout]
extends =
../librsync/buildout.cfg
../coreutils/buildout.cfg
parts =
rdiff-backup
rdiff-backup
-output
[rdiff-backup-build]
recipe = zc.recipe.egg:custom
...
...
@@ -24,3 +25,11 @@ eggs =
entry-points =
rdiff-backup=rdiff_backup.Main:Main
arguments = sys.argv[1:]
[rdiff-backup-output]
# Shared binary location to ease migration
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = ${coreutils-output:test} -x ${:rdiff-backup}
rdiff-backup = ${buildout:directory}/bin/rdiff-backup
setup.py
View file @
7ce4fdd6
...
...
@@ -28,7 +28,7 @@ from setuptools import setup, find_packages
import
glob
import
os
version
=
'0.78.
2
.dev'
version
=
'0.78.
4
.dev'
name
=
'slapos.cookbook'
long_description
=
open
(
"README.txt"
).
read
()
+
"
\
n
"
+
\
open
(
"CHANGES.txt"
).
read
()
+
"
\
n
"
...
...
slapos/recipe/README.kvm.txt
View file @
7ce4fdd6
...
...
@@ -31,10 +31,10 @@ KVM with Remote and gzipped Image
gzip = true
# Use -hda instead -drive arg
# Default is drive (see Options bel
l
ow)
# Default is drive (see Options below)
image_type = hda
### Common Configuration bel
l
ow. ###
### Common Configuration below. ###
# VNC is optional
kvm_vnc = <SOME-IP>:<VNC-DISPLAY>
...
...
slapos/recipe/erp5_promise/__init__.py
View file @
7ce4fdd6
...
...
@@ -34,19 +34,23 @@ class Recipe(GenericBaseRecipe):
"""
def
install
(
self
):
promise_parser
=
ConfigParser
.
RawConfigParser
()
promise_parser
.
add_section
(
'portal_templates'
)
promise_parser
.
set
(
'portal_templates'
,
'repository'
,
self
.
options
[
'bt5-repository-url'
])
promise_parser
.
set
(
'portal_templates'
,
'expected_bt5'
,
self
.
options
[
'bt5'
])
promise_parser
.
add_section
(
'external_service'
)
promise_parser
.
set
(
'external_service'
,
'cloudooo_url'
,
self
.
options
[
'cloudooo-url'
])
promise_parser
.
set
(
'external_service'
,
'memcached_url'
,
self
.
options
[
'memcached-url'
])
promise_parser
.
set
(
'external_service'
,
'kumofs_url'
,
self
.
options
[
'kumofs-url'
])
promise_parser
.
set
(
'external_service'
,
'smtp_url'
,
self
.
options
[
'smtp-url'
])
for
section_name
,
option_id_list
in
(
(
'portal_templates'
,
(
(
'repository'
,
'bt5-repository-url'
),
(
'expected_bt5'
,
'bt5'
),
)),
(
'external_service'
,
(
(
'cloudooo_url'
,
'cloudooo-url'
),
(
'memcached_url'
,
'memcached-url'
),
(
'kumofs_url'
,
'kumofs-url'
),
(
'smtp_url'
,
'smtp-url'
),
)),
):
promise_parser
.
add_section
(
section_name
)
for
internal_id
,
option_id
in
option_id_list
:
option
=
self
.
options
.
get
(
option_id
)
if
option
:
promise_parser
.
set
(
section_name
,
internal_id
,
option
)
promise_parser
.
write
(
open
(
self
.
options
[
'promise-path'
],
'w'
))
return
[
self
.
options
[
'promise-path'
]]
slapos/recipe/haproxy/__init__.py
View file @
7ce4fdd6
...
...
@@ -87,7 +87,11 @@ class Recipe(GenericBaseRecipe):
'haproxy-listen-snippet.cfg.in'
)
server_snippet
=
""
ip
=
self
.
options
[
'ip'
]
server_check_path
=
self
.
options
[
'server-check-path'
]
server_check_path
=
self
.
options
.
get
(
'server-check-path'
,
None
)
if
server_check_path
:
httpchk
=
'option httpchk GET %s'
%
server_check_path
else
:
httpchk
=
''
# FIXME: maxconn must be provided per-backend, not globally
maxconn
=
self
.
options
[
'maxconn'
]
i
=
0
...
...
@@ -97,7 +101,7 @@ class Recipe(GenericBaseRecipe):
'name'
:
name
,
'ip'
:
ip
,
'port'
:
port
,
'
server_check_path'
:
server_check_path
,
'
httpchk'
:
httpchk
,
})
for
address
in
backend_list
:
i
+=
1
...
...
slapos/recipe/haproxy/template/haproxy-listen-snippet.cfg.in
View file @
7ce4fdd6
listen %(name)s %(ip)s:%(port)s
cookie SERVERID insert
balance roundrobin
option httpchk GET %(server_check_path
)s
%(httpchk
)s
stats uri /haproxy
stats realm Global\ statistics
slapos/recipe/publish.py
View file @
7ce4fdd6
...
...
@@ -35,20 +35,22 @@ class Recipe(GenericSlapRecipe):
publish_dict
=
dict
()
options
=
self
.
options
.
copy
()
del
options
[
'recipe'
]
slave_reference
=
options
.
pop
(
'-slave-reference'
,
None
)
for
k
,
v
in
options
.
iteritems
():
if
k
[:
1
]
==
'-'
:
continue
publish_dict
[
k
]
=
v
self
.
_setConnectionDict
(
publish_dict
)
self
.
_setConnectionDict
(
publish_dict
,
slave_reference
)
return
[]
def
_setConnectionDict
(
self
,
publish_dict
):
return
self
.
setConnectionDict
(
publish_dict
)
def
_setConnectionDict
(
self
,
publish_dict
,
slave_reference
=
None
):
return
self
.
setConnectionDict
(
publish_dict
,
slave_reference
)
SERIALISED_MAGIC_KEY
=
'_'
class
Serialised
(
Recipe
):
def
_setConnectionDict
(
self
,
publish_dict
):
return
super
(
Serialised
,
self
).
_setConnectionDict
(
wrap
(
publish_dict
))
def
_setConnectionDict
(
self
,
publish_dict
,
slave_reference
=
None
):
return
super
(
Serialised
,
self
).
_setConnectionDict
(
wrap
(
publish_dict
)
,
slave_reference
)
...
...
slapos/recipe/request.py
View file @
7ce4fdd6
...
...
@@ -33,6 +33,12 @@ import traceback
DEFAULT_SOFTWARE_TYPE
=
'RootSoftwareInstance'
def
getListOption
(
option_dict
,
key
,
default
=
()):
result
=
option_dict
.
get
(
key
,
default
)
if
isinstance
(
result
,
basestring
):
result
=
result
.
split
()
return
result
class
Recipe
(
object
):
"""
Request a partition to a slap master.
...
...
@@ -91,18 +97,18 @@ class Recipe(object):
self
.
logger
=
logging
.
getLogger
(
name
)
software_url
=
options
[
'software-url'
]
name
=
options
[
'name'
]
return_parameters
=
options
.
get
(
'return'
,
''
).
split
(
)
return_parameters
=
getListOption
(
options
,
'return'
)
if
not
return_parameters
:
self
.
logger
.
debug
(
"No parameter to return to main instance."
"Be careful about that..."
)
software_type
=
options
.
get
(
'software-type'
,
DEFAULT_SOFTWARE_TYPE
)
filter_kw
=
dict
(
(
x
,
options
[
'sla-'
+
x
])
for
x
in
options
.
get
(
'sla'
,
''
).
split
(
)
(
x
,
options
[
'sla-'
+
x
])
for
x
in
getListOption
(
options
,
'sla'
)
if
options
[
'sla-'
+
x
]
)
partition_parameter_kw
=
self
.
_filterForStorage
(
dict
(
(
x
,
options
[
'config-'
+
x
])
for
x
in
options
.
get
(
'config'
,
''
).
split
(
)
for
x
in
getListOption
(
options
,
'config'
)
))
slave
=
options
.
get
(
'slave'
,
'false'
).
lower
()
in
\
librecipe
.
GenericBaseRecipe
.
TRUE_VALUES
...
...
slapos/recipe/tidstorage/__init__.py
View file @
7ce4fdd6
...
...
@@ -43,7 +43,11 @@ class Recipe(GenericBaseRecipe):
repozo_wrapper
=
self
.
createPythonScript
(
self
.
options
[
'repozo-wrapper'
],
'slapos.recipe.librecipe.execute.execute'
,
[
self
.
options
[
'tidstorage-repozo-binary'
],
'--config'
,
configuration_file
,
'--repozo'
,
self
.
options
[
'repozo-binary'
],
'-z'
])
[
self
.
options
[
'tidstorage-repozo-binary'
],
'--config'
,
configuration_file
,
'--repozo'
,
self
.
options
[
'repozo-binary'
],
'--gzip'
,
'--quick'
,
])
return
[
configuration_file
,
tidstorage_wrapper
,
repozo_wrapper
]
software/backupserver/instance-pullrdiffbackup.cfg.in
0 → 100644
View file @
7ce4fdd6
{% set part_list = [] -%}
{% set crontab_line_list = [] -%}
###############################
#
# Instanciate dcron
#
###############################
[directory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc
bin = $${buildout:directory}/bin
srv = $${buildout:directory}/srv
var = $${buildout:directory}/var
log = $${:var}/log
# scripts = $${:etc}/run
services = $${:etc}/service
cron-entries = $${:etc}/cron.d
cron-lines = $${:etc}/cron.lines
crontabs = $${:etc}/crontabs
cronstamps = $${:etc}/cronstamps
backup = $${:srv}/backup
backupscript = $${:etc}/backup
home = $${:etc}/home
ssh = $${:home}/.ssh
#################################
# Cron service
#################################
[dcron-service]
recipe = slapos.recipe.template
url = ${template-dcron-service:output}
output = $${directory:services}/crond
mode = 0700
logfile = $${directory:log}/crond.log
#################################
# Slave backup scripts and crontab
#################################
# Go throught slave list to set their configuration
{% for slave_instance in slave_instance_list -%}
{% set slave_reference = slave_instance.get('slave_reference') -%}
{% set frequency = slave_instance.get('frequency', '') -%}
{% set hostname = slave_instance.get('hostname', '') -%}
{% set connection = slave_instance.get('connection', '') -%}
{% set include = slave_instance.get('include', '') -%}
{% set include_string = "' --include='".join(include.split(' ')) -%}
{% set exclude = slave_instance.get('exclude', '') -%}
{% set exclude_string = '' -%}
{% set sudo = slave_instance.get('sudo', 'False') -%}
{% set remote_schema = 'rdiff-backup --server --restrict-read-only / -- "$@"' -%}
{% if (exclude != '') -%}
{% set exclude_string = "' --exclude='".join(exclude.split(' ')) -%}
{% set exclude_string = "--exclude='" + exclude_string + "'" -%}
{% endif -%}
{% if (sudo == 'True') -%}
{% set remote_schema = 'sudo backupagent_rdiff-backup' -%}
{% endif -%}
{% if (frequency != '') and (hostname != '') and (connection != '') and (include != '') -%}
[{{ slave_reference }}-backup-directory]
recipe = slapos.cookbook:mkdirectory
directory = $${directory:backup}/$${:_buildout_section_name_}
[{{ slave_reference }}-backup-private_key]
recipe = plone.recipe.command
stop-on-error = true
command = ${dropbear-output:keygen} -t $${:type} -s 2048 -f $${:key}
key = $${directory:ssh}/$${:_buildout_section_name_}
location = $${:key}
type = rsa
[{{ slave_reference }}-backup-public_key]
recipe = plone.recipe.command
stop-on-error = true
update-command = $${:command}
command = ${coreutils-output:rm} -f $${:key} && ${dropbear-output:keygen} -y -f {{ '$${' ~ slave_reference }}-backup-private_key:key} | ${grep-output:grep} {{ '$${' ~ slave_reference }}-backup-private_key:type} > $${:key}
key = {{ '$${' ~ slave_reference }}-backup-private_key:key}.pub
location = $${:key}
[{{ slave_reference }}-backup-check-public_key]
recipe = plone.recipe.command
stop-on-error = true
update-command = $${:command}
command = grep ssh-{{ '$${' ~ slave_reference }}-backup-private_key:type} {{ '$${' ~ slave_reference }}-backup-public_key:key}
[{{ slave_reference }}-backup-read-public_key]
recipe = slapos.cookbook:generate.password
storage-path = {{ '$${' ~ slave_reference }}-backup-public_key:key}
bytes = 8
# Publish slave {{ slave_reference }} information
[{{ slave_reference }}-backup-publish]
recipe = slapos.cookbook:publish
-slave-reference = {{ slave_reference }}
authorized_key = {{ '$${' ~ slave_reference }}-backup-read-public_key:passwd}
{% do part_list.append("%s-backup-publish" % slave_reference) -%}
[{{ slave_reference }}-backup-script]
recipe = slapos.recipe.template
url = ${template-backup-script:output}
output = $${directory:backupscript}/$${:_buildout_section_name_}
mode = 0700
datadirectory = {{ '$${' ~ slave_reference }}-backup-directory:directory}
sshkey = {{ '$${' ~ slave_reference }}-backup-private_key:key}
connection = {{ connection }}
hostname = {{ hostname }}
include = {{ include_string }}
exclude_string = {{ exclude_string }}
remote_schema = {{ remote_schema }}
[{{ slave_reference }}-backup-crontab-line]
recipe = slapos.recipe.template
url = ${template-crontab-line:output}
output = $${directory:cron-lines}/$${:_buildout_section_name_}
mode = 0600
script = {{ '$${' ~ slave_reference }}-backup-script:output}
frequency = {{ frequency }}
{% do crontab_line_list.append("$${%s-backup-crontab-line:output}" % slave_reference) -%}
{% endif -%}
{% endfor -%}
#################################
# Generate crontab file
#################################
{% set crontab_line_list_string = " ".join(crontab_line_list) -%}
[activate-crontab-file]
# XXX File is never removed
recipe = plone.recipe.command
stop-on-error = true
update-command = $${:command}
command = ${coreutils-output:cat} ${template-crontab:output} {{ crontab_line_list_string }} | ${dcron-output:crontab} -c $${directory:crontabs} -
# Add parts generated by template
[buildout]
parts =
dcron-service
activate-crontab-file
{% for part in part_list -%}
{{ ' %s' % part }}
{% endfor -%}
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
software/backupserver/instance.cfg.in
0 → 100644
View file @
7ce4fdd6
[buildout]
parts =
switch-softwaretype
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[dynamic-template-pullrdiffbackup]
recipe = slapos.recipe.template:jinja2
template = ${template-pullrdiffbackup:output}
rendered = $${buildout:parts-directory}/$${:_buildout_section_name_}/$${:filename}
filename = instance-pullrdiffbackup.cfg
extensions = jinja2.ext.do
context =
key slave_instance_list instance-parameter:slave-instance-list
[switch-softwaretype]
recipe = slapos.cookbook:softwaretype
default = $${:pullrdiffbackup}
# pullrdiffbackup = ${template-pullrdiffbackup:output}
pullrdiffbackup = $${dynamic-template-pullrdiffbackup:rendered}
[slap-connection]
# part to migrate to new - separated words
computer-id = $${slap_connection:computer_id}
partition-id = $${slap_connection:partition_id}
server-url = $${slap_connection:server_url}
software-release-url = $${slap_connection:software_release_url}
key-file = $${slap_connection:key_file}
cert-file = $${slap_connection:cert_file}
# [slap-parameter]
# slave-instance-list = []
[instance-parameter]
# Fetches parameters defined in SlapOS Master for this instance.
# Always the same.
recipe = slapos.cookbook:slapconfiguration.serialised
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/backupserver/software.cfg
0 → 100644
View file @
7ce4fdd6
[buildout]
extends =
../../component/lxml-python/buildout.cfg
../../component/dash/buildout.cfg
../../component/dcron/buildout.cfg
../../component/logrotate/buildout.cfg
# ../../component/nginx/buildout.cfg
../../component/rdiff-backup/buildout.cfg
# ../../component/duplicity/buildout.cfg
# ../../component/git/buildout.cfg
# ../../component/subversion/buildout.cfg
../../component/rsync/buildout.cfg
../../component/dropbear/buildout.cfg
../../component/grep/buildout.cfg
../../stack/flask.cfg
../../stack/slapos.cfg
parts =
eggs
rdiff-backup
# duplicity
dcron
logrotate
# nginx
# git
# subversion
rsync
# flask-egg
template
template-pullrdiffbackup
template-backup-script
template-crontab-line
[networkcache]
# signature certificates of the following uploaders.
# Romain Courteaud
# Sebastien Robin
# Kazuhiko Shiozaki
# Cedric de Saint Martin
# Yingjie Xu
# Gabriel Monnerat
# Łukasz Nowak
# Test Agent (Automatic update from tests)
# Aurélien Calonne
signature-certificate-list =
-----BEGIN CER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GwArc
m711+GzlW5xe6GyH9SZaGOPAdUbI6JTDwLzEgA==
-----END CERTIFICATE-----
[eggs]
recipe = zc.recipe.egg
eggs =
${lxml-python:egg}
[directory]
recipe = slapos.cookbook:mkdirectory
template = ${buildout:directory}/template
##########################################################
# Service startup scripts and configuration files
##########################################################
[template-dcron-service]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/template-dcron-service.sh.in
md5sum = 1372441dac23e4fa7d2dc773a74725ea
output = ${directory:template}/template-dcron-service.sh.in
mode = 0644
[template-backup-script]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/template-backup-script.sh.in
md5sum = 19c3a72913cc285bf9745ab2f869018e
output = ${directory:template}/template-backup-script.sh.in
mode = 0644
[template-crontab-line]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/template-crontab-line.in
md5sum = 5cbd64f04da0601ba4286516a6161f5e
output = ${directory:template}/template-crontab-line.in
mode = 0644
[template-crontab]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/template-crontab.in
md5sum = 072be0fd04896880c931d44d8eabde37
output = ${directory:template}/template-crontab.in
mode = 0644
##########################################################
# Buildout instance.cfg templates
##########################################################
[template-pullrdiffbackup]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-pullrdiffbackup.cfg.in
md5sum = 62c236773dadecac11eb9a47dbca9351
output = ${directory:template}/template-pullrdiffbackup.cfg
mode = 0644
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in
md5sum = 42021b325159dff29e4bd4e33b8ff2f3
output = ${buildout:directory}/template.cfg
mode = 0644
[versions]
rdiff-backup = 1.0.5
Jinja2 = 2.7
MarkupSafe = 0.18
Werkzeug = 0.9.1
buildout-versions = 1.7
gunicorn = 17.5
itsdangerous = 0.22
meld3 = 0.6.10
plone.recipe.command = 1.1
slapos.cookbook = 0.78.3
slapos.recipe.build = 0.11.6
slapos.recipe.cmmi = 0.1.1
slapos.recipe.template = 2.4.2
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.35.1
Flask = 0.10.1
# Required by:
# slapos.cookbook==0.78.1
inotifyx = 0.2.0-1
# Required by:
# slapos.cookbook==0.78.1
lock-file = 2.0
# Required by:
# slapos.cookbook==0.78.1
# slapos.core==0.35.1
# xml-marshaller==0.9.7
lxml = 3.2.1
# Required by:
# slapos.cookbook==0.78.1
netaddr = 0.7.10
# Required by:
# slapos.core==0.35.1
netifaces = 0.8-1
# Required by:
# slapos.core==0.35.1
pyflakes = 0.7.3
# Required by:
# slapos.cookbook==0.78.1
pytz = 2013b
# Required by:
# slapos.cookbook==0.78.1
# slapos.core==0.35.1
# zc.buildout==1.6.0-dev-SlapOS-010
# zc.recipe.egg==1.3.2
setuptools = 0.9.5
# Required by:
# slapos.cookbook==0.78.1
slapos.core = 0.35.1
# Required by:
# slapos.core==0.35.1
supervisor = 3.0b2
# Required by:
# slapos.core==0.35.1
unittest2 = 0.5.1
# Required by:
# slapos.cookbook==0.78.1
xml-marshaller = 0.9.7
# Required by:
# slapos.core==0.35.1
zope.interface = 4.0.5
software/backupserver/template-backup-script.sh.in
0 → 100644
View file @
7ce4fdd6
#!${dash-output:dash}
# trap "echo Backing up failed for $${:hostname}" ERR
export HOME=$${directory:home}
set -e
cd $${:datadirectory}
${rdiff-backup-output:rdiff-backup} \
$${:exclude_string} \
--include='$${:include}' \
--exclude='**' \
--remote-schema '${dropbear-output:ssh} -T -y -i $${:sshkey} %s $${:remote_schema}' \
$${:connection}::/ ./
# python scripts/verify_with_sudo.py ./ $${:connection}:/
software/backupserver/template-crontab-line.in
0 → 100644
View file @
7ce4fdd6
# $${:_buildout_section_name_}
$${:frequency} $${:script}
software/backupserver/template-crontab.in
0 → 100644
View file @
7ce4fdd6
# min(0-59) hours(0-23) day(1-31) month(1-12) dow(0-7) command
MAILTO=admins@erp5.org
software/backupserver/template-dcron-service.sh.in
0 → 100644
View file @
7ce4fdd6
#!${dash-output:dash}
# BEWARE: This file is operated by slapgrid
# BEWARE: It will be overwritten automatically
exec ${dcron-output:crond} \
-s $${directory:cron-entries} \
-c $${directory:crontabs} \
-t $${directory:cronstamps} \
-f -l 5 \
-L $${dcron-service:logfile}
# -M cron_simplelogger
software/cloudooo/instance-cloudoo-input-schema.json
0 → 100644
View file @
7ce4fdd6
{
"$schema"
:
"http://json-schema.org/draft-04/schema#"
,
"extends"
:
"./schema-definitions.json#"
,
"properties"
:
{
"tcpv4-port"
:
{
"allOf"
:
[{
"$ref"
:
"#/definitions/tcpv4port"
},
{
"description"
:
"Start allocating ports at this value, going upward"
,
"default"
:
23000
}]
},
"font-url-list"
:
{
"description"
:
"List of URLs from which fonts are to be downloaded"
,
"default"
:
[],
"items"
:
{
"type"
:
"string"
},
"type"
:
"array"
}
"backend-count"
:
{
"description"
:
"Number of backend cloudooo instances"
,
"default"
:
1
,
"type"
:
"integer"
}
}
}
software/cloudooo/instance-cloudoo-output-schema.json
0 → 100644
View file @
7ce4fdd6
{
"$schema"
:
"http://json-schema.org/draft-04/schema#"
,
"description"
:
"Values returned by Cloudooo instanciation"
,
"properties"
:
{
"url"
:
{
"description"
:
"Conversion service access information"
,
"type"
:
"string"
}
},
"type"
:
"object"
}
software/cloudooo/instance-cloudoo.cfg.in
View file @
7ce4fdd6
{% set ipv4 = (ipv4_set | list)[0] -%}
{% set bin_directory = parameter_dict['buildout-bin-directory'] -%}
{% set section_list = [] -%}
{% macro section(name) %}{% do section_list.append(name) %}{{ name }}{% endmacro -%}
[buildout]
parts =
publish-cloudooo-connection-information
...
...
@@ -9,35 +12,53 @@ develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
[publish-cloudooo-connection-information]
recipe = slapos.cookbook:publish
url
url = cloudooo://${
cloudooo-instance:ip}:${cloudooo-instance
:port}/
recipe = slapos.cookbook:publish
.serialised
url = cloudooo://${
haproxy:ip}:${haproxy
:port}/
[cloudooo-
instanc
e]
[cloudooo-
bas
e]
recipe = slapos.cookbook:generic.cloudooo
# Network options
ip = ${slap-network-information:local-ipv4}
port = 23000
openoffice-port = 23060
# Paths
configuration-file = ${rootdirectory:etc}/cloudooo.cfg
wrapper = ${basedirectory:services}/cloudooo
# Paths: Data
data-directory = ${directory:cloudooo-data}
ip = {{ ipv4 }}
environment =
LD_LIBRARY_PATH = {{ parameter_dict['file'] }}/lib:{{ parameter_dict['fontconfig'] }}/lib:{{ parameter_dict['freetype'] }}/lib:{{ parameter_dict['libICE'] }}/lib:{{ parameter_dict['libpng12'] }}/lib:{{ parameter_dict['libSM'] }}/lib:{{ parameter_dict['libX11'] }}/lib:{{ parameter_dict['libXau'] }}/lib:{{ parameter_dict['libXdmcp'] }}/lib:{{ parameter_dict['libXext'] }}/lib:{{ parameter_dict['libxcb'] }}/lib:{{ parameter_dict['libXrender'] }}/lib:{{ parameter_dict['zlib'] }}/lib
FONTCONFIG_FILE = ${fontconfig-instance:conf-path}
PATH = ${binary-link:target-directory}
# Binary information
# cloudooo specific configuration
ooo-binary-path = {{ parameter_dict['libreoffice-bin'] }}/program
ooo-paster = {{ bin_directory }}/cloudooo_paster
ooo-uno-path = {{ parameter_dict['libreoffice-bin'] }}/basis-link/program
{% set cloudooo_port = slapparameter_dict.get('tcpv4_port', 23000) | int -%}
{% set backend_count = slapparameter_dict.get('backend-count', 1) | int -%}
{% for index in range(backend_count) -%}
{% set name = 'cloudooo-' ~ index -%}
[{{ section(name) }}]
< = cloudooo-base
port = {{ cloudooo_port }}
openoffice-port = {{ cloudooo_port + 1 }}
configuration-file = ${directory:etc}/{{ name }}.cfg
data-directory = ${directory:srv}/{{ name }}
wrapper = ${directory:services}/{{ name }}
{% set cloudooo_port = cloudooo_port + 2 -%}
{% endfor -%}
[haproxy]
recipe = slapos.cookbook:haproxy
name = cloudooo
conf-path = ${directory:etc}/haproxy.cfg
socket-path = ${directory:run}/haproxy.sock
ip = {{ ipv4 }}
port = 8001
maxconn = 1
wrapper-path = ${directory:services}/haproxy
binary-path = {{ parameter_dict['haproxy'] }}/sbin/haproxy
ctl-path = ${directory:bin}/haproxy-ctl
backend-list =
{%- for section_name in section_list %}
{{ "${" ~ section_name ~ ":ip}:${" ~ section_name ~ ":port}" }}
{%- endfor %}
[cloudooo-test-runner]
recipe = slapos.cookbook:cloudooo.test
...
...
@@ -45,24 +66,25 @@ prepend-path = ${buildout:bin-directory}
run-unit-test = ${buildout:bin-directory}/runUnitTest
run-test-suite = ${buildout:bin-directory}/runTestSuite
ooo-paster = ${cloudooo-
instance
:ooo-paster}
configuration-file = ${cloudooo-
instance
:configuration-file}
ooo-paster = ${cloudooo-
0
:ooo-paster}
configuration-file = ${cloudooo-
0
:configuration-file}
run-unit-test-binary = {{ bin_directory }}/runCloudoooUnitTest
run-test-suite-binary = {{ bin_directory }}/runCloudoooTestSuite
[fontconfig-instance]
recipe = slapos.cookbook:fontconfig
conf-path = ${
root
directory:etc}/font.conf
conf-path = ${directory:etc}/font.conf
font-system-folder = {{ parameter_dict['fonts'] }}
font-folder = ${directory:font}
url-list =
service-folder = ${basedirectory:services}
{# XXX: violates "instanciation happens offline" rule -#}
url-list = {{ slapparameter_dict.get('font-url-list', []) | join(' ') }}
service-folder = ${directory:services}
onetimedownload_path = {{ bin_directory }}/onetimedownload
[binary-link]
recipe = slapos.cookbook:symbolic.link
target-directory = ${
root
directory:bin}
target-directory = ${directory:bin}
link-binary =
{{ parameter_dict['coreutils'] }}/bin/basename
{{ parameter_dict['coreutils'] }}/bin/cat
...
...
@@ -78,17 +100,12 @@ link-binary =
{{ parameter_dict['poppler'] }}/bin/pdftohtml
# rest of parts are candidates for some generic stuff
[basedirectory]
recipe = slapos.cookbook:mkdirectory
services = ${rootdirectory:etc}/run
[directory]
recipe = slapos.cookbook:mkdirectory
cloudooo-data = ${rootdirectory:srv}/cloudooo
font = ${rootdirectory:srv}/font
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
bin = ${buildout:directory}/bin
etc = ${buildout:directory}/etc
font = ${:srv}/font
run = ${:var}/run
services = ${:etc}/run
srv = ${buildout:directory}/srv
bin = ${buildout:directory}/bin
var = ${buildout:directory}/var
software/cloudooo/instance.cfg.in
View file @
7ce4fdd6
...
...
@@ -6,6 +6,14 @@ eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
[slap-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}
[jinja2-template-base]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:parts-directory}/${:_buildout_section_name_}/${:filename}
...
...
@@ -13,12 +21,14 @@ extra-context =
context =
key eggs_directory buildout:eggs-directory
key develop_eggs_directory buildout:develop-eggs-directory
key slapparameter_dict slap-parameters:configuration
${:extra-context}
[dynamic-template-cloudooo-parameters]
file = {{ file_location }}
fontconfig = {{ fontconfig_location }}
freetype = {{ freetype_location }}
haproxy = {{ haproxy_location }}
libICE = {{ libICE_location }}
libpng12 = {{ libpng12_location }}
libSM = {{ libSM_location }}
...
...
@@ -40,8 +50,10 @@ buildout-bin-directory = {{ buildout_bin_directory }}
< = jinja2-template-base
template = {{ template_cloudooo }}
filename = instance-cloudoo.cfg
extensions = jinja2.ext.do
extra-context =
section parameter_dict dynamic-template-cloudooo-parameters
key ipv4_set slap-parameters:ipv4
[switch-softwaretype]
recipe = slapos.cookbook:softwaretype
...
...
software/cloudooo/software.cfg
View file @
7ce4fdd6
...
...
@@ -16,6 +16,7 @@ parts +=
check-recipe
# Create instance template
template
slapos-cookbook
# XXX: Workaround of SlapOS limitation
# Unzippig of eggs is required, as SlapOS do not yet provide nicely working
...
...
@@ -24,11 +25,10 @@ unzip = true
# Local development
[slapos.cookbook-repository]
recipe = plone.recipe.command
stop-on-error = true
location = ${buildout:parts-directory}/${:_buildout_section_name_}
command = ${git:location}/bin/git clone --branch cloudooo --quiet http://git.erp5.org/repos/slapos.git ${:location}
update-command = cd ${:location} && ${git:location}/bin/git pull --quiet
recipe = slapos.recipe.build:gitclone
repository = http://git.erp5.org/repos/slapos.git
branch = master
git-executable = ${git:location}/bin/git
[check-recipe]
recipe = plone.recipe.command
...
...
@@ -36,6 +36,14 @@ stop-on-error = true
update-command = ${:command}
command = grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link
[slap-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}
[template-jinja2-base]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/${:filename}.in
...
...
@@ -54,7 +62,7 @@ context =
# XXX: "template.cfg" is hardcoded in instanciation recipe
filename = template.cfg
template = ${:_profile_base_location_}/instance.cfg.in
md5sum =
694205787e78c5d615d72d7b4b26d174
md5sum =
425cb2e76d46d53bb0b0eebdb8c1aa95
extra-context =
key buildout_bin_directory buildout:bin-directory
key dcron_location dcron:location
...
...
@@ -63,6 +71,7 @@ extra-context =
key fonts_location fonts:location
key freetype_location freetype:location
key git_location git:location
key haproxy_location haproxy:location
key imagemagick_location imagemagick:location
key libICE_location libICE:location
key libSM_location libSM:location
...
...
@@ -83,10 +92,9 @@ extra-context =
[template-cloudooo]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-cloudoo.cfg.in
md5sum =
4c8608f9525be0f01a09d60b240315a9
md5sum =
bbe84b4c9022db62c926e8a8a4bf02a1
mode = 640
[networkcache]
# signature certificates of the following uploaders.
# Romain Courteaud
...
...
stack/cloudooo.cfg
View file @
7ce4fdd6
...
...
@@ -49,6 +49,7 @@ extends =
../component/dcron/buildout.cfg
../component/coreutils/buildout.cfg
../component/cloudooo/buildout.cfg
../component/haproxy/buildout.cfg
versions = versions
...
...
@@ -77,6 +78,7 @@ parts =
ffmpeg
rdiff-backup
haproxy
cloudooo
# Local development
...
...
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