Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
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
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
slapos
Commits
713defde
Commit
713defde
authored
Jan 17, 2023
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/erp5testnode: Replace caddy with haproxy
parent
2337e24a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
21 deletions
+41
-21
software/erp5testnode/buildout.hash.cfg
software/erp5testnode/buildout.hash.cfg
+1
-1
software/erp5testnode/instance-default.cfg.jinja.in
software/erp5testnode/instance-default.cfg.jinja.in
+39
-19
software/erp5testnode/software.cfg
software/erp5testnode/software.cfg
+1
-1
No files found.
software/erp5testnode/buildout.hash.cfg
View file @
713defde
...
@@ -18,4 +18,4 @@ md5sum = 5bd72da73a8b84f70f568686924d7d6c
...
@@ -18,4 +18,4 @@ md5sum = 5bd72da73a8b84f70f568686924d7d6c
[template-default]
[template-default]
filename = instance-default.cfg.jinja.in
filename = instance-default.cfg.jinja.in
md5sum =
2aafd7708aac85847da3a8679b84fe34
md5sum =
96fb2221c8a91fb44dc5b931c29e0af9
software/erp5testnode/instance-default.cfg.jinja.in
View file @
713defde
...
@@ -107,23 +107,43 @@ inline =
...
@@ -107,23 +107,43 @@ inline =
--unixdomain-only=$${:socket}:$(id -u):$(id -g):0600 \
--unixdomain-only=$${:socket}:$(id -u):$(id -g):0600 \
--service "/:$(id -u):$(id -g):HOME:$${shell-environment:shell} -l"
--service "/:$(id -u):$(id -g):HOME:$${shell-environment:shell} -l"
[shellinabox-frontend-certificate]
recipe = plone.recipe.command
command =
if [ ! -e $${:cert-file} ]
then
${openssl-output:openssl} req -x509 -nodes -days 3650 \
-subj "/C=AA/ST=X/L=X/O=Dis/CN=$${:common-name}" \
-newkey rsa:2048 -keyout $${:cert-file} \
-out $${:cert-file}
fi
update-command = $${:command}
cert-file = $${directory:var}/$${:_buildout_section_name_}.pem
common-name = $${:ipv6}
location =
$${:cert-file}
ipv6 = {{ partition_ipv6 }}
[shellinabox-frontend-config]
[shellinabox-frontend-config]
recipe = slapos.recipe.template
recipe = slapos.recipe.template:jinja2
url = ${stack-haproxy-default-backend-config:target}
output = $${directory:etc}/$${:_buildout_section_name_}
output = $${directory:etc}/$${:_buildout_section_name_}
inline =
context =
https://$${:hostname}:$${:port} {
key pidfile :pidfile
bind $${:ipv6}
key content :content
tls self_signed
pidfile = $${:pidfile}
gzip
content =
log stdout
userlist auth
errors stderr
user $${:username} insecure-password $${:passwd}
proxy / unix:$${shellinabox:socket}
basicauth $${:username} $${:passwd} {
listen app
realm "Test Node $${testnode:test-node-title}"
log global
/
acl auth_ok http_auth(auth)
}
http-request auth realm "Test Node $${testnode:test-node-title}" unless auth_ok
}
bind $${:ipv6}:$${:port} ssl crt $${shellinabox-frontend-certificate:cert-file} alpn h2,http/1.1
ipv6 = {{ partition_ipv6 }}
server app unix@$${shellinabox:socket}
ipv6 = $${shellinabox-frontend-certificate:ipv6}
hostname = [$${:ipv6}]
hostname = [$${:ipv6}]
port = 8080
port = 8080
username = testnode
username = testnode
...
@@ -131,24 +151,24 @@ passwd = $${pwgen:passwd}
...
@@ -131,24 +151,24 @@ passwd = $${pwgen:passwd}
cert-file = $${directory:shellinabox}/public.crt
cert-file = $${directory:shellinabox}/public.crt
key-file = $${directory:shellinabox}/private.key
key-file = $${directory:shellinabox}/private.key
backend-url = https://$${:username}:$${:passwd}@$${:hostname}:$${:port}
backend-url = https://$${:username}:$${:passwd}@$${:hostname}:$${:port}
pidfile = $${basedirectory:run}/shellinabox-haproxy.pid
[shellinabox-frontend]
[shellinabox-frontend]
recipe = slapos.cookbook:wrapper
recipe = slapos.cookbook:wrapper
wrapper-path = $${rootdirectory:bin}/$${:_buildout_section_name_}
wrapper-path = $${rootdirectory:bin}/$${:_buildout_section_name_}
command-line =
command-line =
${
caddy:output} -conf $${shellinabox-frontend-config:output} -pidfile $${:pidfile
}
${
haproxy:location}/sbin/haproxy -f $${shellinabox-frontend-config:output
}
url = $${shellinabox-frontend-config:backend-url}
url = $${shellinabox-frontend-config:backend-url}
hostname = $${shellinabox-frontend-config:ipv6}
hostname = $${shellinabox-frontend-config:ipv6}
port = $${shellinabox-frontend-config:port}
port = $${shellinabox-frontend-config:port}
pidfile = $${
basedirectory:run}/$${:_buildout_section_name_}.pid
pidfile = $${
shellinabox-frontend-config:pidfile}
[shellinabox-frontend-reload]
[shellinabox-frontend-reload]
recipe = slapos.cookbook:wrapper
recipe = slapos.cookbook:wrapper
wrapper-path = $${basedirectory:services}/$${:_buildout_section_name_}
wrapper-path = $${basedirectory:services}/$${:_buildout_section_name_}
command-line =
command-line =
${bash:location}/bin/bash -c
${bash:location}/bin/bash -c
"kill -s USR
1
$$(${coreutils:location}/bin/cat $${shellinabox-frontend:pidfile}) \
"kill -s USR
2
$$(${coreutils:location}/bin/cat $${shellinabox-frontend:pidfile}) \
&& ${coreutils:location}/bin/sleep infinity"
&& ${coreutils:location}/bin/sleep infinity"
hash-files =
hash-files =
$${shellinabox-frontend-config:output}
$${shellinabox-frontend-config:output}
...
...
software/erp5testnode/software.cfg
View file @
713defde
...
@@ -2,11 +2,11 @@
...
@@ -2,11 +2,11 @@
extends =
extends =
buildout.hash.cfg
buildout.hash.cfg
../../stack/slapos.cfg
../../stack/slapos.cfg
../../stack/haproxy/default-backend.cfg
../../component/git/buildout.cfg
../../component/git/buildout.cfg
../../component/lxml-python/buildout.cfg
../../component/lxml-python/buildout.cfg
../../component/zip/buildout.cfg
../../component/zip/buildout.cfg
../../component/bash/buildout.cfg
../../component/bash/buildout.cfg
../../component/caddy/buildout.cfg
../../component/coreutils/buildout.cfg
../../component/coreutils/buildout.cfg
../../component/shellinabox/buildout.cfg
../../component/shellinabox/buildout.cfg
../../component/pwgen/buildout.cfg
../../component/pwgen/buildout.cfg
...
...
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