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
214d6910
Commit
214d6910
authored
Nov 05, 2015
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X Debugging gitlab-shell -> unicorn link
parent
73e1783a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
16 deletions
+45
-16
software/gitlab/instance-gitlab.cfg.in
software/gitlab/instance-gitlab.cfg.in
+36
-6
software/gitlab/instance.cfg.in
software/gitlab/instance.cfg.in
+2
-2
software/gitlab/template/gitlab-shell-config.yml.in
software/gitlab/template/gitlab-shell-config.yml.in
+5
-6
software/gitlab/template/gitlab.yml.in
software/gitlab/template/gitlab.yml.in
+2
-2
No files found.
software/gitlab/instance-gitlab.cfg.in
View file @
214d6910
...
...
@@ -17,6 +17,7 @@ parts =
{% endfor %}
gitlab-root-shadow
gitlab-shell-root-shadow
service-gitlab-workhorse
service-unicorn
...
...
@@ -56,6 +57,7 @@ configuration.nginx_worker_processes = {{ multiprocessing.cpu_count() }}
# for convenience
# XXX place ok? naming?
# XXX rename -> backend-info ?
[gitlab-backend]
host = ${instance-parameter:ipv6-random}
port = 7777
...
...
@@ -66,7 +68,7 @@ url = http://[${:host}]:${:port}
user = {{ pwd.getpwuid(os.getuid())[0] }}
# XXX hack
gitlab-shell = {{ gitlab_shell }}
#
gitlab-shell = {{ gitlab_shell }}
git = {{ git }}
...
...
@@ -111,10 +113,11 @@ repositories = ${directory:srv}/repositories
backup = ${directory:srv}/backup
# gitlab-shell: etc/
# gitlab-shell: etc/
log/
[gitlab-shell]
recipe = slapos.cookbook:mkdirectory
etc = ${directory:etc}/gitlab-shell
log = ${directory:log}/gitlab-shell
...
...
@@ -151,8 +154,9 @@ context-extra =
<= gitlab-etc-template
template= {{ gitlab_yml_in }}
context-extra =
section gitlab gitlab
section gitlab_backend gitlab-backend
section gitlab gitlab
section gitlab_backend gitlab-backend
section gitlab_shell_root_shadow gitlab-shell-root-shadow
[resque.yml]
<= gitlab-etc-template
...
...
@@ -182,8 +186,13 @@ context-extra =
template= {{ gitlab_shell_config_yml_in }}
rendered= ${gitlab-shell:etc}/config.yml
context-extra =
section gitlab gitlab
section gitlab_backend gitlab-backend
import urllib urllib
section gitlab gitlab
section gitlab_shell gitlab-shell
section gitlab_backend gitlab-backend
section unicorn unicorn
section service_redis service-redis
raw redis_bin {{ redis_bin }}
[nginx-etc-template]
...
...
@@ -257,6 +266,7 @@ prog = {{ prog }}
# and we can reuse SR.
# 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]
recipe = plone.recipe.command
stop-on-error = yes
...
...
@@ -289,6 +299,26 @@ command =
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}
relink-commands =
cd ${:location} &&
ln -s ${gitlab-shell-config.yml:rendered} config.yml &&
ln -s ${gitlab-shell:etc}/gitlab_shell_secret .gitlab_shell_secret &&
true
# etc/
...
...
software/gitlab/instance.cfg.in
View file @
214d6910
...
...
@@ -24,12 +24,12 @@ rendered= $${buildout:directory}/instance-gitlab.cfg
context =
import os os
import pwd pwd
import urlparse urlparse
import multiprocessing multiprocessing
key eggs_directory buildout:eggs-directory
key develop_eggs_directory buildout:develop-eggs-directory
key software_release_url slap-connection:software-release-url
raw gitlab_repository_location ${gitlab-repository:location}
raw gitlab_repository_location ${gitlab-repository:location}
raw gitlab_shell_repository_location ${gitlab-shell-repository:location}
raw bundler_4gitlab ${bundler-4gitlab:bundle}
raw gitlab_workhorse ${gitlab-workhorse:location}/gitlab-workhorse
raw git ${git:location}/bin/git
...
...
software/gitlab/template/gitlab-shell-config.yml.in
View file @
214d6910
...
...
@@ -8,8 +8,7 @@
user: {{ gitlab_backend.user }}
# Url to gitlab instance. Used for api calls. Should end with a slash.
# TODO urlencode
gitlab_url: "http+unix://{{ unicorn.socket }}/"
gitlab_url: "http+unix://{{ urllib.quote_plus(unicorn.socket) }}X/"
http_settings:
{# we don't need any
...
...
@@ -33,10 +32,10 @@ auth_file: "TODO"
# Redis settings used for pushing commit notices to gitlab
redis:
bin: {{ redis
.
bin }}/redis-cli
host: {{
redis_service
.ipv6 }} {# XXX not specify at all ? #}
port: {{
redis_service
.port }} {# XXX not specify at all ? #}
socket: {{
redis_service
.unixsocket }}
bin: {{ redis
_
bin }}/redis-cli
host: {{
service_redis
.ipv6 }} {# XXX not specify at all ? #}
port: {{
service_redis
.port }} {# XXX not specify at all ? #}
socket: {{
service_redis
.unixsocket }}
{# we don't use password for redis
<% if @redis_password %>
pass: <%= @redis_password %>
...
...
software/gitlab/template/gitlab.yml.in
View file @
214d6910
...
...
@@ -102,10 +102,10 @@ production: &base
## GitLab Shell settings
gitlab_shell:
path: {{ gitlab_
backend['gitlab-shell']
}}
path: {{ gitlab_
shell_root_shadow.location
}}
repos_path: {{ gitlab.repositories }}
hooks_path: {{ gitlab_
backend['gitlab-shell']
}}/hooks/
hooks_path: {{ gitlab_
shell_root_shadow.location
}}/hooks/
# Git over HTTP is enabled
upload_pack: true
...
...
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