software.cfg 7.91 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# GitLab software-release
[buildout]
extends =
    ../../stack/slapos.cfg
    ../../component/ruby/buildout.cfg
    ../../component/golang/buildout.cfg
    ../../component/postgresql/buildout.cfg
    ../../component/redis/buildout.cfg
    ../../component/cmake/buildout.cfg
    ../../component/icu/buildout.cfg
    ../../component/pkgconfig/buildout.cfg
    ../../component/nodejs/buildout.cfg
    ../../component/openssl/buildout.cfg
    ../../component/nginx/buildout.cfg

16
#   for instance
17
    ../../component/bash/buildout.cfg
18
    ../../component/bzip2/buildout.cfg
19
    ../../component/curl/buildout.cfg
20 21 22 23
    ../../component/gzip/buildout.cfg
    ../../component/dcron/buildout.cfg
    ../../component/logrotate/buildout.cfg

24 25
parts =
    ruby2.1
Kirill Smelkov's avatar
Kirill Smelkov committed
26
    golang16
27 28 29 30 31 32 33 34
    git
    postgresql92
    redis28
    cmake
    icu
    pkgconfig
    nginx-output

35
    python-4gitlab
36 37 38 39
    gitlab-shell/vendor
    gitlab/vendor/bundle
    gitlab-workhorse

40 41 42 43 44 45
#   for instance
    instance.cfg

    slapos-cookbook
    eggs

46 47
    bash
    curl
48
    watcher-sigkill
49 50 51 52
    gzip
    dcron-output
    logrotate

53 54 55 56 57

############################
#   Software compilation   #
############################

58 59 60 61 62 63 64 65 66 67 68
# python with eggs, that will be used in gitlab
[python-4gitlab]
# NOTE cannot use zc.recipe.egg - github-markup invoks `python2 -S` and
# interpreter generated by zc.recipe.egg cannot handle that.
recipe  = z3c.recipe.scripts
# NOTE github-markup invokes it as `python2`, that's why we are naming it this way
# https://github.com/github/markup/blob/5393ae93/lib/github/markups.rb#L36
interpreter = python2
eggs    =
    docutils

69 70 71
# rubygemsrecipe with fixed url and this way pinned rubygems version
[rubygemsrecipe]
recipe  = rubygemsrecipe
72
url     = https://rubygems.org/rubygems/rubygems-2.5.2.zip
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96


# bundler, that we'll use to
# - install gems for gitlab
# - run gitlab services / jobs  (via `bundle exec ...`)
[bundler-4gitlab]
<= rubygemsrecipe
ruby-location = ${ruby2.1:location}
ruby-executable = ${:ruby-location}/bin/ruby
gems    = bundler==1.11.2

# bin installed here
bundle  = ${buildout:bin-directory}/bundle

# install together with dependencies of gitlab, which we cannot specify using
#   --with-... gem option
# ( reason: rubygemsrecipe hardcodes PATH inside generated bin/* and it is
#   impossible to adjust it later )
#
# bundle exec <smth>                ; <smth> starts with `#!/usr/bin/env ruby` as rubygems
# Rugged needs: cmake, pkgconfig
# execjs needs: nodejs
# rails needs db client program on path: psql
# gitlab wants to check redis version via running: redis-cli
97 98 99
# gitlab wants git to be really on path ( it uses git from abspath defined in
#   gitlab.yml, but there are not all cases like this, e.g. in
#   https://gitlab.com/gitlab-org/gitlab_git/blob/2f0d3c1a/lib/gitlab_git/repository.rb#L259 )
100 101
# gitlab (via github-markup) wants to convert rst -> html via running: python2 (with docutils egg)
# (python-4gitlab puts interpreter into ${buildout:bin-directory})
102
environment =
103
  PATH    = ${:ruby-location}/bin:${cmake:location}/bin:${pkgconfig:location}/bin:${nodejs:location}/bin:${postgresql92:location}/bin:${redis28:location}/bin:${git:location}/bin:${buildout:bin-directory}:%(PATH)s
104 105 106 107 108 109 110 111 112 113


# gitlab, gitlab-shell & gitlab-workhorse checked out as git repositories
# pinned to exact commit
[git-repository]
recipe  = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git

[gitlab-repository]
<= git-repository
114
#repository = https://gitlab.com/gitlab-org/gitlab-ce.git
115
repository = https://lab.nexedi.com/nexedi/gitlab-ce.git
iv's avatar
iv committed
116 117
# 8.8.X + NXD patches:
revision = v8.8.9-10-g967afbdc3a2d2bcc58ed31ca50d5293fa2a2e9ed
118 119 120 121
location = ${buildout:parts-directory}/gitlab

[gitlab-shell-repository]
<= git-repository
122
#repository = https://gitlab.com/gitlab-org/gitlab-shell.git
123
repository = https://lab.nexedi.com/nexedi/gitlab-shell.git
iv's avatar
iv committed
124
# gitlab 8.8 wants gitlab-shell 2.7.2
125 126
# 2.7.2 + NXD patches
revision = v2.6.10-50-gfbca95be784816349abc5930324659151eca50d1
127 128 129 130
location = ${buildout:parts-directory}/gitlab-shell

