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
Valentin Benozillo
slapos
Commits
619d6d39
Commit
619d6d39
authored
Jul 18, 2013
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'cloudooo-clusterise'
parents
7dd074e3
d66e512b
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
150 additions
and
65 deletions
+150
-65
component/cloudooo/buildout.cfg
component/cloudooo/buildout.cfg
+1
-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
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
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
+15
-22
stack/cloudooo.cfg
stack/cloudooo.cfg
+2
-5
No files found.
component/cloudooo/buildout.cfg
View file @
619d6d39
...
...
@@ -22,7 +22,7 @@ git-executable = ${git:location}/bin/git
[cloudooo]
recipe = zc.recipe.egg
python = python2.
6
python = python2.
7
extra-paths = ${cloudooo-repository:location}
eggs =
${lxml-python:egg}
...
...
component/ffmpeg/buildout.cfg
View file @
619d6d39
...
...
@@ -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 @
619d6d39
--- 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);
}
slapos/recipe/haproxy/__init__.py
View file @
619d6d39
...
...
@@ -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 @
619d6d39
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
software/cloudooo/instance-cloudoo-input-schema.json
0 → 100644
View file @
619d6d39
{
"$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 @
619d6d39
{
"$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 @
619d6d39
{% 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 @
619d6d39
...
...
@@ -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 @
619d6d39
...
...
@@ -14,10 +14,9 @@ parts +=
# Local development
slapos.cookbook-repository
check-recipe
slapos.cookbook-python2.6
slapos.recipe.template-python2.6
# Create instance template
template
slapos-cookbook
# XXX: Workaround of SlapOS limitation
# Unzippig of eggs is required, as SlapOS do not yet provide nicely working
...
...
@@ -26,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
...
...
@@ -38,18 +36,13 @@ stop-on-error = true
update-command = ${:command}
command = grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link
[slapos.cookbook-python2.6]
recipe = zc.recipe.egg
eggs = slapos.cookbook
scripts =
python = python2.6
ugly-depend-on = ${slapos.cookbook-repository:command} ${slapos.cookbook-repository:update-command}
[slapos.recipe.template-python2.6]
recipe = zc.recipe.egg
eggs = slapos.recipe.template
scripts =
python = python2.6
[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
...
...
@@ -69,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
...
...
@@ -78,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
...
...
@@ -98,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 @
619d6d39
...
...
@@ -36,7 +36,6 @@ extends =
../component/libreoffice-bin/buildout.cfg
../component/libpng/buildout.cfg
../component/lxml-python/buildout.cfg
../component/python-2.6/buildout.cfg
../component/python-2.7/buildout.cfg
../component/xorg/buildout.cfg
../component/fonts/buildout.cfg
...
...
@@ -50,6 +49,7 @@ extends =
../component/dcron/buildout.cfg
../component/coreutils/buildout.cfg
../component/cloudooo/buildout.cfg
../component/haproxy/buildout.cfg
versions = versions
...
...
@@ -77,17 +77,14 @@ parts =
poppler
ffmpeg
bootstrap2.6
rdiff-backup
haproxy
cloudooo
# Local development
develop +=
${:parts-directory}/cloudooo
[bootstrap2.6]
python = python2.6
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.6.0-dev-SlapOS-006
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