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
71565a2c
Commit
71565a2c
authored
Oct 26, 2015
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X Nginx instance dirs layout settled
parent
bae28dd8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
18 deletions
+39
-18
software/gitlab/instance-gitlab.cfg.in
software/gitlab/instance-gitlab.cfg.in
+32
-15
software/gitlab/instance.cfg.in
software/gitlab/instance.cfg.in
+2
-1
software/gitlab/software.cfg
software/gitlab/software.cfg
+4
-1
software/gitlab/template/nginx.conf.in
software/gitlab/template/nginx.conf.in
+1
-1
No files found.
software/gitlab/instance-gitlab.cfg.in
View file @
71565a2c
...
@@ -67,6 +67,7 @@ recipe = slapos.cookbook:publish
...
@@ -67,6 +67,7 @@ recipe = slapos.cookbook:publish
url = ${gitlab-backend:url}
url = ${gitlab-backend:url}
# TODO reintegrate postgresql/redis into this instance
#################################
#################################
# need: PostgreSQL instance #
# need: PostgreSQL instance #
#################################
#################################
...
@@ -95,7 +96,6 @@ software-url = {{ urlparse.urljoin(software_release_url, '../redis-server/softwa
...
@@ -95,7 +96,6 @@ software-url = {{ urlparse.urljoin(software_release_url, '../redis-server/softwa
return = redis_ip redis_port
return = redis_ip redis_port
# TODO need: Nginx instance
#############################
#############################
...
@@ -110,6 +110,7 @@ bin = ${:home}/bin
...
@@ -110,6 +110,7 @@ bin = ${:home}/bin
etc = ${:home}/etc
etc = ${:home}/etc
var = ${:home}/var
var = ${:home}/var
log = ${:var}/log
log = ${:var}/log
run = ${:var}/run
srv = ${:home}/srv
srv = ${:home}/srv
# slapos startup/service/promies scripts live here:
# slapos startup/service/promies scripts live here:
startup = ${:etc}/run
startup = ${:etc}/run
...
@@ -123,6 +124,8 @@ promise = ${:etc}/promise
...
@@ -123,6 +124,8 @@ promise = ${:etc}/promise
recipe = slapos.cookbook:mkdirectory
recipe = slapos.cookbook:mkdirectory
etc = ${directory:etc}/gitlab
etc = ${directory:etc}/gitlab
log = ${directory:log}/gitlab
log = ${directory:log}/gitlab
# XXX questionable from now on?
var = ${directory:var}/gitlab
var = ${directory:var}/gitlab
tmp = ${:var}/tmp
tmp = ${:var}/tmp
uploads = ${:var}/uploads
uploads = ${:var}/uploads
...
@@ -140,12 +143,16 @@ etc = ${directory:etc}/gitlab-shell
...
@@ -140,12 +143,16 @@ etc = ${directory:etc}/gitlab-shell
# 2. configuration files
# 2. configuration files
[
gitlab-
etc-template]
[etc-template]
recipe = slapos.recipe.template:jinja2
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
extensions = jinja2.ext.do
rendered= ${gitlab:etc}/${:_buildout_section_name_}
mode = 0640
mode = 0640
[gitlab-etc-template]
<= etc-template
rendered= ${gitlab:etc}/${:_buildout_section_name_}
[database.yml]
[database.yml]
<= gitlab-etc-template
<= gitlab-etc-template
template= {{ database_yml_in }}
template= {{ database_yml_in }}
...
@@ -160,14 +167,12 @@ context =
...
@@ -160,14 +167,12 @@ context =
section gitlab_backend gitlab-backend
section gitlab_backend gitlab-backend
section instance_parameter instance-parameter
section instance_parameter instance-parameter
[resque.yml]
[resque.yml]
<= gitlab-etc-template
<= gitlab-etc-template
template= {{ resque_yml_in }}
template= {{ resque_yml_in }}
context =
context =
section redis request-redis
section redis request-redis
[smtp_settings.rb]
[smtp_settings.rb]
<= gitlab-etc-template
<= gitlab-etc-template
template= {{ smtp_settings_rb_in }}
template= {{ smtp_settings_rb_in }}
...
@@ -180,19 +185,23 @@ template = {{ rack_attack_rb_in }}
...
@@ -180,19 +185,23 @@ template = {{ rack_attack_rb_in }}
context =
context =
section instance_parameter instance-parameter
section instance_parameter instance-parameter
# XXX move to own directory?
[nginx-etc-template]
<= etc-template
rendered= ${nginx:etc}/${:_buildout_section_name_}
[nginx.conf]
[nginx.conf]
<=
gitlab
-etc-template
<=
nginx
-etc-template
template= {{ nginx_conf_in }}
template= {{ nginx_conf_in }}
context =
context =
section instance_parameter instance-parameter
section instance_parameter instance-parameter
section gitlab_backend gitlab-backend
section gitlab_backend gitlab-backend
section directory directory
raw mime_types {{ mime_types }}
raw mime_types {{ mime_types }}
# raw nginx_gitlab_http_conf ${nginx-gitlab-http.conf:rendered}
# raw nginx_gitlab_http_conf ${nginx-gitlab-http.conf:rendered}
[nginx-gitlab-http.conf]
[nginx-gitlab-http.conf]
<=
gitlab
-etc-template
<=
nginx
-etc-template
template= {{ nginx_gitlab_http_conf_in }}
template= {{ nginx_gitlab_http_conf_in }}
context = ...
context = ...
...
@@ -309,17 +318,25 @@ command =
...
@@ -309,17 +318,25 @@ command =
# sidekiq
# sidekiq
# nginx: etc/ log/ ...
######################
[xnginx]
# Nginx frontend #
######################
# srv/nginx/ prefix + etc/ log/ ...
[nginx]
recipe = slapos.cookbook:mkdirectory
recipe = slapos.cookbook:mkdirectory
srv = ${directory:srv}/nginx
etc = ${directory:etc}/nginx
log = ${directory:log}/nginx
log = ${directory:log}/nginx
# TODO more?
[nginx-symlinks]
# (nginx wants <prefix>/logs to be there from start - else it issues alarm to the log)
recipe = cns.recipe.symlink
symlink = ${nginx:log} = ${nginx:srv}/logs
# nginx frontend
[service-nginx]
[service-nginx]
recipe = slapos.cookbook:wrapper
recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:service}/nginx
wrapper-path = ${directory:service}/nginx
#command-line = {{ nginx }} -p ...
-c ${nginx.conf:rendered}
command-line = {{ nginx_bin }} -p ${nginx:srv}
-c ${nginx.conf:rendered}
command-line = {{ nginx }} -p ${directory:home} -c ${nginx.conf:rendered
}
depend = ${nginx-symlinks:symlink
}
software/gitlab/instance.cfg.in
View file @
71565a2c
# GitLab "switch-softwaretype" instance
# GitLab "switch-softwaretype" instance
# TODO write why we still use switch-softwaretype, if we only have 1 -gitlab softwaretype
[buildout]
[buildout]
parts = switch-softwaretype
parts = switch-softwaretype
...
@@ -31,7 +32,7 @@ context =
...
@@ -31,7 +32,7 @@ context =
raw gitlab_repository_location ${gitlab-repository:location}
raw gitlab_repository_location ${gitlab-repository:location}
raw bundler_4gitlab ${bundler-4gitlab:bundle}
raw bundler_4gitlab ${bundler-4gitlab:bundle}
raw git ${git:location}/bin/git
raw git ${git:location}/bin/git
raw nginx
${nginx-output:nginx}
raw nginx
_bin
${nginx-output:nginx}
raw mime_types ${nginx-output:mime}
raw mime_types ${nginx-output:mime}
raw gitlab_parameters_cfg ${gitlab-parameters.cfg:target}
raw gitlab_parameters_cfg ${gitlab-parameters.cfg:target}
...
...
software/gitlab/software.cfg
View file @
71565a2c
...
@@ -157,7 +157,9 @@ make-targets= cd ${:path} &&
...
@@ -157,7 +157,9 @@ make-targets= cd ${:path} &&
# eggs for instance.cfg
# eggs for instance.cfg
[eggs]
[eggs]
recipe = zc.recipe.egg
recipe = zc.recipe.egg
eggs = plone.recipe.command
eggs =
plone.recipe.command
cns.recipe.symlink
[instance.cfg]
[instance.cfg]
...
@@ -228,3 +230,4 @@ url = ${:_profile_base_location_}/template/${:_buildout_section_name_}
...
@@ -228,3 +230,4 @@ url = ${:_profile_base_location_}/template/${:_buildout_section_name_}
rubygemsrecipe = 0.2.2
rubygemsrecipe = 0.2.2
plone.recipe.command = 1.1
plone.recipe.command = 1.1
slapos.recipe.template = 2.8
slapos.recipe.template = 2.8
cns.recipe.symlink = 0.2.3
software/gitlab/template/nginx.conf.in
View file @
71565a2c
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
worker_processes {{ cfg('nginx_worker_processes') }};
worker_processes {{ cfg('nginx_worker_processes') }};
error_log stderr;
error_log stderr;
pid nginx.pid;
pid
{{ directory.run }}/
nginx.pid;
daemon off;
daemon off;
...
...
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