[gitlab-workhorse-repository]
<= git-repository
131
#repository = https://gitlab.com/gitlab-org/gitlab-workhorse.git
132
repository = https://lab.nexedi.com/nexedi/gitlab-workhorse.git
iv's avatar
iv committed
133
# gitlab 8.8 wants gitlab-workhorse 0.7.1
134 135
# 0.7.1 + NXD patches
revision = v0.7.1-5-gd23a3247829fc3200e3dc784dcd57b5a0febac48
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177
location = ${buildout:parts-directory}/gitlab-workhorse



# build needed-by-gitlab gems via bundler
[gitlab/vendor/bundle]
recipe  = slapos.recipe.cmmi
path    = ${gitlab-repository:location}
bundle  = ${bundler-4gitlab:bundle}

configure-command = cd ${:path} &&
    ${:bundle} config --local build.charlock_holmes --with-icu-dir=${icu:location}  &&
    ${:bundle} config --local build.pg  --with-pg-config=${postgresql92:location}/bin/pg_config

make-binary =
make-targets= cd ${:path} &&
    ${:bundle} install --deployment  --without development test  mysql kerberos


# build needed-by-gitlab-shell gems via bundler
# ( there is not vendor/ dir in gitlab-shell, so to avoid having buildout error
#   on mkdir vendor/bundle, this part name is just /vendor )
[gitlab-shell/vendor]
recipe  = slapos.recipe.cmmi
path    = ${gitlab-shell-repository:location}
bundle  = ${bundler-4gitlab:bundle}

configure-command = true
make-binary =
make-targets= cd ${:path} &&
    ${:bundle} install --deployment  --without development test


# build gitlab-workhorse
[gitlab-workhorse]
recipe  = slapos.recipe.cmmi
path    = ${gitlab-workhorse-repository:location}

configure-command = :
make-targets= ${:_buildout_section_name_}

environment =
Kirill Smelkov's avatar
Kirill Smelkov committed
178
  PATH=${golang16:location}/bin:%(PATH)s
179 180


181 182 183 184 185 186 187 188 189
###############################
#   Trampoline for instance   #
###############################

# eggs for instance.cfg
[eggs]
recipe  = zc.recipe.egg
eggs    =
    plone.recipe.command
190
    cns.recipe.symlink
191 192 193 194 195 196


[instance.cfg]
recipe  = slapos.recipe.template
url     = ${:_profile_base_location_}/instance.cfg.in
output  = ${buildout:directory}/instance.cfg
197
md5sum  = ef85f02c4f6070c586d773b859a2f4e2
198

199 200 201 202 203
[watcher-sigkill]
recipe  = slapos.recipe.template:jinja2
template= ${:_profile_base_location_}/${:_buildout_section_name_}.in
rendered= ${buildout:bin-directory}/${:_buildout_section_name_}
mode    = 0755
204
md5sum  = 2986dcb006dc9e8508ff81f646656131
205 206 207
context =
    section bash    bash

208 209 210 211 212 213 214 215 216 217 218

# macro: download a file named as section name
#
#   [filename]
#   <= download-file
#   md5sum = ...
[download-file]
recipe  = slapos.recipe.build:download
url     = ${:_profile_base_location_}/${:_buildout_section_name_}
destination = ${buildout:directory}/${:_buildout_section_name_}

219 220 221 222 223 224 225 226
# like download-file, but download from template/<filename>
[download-template]
<= download-file
url     = ${:_profile_base_location_}/template/${:_buildout_section_name_}


[database.yml.in]
<= download-template
227
md5sum  = 61d1d04b9347b3168a1ad7676e4681ef
228

229 230
[gitconfig.in]
<= download-template
231
md5sum  = eb1230fee50067924ba89f4dc6e82fa9
232

233 234
[gitlab-parameters.cfg]
<= download-file
235
md5sum  = a74670934ec0190cc212d1f3468c11ed
236

237 238
[gitlab-shell-config.yml.in]
<= download-template
239
md5sum  = 58c09b1e609f903e483a76fe9e57366c
240

241 242
[gitlab-unicorn-startup.in]
<= download-file
243
md5sum  = a9cb347f60aad3465932fd36cd4fe25d
244

245 246
[gitlab.yml.in]
<= download-template
247
md5sum  = 176939a6428a7aca4767a36421b0af2b
248 249 250

[instance-gitlab.cfg.in]
<= download-file
251
md5sum  = 89914e4a225f6cdebfa196d46359f6f2
252

253 254
[macrolib.cfg.in]
<= download-file
255
md5sum  = a56a44e96f65f5ed20211bb6a54279f4
256

257 258
[nginx-gitlab-http.conf.in]
<= download-template
259
md5sum  = a11b50d2ff2b1fa842ba4aa20041e2fe
260 261 262

[nginx.conf.in]
<= download-template
263
md5sum  = 1374f38ab6f295b850d45ea0019ec05d
264

265 266
[rack_attack.rb.in]
<= download-template
267
md5sum  = 7d0e6dc6b826f6df6b20d8574a29e2f8
268 269 270

[resque.yml.in]
<= download-template
271
md5sum  = 7c89a730889e3224548d9abe51a2d719
272 273 274

[smtp_settings.rb.in]
<= download-template
275
md5sum  = c67ea492e17f774d0e18f1217338a55f
276 277 278

[unicorn.rb.in]
<= download-template
279
md5sum  = 83921db1835d9e81cbbe808631cc40a9
280

281 282

[versions]
283
cns.recipe.symlink = 0.2.3
284
docutils = 0.12
285
plone.recipe.command = 1.1
286
rubygemsrecipe  = 0.2.2
287
slapos.recipe.template = 2.9
288
z3c.recipe.scripts = 1.0.1