Commit 345b7374 authored by iv's avatar iv

Gitlab: start automation of git-backup

  - git-clone and build git-backup sources
  - add a crontab (just a test for now)
parent e770e9f7
......@@ -30,6 +30,7 @@ parts =
service-redis
service-cron
cron-entry-git-backup
on-reinstantiate
......@@ -765,9 +766,7 @@ cron-entries = ${cron-dir:cron.d}
crontabs = ${cron-dir:crontabs}
cronstamps = ${cron-dir:cronstamps}
catcher = ${cron-simplelogger:wrapper}
dcrond-binary = {{ dcron_bin }}
depends =
${logrotate-entry-cron:recipe}
......@@ -777,7 +776,6 @@ recipe = slapos.cookbook:simplelogger
wrapper = ${directory:bin}/${:_buildout_section_name_}
log = ${cron-dir:log}/cron.log
# base entry for clients who registers to cron
[cron-entry]
recipe = slapos.cookbook:cron.d
......@@ -843,7 +841,10 @@ backup = ...
time = daily
command = ${logrotate:wrapper}
[cron-entry-git-backup]
<= cron-entry
time = weekly
command = ${directory:bin}/git-backup --help # XXX(IV): run a simple command for now
# 6. on-reinstantiate actions
......
......@@ -49,6 +49,7 @@ parts =
gzip
dcron-output
logrotate
git-backup
############################
......@@ -135,7 +136,11 @@ repository = https://lab.nexedi.com/nexedi/gitlab-workhorse.git
revision = v0.6.4-3-g32ec77c4db3556dc66e8c863326325f8ec970849
location = ${buildout:parts-directory}/gitlab-workhorse
[git-backup-repository]
<= git-repository
repository = https://lab.nexedi.com/kirr/git-backup.git
revision = 302aaaea2a1bfa9a5352b11c3fce813641015d19
location = ${buildout:parts-directory}/git-backup
# build needed-by-gitlab gems via bundler
[gitlab/vendor/bundle]
......@@ -177,6 +182,13 @@ make-targets= ${:_buildout_section_name_}
environment =
PATH=${golang15:location}/bin:%(PATH)s
[git-backup]
recipe = slapos.recipe.cmmi
path = ${git-backup-repository:location}
configure-command = :
make-binary =
make-targets= cd ${:path} && ${golang15:location}/bin/go build -o
${buildout:bin-directory}/${:_buildout_section_name_} *.go
###############################
# Trampoline for instance #
......@@ -252,7 +264,7 @@ md5sum = 8f1c52ed223ee2c2d07c6c79bcd2f6c0
[instance-gitlab.cfg.in]
<= download-file
md5sum = d3158d58e7fea9a656a8ef6e238a919b
md5sum = 767956feaa9cec43d2d9ea6b98da2e20
[macrolib.cfg.in]
<= 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