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
Joanne Hugé
slapos
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
Show 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 ipv4 = (ipv4_set | list)[0] -%}
{% set bin_directory = parameter_dict['buildout-bin-directory'] -%}
{% set bin_directory = parameter_dict['buildout-bin-directory'] -%}
{% set section_list = [] -%}
{% set section_list = [] -%}
{% set publish_list = [] -%}
{% macro section(name) %}{% do section_list.append(name) %}{{ name }}{% endmacro -%}
{% 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]
[cloudooo-base]
recipe = slapos.cookbook:generic.cloudooo
recipe = slapos.cookbook:generic.cloudooo
ip = {{ ipv4 }}
ip = {{ ipv4 }}
...
@@ -39,25 +28,14 @@ openoffice-port = {{ cloudooo_port + 1 }}
...
@@ -39,25 +28,14 @@ openoffice-port = {{ cloudooo_port + 1 }}
configuration-file = ${directory:etc}/{{ name }}.cfg
configuration-file = ${directory:etc}/{{ name }}.cfg
data-directory = ${directory:srv}/{{ name }}
data-directory = ${directory:srv}/{{ name }}
wrapper = ${directory:services}/{{ name }}
wrapper = ${directory:services}/{{ name }}
{% set publish_info = ipv4 ~ ':' ~ cloudooo_port -%}
{% do publish_list.append(publish_info) -%}
{% set cloudooo_port = cloudooo_port + 2 -%}
{% set cloudooo_port = cloudooo_port + 2 -%}
{% endfor -%}
{% endfor -%}
[haproxy]
[cloudooo-instance]
recipe = slapos.cookbook:haproxy
# Paths: Data
name = cloudooo
data-directory = ${directory:cloudooo-data}
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]
[cloudooo-test-runner]
recipe = slapos.cookbook:cloudooo.test
recipe = slapos.cookbook:cloudooo.test
...
@@ -99,6 +77,21 @@ link-binary =
...
@@ -99,6 +77,21 @@ link-binary =
{{ parameter_dict['poppler'] }}/bin/pdftotext
{{ parameter_dict['poppler'] }}/bin/pdftotext
{{ parameter_dict['poppler'] }}/bin/pdftohtml
{{ 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
# rest of parts are candidates for some generic stuff
[directory]
[directory]
recipe = slapos.cookbook:mkdirectory
recipe = slapos.cookbook:mkdirectory
...
@@ -109,3 +102,4 @@ run = ${:var}/run
...
@@ -109,3 +102,4 @@ run = ${:var}/run
services = ${:etc}/run
services = ${:etc}/run
srv = ${buildout:directory}/srv
srv = ${buildout:directory}/srv
var = ${buildout:directory}/var
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 =
...
@@ -22,13 +22,13 @@ context =
key eggs_directory buildout:eggs-directory
key eggs_directory buildout:eggs-directory
key develop_eggs_directory buildout:develop-eggs-directory
key develop_eggs_directory buildout:develop-eggs-directory
key slapparameter_dict slap-parameters:configuration
key slapparameter_dict slap-parameters:configuration
key slap_software_type slap-parameters:slap-software-type
${:extra-context}
${:extra-context}
[dynamic-template-cloudooo-parameters]
[dynamic-template-cloudooo-parameters]
file = {{ file_location }}
file = {{ file_location }}
fontconfig = {{ fontconfig_location }}
fontconfig = {{ fontconfig_location }}
freetype = {{ freetype_location }}
freetype = {{ freetype_location }}
haproxy = {{ haproxy_location }}
libICE = {{ libICE_location }}
libICE = {{ libICE_location }}
libpng12 = {{ libpng12_location }}
libpng12 = {{ libpng12_location }}
libSM = {{ libSM_location }}
libSM = {{ libSM_location }}
...
@@ -46,6 +46,10 @@ imagemagick = {{ imagemagick_location }}
...
@@ -46,6 +46,10 @@ imagemagick = {{ imagemagick_location }}
poppler = {{ poppler_location }}
poppler = {{ poppler_location }}
buildout-bin-directory = {{ buildout_bin_directory }}
buildout-bin-directory = {{ buildout_bin_directory }}
[dynamic-template-haproxy-parameters]
haproxy = {{ haproxy_location }}
buildout-bin-directory = {{ buildout_bin_directory }}
[dynamic-template-cloudooo]
[dynamic-template-cloudooo]
< = jinja2-template-base
< = jinja2-template-base
template = {{ template_cloudooo }}
template = {{ template_cloudooo }}
...
@@ -55,9 +59,19 @@ extra-context =
...
@@ -55,9 +59,19 @@ extra-context =
section parameter_dict dynamic-template-cloudooo-parameters
section parameter_dict dynamic-template-cloudooo-parameters
key ipv4_set slap-parameters:ipv4
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]
[switch-softwaretype]
recipe = slapos.cookbook:softwaretype
recipe = slapos.cookbook:softwaretype
default = ${dynamic-template-cloudooo:rendered}
default = ${dynamic-template-cloudooo:rendered}
haproxy = ${dynamic-template-haproxy:rendered}
[slap-connection]
[slap-connection]
# part to migrate to new - separated words
# part to migrate to new - separated words
...
...
software/cloudooo/software.cfg
View file @
6b43c47d
...
@@ -62,7 +62,7 @@ context =
...
@@ -62,7 +62,7 @@ context =
# XXX: "template.cfg" is hardcoded in instanciation recipe
# XXX: "template.cfg" is hardcoded in instanciation recipe
filename = template.cfg
filename = template.cfg
template = ${:_profile_base_location_}/instance.cfg.in
template = ${:_profile_base_location_}/instance.cfg.in
md5sum =
425cb2e76d46d53bb0b0eebdb8c1aa95
md5sum =
2456c43484286fe58bed42a417877b42
extra-context =
extra-context =
key buildout_bin_directory buildout:bin-directory
key buildout_bin_directory buildout:bin-directory
key dcron_location dcron:location
key dcron_location dcron:location
...
@@ -86,13 +86,20 @@ extra-context =
...
@@ -86,13 +86,20 @@ extra-context =
key openssl_location openssl:location
key openssl_location openssl:location
key poppler_location poppler:location
key poppler_location poppler:location
key template_cloudooo template-cloudooo:target
key template_cloudooo template-cloudooo:target
key template_haproxy template-haproxy:target
key zlib_location zlib:location
key zlib_location zlib:location
key coreutils_location coreutils:location
key coreutils_location coreutils:location
[template-cloudooo]
[template-cloudooo]
recipe = slapos.recipe.build:download
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/instance-cloudoo.cfg.in
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
mode = 640
[networkcache]
[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