software.cfg 7.69 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 18
    ../../component/bash/buildout.cfg
    ../../component/curl/buildout.cfg
19 20 21 22
    ../../component/gzip/buildout.cfg
    ../../component/dcron/buildout.cfg
    ../../component/logrotate/buildout.cfg

23 24 25 26 27 28 29 30 31 32 33
parts =
    ruby2.1
    golang15
    git
    postgresql92
    redis28
    cmake
    icu
    pkgconfig
    nginx-output

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

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

    slapos-cookbook
    eggs

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

52 53 54 55 56

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

57 58 59 60 61 62 63 64 65 66 67
# 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

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


# 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
96 97
# gitlab (via github-markup) wants to convert rst -> html via running: python2 (with docutils egg)
# (python-4gitlab puts interpreter into ${buildout:bin-directory})
98
environment =
99
  PATH    = ${:ruby-location}/bin:${cmake:location}/bin:${pkgconfig:location}/bin:${nodejs:location}/bin:${postgresql92:location}/bin:${redis28:location}/bin:${buildout:bin-directory}:%(PATH)s
100 101 102 103 104 105 106 107 108 109


# 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
110 111 112 113
#repository = https://gitlab.com/gitlab-org/gitlab-ce.git
repository = https://lab.nexedi.com/kirr/gitlab-ce.git
# 8.2.X + NXD patches:
revision = v8.2.3-9-g79c127e6e068a619c53a8c22f1db8c1e28ec87d2
114 115 116 117 118 119
location = ${buildout:parts-directory}/gitlab

[gitlab-shell-repository]
<= git-repository
repository = https://gitlab.com/gitlab-org/gitlab-shell.git
# gitlab 8.2 wants gitlab-shell 2.6.8
120 121
# 2.6.8 + NXD patches
revision = v2.6.8-2-g216d7e15fe06917198891a895f762ba84fdcc4d4
122 123 124 125
location = ${buildout:parts-directory}/gitlab-shell

[gitlab-workhorse-repository]
<= git-repository
126 127 128 129 130
#repository = https://gitlab.com/gitlab-org/gitlab-workhorse.git
repository = https://lab.nexedi.com/kirr/gitlab-workhorse.git
# 0.4.X + NXD patches for blob download speedup
# (https://gitlab.com/gitlab-org/gitlab-workhorse/merge_requests/17)
revision = 0.4.1-23-g2beb8c9539433f072e3db540f91f75894ca6b1b0
131 132 133 134 135 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
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 =
  PATH=${golang15:location}/bin:%(PATH)s


176 177 178 179 180 181 182 183 184
###############################
#   Trampoline for instance   #
###############################

# eggs for instance.cfg
[eggs]
recipe  = zc.recipe.egg
eggs    =
    plone.recipe.command
185
    cns.recipe.symlink
186 187 188 189 190 191


[instance.cfg]
recipe  = slapos.recipe.template
url     = ${:_profile_base_location_}/instance.cfg.in
output  = ${buildout:directory}/instance.cfg
192
md5sum  = b40cd8824b978da867404d8955b06c18
193

194 195 196 197 198
[watcher-sigkill]
recipe  = slapos.recipe.template:jinja2
template= ${:_profile_base_location_}/${:_buildout_section_name_}.in
rendered= ${buildout:bin-directory}/${:_buildout_section_name_}
mode    = 0755
199
md5sum  = 2986dcb006dc9e8508ff81f646656131
200 201 202
context =
    section bash    bash

203 204 205 206 207 208 209 210 211 212 213

# 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_}

214 215 216 217 218 219 220 221
# like download-file, but download from template/<filename>
[download-template]
<= download-file
url     = ${:_profile_base_location_}/template/${:_buildout_section_name_}


[config.ru.in]
<= download-template
222
md5sum  = bb12852c28079f40a0751f7f3559e2a6
223 224 225

[database.yml.in]
<= download-template
226
md5sum  = ee656cfd96e1c82df167f68bb5773291
227

228 229
[gitconfig.in]
<= download-template
230
md5sum  = f4cb11e8bca379e016b062d0db859b74
231

232 233
[gitlab-parameters.cfg]
<= download-file
234
md5sum  = bc98ec10209bc53f6a49888b1a2b9382
235

236 237
[gitlab-shell-config.yml.in]
<= download-template
238
md5sum  = ea351e16b47f0008f61211eb2d7685e2
239

240 241
[gitlab-unicorn-startup.in]
<= download-file
242
md5sum  = 2716afaa9445c0c429c6b211356ebe8f
243

244 245
[gitlab.yml.in]
<= download-template
246
md5sum  = cc32f5053dd2a2461aa5952a5b925310
247 248 249

[instance-gitlab.cfg.in]
<= download-file
250
md5sum  = dfd2b14f846eda999fe9d12108d513b4
251

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

256 257
[nginx-gitlab-http.conf.in]
<= download-template
258
md5sum  = 590da2b00cd198c7bc261c3d893bc199
259 260 261

[nginx.conf.in]
<= download-template
262
md5sum  = f1a6e2bce3f28a2243fed49d1e1601df
263

264 265
[rack_attack.rb.in]
<= download-template
266
md5sum  = 16503c029159ea6db7d0fb5ab67093a3
267 268 269

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

[smtp_settings.rb.in]
<= download-template
274
md5sum  = c7c09c241b5fa8163e4995260be52604
275 276 277

[unicorn.rb.in]
<= download-template
278
md5sum  = 9bdca16362fe19c727bca38383e57068
279

280 281

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