Commit 509818df authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 1cd49f99
# GitLab instance
# NOTE instance/software layout is inspired by gitlab omnibus
# TODO last updated for gitlab-omnibus vXXXX
# TODO all services are interconnected via unix sockets: write why / more
[buildout]
extends = {{ gitlab_parameters_cfg }}
parts =
......@@ -8,14 +9,19 @@ parts =
# promise TODO
publish-instance-info
gitlab-rails
gitlab-rake
gitlab-unicorn
gitlab-sidekiq
# gitlab-<prog>
# ? unicorn_rails, mailroom, ri
{% set gitlab_progv = 'rails rake unicorn sidekiq' .split() %}
{% for prog in gitlab_progv %}
gitlab-{{ prog }}
{% endfor %}
gitlab-root-shadow
# service-gitlab-workhorse
# service-gitlab-unicorn
# service-gitlab-sidekiq
service-nginx
service-postgresql
service-redis
......@@ -91,7 +97,6 @@ promise = ${:etc}/promise
# gitlab: etc/ log/ ...
# TODO var/run/ (for *.pid .lock)
# XXX do we need gitlab/ subdir for all that? (services are already separated into different slappartX)
[gitlab]
recipe = slapos.cookbook:mkdirectory
etc = ${directory:etc}/gitlab
......@@ -121,6 +126,11 @@ extensions = jinja2.ext.do
mode = 0640
import-list =
rawfile macrolib.cfg.in {{ macrolib_cfg_in }}
context =
raw autogenerated # This file was autogenerated. (DO NOT EDIT - changes will be lost)
${:context-extra}
# TODO move common context parameters here (= common)
......@@ -131,14 +141,14 @@ rendered= ${gitlab:etc}/${:_buildout_section_name_}
[database.yml]
<= gitlab-etc-template
template= {{ database_yml_in }}
context =
context-extra =
section gitlab_backend gitlab-backend
section pgsql service-postgresql
[gitlab.yml]
<= gitlab-etc-template
template= {{ gitlab_yml_in }}
context =
context-extra =
section gitlab gitlab
section gitlab_backend gitlab-backend
section instance_parameter instance-parameter
......@@ -146,19 +156,19 @@ context =
[resque.yml]
<= gitlab-etc-template
template= {{ resque_yml_in }}
context =
context-extra =
section redis service-redis
[smtp_settings.rb]
<= gitlab-etc-template
template= {{ smtp_settings_rb_in }}
context =
context-extra =
section instance_parameter instance-parameter
[rack_attack.rb]
<= gitlab-etc-template
template = {{ rack_attack_rb_in }}
context =
context-extra =
section instance_parameter instance-parameter
......@@ -169,7 +179,7 @@ rendered= ${nginx:etc}/${:_buildout_section_name_}
[nginx.conf]
<= nginx-etc-template
template= {{ nginx_conf_in }}
context =
context-extra =
section instance_parameter instance-parameter
section gitlab_backend gitlab-backend
section directory directory
......@@ -179,7 +189,7 @@ context =
[nginx-gitlab-http.conf]
<= nginx-etc-template
template= {{ nginx_gitlab_http_conf_in }}
context =
context-extra =
section instance_parameter instance-parameter
section gitlab_backend gitlab-backend
section nginx nginx
......@@ -189,10 +199,7 @@ context =
# 3. bin/
# gitlab-rails
# gitlab-rake
# gitlab-unicorn
# gitlab-sidekiq
# gitlab-<prog>
[gitlab-bin]
recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:bin}/${:_buildout_section_name_}
......@@ -204,38 +211,18 @@ environment =
# XXX here vvv ?
SIDEKIQ_MEMORY_KILLER_MAX_RSS = 1000000
[gitlab-rails]
<= gitlab-bin
# NOTE sys.argv[1:] implicityly appended
command-line =
{{ bundler_4gitlab }} exec sh -c
'cd ${gitlab-root-shadow:location} && rails "$@"' rails
[gitlab-rake]
<= gitlab-bin
# NOTE sys.argv[1:] implicityly appended
command-line =
{{ bundler_4gitlab }} exec sh -c
'cd ${gitlab-root-shadow:location} && rake "$@"' rake
[gitlab-unicorn]
<= gitlab-bin
# NOTE sys.argv[1:] implicityly appended
command-line =
{{ bundler_4gitlab }} exec sh -c
'cd ${gitlab-root-shadow:location} && unicorn "$@"' unicorn
'cd ${gitlab-root-shadow:location} && ${:prog} "$@"' ${:prog}
[gitlab-sidekiq]
{% for prog in gitlab_progv %}
[gitlab-{{ prog }}]
<= gitlab-bin
# NOTE sys.argv[1:] implicityly appended
command-line =
{{ bundler_4gitlab }} exec sh -c
'cd ${gitlab-root-shadow:location} && sidekiq "$@"' sidekiq
prog = {{ prog }}
{% endfor %}
# # TODO -> service/
# [gitlab-unicorn]
# <= gitlab-bin
# Gitlab/Rails operation is tighted that config/ lives inside code, which goes
......@@ -370,6 +357,12 @@ ipv6 = ::1
port = 0
########################
# gitlab-workhorse #
########################
# TODO
######################
# Nginx frontend #
######################
......
# @autogenerated XXX
{{ autogenerated }}
# see:
# https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/database.yml.postgresql
# https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-cookbooks/gitlab/templates/default/database.yml.erb
......
# @autogenerated XXX
{{ autogenerated }}
# see:
# https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/gitlab.yml.example
# https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-cookbooks/gitlab/templates/default/gitlab.yml.erb
......
# @autogenerated XXX
{{ autogenerated }}
# see:
# https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-cookbooks/gitlab/templates/default/nginx-gitlab-http.conf.erb
# (last updated for omnibus-gitlab 8.1.0+rc1.ce.0-24-g3021ed9)
......
# @autogenerated XXX
{{ autogenerated }}
# see:
# https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/support/nginx/gitlab-ssl
# https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-cookbooks/gitlab/templates/default/nginx.conf.erb
......
# @autogenerated
{{ autogenerated }}
# see:
# https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/initializers/rack_attack.rb.example
# https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-cookbooks/gitlab/templates/default/rack_attack.rb.erb
......
# @autogenerated XXX
{{ autogenerated }}
# see:
# https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/resque.yml.example
# https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-cookbooks/gitlab/templates/default/resque.yml.erb
# (last udpdated for 8.1.0+rc1.ce.0-77-ge349060)
production: unix://{{ redis.unixsocket }}
# @autogenerated
{{ autogenerated }}
# see:
# https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/initializers/smtp_settings.rb.sample
# https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-cookbooks/gitlab/templates/default/smtp_settings.rb.erb
......
# @autogenerated XXX
{{ autogenerated }}
# see:
# https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/unicorn.rb.example
# https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/unicorn.rb.example.development
# https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-cookbooks/gitlab/templates/default/unicorn.rb.erb
# (last updated for omnibus-gitlab 8.1.0+rc1.ce.0-24-g3021ed9 XXX check)
# XXX import cfg
# What ports/sockets to listen on, and what options for them.
listen "{XXX:unicorn-host:port}", :tcp_nopush => ${instance-parameters:configuration.unicorn_tcp_nopush}
......
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