Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos
Commits
e6b926f1
Commit
e6b926f1
authored
Nov 11, 2015
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X on setting up DB first time / migrations on upgrade
parent
3b899791
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
22 deletions
+35
-22
software/gitlab/TODO
software/gitlab/TODO
+2
-13
software/gitlab/instance-gitlab.cfg.in
software/gitlab/instance-gitlab.cfg.in
+32
-8
stack/slapos.cfg
stack/slapos.cfg
+1
-1
No files found.
software/gitlab/TODO
View file @
e6b926f1
+ remove ssh access, "You won't be able to pull or push ..." warning
- disable ssh keys management (so gitlab does not mess with webrunner keys) ?
~ remove `sudo ...` (or fake it)
~ gitlab.yml: git -> bin_path
- setup basic ~/.gitconfig
- pull request with 1 patch -> merge fast-forward
- unicorn.rb + other configs (check vs omnibus)
- default project limit setting: 10 -> 50
- integrate git-backup in a PBS-style way
? mail server (for email notifications)
+ it has bug with exim (https://github.com/gitlabhq/gitlabhq/issues/4866)
? `bundle exec rails console` exit/fails silently
http://localhost:3000/help/security/reset_root_password.md
? No effect after changing extra:sign_in_text (in gitlab.yml) and restarting gitlab foreman
http://localhost:3000/help/customization/welcome_message.md
...
...
@@ -26,10 +16,11 @@ NOTES
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md
bundle exec rake <task> RAILS_ENV=production
gitlab-rake <task>
(list of tasks: `rake -T` or `rake -D`)
(see doc/raketasks/*)
gitlab:check
gitlab:*:check -> promise
gitlab:env:info
gitlab:import:repos
...
...
@@ -37,8 +28,6 @@ gitlab:setup
gitlab:shell:install
gitlab:shell:setup
gitlab:sidekiq:*
gitlab:web_hook:{add,rm,list}
gitlab:test
...
...
software/gitlab/instance-gitlab.cfg.in
View file @
e6b926f1
...
...
@@ -30,7 +30,7 @@ parts =
service-postgresql
service-redis
# instance-setup-firsttime
instance-setup
instance-upgrade
# std stuff for slapos instance
...
...
@@ -386,7 +386,6 @@ ipv6-random =
port =
#############
# Redis #
#############
...
...
@@ -533,24 +532,49 @@ depend = ${nginx-symlinks:symlink}
# 5. instance setup / upgrade
# TODO
#[instance-setup-firsttime]
# FIXME for both instance-setup and instance-upgrade to run ok postgresql &
# redis must be running. how to make sure to start them? `xslapos node restart
# slappart0:postgresql-on-watch` ?
[on-reinstantiate]
recipe = plone.recipe.command
stop-on-error = true
rake = ${gitlab-rake:wrapper-path}
# run command on every reinstantiation
update-command = ${:command}
# what to do when instance is initially setup
# see
# https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-cookbooks/gitlab/recipes/database_migrations.rb
# https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-cookbooks/gitlab/recipes/postgresql.rb
[instance-setup]
<= on-reinstantiate
command =
if {{ postgresql_location }}/bin/psql \
-h ${service-postgresql:pgdata-directory} \
-U ${service-postgresql:superuser} \
-d ${service-postgresql:dbname} \
-c '\d' | grep -q '^No relations found' ; then
${:rake} db:schema:load db:seed_fu
fi
# 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 ?
# https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-cookbooks/gitlab/recipes/gitlab-rails.rb
# https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-ctl-commands/upgrade.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}
<= on-reinstantiate
command =
# XXX | tee breaks exit code check
${:rake} db:migrate 2>&1 | tee ${upgrade-dir:log}/db-mirate-`date +%s`.log &&
${:rake} assets:clean &&
${:rake} assets:precompile &&
...
...
stack/slapos.cfg
View file @
e6b926f1
...
...
@@ -76,7 +76,7 @@ git-executable = ${git:location}/bin/git
recipe = zc.recipe.egg:develop
#setup = ${slapos.cookbook-repository:location}
# XXX hack
setup = /srv/slapgrid/slappart1
6
/srv/runner/project/slapos
setup = /srv/slapgrid/slappart1
4
/srv/runner/project/slapos
# Install slapos.cookbook containing all officials recipes
# Explicitely define dependencies as well, because of buildout limitation
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment