Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
moodle_rebase10.1.2
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
Dmitry Blinov
moodle_rebase10.1.2
Commits
673572ef
Commit
673572ef
authored
Mar 21, 2021
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
re6stnet: add cron task to backup registry.db
parent
63015188
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
2 deletions
+39
-2
software/re6stnet/buildout.hash.cfg
software/re6stnet/buildout.hash.cfg
+2
-2
software/re6stnet/instance-re6stnet-input-schema.json
software/re6stnet/instance-re6stnet-input-schema.json
+5
-0
software/re6stnet/instance-re6stnet.cfg.in
software/re6stnet/instance-re6stnet.cfg.in
+8
-0
software/re6stnet/instance.cfg.in
software/re6stnet/instance.cfg.in
+1
-0
software/re6stnet/software.cfg
software/re6stnet/software.cfg
+23
-0
No files found.
software/re6stnet/buildout.hash.cfg
View file @
673572ef
...
@@ -14,11 +14,11 @@
...
@@ -14,11 +14,11 @@
# not need these here).
# not need these here).
[template]
[template]
filename = instance.cfg.in
filename = instance.cfg.in
md5sum =
99e8d2b0a0a937ca21d449b542fd8f45
md5sum =
01938aa1683b7994f814fff6d964b9ba
[template-re6stnet]
[template-re6stnet]
filename = instance-re6stnet.cfg.in
filename = instance-re6stnet.cfg.in
md5sum =
f6dbd62f8db7de1c431eb82b82568085
md5sum =
bc3a7aebbd15b90309e6bdaffaf9643e
[template-apache-conf]
[template-apache-conf]
filename = apache.conf.in
filename = apache.conf.in
...
...
software/re6stnet/instance-re6stnet-input-schema.json
View file @
673572ef
...
@@ -78,6 +78,11 @@
...
@@ -78,6 +78,11 @@
"description"
:
"Prevent tunnelling accross borders of listed countries"
,
"description"
:
"Prevent tunnelling accross borders of listed countries"
,
"type"
:
"string"
,
"type"
:
"string"
,
"default"
:
""
"default"
:
""
},
"backup-repository"
:
{
"title"
:
"Git backup repository"
,
"description"
:
"URL of Git repository where backups are pushed. Nothing is pushed if empty."
,
"type"
:
"string"
}
}
}
}
}
}
software/re6stnet/instance-re6stnet.cfg.in
View file @
673572ef
...
@@ -112,6 +112,13 @@ wrapper-path = ${directory:services}/re6st-registry
...
@@ -112,6 +112,13 @@ wrapper-path = ${directory:services}/re6st-registry
pidfile = ${directory:run}/registry.pid
pidfile = ${directory:run}/registry.pid
command-line = {{ bin_directory }}/re6st-registry @${re6st-registry-conf:rendered}
command-line = {{ bin_directory }}/re6st-registry @${re6st-registry-conf:rendered}
[cron-entry-re6st-backup]
recipe = slapos.cookbook:cron.d
cron-entries = ${cron:cron-entries}
name = re6stnet-backup
time = hourly
command = {{ parameter_dict['re6stnet-backup'] }} ${logrotate-directory:backup}/re6stnet ${re6st-registry-conf-dict:db} {{ slapparameter_dict.get('backup-repository', '') }}
[re6st-registry]
[re6st-registry]
recipe = slapos.cookbook:re6stnet.registry
recipe = slapos.cookbook:re6stnet.registry
manager-wrapper = ${directory:bin}/re6stManageToken
manager-wrapper = ${directory:bin}/re6stManageToken
...
@@ -199,6 +206,7 @@ parts =
...
@@ -199,6 +206,7 @@ parts =
re6stnet-manage
re6stnet-manage
cron-entry-logrotate
cron-entry-logrotate
cron-entry-re6st-manage
cron-entry-re6st-manage
cron-entry-re6st-backup
apache-httpd
apache-httpd
apache-httpd-graceful
apache-httpd-graceful
publish
publish
...
...
software/re6stnet/instance.cfg.in
View file @
673572ef
...
@@ -29,6 +29,7 @@ bin-directory = {{ bin_directory }}
...
@@ -29,6 +29,7 @@ bin-directory = {{ bin_directory }}
python-executable = {{ python_with_eggs }}
python-executable = {{ python_with_eggs }}
template-apache-conf = {{ template_apache_conf }}
template-apache-conf = {{ template_apache_conf }}
apache-location = {{ apache_location }}
apache-location = {{ apache_location }}
re6stnet-backup = {{ re6stnet_backup }}
template-re6st-registry-conf = {{ template_re6st_registry_conf }}
template-re6st-registry-conf = {{ template_re6st_registry_conf }}
[dynamic-template-re6stnet]
[dynamic-template-re6stnet]
...
...
software/re6stnet/software.cfg
View file @
673572ef
...
@@ -43,6 +43,28 @@ initialization =
...
@@ -43,6 +43,28 @@ initialization =
os.environ['PATH'] = '${git:location}/bin' + (path and ':' + path)
os.environ['PATH'] = '${git:location}/bin' + (path and ':' + path)
depends = ${re6stnet-develop:recipe}
depends = ${re6stnet-develop:recipe}
[re6stnet-backup]
recipe = slapos.recipe.template:jinja2
rendered = ${buildout:bin-directory}/re6st-backup
template =
inline:#!/bin/sh -e
PATH={{git_location}}/bin:{{sqlite3_location}}/bin:$PATH
cd "$1" || {
rm -rf "$1.new"
git init --bare "$1.new"
rm "$1.new"/description "$1.new"/hooks/*
mv "$1.new" "$1"
cd "$1"
}
h=`sqlite3 "$2" .dump |git hash-object --stdin -w`
git update-index --add --cacheinfo 0644 "$h" registry.sql
git diff --cached --quiet || GIT_WORK_TREE=$PWD GIT_DIR=$PWD git \
-c gc.auto=100 -c gc.autoDetach=false commit --allow-empty-message -qm ''
[ ! "$3" ] || git push --mirror "$3"
context =
key git_location git:location
key sqlite3_location sqlite3:location
[download-base]
[download-base]
recipe = slapos.recipe.build:download
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:filename}
url = ${:_profile_base_location_}/${:filename}
...
@@ -59,6 +81,7 @@ context =
...
@@ -59,6 +81,7 @@ context =
key apache_location apache:location
key apache_location apache:location
key logrotate_location logrotate:location
key logrotate_location logrotate:location
key openssl_location openssl:location
key openssl_location openssl:location
key re6stnet_backup re6stnet-backup:rendered
key template_apache_conf template-apache-conf:target
key template_apache_conf template-apache-conf:target
key template_re6stnet template-re6stnet:target
key template_re6stnet template-re6stnet:target
key template_re6st_registry_conf template-re6st-registry-conf:target
key template_re6st_registry_conf template-re6st-registry-conf:target
...
...
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