Commit e789016a authored by iv's avatar iv

wip

parent 345b7374
...@@ -108,6 +108,8 @@ startup = ${:etc}/run ...@@ -108,6 +108,8 @@ startup = ${:etc}/run
service = ${:etc}/service service = ${:etc}/service
promise = ${:etc}/promise promise = ${:etc}/promise
promise.slow = ${:promise}.slow promise.slow = ${:promise}.slow
# gitlab backup location
backup = ${:var}/backup
# gitlab: etc/ log/ ... # gitlab: etc/ log/ ...
[gitlab-dir] [gitlab-dir]
...@@ -842,9 +844,12 @@ time = daily ...@@ -842,9 +844,12 @@ time = daily
command = ${logrotate:wrapper} command = ${logrotate:wrapper}
[cron-entry-git-backup] [cron-entry-git-backup]
# XXX(IV): add time command to have feedbacks on how much time it takes?
<= cron-entry <= cron-entry
time = weekly time = hourly
command = ${directory:bin}/git-backup --help # XXX(IV): run a simple command for now command = cd ${directory:backup};
${directory:bin}/xnice ${directory:bin}/gitlab-backup pull >
${directory:log}/gitlab-backup.log
# 6. on-reinstantiate actions # 6. on-reinstantiate actions
......
...@@ -49,7 +49,7 @@ parts = ...@@ -49,7 +49,7 @@ parts =
gzip gzip
dcron-output dcron-output
logrotate logrotate
git-backup xnice-gitlab-backup-git-backup
############################ ############################
...@@ -142,6 +142,13 @@ repository = https://lab.nexedi.com/kirr/git-backup.git ...@@ -142,6 +142,13 @@ repository = https://lab.nexedi.com/kirr/git-backup.git
revision = 302aaaea2a1bfa9a5352b11c3fce813641015d19 revision = 302aaaea2a1bfa9a5352b11c3fce813641015d19
location = ${buildout:parts-directory}/git-backup location = ${buildout:parts-directory}/git-backup
[xnice-repository]
# to get kirr's misc repo containing xnice script
<= git-repository
repository = https://lab.nexedi.com/kirr/misc.git
revision = 4073572ea700bf1b115f3a135aebebe5b3b824e4
location = ${buildout:parts-directory}/misc
# build needed-by-gitlab gems via bundler # build needed-by-gitlab gems via bundler
[gitlab/vendor/bundle] [gitlab/vendor/bundle]
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
...@@ -182,13 +189,19 @@ make-targets= ${:_buildout_section_name_} ...@@ -182,13 +189,19 @@ make-targets= ${:_buildout_section_name_}
environment = environment =
PATH=${golang15:location}/bin:%(PATH)s PATH=${golang15:location}/bin:%(PATH)s
[git-backup] [xnice-gitlab-backup-git-backup]
# build and install git-backup,
# copy gitlab-backup, xnice scripts
recipe = slapos.recipe.cmmi recipe = slapos.recipe.cmmi
path = ${git-backup-repository:location} path = ${git-backup-repository:location}
configure-command = : configure-command = :
make-binary = make-binary =
make-targets= cd ${:path} && ${golang15:location}/bin/go build -o make-targets = cd ${git-backup-repository:location} &&
${buildout:bin-directory}/${:_buildout_section_name_} *.go ${golang15:location}/bin/go build -o
${buildout:bin-directory}/${:_buildout_section_name_} *.go ;
cp ${git-backup-repository:location}/contrib/gitlab-backup
${xnice-repository:location}/bin/xnice
${buildout:bin-directory}
############################### ###############################
# Trampoline for instance # # Trampoline for instance #
...@@ -264,7 +277,7 @@ md5sum = 8f1c52ed223ee2c2d07c6c79bcd2f6c0 ...@@ -264,7 +277,7 @@ md5sum = 8f1c52ed223ee2c2d07c6c79bcd2f6c0
[instance-gitlab.cfg.in] [instance-gitlab.cfg.in]
<= download-file <= download-file
md5sum = 767956feaa9cec43d2d9ea6b98da2e20 md5sum = 2b631d2aac727f06310d87d2af50ba1e
[macrolib.cfg.in] [macrolib.cfg.in]
<= download-file <= download-file
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment