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
Joanne Hugé
slapos
Commits
84bc5488
Commit
84bc5488
authored
Nov 26, 2021
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
repman: use python 3
parent
690a2010
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
16 deletions
+15
-16
software/repman/buildout.hash.cfg
software/repman/buildout.hash.cfg
+2
-2
software/repman/instance-mariadb.cfg.jinja2.in
software/repman/instance-mariadb.cfg.jinja2.in
+11
-8
software/repman/instance-repman.cfg.jinja2.in
software/repman/instance-repman.cfg.jinja2.in
+1
-1
software/repman/software.cfg
software/repman/software.cfg
+1
-5
No files found.
software/repman/buildout.hash.cfg
View file @
84bc5488
...
...
@@ -18,7 +18,7 @@ md5sum = af2fc4a7a0f782fed2cb1112ef3cb397
[instance-repman.cfg]
_update_hash_filename_ = instance-repman.cfg.jinja2.in
md5sum =
e2cee0c297ecd19573cb47159561d276
md5sum =
a099b0f693b2efe419aff3d9a2b3210d
[config-toml.in]
_update_hash_filename_ = templates/config.toml.in
...
...
@@ -34,7 +34,7 @@ md5sum = 0eeb24c6aa0760f0d33c4cc2828ddf30
[template-mariadb.cfg]
_update_hash_filename_ = instance-mariadb.cfg.jinja2.in
md5sum =
33c7e5a4039744127ed4ebefc5b1d9a7
md5sum =
94577526d8f2369a16c55ce2e4287c1d
[template-my-cnf]
_update_hash_filename_ = templates/my.cnf.in
...
...
software/repman/instance-mariadb.cfg.jinja2.in
View file @
84bc5488
...
...
@@ -21,7 +21,7 @@ database-host = {{ host }}:{{ port }}
monitor-base-url = ${monitor-publish-parameters:monitor-base-url}
partition-path = ${buildout:directory}
receiver-port = ${dbjob-parameter:socat-port}
csr-id = ${caucase-csr-id:csr
_
id}
csr-id = ${caucase-csr-id:csr
-
id}
[jinja2-template-base]
recipe = slapos.recipe.template:jinja2
...
...
@@ -87,22 +87,25 @@ recipe = plone.recipe.command
output = ${directory:tmp}/csr_id
command =
if [ -s "${mysql-directory:ssl}/server-cert.pem" ]; then
echo "None" > ${:output}
;
RESULT="None"
;
else
if [ -f "${caucase-updater-csr:csr}" ]; then
result
=$({{ caucase_bin_client }} --ca-url {{ slapparameter_dict['caucase-url'] }} --send-csr ${caucase-updater-csr:csr} | cut -d ' ' -f1)
RESULT
=$({{ caucase_bin_client }} --ca-url {{ slapparameter_dict['caucase-url'] }} --send-csr ${caucase-updater-csr:csr} | cut -d ' ' -f1)
if [ ! $? -eq 0 ]; then
$result
="None";
RESULT
="None";
fi
echo "$result" > ${:output}
fi
fi
cat <<EOF > ${:output}
[caucase]
csr-id = $(echo $RESULT)
EOF
update-command = ${:command}
[caucase-csr-id]
recipe =
collective.recipe.shelloutput
commands =
csr_id = if [ -f "${get-csr-id:output}" ]; then cat ${get-csr-id:output}; fi
recipe =
slapos.cookbook:zero-knowledge.read
file-path = ${get-csr-id:output}
csr-id =
[my-cnf-parameters]
socket = ${directory:run}/mariadb.sock
...
...
software/repman/instance-repman.cfg.jinja2.in
View file @
84bc5488
...
...
@@ -409,7 +409,7 @@ template =
cp ${directory:ssl}/caucase.user.key ${directory:ssl}/caucase-full.key
cat ${directory:ssl}/caucase.user.crt >> ${directory:ssl}/caucase-full.key
for csr_id in {{ csrid_list | join(' ') }}; do
if [ "$csr_id" = "None" ]; then
if [ "$csr_id" = "None" ]
|| [ -z "$csr_id"]
; then
continue
fi
{{ buildout_bin_directory }}/caucase --ca-url {{ caucase_url }} --user-key ${directory:ssl}/caucase-full.key --sign-csr $csr_id
...
...
software/repman/software.cfg
View file @
84bc5488
...
...
@@ -36,16 +36,12 @@ parts =
location = ${mariadb-10.4:location}
[python]
part = python
2.7
part = python
3
[gowork]
# replication-manager does not build on golang 1.17
golang = ${golang1.16:location}
[monitor-eggs]
eggs +=
collective.recipe.shelloutput
[template-mysqld-wrapper]
recipe = slapos.recipe.template:jinja2
...
...
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