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
f0ac1f96
Commit
f0ac1f96
authored
Jul 15, 2015
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X I can start rails app manually, but 500 because redis is not yet there
parent
d3666828
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
105 additions
and
41 deletions
+105
-41
software/gitlab/build.sh
software/gitlab/build.sh
+1
-1
software/gitlab/instance-gitlab.cfg.in
software/gitlab/instance-gitlab.cfg.in
+71
-37
software/gitlab/instance.cfg.in
software/gitlab/instance.cfg.in
+1
-0
software/gitlab/software.cfg
software/gitlab/software.cfg
+9
-1
software/gitlab/template/database.yml.in
software/gitlab/template/database.yml.in
+2
-2
software/gitlab/template/gitlab.yml.in
software/gitlab/template/gitlab.yml.in
+21
-0
No files found.
software/gitlab/build.sh
View file @
f0ac1f96
...
...
@@ -3,7 +3,7 @@
partition_forinst
()
{
# 2015-06-12 12:08:48 slapos[5354] INFO slappart3 slaprunner busy /srv/slapgrid/slappart16/srv/runner/project/slapos/software/gitlab/software.cfg RootSoftwareInstance gitlab1 - started
# gitlab1 -> slappart3
xslapos proxy show 2>&1 |
grep
-w
$1
|
awk
'{print $5}'
xslapos proxy show
--partitions
2>&1 |
grep
-w
$1
|
awk
'{print $5}'
}
xslapos node software
-v
--only-sr
`
pwd
`
/software.cfg
--pidfile
$HOME
/var/run/slapgrid-sr.pid
&&
\
...
...
software/gitlab/instance-gitlab.cfg.in
View file @
f0ac1f96
...
...
@@ -4,12 +4,15 @@
parts =
directory
# promise TODO
# publish-connection-parameters
publish-instance-info
# request-postgresql
gitlab-rails
gitlab-rake
gitlab-unicorn
gitlab-sidekiq
gitlab-root-shadow
# std stuff for slapos instance
...
...
@@ -19,6 +22,31 @@ offline = true
[instance-parameter]
# std stuff to fetch slapos instance parameters
recipe = slapos.cookbook:slapconfiguration
computer= ${slap-connection:computer-id}
partition=${slap-connection:partition-id}
url = ${slap-connection:server-url}
key = ${slap-connection:key-file}
cert = ${slap-connection:cert-file}
# gitlab instance parameters
configuration.name = XXX
# for convenience
[gitlab-backend]
host = ${instance-parameter:ipv6-random}
port = 7777
url = http://[${:host}]:${:port}
[publish-instance-info]
recipe = slapos.cookbook:publish
url = ${gitlab-backend:url}
[request-postgresql]
<= slap-connection
recipe = slapos.cookbook:request
...
...
@@ -54,14 +82,30 @@ recipe = slapos.cookbook:mkdirectory
etc = ${directory:etc}/gitlab
log = ${directory:log}/gitlab
var = ${directory:var}/gitlab
tmp = ${:var}/tmp
uploads = ${:var}/uploads
# gitlab-shell: etc/
[gitlab-shell]
recipe = slapos.cookbook:mkdirectory
etc = ${directory:etc}/gitlab-shell
[gitlab-database.yml]
recipe = slapos.recipe.template
url = {{ database_yml_in }}
output = ${gitlab:etc}/database.yml
# FIXME aaa should not be here
aaa = ${request-postgresql:connection-url}
[gitlab.yml]
recipe = slapos.recipe.template
url = {{ gitlab_yml_in }}
output = ${gitlab:etc}/gitlab.yml
# TODO log: logrotate
...
...
@@ -69,6 +113,8 @@ aaa = ${request-postgresql:connection-url}
# bin/
# gitlab-rails
# gitlab-rake
# ? gitlab-unicorn
# ? gitlab-sidekiq
[gitlab-bin]
recipe = slapos.cookbook:wrapper
wrapper-path = ${directory:bin}/${:_buildout_section_name_}
...
...
@@ -93,6 +139,25 @@ 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
[gitlab-sidekiq]
<= gitlab-bin
# NOTE sys.argv[1:] implicityly appended
command-line =
{{ bundler_4gitlab }} exec sh -c
'cd ${gitlab-root-shadow:location} && sidekiq "$@"' sidekiq
# # TODO -> service/
# [gitlab-unicorn]
# <= gitlab-bin
# Gitlab/Rails operation is tighted that config/ lives inside code.
# to have ability to create several instances configured differently from 1 SR.
...
...
@@ -122,13 +187,14 @@ command =
rm -f .secret .gitlab_shell_secret &&
rm -rf log tmp &&
ln -s ${gitlab:etc}/secret .secret &&
ln -s AAA/.gitlab_shell_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:
var}/tmp .
&&
ln -s ${gitlab:
tmp} tmp
&&
# config/
cd config &&
ln -s ${gitlab:etc}/unicorn.rb . &&
ln -s ${gitlab
:etc}/gitlab.yml .
&&
ln -s ${gitlab
.yml:output} gitlab.yml
&&
ln -s ${gitlab-database.yml:output} database.yml &&
ln -s ${gitlab:etc}/resque.yml . &&
# config/initializers/
...
...
@@ -138,43 +204,11 @@ command =
# public/
cd ../../public &&
rm -rf uploads &&
ln -s ${gitlab:
var}/uploads .
&&
ln -s ${gitlab:
uploads} uploads
&&
true
# 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 $${gitlab:etc}/secret .secret &&
# ln -s AAA/.gitlab_shell_secret . &&
# ln -s $${gitlab:log} log &&
# ln -s $${gitlab:var}/tmp . &&
# # config/
# rm config && mkdir config && cd config &&
# for i in ${gitlab-repository:location}/config/* ; do ln -s $i ; done &&
# ln -s $${gitlab:etc}/unicorn.rb . &&
# ln -s $${gitlab:etc}/gitlab.yml . &&
# ln -s $${gitlab-database.yml:output} database.yml &&
# ln -s $${gitlab:etc}/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 $${gitlab:etc}/rack_attack.rb . &&
# ln -s $${gitlab:etc}/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 $${gitlab:var}/uploads . &&
# true
# etc/
...
...
software/gitlab/instance.cfg.in
View file @
f0ac1f96
...
...
@@ -24,6 +24,7 @@ context =
raw git ${git:location}/bin/git
raw database_yml_in ${database.yml.in:target}
raw gitlab_yml_in ${gitlab.yml.in:target}
[switch-softwaretype]
...
...
software/gitlab/software.cfg
View file @
f0ac1f96
...
...
@@ -180,12 +180,20 @@ destination = ${buildout:directory}/instance-gitlab.cfg.in
# TODO parts/database.yml.in/database.yml.in -> parts/database.yml.in
[d
atabase.yml.in
]
[d
ownload-template
]
recipe = slapos.recipe.download
download-only = true
url = ${:_profile_base_location_}/template/${:_buildout_section_name_}
[database.yml.in]
<= download-template
# TODO md5sum
[gitlab.yml.in]
<= download-template
# TODO md5sum
# [buildout]
# gems-directory = gemsAAA # XXX = good idea?
...
...
software/gitlab/template/database.yml.in
View file @
f0ac1f96
...
...
@@ -9,8 +9,8 @@ production:
#database: gitlabhq_production
database: ${postgresql-urlparse:path}
pool: 10
username:
${postgresql-urlparse:username}
password:
${postgresql-urlparse:password}
username:
'${postgresql-urlparse:username}'
password:
'${postgresql-urlparse:password}'
host: ${postgresql-urlparse:host}
port: ${postgresql-urlparse:port}
# socket:
software/gitlab/template/gitlab.yml.in
0 → 100644
View file @
f0ac1f96
# @autogenerated XXX
# 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
production: &base
#
# 1. GitLab app settings
# ==========================
## GitLab settings
gitlab:
## Web server settings (note: host is the FQDN, do not include http://)
host: ${gitlab-backend:host}
port: ${gitlab-backend:port}
# TODO
#https: <%= @gitlab_https %>
https: false
# TODO
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