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
2d17ae03
Commit
2d17ae03
authored
Nov 06, 2015
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X gitlab-shell talks to unicorn via socket
parent
214d6910
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
30 deletions
+38
-30
software/gitlab/instance-gitlab.cfg.in
software/gitlab/instance-gitlab.cfg.in
+35
-29
software/gitlab/template/gitlab-shell-config.yml.in
software/gitlab/template/gitlab-shell-config.yml.in
+2
-1
software/gitlab/template/unicorn.rb.in
software/gitlab/template/unicorn.rb.in
+1
-0
No files found.
software/gitlab/instance-gitlab.cfg.in
View file @
2d17ae03
...
...
@@ -267,56 +267,62 @@ prog = {{ prog }}
# XXX run second time after first error try? (mkdir fails)
# XXX naming
# XXX better do such tricks with bind mounting, but that requires user namespaces
[gitlab-root-shadow]
[root-shadow]
recipe = plone.recipe.command
stop-on-error = yes
location = ${directory:home}/${:_buildout_section_name_}
command =
{{ git }} clone {{ gitlab_repository_location }} ${:location} &&
cd ${:location} &&
{{ git }} init ${:location} &&
cd ${:location} &&
{{ git }} remote add software ${:software} &&
${:update-command}
update-command =
cd ${:location} &&
{{ git }} fetch software &&
{{ git }} reset --hard `cd ${:software} && {{ git }} rev-parse HEAD` &&
${:relink-command}
[gitlab-root-shadow]
<= root-shadow
software = {{ gitlab_repository_location }}
relink-command =
# secret* tmp/ log/
rm -f .secret .gitlab_shell_secret &&
rm -rf log tmp &&
ln -s ${gitlab:etc}/secret .secret &&
ln -s
f
${gitlab:etc}/secret .secret &&
touch ${gitlab-shell:etc}/gitlab_shell_secret &&
ln -s ${gitlab-shell:etc}/gitlab_shell_secret .gitlab_shell_secret &&
ln -s ${gitlab:log} log &&
ln -s ${gitlab:tmp} tmp &&
ln -s
f
${gitlab-shell:etc}/gitlab_shell_secret .gitlab_shell_secret &&
ln -s
f
${gitlab:log} log &&
ln -s
f
${gitlab:tmp} tmp &&
# config/
cd config &&
ln -s ${unicorn.rb:rendered} unicorn.rb &&
ln -s ${gitlab.yml:rendered} gitlab.yml &&
ln -s ${database.yml:rendered} database.yml &&
ln -s ${resque.yml:rendered} resque.yml &&
ln -s
f
${unicorn.rb:rendered} unicorn.rb &&
ln -s
f
${gitlab.yml:rendered} gitlab.yml &&
ln -s
f
${database.yml:rendered} database.yml &&
ln -s
f
${resque.yml:rendered} resque.yml &&
# config/initializers/
cd initializers &&
ln -s ${rack_attack.rb:rendered} rack_attack.rb &&
ln -s ${smtp_settings.rb:rendered} smtp_settings.rb &&
ln -s
f
${rack_attack.rb:rendered} rack_attack.rb &&
ln -s
f
${smtp_settings.rb:rendered} smtp_settings.rb &&
# public/
cd ../../public &&
rm -rf uploads &&
ln -s ${gitlab:uploads} uploads &&
ln -s
f
${gitlab:uploads} uploads &&
true
# ----//---- for gitlab-shell
# XXX move common to common?
[gitlab-shell-root-shadow]
recipe = plone.recipe.command
stop-on-error = yes
location = ${directory:home}/${:_buildout_section_name_}
command =
{{ git }} clone {{ gitlab_shell_repository_location }} ${:location} &&
${:relink-commands}
update-command =
{{ git }} pull origin &&
${:relink-commands}
<= root-shadow
software = {{ gitlab_shell_repository_location }}
relink-commands =
cd ${:location} &&
ln -s ${gitlab-shell-config.yml:rendered} config.yml &&
ln -s ${gitlab-shell:etc}/gitlab_shell_secret .gitlab_shell_secret &&
relink-command =
ln -sf ${gitlab-shell-config.yml:rendered} config.yml &&
ln -sf ${gitlab-shell:etc}/gitlab_shell_secret .gitlab_shell_secret &&
true
...
...
software/gitlab/template/gitlab-shell-config.yml.in
View file @
2d17ae03
...
...
@@ -8,7 +8,8 @@
user: {{ gitlab_backend.user }}
# Url to gitlab instance. Used for api calls. Should end with a slash.
gitlab_url: "http+unix://{{ urllib.quote_plus(unicorn.socket) }}X/"
gitlab_url: "http+unix://{{ urllib.quote_plus(unicorn.socket) }}"
#gitlab_url: "http://127.0.0.1:8888"
http_settings:
{# we don't need any
...
...
software/gitlab/template/unicorn.rb.in
View file @
2d17ae03
...
...
@@ -10,6 +10,7 @@
# What ports/sockets to listen on, and what options for them.
# we listen only on unix socket
listen "{{ unicorn.socket }}", :backlog => {{ cfg('unicorn_backlog_socket') }}
#listen "127.0.0.1:8888", :tcp_nopush => true
working_directory '{{ gitlab_root_shadow.location }}'
...
...
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