Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos-caddy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Guillaume Hervier
slapos-caddy
Commits
6b43c47d
Commit
6b43c47d
authored
Jul 17, 2013
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[WIP] split cloudooo instances partition and haproxy instance partition.
parent
619d6d39
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
86 additions
and
32 deletions
+86
-32
software/cloudooo/instance-cloudoo.cfg.in
software/cloudooo/instance-cloudoo.cfg.in
+23
-29
software/cloudooo/instance-haproxy.cfg.in
software/cloudooo/instance-haproxy.cfg.in
+39
-0
software/cloudooo/instance.cfg.in
software/cloudooo/instance.cfg.in
+15
-1
software/cloudooo/software.cfg
software/cloudooo/software.cfg
+9
-2
No files found.
software/cloudooo/instance-cloudoo.cfg.in
View file @
6b43c47d
{% if slap_software_type != 'haproxy' -%}
{% set ipv4 = (ipv4_set | list)[0] -%}
{% set bin_directory = parameter_dict['buildout-bin-directory'] -%}
{% set section_list = [] -%}
{% set publish_list = [] -%}
{% macro section(name) %}{% do section_list.append(name) %}{{ name }}{% endmacro -%}
[buildout]
parts =
publish-cloudooo-connection-information
cloudooo-test-runner
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
[publish-cloudooo-connection-information]
recipe = slapos.cookbook:publish.serialised
url = cloudooo://${haproxy:ip}:${haproxy:port}/
[cloudooo-base]
recipe = slapos.cookbook:generic.cloudooo
ip = {{ ipv4 }}
...
...
@@ -39,25 +28,14 @@ openoffice-port = {{ cloudooo_port + 1 }}
configuration-file = ${directory:etc}/{{ name }}.cfg
data-directory = ${directory:srv}/{{ name }}
wrapper = ${directory:services}/{{ name }}
{% set publish_info = ipv4 ~ ':' ~ cloudooo_port -%}
{% do publish_list.append(publish_info) -%}
{% 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-instance]
# Paths: Data
data-directory = ${directory:cloudooo-data}
[cloudooo-test-runner]
recipe = slapos.cookbook:cloudooo.test
...
...
@@ -99,6 +77,21 @@ link-binary =
{{ parameter_dict['poppler'] }}/bin/pdftotext
{{ parameter_dict['poppler'] }}/bin/pdftohtml
[publish-cloudooo-cluster-information]
recipe = slapos.cookbook:publish.serialised
cloudooo-address-list = {{ dumps(publish_list) }}
url = cloudooo://${cloudooo-0:ip}:${cloudooo-0:port}/
[buildout]
parts =
publish-cloudooo-cluster-information
cloudooo-test-runner
{{ section_list | join('\n\t') }}
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
# rest of parts are candidates for some generic stuff
[directory]
recipe = slapos.cookbook:mkdirectory
...
...
@@ -109,3 +102,4 @@ run = ${:var}/run
services = ${:etc}/run
srv = ${buildout:directory}/srv
var = ${buildout:directory}/var
{% endif -%}
software/cloudooo/instance-haproxy.cfg.in
0 → 100644
View file @
6b43c47d
{% if slap_software_type == 'haproxy' -%}
{% set bin_directory = parameter_dict['buildout-bin-directory'] -%}
[buildout]
parts =
publish-cloudooo-connection-information
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
[publish-cloudooo-connection-information]
recipe = slapos.cookbook:publishurl
url = cloudooo://${haproxy:ip}:${haproxy:port}/
[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 %}
# rest of parts are candidates for some generic stuff
[directory]
recipe = slapos.cookbook:mkdirectory
bin = ${buildout:directory}/bin
etc = ${buildout:directory}/etc
run = ${:var}/run
services = ${:etc}/run
var = ${buildout:directory}/var
{% endif -%}
software/cloudooo/instance.cfg.in
View file @
6b43c47d
...
...
@@ -22,13 +22,13 @@ context =
key eggs_directory buildout:eggs-directory
key develop_eggs_directory buildout:develop-eggs-directory
key slapparameter_dict slap-parameters:configuration
key slap_software_type slap-parameters:slap-software-type
${: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 }}
...
...
@@ -46,6 +46,10 @@ imagemagick = {{ imagemagick_location }}
poppler = {{ poppler_location }}
buildout-bin-directory = {{ buildout_bin_directory }}
[dynamic-template-haproxy-parameters]
haproxy = {{ haproxy_location }}
buildout-bin-directory = {{ buildout_bin_directory }}
[dynamic-template-cloudooo]
< = jinja2-template-base
template = {{ template_cloudooo }}
...
...
@@ -55,9 +59,19 @@ extra-context =
section parameter_dict dynamic-template-cloudooo-parameters
key ipv4_set slap-parameters:ipv4
[dynamic-template-haproxy]
< = jinja2-template-base
template = {{ template_haproxy }}
filename = instance-cloudoo.cfg
extensions = jinja2.ext.do
extra-context =
section parameter_dict dynamic-template-haproxy-parameters
key ipv4_set slap-parameters:ipv4
[switch-softwaretype]
recipe = slapos.cookbook:softwaretype
default = ${dynamic-template-cloudooo:rendered}
haproxy = ${dynamic-template-haproxy:rendered}
[slap-connection]
# part to migrate to new - separated words
...
...
software/cloudooo/software.cfg
View file @
6b43c47d
...
...
@@ -62,7 +62,7 @@ context =
# XXX: "template.cfg" is hardcoded in instanciation recipe
filename = template.cfg
template = ${:_profile_base_location_}/instance.cfg.in
md5sum =
425cb2e76d46d53bb0b0eebdb8c1aa95
md5sum =
2456c43484286fe58bed42a417877b42
extra-context =
key buildout_bin_directory buildout:bin-directory
key dcron_location dcron:location
...
...
@@ -86,13 +86,20 @@ extra-context =
key openssl_location openssl:location
key poppler_location poppler:location
key template_cloudooo template-cloudooo:target
key template_haproxy template-haproxy:target
key zlib_location zlib:location
key coreutils_location coreutils:location
[template-cloudooo]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-cloudoo.cfg.in
md5sum = bbe84b4c9022db62c926e8a8a4bf02a1
md5sum = dfa79313d73c68ef65b636f9f01be54a
mode = 640
[template-haproxy]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-haproxy.cfg.in
md5sum = 3507e29619940fe8f3bd932ce3054f85
mode = 640
[networkcache]
...
...
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