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
Carlos Ramos Carreño
slapos
Commits
686adec3
Commit
686adec3
authored
Jan 18, 2023
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/theia: Simplify haproxy implementation
Reuse stack and drop overcomplicated rsyslogd configuration.
parent
9159fe93
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
73 deletions
+9
-73
software/theia/buildout.hash.cfg
software/theia/buildout.hash.cfg
+1
-1
software/theia/instance-theia.cfg.jinja.in
software/theia/instance-theia.cfg.jinja.in
+7
-70
software/theia/software.cfg
software/theia/software.cfg
+1
-2
No files found.
software/theia/buildout.hash.cfg
View file @
686adec3
...
...
@@ -15,7 +15,7 @@
[instance-theia]
_update_hash_filename_ = instance-theia.cfg.jinja.in
md5sum =
ca0f353d00131851a992cd3519bec5b0
md5sum =
4b69822605e3f20fcec8f44a0bdf80bb
[instance]
_update_hash_filename_ = instance.cfg.in
...
...
software/theia/instance-theia.cfg.jinja.in
View file @
686adec3
...
...
@@ -14,7 +14,6 @@ theia-environment-parts =
theia-parts =
frontend-instance
frontend-instance-rsyslogd
python-server
promises
...
...
@@ -98,7 +97,6 @@ instance-promises =
{% if additional_frontend %}
$${remote-additional-frontend-url-available-promise:name}
{% endif %}
$${frontend-instance-rsyslogd-promise:name}
$${slapos-standalone-listen-promise:name}
$${slapos-standalone-ready-promise:name}
$${slapos-autorun-promise:name}
...
...
@@ -153,12 +151,6 @@ config-url = $${remote-additional-frontend:connection-secure_access}
config-http-code = 401
{% endif %}
[frontend-instance-rsyslogd-promise]
<= monitor-promise-base
promise = check_command_execute
name = rsyslogd_listen_promise.py
config-command = test -S $${frontend-instance-rsyslogd-config:log-socket}
[slapos-standalone-listen-promise]
<= monitor-promise-base
promise = check_socket_listening
...
...
@@ -232,39 +224,6 @@ recipe = slapos.cookbook:generate.password
username = admin
storage-path = $${buildout:parts-directory}/.$${:_buildout_section_name_}
[frontend-instance-rsyslogd-config]
recipe = slapos.recipe.template
output = $${directory:etc}/$${:_buildout_section_name_}
log-file = $${directory:log}/frontend-instance.log
log-socket = $${directory:run}/rsyslog.sock
pidfile = $${directory:pidfiles}/rsyslogd.pid
inline =
module(
load="imuxsock"
SysSock.Name="$${:log-socket}")
# Just simply output the raw line without any additional information, as
# haproxy emits enough information by itself
# Also cut out first empty space in msg, which is related to rsyslogd
# internal and end up cutting on 8k, as it's default of $MaxMessageSize
template(name="rawoutput" type="string" string="%msg:2:8192%\n")
$ActionFileDefaultTemplate rawoutput
$FileCreateMode 0600
$DirCreateMode 0700
$Umask 0022
$WorkDirectory $${directory:run}
*.* $${:log-file};rawoutput
[frontend-instance-rsyslogd]
recipe = slapos.cookbook:wrapper
command-line = ${rsyslogd:location}/sbin/rsyslogd -i $${frontend-instance-rsyslogd-config:pidfile} -n -f $${frontend-instance-rsyslogd-config:output}
wrapper-path = $${directory:services}/$${:_buildout_section_name_}
hash-files = $${frontend-instance-rsyslogd-config:output}
[frontend-instance-port]
recipe = slapos.cookbook:free_port
minimum = 3000
...
...
@@ -278,7 +237,7 @@ command =
then
${openssl-output:openssl} req -x509 -nodes -days 3650 \
-subj "/C=AA/ST=X/L=X/O=Dis/CN=$${:common-name}" \
-newkey rsa:
1024
-keyout $${:cert-file} \
-newkey rsa:
2048
-keyout $${:cert-file} \
-out $${:cert-file}
fi
update-command = $${:command}
...
...
@@ -288,34 +247,13 @@ location =
$${:cert-file}
[frontend-instance-config]
recipe = slapos.recipe.template
recipe = slapos.recipe.template:jinja2
url = ${stack-haproxy-default-backend-config:target}
output = $${directory:etc}/$${:_buildout_section_name_}
blankline =
inline =
global
maxconn 4096
master-worker
pidfile $${frontend-instance:pidfile}
log $${frontend-instance-rsyslogd-config:log-socket} local0 info
defaults
log global
option httplog
mode http
retries 1
option redispatch
maxconn 2000
balance roundrobin
timeout connect 10s
timeout queue 60s
timeout server 305s
timeout client 305s
# compress some content types
compression algo gzip
compression type application/font-woff application/font-woff2 application/hal+json application/javascript application/json application/rss+xml application/wasm application/x-font-opentype application/x-font-ttf application/x-javascript application/xml image/svg+xml text/cache-manifest text/css text/html text/javascript text/plain text/xml
context =
key pidfile frontend-instance:pidfile
key content :content
content =
userlist basic-auth-list
user $${frontend-instance-password:username} insecure-password $${frontend-instance-password:passwd}
...
...
@@ -340,7 +278,6 @@ inline =
backend static
log global
server static_backend $${python-server-port:ip}:$${python-server-port:port}
$${:blankline}
ip = $${frontend-instance-port:ip}
hostname = [$${:ip}]
...
...
software/theia/software.cfg
View file @
686adec3
[buildout]
extends =
../../component/haproxy/buildout.cfg
../../component/rsyslogd/buildout.cfg
../../component/git/buildout.cfg
../../component/bash/buildout.cfg
../../component/bash-completion/buildout.cfg
...
...
@@ -14,6 +12,7 @@ extends =
../../component/fonts/buildout.cfg
../../component/theia/buildout.cfg
../../component/pygolang/buildout.cfg
../../stack/haproxy/default-backend.cfg
../../stack/slapos.cfg
../../stack/monitor/buildout.cfg
../../stack/resilient/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