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
9af0fca2
Commit
9af0fca2
authored
Jul 11, 2023
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix lock file issue
parent
30f9b711
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
59 deletions
+20
-59
software/autocert/buildout.hash.cfg
software/autocert/buildout.hash.cfg
+2
-6
software/autocert/instance-autocert.cfg.jinja2.in
software/autocert/instance-autocert.cfg.jinja2.in
+15
-31
software/autocert/instance.cfg.in
software/autocert/instance.cfg.in
+1
-1
software/autocert/sign-certificate.sh.in
software/autocert/sign-certificate.sh.in
+0
-17
software/autocert/software.cfg
software/autocert/software.cfg
+2
-4
No files found.
software/autocert/buildout.hash.cfg
View file @
9af0fca2
...
@@ -15,16 +15,12 @@
...
@@ -15,16 +15,12 @@
[template-instance]
[template-instance]
filename = instance.cfg.in
filename = instance.cfg.in
md5sum =
abcb4312498177b0577202c0094efcba
md5sum =
9f90a93264649539688aba42de8f3fb8
[template-autocert]
[template-autocert]
filename = instance-autocert.cfg.jinja2.in
filename = instance-autocert.cfg.jinja2.in
md5sum =
a6dc701b75ffb888bf8648ea7dca33e2
md5sum =
ba9e0c4b19c7fbad31fa3b78e166b6f3
[template-dehydrated-config]
[template-dehydrated-config]
filename = config.in
filename = config.in
md5sum = a12b0e12658a48658e366f3ed7c2e48e
md5sum = a12b0e12658a48658e366f3ed7c2e48e
[template-sign-certificate.sh]
filename = sign-certificate.sh.in
md5sum = 2d655b0f0d2d46557d329038db3240f7
software/autocert/instance-autocert.cfg.jinja2.in
View file @
9af0fca2
...
@@ -53,27 +53,30 @@ context =
...
@@ -53,27 +53,30 @@ context =
[dehydrated-register]
[dehydrated-register]
recipe = slapos.cookbook:wrapper
recipe = slapos.cookbook:wrapper
command-line =
command-line =
{{ parameter_dict['dehydrated-location'] }}/dehydrated
${dehydrated-wrapper:wrapper-path}
--config ${dehydrated-config:output}
--register --accept-terms
--register --accept-terms
wrapper-path = ${directory:scripts}/dehydrated-register
wrapper-path = ${directory:scripts}/dehydrated-register
[cron-entry-dehydrated]
<= cron
recipe = slapos.cookbook:cron.d
name = dehydrated-renew
frequency = 0 0 * * 0
command = {{ linux_util_location }}/bin/flock ${directory:dehydrated}/lock ${dehydrated-wrapper:wrapper-path} --cron --keep-going --no-lock
[dehydrated-signcert]
<= base-wrapper
command-line = ${cron-entry-dehydrated:command}
wrapper-path = ${directory:scripts}/dehydrated-signcert
depends =
${dehydrated-domains.txt:recipe}
[dehydrated-wrapper]
[dehydrated-wrapper]
<= base-wrapper
<= base-wrapper
command-line =
command-line =
{{ parameter_dict['dehydrated-location'] }}/dehydrated
{{ parameter_dict['dehydrated-location'] }}/dehydrated
--config ${dehydrated-config:output}
--config ${dehydrated-config:output}
--cron
wrapper-path = ${directory:bin}/dehydrated
wrapper-path = ${directory:bin}/dehydrated
depends =
${dehydrated-domains.txt:recipe}
[cron-entry-dehydrated]
<= cron
recipe = slapos.cookbook:cron.d
name = dehydrated-renew
frequency = 0 0 * * 0
command = ${dehydrated-wrapper:wrapper-path} --keep-going
[caucase-updater]
[caucase-updater]
recipe = slapos.cookbook:wrapper
recipe = slapos.cookbook:wrapper
...
@@ -117,8 +120,6 @@ command-line =
...
@@ -117,8 +120,6 @@ command-line =
${directory:kedifa}/{{ domain }}.sh
${directory:kedifa}/{{ domain }}.sh
${directory:dehydrated}/certs/{{ domain }}/privkey.pem
${directory:dehydrated}/certs/{{ domain }}/privkey.pem
${directory:dehydrated}/certs/{{ domain }}/fullchain.pem
${directory:dehydrated}/certs/{{ domain }}/fullchain.pem
wait-for-files =
${directory:dehydrated}/certs/{{ domain }}/fullchain.pem
wrapper-path = ${directory:bin}/kedifa-upload-{{ domain.replace('\.', '-') }}
wrapper-path = ${directory:bin}/kedifa-upload-{{ domain.replace('\.', '-') }}
depends =
depends =
{{ "${kedifa-generate-auth-" ~ domain ~ ":recipe}" }}
{{ "${kedifa-generate-auth-" ~ domain ~ ":recipe}" }}
...
@@ -131,12 +132,6 @@ name = upload-{{ domain }}
...
@@ -131,12 +132,6 @@ name = upload-{{ domain }}
frequency = 0 0 * * 0
frequency = 0 0 * * 0
command = {{ "${kedifa-upload-" ~ domain ~ ":wrapper-path}" }}
command = {{ "${kedifa-upload-" ~ domain ~ ":wrapper-path}" }}
[dehydrated-sign-{{ domain }}]
<= base-wrapper
command-line =
{{ parameter_dict['kedifa-location'] }}
wrapper-path = ${directory:scripts}/kedifa-genauth-{{ domain.replace('\.', '-') }}
[promise-{{ domain }}]
[promise-{{ domain }}]
recipe = slapos.recipe.template:jinja2
recipe = slapos.recipe.template:jinja2
inline =
inline =
...
@@ -169,16 +164,6 @@ mode = 755
...
@@ -169,16 +164,6 @@ mode = 755
{% do part_list.append("cron-entry-" ~ domain) -%}
{% do part_list.append("cron-entry-" ~ domain) -%}
{% endfor %}
{% endfor %}
[dehydrated-signcert]
recipe = slapos.recipe.template:jinja2
url = {{ parameter_dict['template-signcert'] }}
output = ${directory:scripts}/dehydrated-signcert
domain-list = {{ dumps(domain_list) }}
context =
key base_directory directory:dehydrated
key dehydrated_wrapper dehydrated-wrapper:wrapper-path
key domain_list :domain-list
[dehydrated-domains.txt]
[dehydrated-domains.txt]
recipe = slapos.recipe.template
recipe = slapos.recipe.template
inline =
inline =
...
@@ -228,7 +213,6 @@ parts =
...
@@ -228,7 +213,6 @@ parts =
httpd-url-promise
httpd-url-promise
dehydrated-register
dehydrated-register
dehydrated-signcert
dehydrated-signcert
cron-entry-dehydrated
# Complete parts with sections
# Complete parts with sections
{{ part_list | join('\n ') }}
{{ part_list | join('\n ') }}
...
...
software/autocert/instance.cfg.in
View file @
9af0fca2
...
@@ -35,6 +35,7 @@ context =
...
@@ -35,6 +35,7 @@ context =
raw bash_bin {{ bash_location }}/bin/bash
raw bash_bin {{ bash_location }}/bin/bash
raw curl_location {{ curl_location }}
raw curl_location {{ curl_location }}
raw openssl_location {{ openssl_location }}
raw openssl_location {{ openssl_location }}
raw linux_util_location {{ linux_util_location }}
raw openssl_bin {{ openssl_location }}/bin/openssl
raw openssl_bin {{ openssl_location }}/bin/openssl
raw template_monitor {{ template_monitor_cfg }}
raw template_monitor {{ template_monitor_cfg }}
${:extra-context}
${:extra-context}
...
@@ -44,7 +45,6 @@ context =
...
@@ -44,7 +45,6 @@ context =
dehydrated-location = {{ dehydrated_location }}
dehydrated-location = {{ dehydrated_location }}
kedifa-location = {{ kedifa_location }}
kedifa-location = {{ kedifa_location }}
template-config = {{ template_dehydrated_config }}
template-config = {{ template_dehydrated_config }}
template-signcert = {{ template_signcert }}
[dynamic-template-autocert]
[dynamic-template-autocert]
<= jinja2-template-base
<= jinja2-template-base
...
...
software/autocert/sign-certificate.sh.in
deleted
100644 → 0
View file @
30f9b711
#!/bin/sh
# Sign a single certificate if not exists yet
BASE_DIR
={{
base_directory
}}
sign_cert
()
{
BASE_DOMAIN
=
$1
DOMAINS
=
$2
if
[
-s
"
$BASE_DIR
/certs/
$BASE_DOMAIN
/fullchain.pem"
]
;
then
exit
0
;
fi
{{
dehydrated_wrapper
}}
--domain
$DOMAINS
--lock-suffix
$BASE_DOMAIN
}
{
%
for
domain_string
in
domain_list -%
}
sign_cert
{{
domain_string.split
(
' '
)[
0]
}}
"{{ domain_string }}"
{
% endfor -%
}
software/autocert/software.cfg
View file @
9af0fca2
...
@@ -3,6 +3,7 @@ extends =
...
@@ -3,6 +3,7 @@ extends =
../../component/bash/buildout.cfg
../../component/bash/buildout.cfg
../../component/openssl/buildout.cfg
../../component/openssl/buildout.cfg
../../component/curl/buildout.cfg
../../component/curl/buildout.cfg
../../component/util-linux/buildout.cfg
../../stack/slapos.cfg
../../stack/slapos.cfg
../../stack/monitor/buildout.cfg
../../stack/monitor/buildout.cfg
./buildout.hash.cfg
./buildout.hash.cfg
...
@@ -60,9 +61,9 @@ context =
...
@@ -60,9 +61,9 @@ context =
key dehydrated_location dehydrated:location
key dehydrated_location dehydrated:location
key kedifa_location kedifa:location
key kedifa_location kedifa:location
key openssl_location openssl:location
key openssl_location openssl:location
key linux_util_location util-linux:location
key template_monitor_cfg monitor2-template:output
key template_monitor_cfg monitor2-template:output
key template_autocert template-autocert:target
key template_autocert template-autocert:target
key template_signcert template-sign-certificate.sh:target
key template_dehydrated_config template-dehydrated-config:target
key template_dehydrated_config template-dehydrated-config:target
[template-autocert]
[template-autocert]
...
@@ -72,9 +73,6 @@ output = ${buildout:directory}/instance-autocert.cfg.jinja2
...
@@ -72,9 +73,6 @@ output = ${buildout:directory}/instance-autocert.cfg.jinja2
[template-dehydrated-config]
[template-dehydrated-config]
<= download-template
<= download-template
[template-sign-certificate.sh]
<= download-template
[versions]
[versions]
caucase = 0.9.15
caucase = 0.9.15
kedifa = 0.0.6
kedifa = 0.0.6
...
...
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