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
Thomas Leymonerie
slapos
Commits
cd202751
Commit
cd202751
authored
Oct 09, 2020
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
caddy-frontend: Switch rejected publication to nginx
parent
63828339
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
16 deletions
+47
-16
software/caddy-frontend/buildout.hash.cfg
software/caddy-frontend/buildout.hash.cfg
+1
-1
software/caddy-frontend/instance-apache-replicate.cfg.in
software/caddy-frontend/instance-apache-replicate.cfg.in
+45
-14
software/caddy-frontend/test/test.py
software/caddy-frontend/test/test.py
+1
-1
No files found.
software/caddy-frontend/buildout.hash.cfg
View file @
cd202751
...
@@ -26,7 +26,7 @@ md5sum = 91fce5ebea302e9c9ccc20c140b76608
...
@@ -26,7 +26,7 @@ md5sum = 91fce5ebea302e9c9ccc20c140b76608
[profile-caddy-replicate]
[profile-caddy-replicate]
filename = instance-apache-replicate.cfg.in
filename = instance-apache-replicate.cfg.in
md5sum =
4d4ace1bdad5adcf64d8dbf11d2fa21
d
md5sum =
26b21124b898158c4f409a798eb253a
d
[profile-slave-list]
[profile-slave-list]
_update_hash_filename_ = templates/apache-custom-slave-list.cfg.in
_update_hash_filename_ = templates/apache-custom-slave-list.cfg.in
...
...
software/caddy-frontend/instance-apache-replicate.cfg.in
View file @
cd202751
...
@@ -399,6 +399,8 @@ backup = ${:srv}/backup
...
@@ -399,6 +399,8 @@ backup = ${:srv}/backup
# CAUCASE directories
# CAUCASE directories
caucased = ${:srv}/caucased
caucased = ${:srv}/caucased
backup-caucased = ${:backup}/caucased
backup-caucased = ${:backup}/caucased
# NGINX
rejected-var = ${:var}/rejected-nginx
{% if aikc_enabled %}
{% if aikc_enabled %}
[directory]
[directory]
...
@@ -692,13 +694,8 @@ port = 14455
...
@@ -692,13 +694,8 @@ port = 14455
directory = ${rejected-slave-json:directory}
directory = ${rejected-slave-json:directory}
url = https://${rejected-slave-password:user}:${rejected-slave-password:passwd}@[${rejected-slave-publish-configuration:ip}]:${rejected-slave-publish-configuration:port}/${rejected-slave-json:filename}
url = https://${rejected-slave-password:user}:${rejected-slave-password:passwd}@[${rejected-slave-publish-configuration:ip}]:${rejected-slave-publish-configuration:port}/${rejected-slave-json:filename}
recipe = slapos.cookbook:wrapper
recipe = slapos.cookbook:wrapper
command-line = {{ software_parameter_dict['caddy'] }}
command-line = {{ software_parameter_dict['nginx'] }}
-conf ${rejected-slave-template:rendered}
-c ${rejected-slave-template:rendered}
-log stderr
-http2=true
-disable-http-challenge
-disable-tls-alpn-challenge
-root ${:directory}
wrapper-path = ${directory:service}/rejected-slave-publish
wrapper-path = ${directory:service}/rejected-slave-publish
hash-existing-files =
hash-existing-files =
...
@@ -728,18 +725,52 @@ storage-path = ${directory:etc}/.rejected-slave.passwd
...
@@ -728,18 +725,52 @@ storage-path = ${directory:etc}/.rejected-slave.passwd
bytes = 8
bytes = 8
user = admin
user = admin
[rejected-slave-htpasswd]
recipe = plone.recipe.command
stop-on-error = True
file = ${directory:var}/nginx-rejected.htpasswd
command = {{ software_parameter_dict['htpasswd'] }} -cb ${:file} ${rejected-slave-password:user} ${rejected-slave-password:passwd}
update-command = ${:command}
[rejected-slave-template]
[rejected-slave-template]
recipe = slapos.recipe.template:jinja2
recipe = slapos.recipe.template:jinja2
var = ${directory:rejected-var}
pid = ${directory:var}/nginx-rejected.pid
template = inline:
template = inline:
https://:${rejected-slave-publish-configuration:port}/ {
daemon off;
basicauth / ${rejected-slave-password:user} ${rejected-slave-password:passwd}
pid ${:pid};
tls ${rejected-slave-certificate:certificate} ${rejected-slave-certificate:key}
error_log stderr;
bind ${rejected-slave-publish-configuration:ip}
events {
log stderr
}
errors stderr
http {
include {{ software_parameter_dict['nginx_mime'] }};
server {
server_name_in_redirect off;
port_in_redirect off;
error_log stderr;
access_log /dev/null;
listen [${rejected-slave-publish-configuration:ip}]:${rejected-slave-publish-configuration:port} ssl;
ssl_certificate ${rejected-slave-certificate:certificate};
ssl_certificate_key ${rejected-slave-certificate:certificate};
default_type application/octet-stream;
client_body_temp_path ${:var} 1 2;
proxy_temp_path ${:var} 1 2;
fastcgi_temp_path ${:var} 1 2;
uwsgi_temp_path ${:var} 1 2;
scgi_temp_path ${:var} 1 2;
location / {
alias ${rejected-slave-json:directory}/;
autoindex off;
sendfile on;
sendfile_max_chunk 1m;
auth_basic "Rejected slave template";
auth_basic_user_file ${rejected-slave-htpasswd:file};
}
}
}
}
rendered = ${directory:etc}/
Caddyfile-rejected-slave
rendered = ${directory:etc}/
nginx-rejected-slave.conf
[promise-rejected-slave-publish-ip-port]
[promise-rejected-slave-publish-ip-port]
<= monitor-promise-base
<= monitor-promise-base
...
...
software/caddy-frontend/test/test.py
View file @
cd202751
...
@@ -358,7 +358,7 @@ class TestDataMixin(object):
...
@@ -358,7 +358,7 @@ class TestDataMixin(object):
[
backend_haproxy_wrapper_path
]
+
hash_file_list
[
backend_haproxy_wrapper_path
]
+
hash_file_list
)
)
for
rejected_slave_publish_path
in
glob
.
glob
(
os
.
path
.
join
(
for
rejected_slave_publish_path
in
glob
.
glob
(
os
.
path
.
join
(
self
.
instance_path
,
'*'
,
'etc'
,
'
Caddyfile-rejected-slave
'
)):
self
.
instance_path
,
'*'
,
'etc'
,
'
nginx-rejected-slave.conf
'
)):
partition_id
=
rejected_slave_publish_path
.
split
(
'/'
)[
-
3
]
partition_id
=
rejected_slave_publish_path
.
split
(
'/'
)[
-
3
]
rejected_slave_pem_path
=
os
.
path
.
join
(
rejected_slave_pem_path
=
os
.
path
.
join
(
self
.
instance_path
,
partition_id
,
'etc'
,
'rejected-slave.pem'
)
self
.
instance_path
,
partition_id
,
'etc'
,
'rejected-slave.pem'
)
...
...
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