Commit 98783319 authored by Alain Takoudjou's avatar Alain Takoudjou

gitlab sr: fixup, not starting and backup pull restore

parent 154bde3f
...@@ -34,7 +34,7 @@ md5sum = 7782f5c5d75663c2586e28d029c51e49 ...@@ -34,7 +34,7 @@ md5sum = 7782f5c5d75663c2586e28d029c51e49
[gitlab-parameters.cfg] [gitlab-parameters.cfg]
_update_hash_filename_ = gitlab-parameters.cfg _update_hash_filename_ = gitlab-parameters.cfg
md5sum = c2e23c0f7baa1633df0436ca4e728424 md5sum = cfda6d959bb90bf0b9c947383f45ce0a
[gitlab-shell-config.yml.in] [gitlab-shell-config.yml.in]
_update_hash_filename_ = template/gitlab-shell-config.yml.in _update_hash_filename_ = template/gitlab-shell-config.yml.in
...@@ -42,11 +42,11 @@ md5sum = 9920d10442604f5d8a736825f20ebd2a ...@@ -42,11 +42,11 @@ md5sum = 9920d10442604f5d8a736825f20ebd2a
[gitlab-unicorn-startup.in] [gitlab-unicorn-startup.in]
_update_hash_filename_ = gitlab-unicorn-startup.in _update_hash_filename_ = gitlab-unicorn-startup.in
md5sum = 79310724640dcc385e627b33334f4877 md5sum = 649342a015e9dcd84c3ce45da616fee4
[gitlab.yml.in] [gitlab.yml.in]
_update_hash_filename_ = template/gitlab.yml.in _update_hash_filename_ = template/gitlab.yml.in
md5sum = bedbfc03eaf3560a93cfde1f497e99f6 md5sum = 7729388b0939a785e2cd20f6e623660c
[gitaly-config.toml.in] [gitaly-config.toml.in]
_update_hash_filename_ = template/gitaly-config.toml.in _update_hash_filename_ = template/gitaly-config.toml.in
...@@ -54,7 +54,7 @@ md5sum = 96d597d5f344dadfe9fb4bdc5ae1f2b2 ...@@ -54,7 +54,7 @@ md5sum = 96d597d5f344dadfe9fb4bdc5ae1f2b2
[instance-gitlab.cfg.in] [instance-gitlab.cfg.in]
_update_hash_filename_ = instance-gitlab.cfg.in _update_hash_filename_ = instance-gitlab.cfg.in
md5sum = 1b96d49767f925afc53df6960614eebb md5sum = a7e6f2e557bc177b402f45d3c0ffca6e
[instance-gitlab-export.cfg.in] [instance-gitlab-export.cfg.in]
_update_hash_filename_ = instance-gitlab-export.cfg.in _update_hash_filename_ = instance-gitlab-export.cfg.in
...@@ -62,7 +62,7 @@ md5sum = 6ba5b3157a4c89edf280e32e84db6ac2 ...@@ -62,7 +62,7 @@ md5sum = 6ba5b3157a4c89edf280e32e84db6ac2
[instance-gitlab-test.cfg.in] [instance-gitlab-test.cfg.in]
_update_hash_filename_ = instance-gitlab-test.cfg.in _update_hash_filename_ = instance-gitlab-test.cfg.in
md5sum = 60714fb4e6c869c41bd5e9fada1b6e40 md5sum = 6c24bbc5b74cb1a6c1c78a9d160ac78c
[macrolib.cfg.in] [macrolib.cfg.in]
_update_hash_filename_ = macrolib.cfg.in _update_hash_filename_ = macrolib.cfg.in
...@@ -94,4 +94,4 @@ md5sum = f85c5bf252b8756558f40c8b110731cf ...@@ -94,4 +94,4 @@ md5sum = f85c5bf252b8756558f40c8b110731cf
[unicorn.rb.in] [unicorn.rb.in]
_update_hash_filename_ = template/unicorn.rb.in _update_hash_filename_ = template/unicorn.rb.in
md5sum = 046cee1a8a024e55f8e64078b1fd5cb2 md5sum = ed1fb75d937613356388f62898166a47
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# (last updated for omnibus-gitlab 8.8.9+ce.0-g25376053) # (last updated for omnibus-gitlab 8.8.9+ce.0-g25376053)
[gitlab-parameters] [gitlab-parameters]
configuration.external_url = http://lab.example.com configuration.external_url = https://lab.example.com
# db advanced # db advanced
configuration.db_pool = 10 configuration.db_pool = 10
......
...@@ -57,7 +57,7 @@ $RAKE db:migrate >$migrate_log 2>&1 || die "db:migrate failed" ...@@ -57,7 +57,7 @@ $RAKE db:migrate >$migrate_log 2>&1 || die "db:migrate failed"
# if it was a no-op "migration" - we don't need info about that - only keep # if it was a no-op "migration" - we don't need info about that - only keep
# logs of actual migration run. # logs of actual migration run.
test -s $migrate_log || rm $migrate_log test -s $migrate_log || rm $migrate_log
touch {{ var_dir }}/gitlab_db_ok
# clear cache # clear cache
$RAKE cache:clear || die "cache:clear failed" $RAKE cache:clear || die "cache:clear failed"
......
...@@ -31,9 +31,9 @@ socket = ${:srv}/unc.socket ...@@ -31,9 +31,9 @@ socket = ${:srv}/unc.socket
password = ${root-password:passwd} password = ${root-password:passwd}
# token for default.user user in gitlab demo backup # token for default.user user in gitlab demo backup
# Edit this token if needed # Edit this token if needed
private-token = SLurtnxPscPsU-SDm4oN private-token = 7zdiC6VrZYnUD3yuvna3
# raw URL for latest commit on setup.py in gitlab demo backup. # raw URL for latest commit on setup.py in gitlab demo backup.
latest-file-uri = ${:backend_url}/open/slapos/raw/94c96d42c22e16836dadddac7c8061f4a8c6ca7a/setup.py latest-file-uri = ${:backend_url}/open/slapos/-/blob/4c2fa97791a2b7530b2d71e8760cb11d287d4e53/setup.py
[instance-parameter] [instance-parameter]
# backup more often, 10 minutes seems the minimal # backup more often, 10 minutes seems the minimal
...@@ -46,6 +46,9 @@ backup-done = ${directory:var}/backup.ready ...@@ -46,6 +46,9 @@ backup-done = ${directory:var}/backup.ready
command = command =
if [ -f "${:backup-done}" ]; then if [ -f "${:backup-done}" ]; then
echo "Demo backup installed." echo "Demo backup installed."
else
if [ ! -f "${directory:var}/gitlab_db_ok" ]; then
echo "Not ready to start restoration now..."
else else
rm -rf ${secrets:secrets} ${directory:var}/backup/* && rm -rf ${secrets:secrets} ${directory:var}/backup/* &&
mkdir -p ${secrets:secrets} ${directory:var}/tmp && mkdir -p ${secrets:secrets} ${directory:var}/tmp &&
...@@ -56,5 +59,6 @@ command = ...@@ -56,5 +59,6 @@ command =
gitlab-backup restore -vupok -go HEAD && gitlab-backup restore -vupok -go HEAD &&
touch ${:backup-done} touch ${:backup-done}
fi fi
fi
update-command = ${:command} update-command = ${:command}
...@@ -342,6 +342,7 @@ context = ...@@ -342,6 +342,7 @@ context =
raw psql_bin {{ postgresql_location }}/bin/psql raw psql_bin {{ postgresql_location }}/bin/psql
section pgsql service-postgresql section pgsql service-postgresql
raw log_dir ${gitlab:log} raw log_dir ${gitlab:log}
raw var_dir ${directory:var}
section unicorn_rb unicorn.rb section unicorn_rb unicorn.rb
section gitlab_work gitlab-work section gitlab_work gitlab-work
...@@ -401,13 +402,13 @@ tune-command = ...@@ -401,13 +402,13 @@ tune-command =
# secret* tmp/ log/ shared/ builds/ node_modules/ # secret* tmp/ log/ shared/ builds/ node_modules/
rm -f .secret && rm -f .secret &&
rm -rf log tmp shared builds node_modules && rm -rf log tmp shared builds node_modules &&
ln -sf ${secrets:secrets}/gitlab_rails_secret .secret && # ln -sf ${secrets:secrets}/gitlab_rails_secret .secret &&
ln -sf ${gitlab:log} log && ln -sf ${gitlab:log} log &&
ln -sf ${gitlab:tmp} tmp && ln -sf ${gitlab:tmp} tmp &&
ln -sf ${gitlab:shared} shared && ln -sf ${gitlab:shared} shared &&
ln -sf ${gitlab:builds} builds && ln -sf ${gitlab:builds} builds &&
ln -sf {{ gitlab_repository_location }}/node_modules node_modules && ln -sf {{ gitlab_repository_location }}/node_modules node_modules &&
ln -sf ${gitlab-workhorse:secret} .gitlab_workhorse_secret ln -sf ${gitlab-workhorse:secret} .gitlab_workhorse_secret &&
# config/ # config/
cd config && cd config &&
ln -sf ${unicorn.rb:rendered} unicorn.rb && ln -sf ${unicorn.rb:rendered} unicorn.rb &&
...@@ -417,7 +418,7 @@ tune-command = ...@@ -417,7 +418,7 @@ tune-command =
ln -sf ${secrets:secrets}/gitlab_secrets.yml secrets.yml && ln -sf ${secrets:secrets}/gitlab_secrets.yml secrets.yml &&
# config/initializers/ # config/initializers/
cd initializers && cd initializers &&
ln -sf ${rack_attack.rb:rendered} rack_attack.rb && # ln -sf ${rack_attack.rb:rendered} rack_attack.rb &&
ln -sf ${smtp_settings.rb:rendered} smtp_settings.rb && ln -sf ${smtp_settings.rb:rendered} smtp_settings.rb &&
# public/ # public/
cd ../../public && cd ../../public &&
...@@ -542,6 +543,7 @@ name = redis ...@@ -542,6 +543,7 @@ name = redis
truncate = true truncate = true
######################## ########################
# gitlab-workhorse # # gitlab-workhorse #
######################## ########################
...@@ -714,6 +716,8 @@ command-line = ...@@ -714,6 +716,8 @@ command-line =
depend = depend =
${promise-sidekiq:recipe} ${promise-sidekiq:recipe}
${logrotate-entry-sidekiq:recipe} ${logrotate-entry-sidekiq:recipe}
wait-for-files =
${directory:var}/gitlab_db_ok
[promise-sidekiq] [promise-sidekiq]
<= promise-rakebase <= promise-rakebase
...@@ -836,8 +840,6 @@ rake = ${gitlab-rake:wrapper-path} ...@@ -836,8 +840,6 @@ rake = ${gitlab-rake:wrapper-path}
# run command on every reinstantiation # run command on every reinstantiation
update-command = ${:command} update-command = ${:command}
# https://gitlab.com/gitlab-org/gitlab-foss/issues/38457
# we need to manually install ajv@^4.0.0 with yarn to fix the bug 'yarn check failed!'
command = command =
${:rake} gitlab:assets:clean && ${:rake} gitlab:assets:clean &&
${:rake} gettext:compile RAILS_ENV=production && ${:rake} gettext:compile RAILS_ENV=production &&
......
...@@ -143,7 +143,8 @@ git-executable = ${git:location}/bin/git ...@@ -143,7 +143,8 @@ git-executable = ${git:location}/bin/git
repository = https://gitlab.com/gitlab-org/gitlab-foss.git repository = https://gitlab.com/gitlab-org/gitlab-foss.git
# 11.11.8 + NXD patches: # 11.11.8 + NXD patches:
#revision = v11.11.8-7-g193b94c3e2 #revision = v11.11.8-7-g193b94c3e2
revision = v13.0.3-0-ge2397fc revision = 5aa982e01ea9793c71f9f1a6ac0146f4ffe52879
#branch = v13.1.0
location = ${buildout:parts-directory}/gitlab location = ${buildout:parts-directory}/gitlab
[gitlab-shell-repository] [gitlab-shell-repository]
...@@ -401,8 +402,8 @@ destination = ${buildout:directory}/${:_buildout_section_name_} ...@@ -401,8 +402,8 @@ destination = ${buildout:directory}/${:_buildout_section_name_}
[gitlab-demo-backup.git] [gitlab-demo-backup.git]
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
url = https://lab.nexedi.com/alain.takoudjou/labdemo.backup/repository/archive.tar.gz?ref=master url = https://lab.nexedi.com/alain.takoudjou/labdemo.backup/-/archive/version-13/labdemo.backup-version-13.tar.bz2
md5sum = d40e5e211dc9a4e5ada9c0250377c639 md5sum = 80fb5fd25c6368b1615af5191f176bca
strip-top-level-dir = true strip-top-level-dir = true
[versions] [versions]
......
...@@ -18,6 +18,9 @@ production: &base ...@@ -18,6 +18,9 @@ production: &base
host: {{ external_url.hostname }} host: {{ external_url.hostname }}
port: {{ external_url.port or default_port[external_url.scheme] }} port: {{ external_url.port or default_port[external_url.scheme] }}
https: {{ cfg_https }} https: {{ cfg_https }}
# The maximum time unicorn/puma can spend on the request. This needs to be smaller than the worker timeout.
# Default is 95% of the worker timeout.
# max_request_duration_seconds: 57
{# ssh is disabled completely in slapos version {# ssh is disabled completely in slapos version
# Uncommment this line below if your ssh host is different from HTTP/HTTPS one # Uncommment this line below if your ssh host is different from HTTP/HTTPS one
...@@ -413,10 +416,11 @@ production: &base ...@@ -413,10 +416,11 @@ production: &base
#} #}
# Gitaly settings # Gitaly settings
# This setting controls whether GitLab uses Gitaly
# Eventually Gitaly use will become mandatory and
# this option will disappear.
gitaly: gitaly:
# Default Gitaly authentication token. Can be overriden per storage. Can client_path: {{ gitaly.location }}
# be left blank when Gitaly is running locally on a Unix socket, which
# is the normal way to deploy Gitaly.
token: token:
......
...@@ -31,12 +31,15 @@ preload_app true ...@@ -31,12 +31,15 @@ preload_app true
check_client_connection false check_client_connection false
require_relative '{{ gitlab_work.location }}/lib/gitlab/cluster/lifecycle_events' require_relative '{{ gitlab_work.location }}/lib/gitlab/cluster/lifecycle_events'
require_relative '{{ gitlab_work.location }}/lib/gitlab/log_timestamp_formatter.rb'
before_exec do |server| before_exec do |server|
# Signal application hooks that we're about to restart # Signal application hooks that we're about to restart
Gitlab::Cluster::LifecycleEvents.do_before_master_restart Gitlab::Cluster::LifecycleEvents.do_before_master_restart
end end
run_once = true
# How many worker processes # How many worker processes
worker_processes {{ cfg('unicorn_worker_processes') }} worker_processes {{ cfg('unicorn_worker_processes') }}
...@@ -86,7 +89,6 @@ after_fork do |server, worker| ...@@ -86,7 +89,6 @@ after_fork do |server, worker|
end end
# Where to drop a pidfile # Where to drop a pidfile
pid '{{ directory.run }}/unicorn.pid' pid '{{ directory.run }}/unicorn.pid'
...@@ -109,3 +111,7 @@ ENV['GITLAB_UNICORN_MEMORY_MIN'] = ({{ cfg('unicorn_worker_memory_limit_min') }} ...@@ -109,3 +111,7 @@ ENV['GITLAB_UNICORN_MEMORY_MIN'] = ({{ cfg('unicorn_worker_memory_limit_min') }}
# Max memory size (RSS) per worker # Max memory size (RSS) per worker
ENV['GITLAB_UNICORN_MEMORY_MAX'] = ({{ cfg('unicorn_worker_memory_limit_max') }}).to_s ENV['GITLAB_UNICORN_MEMORY_MAX'] = ({{ cfg('unicorn_worker_memory_limit_max') }}).to_s
# Configure the default logger to use a custom formatter that formats the
# timestamps to be in UTC and in ISO8601.3 format
Configurator::DEFAULTS[:logger].formatter = Gitlab::LogTimestampFormatter.new
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