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
Lu Xu
slapos
Commits
9c4bbaa5
Commit
9c4bbaa5
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
52632323
Changes
4
Hide 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 @
9c4bbaa5
...
...
@@ -13,9 +13,13 @@
# section inheritance (< = ...) are NOT supported (but you should really
# not need these here).
[template-cloudooo]
filename = instance.cfg.in
filename = instance.cfg.in
md5sum = d1e4d7306c39f2ebc64d0407860d4301
[template-cloudooo-instance]
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 @
9c4bbaa5
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 @
9c4bbaa5
...
...
@@ -68,7 +68,7 @@ parts =
apache-promise
apache-logrotate
cloudooo-test-runner
haproxy
haproxy
-service
xvfb-instance
wkhtmltopdf-on-xvfb
...
...
@@ -181,17 +181,25 @@ wrapper = ${directory:services}/{{ name }}
{% 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]
recipe = slapos.cookbook:haproxy
name = cloudooo
conf-path = ${directory:etc}/haproxy.cfg
socket-path = ${directory:run}/haproxy.sock
pidfile = ${directory:run}/haproxy.pid
ip = {{ ipv4 }}
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 =
{%- for section_name in cloudooo_section_list %}
{{ "${" ~ section_name ~ ":ip}:${" ~ section_name ~ ":port}" }}
...
...
@@ -230,7 +238,6 @@ link-binary =
{{ parameter_dict['poppler'] }}/bin/pdftohtml
{{ parameter_dict['onlyoffice-core'] }}/bin/x2t
# rest of parts are candidates for some generic stuff
[directory]
recipe = slapos.cookbook:mkdirectory
apache-conf = ${:etc}/apache
...
...
software/cloudooo/software-common.cfg
View file @
9c4bbaa5
...
...
@@ -92,11 +92,16 @@ zlib = ${zlib:location}
template-apache-conf = ${template-apache-backend-conf:target}
template-logrotate-base = ${template-logrotate-base:output}
template-monitor = ${monitor2-template:output}
template-haproxy-cfg = ${template-haproxy-cfg:target}
[template-cloudooo-instance]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:filename}
[template-haproxy-cfg]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:filename}
[versions]
argparse = 1.4.0
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