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
4ec7c88e
Commit
4ec7c88e
authored
Jun 22, 2015
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X Took decision to build shadow gitlab root per instance
parent
82b91ce8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
0 deletions
+74
-0
software/gitlab/TODO
software/gitlab/TODO
+20
-0
software/gitlab/instance.cfg.in
software/gitlab/instance.cfg.in
+47
-0
software/gitlab/software.cfg
software/gitlab/software.cfg
+7
-0
No files found.
software/gitlab/TODO
View file @
4ec7c88e
...
...
@@ -47,3 +47,23 @@ db:migrate
Useful to understand:
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/architecture.md
~~~~
per instance
.secret
.gitlab_shell_secret
log/
tmp/
public/uploads/
config/
resque.yml
gitlab.yml
database.yml
initializers/
rack_attack.rb
smtp_settings.rb
XXX what about unicorn.rb ? <- no need to link (not under rails)
software/gitlab/instance.cfg.in
View file @
4ec7c88e
...
...
@@ -9,6 +9,7 @@ parts =
gitlab-rails
gitlab-rake
gitlab-root-shadow
# std stuff for slapos instance
eggs-directory = ${buildout:eggs-directory}
...
...
@@ -61,6 +62,52 @@ command-line = ${bundler-4gitlab:bundle} exec rails
command-line = ${bundler-4gitlab:bundle} exec rake
# Gitlab/Rails operation is tighted that config/ lives inside code.
# to have ability to create several instances configured differently from 1 SR,
# we make another Gitlab root symbolically linked to original SR _and_ several
# configuration files symbolically linked to instance place.
#
# This way Gitlab/Rails still think they work in 1 code / 1 instance way,
# and we can reuse SR.
# XXX run second time after first error try? (mkdir fails)
[gitlab-root-shadow]
recipe = plone.recipe.command
stop-on-error = yes
location = $${directory:home}/$${:_buildout_section_name_}
command =
mkdir $${:location} && cd $${:location} &&
# XXX .[a-z]* - hacky to skip . and ..
for i in ${gitlab-repository:location}/* ${gitlab-repository:location}/.[a-z]* ; do ln -s $i ; done &&
# secret* tmp/ log/
rm -f .secret .gitlab_shell_secret log tmp &&
ln -s AAA/.secret . &&
ln -s AAA/.gitlab_shell_secret . &&
ln -s $${directory:log}/gitlab log &&
ln -s AAA/tmp . &&
# config/
rm config && mkdir config && cd config &&
for i in ${gitlab-repository:location}/config/* ; do ln -s $i ; done &&
ln -s AAA/unicorn.rb . &&
ln -s AAA/gitlab.yml . &&
ln -s AAA/database.yml . &&
ln -s AAA/resque.yml . &&
# config/initializers/
rm initializers && mkdir initializers && cd initializers &&
for i in ${gitlab-repository:location}/config/initializers/* ; do ln -s $i ; done &&
ln -s AAA/rack_attack.rb . &&
ln -s AAA/smtp_settings.rb . &&
# public/
cd ../../ &&
rm public && mkdir public && cd public &&
for i in ${gitlab-repository:location}/public/* ; do ln -s $i ; done &&
rm uploads &&
ln -s $${directory:var}/gitlab-uploads uploads &&
true
# etc/
# service/
...
...
software/gitlab/software.cfg
View file @
4ec7c88e
...
...
@@ -38,11 +38,18 @@ parts =
# for instance
slapos-cookbook
eggs
#extends = https://lab.nexedi.cn/kirr/slapos/raw/master/software/helloworld/software.cfg
#extends = /home/kirr/src/wendelin/slapos/slapos/software/helloworld/software.cfg
# eggs for instance.cfg
[eggs]
recipe = zc.recipe.egg
eggs = plone.recipe.command
[ktest]
recipe = zc.recipe.egg:develop
egg = ktest
...
...
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