Commit e568037f authored by Kirill Smelkov's avatar Kirill Smelkov

X on reinstantiate run asset:precompile & friends

parent b8d35c8d
...@@ -30,6 +30,8 @@ parts = ...@@ -30,6 +30,8 @@ parts =
service-postgresql service-postgresql
service-redis service-redis
# instance-setup-firsttime
instance-upgrade
# std stuff for slapos instance # std stuff for slapos instance
eggs-directory = {{ eggs_directory }} eggs-directory = {{ eggs_directory }}
...@@ -129,7 +131,7 @@ log = ${gitlab-shell-dir:log} ...@@ -129,7 +131,7 @@ log = ${gitlab-shell-dir:log}
secret = ${secrets:secrets}/gitlab_shell_secret secret = ${secrets:secrets}/gitlab_shell_secret
# place to keep all secrets
[secrets] [secrets]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
secrets = ${directory:srv}/secrets secrets = ${directory:srv}/secrets
...@@ -283,6 +285,7 @@ prog = {{ prog }} ...@@ -283,6 +285,7 @@ prog = {{ prog }}
# XXX naming # XXX naming
# XXX better do such tricks with bind mounting, but that requires user namespaces # XXX better do such tricks with bind mounting, but that requires user namespaces
# TODO root-shadow -> work
[root-shadow] [root-shadow]
recipe = plone.recipe.command recipe = plone.recipe.command
stop-on-error = yes stop-on-error = yes
...@@ -301,7 +304,6 @@ update-command = ...@@ -301,7 +304,6 @@ update-command =
${:tune-command} ${:tune-command}
# XXX store
# NOTE there is no need to link/create .gitlab_shell_secret - we set path to it # NOTE there is no need to link/create .gitlab_shell_secret - we set path to it
# in gitlab & gitlab-shell configs, and gitlab creates it on its first start # in gitlab & gitlab-shell configs, and gitlab creates it on its first start
[gitlab-root-shadow] [gitlab-root-shadow]
...@@ -392,6 +394,7 @@ port = ...@@ -392,6 +394,7 @@ port =
[redis] [redis]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
srv = ${directory:srv}/redis srv = ${directory:srv}/redis
log = ${directory:log}/redis
[service-redis] [service-redis]
...@@ -401,7 +404,7 @@ server_bin = {{ redis_bin }}/redis-server ...@@ -401,7 +404,7 @@ server_bin = {{ redis_bin }}/redis-server
server_dir = ${redis:srv} server_dir = ${redis:srv}
config_file = ${directory:etc}/redis.conf config_file = ${directory:etc}/redis.conf
log_file = ${directory:log}/redis.log log_file = ${redis:log}/redis.log
pid_file = ${directory:run}/redis.pid pid_file = ${directory:run}/redis.pid
use_passwd = false use_passwd = false
...@@ -526,3 +529,31 @@ recipe = slapos.cookbook:wrapper ...@@ -526,3 +529,31 @@ recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:service}/nginx wrapper-path = ${directory:service}/nginx
command-line = {{ nginx_bin }} -p ${nginx:srv} -c ${nginx.conf:rendered} command-line = {{ nginx_bin }} -p ${nginx:srv} -c ${nginx.conf:rendered}
depend = ${nginx-symlinks:symlink} depend = ${nginx-symlinks:symlink}
# 5. instance setup / upgrade
# TODO
#[instance-setup-firsttime]
# what to do when instance is upgraded
# see
# https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/support/deploy/deploy.sh
# https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/gitlab/upgrader.rb
# TODO omnibus -> files/gitlab-cookbooks/gitlab/recipes/gitlab-rails.rb ?
[upgrade-dir]
recipe = slapos.cookbook:mkdirectory
log = ${directory:log}/upgrade
# XXX run db:migrate only if version changed ?
[instance-upgrade]
recipe = plone.recipe.command
stop-on-error = true
rake = ${gitlab-rake:wrapper-path}
command =
${:rake} db:migrate 2>&1 | tee ${upgrade-dir:log}/db-mirate-`date +%s`.log &&
${:rake} assets:clean &&
${:rake} assets:precompile &&
${:rake} cache:clear &&
true
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