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
Labels
Merge Requests
103
Merge Requests
103
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
4b809896
Commit
4b809896
authored
Nov 05, 2022
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/cloudooo: re-implement haproxy with a template
slapos.cookbook:haproxy no longer exist
parent
65389794
Pipeline
#24596
passed with stage
in 0 seconds
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
11 deletions
+52
-11
software/cloudooo/buildout.hash.cfg
software/cloudooo/buildout.hash.cfg
+6
-2
software/cloudooo/haproxy.cfg.in
software/cloudooo/haproxy.cfg.in
+25
-0
software/cloudooo/instance-cloudooo.cfg.in
software/cloudooo/instance-cloudooo.cfg.in
+16
-9
software/cloudooo/software-common.cfg
software/cloudooo/software-common.cfg
+5
-0
No files found.
software/cloudooo/buildout.hash.cfg
View file @
4b809896
...
@@ -18,4 +18,8 @@ md5sum = d1e4d7306c39f2ebc64d0407860d4301
...
@@ -18,4 +18,8 @@ md5sum = d1e4d7306c39f2ebc64d0407860d4301
[template-cloudooo-instance]
[template-cloudooo-instance]
filename = instance-cloudooo.cfg.in
filename = instance-cloudooo.cfg.in
md5sum = 90299c1dbdc5f983613794a8e9a7bc9d
md5sum = 3c499fd3cdfc7915d6eaf1cf4130b56d
[template-haproxy-cfg]
filename = haproxy.cfg.in
md5sum = 3d989eeb2e326bb0daf9351850f7fc39
software/cloudooo/haproxy.cfg.in
0 → 100644
View file @
4b809896
global
maxconn 4096
stats socket {{ parameter_dict['socket-path'] }} level admin
master-worker
pidfile {{ parameter_dict['pidfile'] }}
defaults
mode http
retries 1
option redispatch
maxconn 2000
timeout server 305s
timeout queue 60s
timeout connect 5s
timeout client 305s
option httpclose
listen cloudooo
bind {{ parameter_dict['ip'] }}:{{ parameter_dict['port'] }}
balance roundrobin
stats uri /haproxy
{% for i, backend_netloc in enumerate(parameter_dict['backend-list'].splitlines()) -%}
server cloudooo_{{ i + 1 }} {{ backend_netloc }} rise 1 fall 2 maxqueue 5 maxconn 1
{% endfor %}
software/cloudooo/instance-cloudooo.cfg.in
View file @
4b809896
...
@@ -68,7 +68,7 @@ parts =
...
@@ -68,7 +68,7 @@ parts =
apache-promise
apache-promise
apache-logrotate
apache-logrotate
cloudooo-test-runner
cloudooo-test-runner
haproxy
haproxy
-service
xvfb-instance
xvfb-instance
wkhtmltopdf-on-xvfb
wkhtmltopdf-on-xvfb
...
@@ -181,17 +181,25 @@ wrapper = ${directory:services}/{{ name }}
...
@@ -181,17 +181,25 @@ wrapper = ${directory:services}/{{ name }}
{% endfor -%}
{% endfor -%}
[haproxy-cfg]
recipe = slapos.recipe.template:jinja2
url = {{ parameter_dict['template-haproxy-cfg'] }}
output = ${directory:etc}/haproxy.cfg
context =
section parameter_dict haproxy
[haproxy-service]
recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:services}/${:_buildout_section_name_}
command-line =
"{{ parameter_dict['haproxy'] }}/sbin/haproxy" -f "${haproxy-cfg:output}"
hash-files = ${haproxy-cfg:output}
[haproxy]
[haproxy]
recipe = slapos.cookbook:haproxy
name = cloudooo
conf-path = ${directory:etc}/haproxy.cfg
socket-path = ${directory:run}/haproxy.sock
socket-path = ${directory:run}/haproxy.sock
pidfile = ${directory:run}/haproxy.pid
ip = {{ ipv4 }}
ip = {{ ipv4 }}
port = {{ haproxy_port }}
port = {{ haproxy_port }}
maxconn = 1
wrapper-path = ${directory:services}/haproxy
binary-path = {{ parameter_dict['haproxy'] }}/sbin/haproxy
ctl-path = ${directory:bin}/haproxy-ctl
backend-list =
backend-list =
{%- for section_name in cloudooo_section_list %}
{%- for section_name in cloudooo_section_list %}
{{ "${" ~ section_name ~ ":ip}:${" ~ section_name ~ ":port}" }}
{{ "${" ~ section_name ~ ":ip}:${" ~ section_name ~ ":port}" }}
...
@@ -230,7 +238,6 @@ link-binary =
...
@@ -230,7 +238,6 @@ link-binary =
{{ parameter_dict['poppler'] }}/bin/pdftohtml
{{ parameter_dict['poppler'] }}/bin/pdftohtml
{{ parameter_dict['onlyoffice-core'] }}/bin/x2t
{{ parameter_dict['onlyoffice-core'] }}/bin/x2t
# rest of parts are candidates for some generic stuff
[directory]
[directory]
recipe = slapos.cookbook:mkdirectory
recipe = slapos.cookbook:mkdirectory
apache-conf = ${:etc}/apache
apache-conf = ${:etc}/apache
...
...
software/cloudooo/software-common.cfg
View file @
4b809896
...
@@ -92,11 +92,16 @@ zlib = ${zlib:location}
...
@@ -92,11 +92,16 @@ zlib = ${zlib:location}
template-apache-conf = ${template-apache-backend-conf:target}
template-apache-conf = ${template-apache-backend-conf:target}
template-logrotate-base = ${template-logrotate-base:output}
template-logrotate-base = ${template-logrotate-base:output}
template-monitor = ${monitor2-template:output}
template-monitor = ${monitor2-template:output}
template-haproxy-cfg = ${template-haproxy-cfg:target}
[template-cloudooo-instance]
[template-cloudooo-instance]
recipe = slapos.recipe.build:download
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:filename}
url = ${:_profile_base_location_}/${:filename}
[template-haproxy-cfg]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:filename}
[versions]
[versions]
argparse = 1.4.0
argparse = 1.4.0
pyPdf = 1.13
pyPdf = 1.13
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