Commit 3ac264d1 authored by Alain Takoudjou's avatar Alain Takoudjou

gitlab: add gitlab-test software-type used for resiliency test

parent fe0121cf
[buildout]
extends =
{{ instance_gitlab_cfg }}
{{ instance_gitlab_export_cfg }}
parts +=
install-demo-backup
[root-password]
passwd = root1234
[service-unicorn]
environment =
GITLAB_ROOT_PASSWORD=${root-password:passwd}
[backend-info]
# host = ${instance-parameter:ipv4-random}
[publish-instance-info]
password = ${root-password:passwd}
# token for default.user user in gitlab demo backup
# Edit this token if needed
private-token = SLurtnxPscPsU-SDm4oN
# raw URL for latest commit on setup.py in gitlab demo backup.
latest-file-uri = ${:backend_url}/open/slapos/raw/94c96d42c22e16836dadddac7c8061f4a8c6ca7a/setup.py
[instance-parameter]
# backup more often, 10 minutes seems the minimal
configuration.backup_frequency = */10 * * * *
[install-demo-backup]
recipe = plone.recipe.command
stop-on-error = false
backup-done = ${directory:var}/backup.ready
command =
if [ -f "${:backup-done}" ]; then
echo "Demo backup installed."
else
rm -rf ${secrets:secrets} ${directory:var}/backup/* &&
mkdir -p ${secrets:secrets} ${directory:var}/tmp &&
cp -r {{ gitlab_demo_backup_path }}/secrets/* ${secrets:secrets} &&
cp -rf {{ gitlab_demo_backup_path }}/backup-gitlab.git/ ${directory:var}/tmp &&
cd ${directory:var}/tmp/backup-gitlab.git/
PATH=${directory:bin}:{{ gopath_bin }}:{{ git_location }}/bin:$PATH
gitlab-backup restore -vupok -go HEAD &&
touch ${:backup-done}
fi
update-command = ${:command}
...@@ -12,6 +12,7 @@ offline = true ...@@ -12,6 +12,7 @@ offline = true
recipe = slapos.cookbook:softwaretype recipe = slapos.cookbook:softwaretype
gitlab = $${instance-gitlab.cfg:rendered} gitlab = $${instance-gitlab.cfg:rendered}
gitlab-export = $${instance-gitlab-export.cfg:rendered} gitlab-export = $${instance-gitlab-export.cfg:rendered}
gitlab-test = $${instance-gitlab-test.cfg:rendered}
default = $${:gitlab} default = $${:gitlab}
# TODO -import, -pull-backup # TODO -import, -pull-backup
...@@ -86,3 +87,11 @@ template= ${instance-gitlab.cfg.in:target} ...@@ -86,3 +87,11 @@ template= ${instance-gitlab.cfg.in:target}
template= ${instance-gitlab-export.cfg.in:target} template= ${instance-gitlab-export.cfg.in:target}
context-extra = context-extra =
raw instance_gitlab_cfg $${instance-gitlab.cfg:rendered} raw instance_gitlab_cfg $${instance-gitlab.cfg:rendered}
[instance-gitlab-test.cfg]
<= instance-cfg
template= ${instance-gitlab-test.cfg.in:target}
context-extra =
raw instance_gitlab_cfg $${instance-gitlab.cfg:rendered}
raw instance_gitlab_export_cfg $${instance-gitlab-export.cfg:rendered}
raw gitlab_demo_backup_path ${gitlab-demo-backup.git:location}
...@@ -259,7 +259,7 @@ eggs = ...@@ -259,7 +259,7 @@ eggs =
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in url = ${:_profile_base_location_}/instance.cfg.in
output = ${buildout:directory}/instance.cfg output = ${buildout:directory}/instance.cfg
md5sum = b2af6c8df8039ca7415ce433b6091919 md5sum = a01b42efe47811cadd70daf47850de93
# macro: download a shell script and put it rendered into <software>/bin/ # macro: download a shell script and put it rendered into <software>/bin/
[binsh] [binsh]
...@@ -328,6 +328,10 @@ md5sum = b05fad928ffbb689b4415837525c62d1 ...@@ -328,6 +328,10 @@ md5sum = b05fad928ffbb689b4415837525c62d1
<= download-file <= download-file
md5sum = 319d7dbe3ad9b260c1e292cfc0d13b11 md5sum = 319d7dbe3ad9b260c1e292cfc0d13b11
[instance-gitlab-test.cfg.in]
<= download-file
md5sum = cc8065104458af311c2ffa9ae20235a6
[macrolib.cfg.in] [macrolib.cfg.in]
<= download-file <= download-file
md5sum = a56a44e96f65f5ed20211bb6a54279f4 md5sum = a56a44e96f65f5ed20211bb6a54279f4
...@@ -360,6 +364,11 @@ md5sum = 99c4101b1fcc9a099cf94d09c33d70d0 ...@@ -360,6 +364,11 @@ md5sum = 99c4101b1fcc9a099cf94d09c33d70d0
<= download-template <= download-template
md5sum = 83921db1835d9e81cbbe808631cc40a9 md5sum = 83921db1835d9e81cbbe808631cc40a9
[gitlab-demo-backup.git]
recipe = hexagonit.recipe.download
url = https://lab.nexedi.com/alain.takoudjou/labdemo.backup/repository/archive.tar.gz?ref=master
md5sum = d40e5e211dc9a4e5ada9c0250377c639
strip-top-level-dir = true
[versions] [versions]
cns.recipe.symlink = 0.2.3 cns.recipe.symlink = 0.2.3
......
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