# 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 ../../component/libgit2/buildout.cfg # for instance ../../component/bash/buildout.cfg ../../component/curl/buildout.cfg ../../component/gzip/buildout.cfg ../../component/dcron/buildout.cfg ../../component/logrotate/buildout.cfg parts = ruby2.1 golang15 git postgresql92 redis28 cmake icu pkgconfig nginx-output python-4gitlab gitlab-shell/vendor gitlab/vendor/bundle gitlab-workhorse # for instance instance.cfg slapos-cookbook eggs bash curl watcher-sigkill gzip dcron-output logrotate ############################ # Software compilation # ############################ # 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 # rubygemsrecipe with fixed url and this way pinned rubygems version [rubygemsrecipe] recipe = rubygemsrecipe url = https://rubygems.org/rubygems/rubygems-2.5.2.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 # 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 ) # gitlab (via github-markup) wants to convert rst -> html via running: python2 (with docutils egg) # (python-4gitlab puts interpreter into ${buildout:bin-directory}) environment = 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 # 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 #repository = https://gitlab.com/gitlab-org/gitlab-ce.git repository = https://lab.nexedi.com/kazuhiko/gitlab-ce.git # 8.6.1 + NXD patches: revision = v8.6.1-9-gc9201a8aaed5cf9b23b39f0be310644f21df85d0 location = ${buildout:parts-directory}/gitlab [gitlab-shell-repository] <= git-repository #repository = https://gitlab.com/gitlab-org/gitlab-shell.git repository = https://lab.nexedi.com/kazuhiko/gitlab-shell.git # gitlab 8.6 wants gitlab-shell 2.6.11 # 2.6.11 + no-hooks.old patch revision = v2.6.10-17-gbbe699e29ad5f51990de90b56af6ede3dba49c17 location = ${buildout:parts-directory}/gitlab-shell [gitlab-workhorse-repository] <= git-repository #repository = https://gitlab.com/gitlab-org/gitlab-workhorse.git repository = https://lab.nexedi.com/kazuhiko/gitlab-workhorse.git # 0.7.1 + NXD patches for blob download speedup # (https://gitlab.com/gitlab-org/gitlab-workhorse/merge_requests/17) revision = v0.7.1-3-gf82cbe49d5f7de8fd783b95ee6cd229d48278ea6 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.rugged --use-system-libraries=true --with-git2-include=${libgit2:location}/include --with-git2-lib=${libgit2:location}/lib ${: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 ############################### # Trampoline for instance # ############################### # eggs for instance.cfg [eggs] recipe = zc.recipe.egg eggs = plone.recipe.command cns.recipe.symlink [instance.cfg] recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance.cfg.in output = ${buildout:directory}/instance.cfg md5sum = b40cd8824b978da867404d8955b06c18 [watcher-sigkill] recipe = slapos.recipe.template:jinja2 template= ${:_profile_base_location_}/${:_buildout_section_name_}.in rendered= ${buildout:bin-directory}/${:_buildout_section_name_} mode = 0755 md5sum = 2986dcb006dc9e8508ff81f646656131 context = section bash bash # 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_} # 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 md5sum = 91737a2067be80f3ae48157e5a0738b4 [database.yml.in] <= download-template md5sum = 76d8f20532d63282ecd3617a3937fcf1 [gitconfig.in] <= download-template md5sum = d8b3611386c4982605edd9a31832ee28 [gitlab-parameters.cfg] <= download-file md5sum = b04b72949f0b9b5da96870ffbf8c1ff4 [gitlab-shell-config.yml.in] <= download-template md5sum = 9c62aa1bf7396f207a528e39973aa135 [gitlab-unicorn-startup.in] <= download-file md5sum = 14c5632182d830c03f7788c85d6f4da1 [gitlab.yml.in] <= download-template md5sum = 7f48727ab64f1a6f3854420fa0434889 [instance-gitlab.cfg.in] <= download-file md5sum = 7a0ba60d09e6a62ffc1da34cf79737a0 [macrolib.cfg.in] <= download-file md5sum = a56a44e96f65f5ed20211bb6a54279f4 [nginx-gitlab-http.conf.in] <= download-template md5sum = 405dd5aa5703425a50c01dfe62f3a28b [nginx.conf.in] <= download-template md5sum = 71b4221cd91e0e1e20a72b97991f2665 [rack_attack.rb.in] <= download-template md5sum = 2cf56b210a906cee80f86cde7112f468 [resque.yml.in] <= download-template md5sum = 1fa21655a845602f68a901f23a1da89a [smtp_settings.rb.in] <= download-template md5sum = 07b640122b8c4840e853360f2479d0ac [unicorn.rb.in] <= download-template md5sum = 4f7c14147fd60b4cc9aefe7f64524abe [versions] cns.recipe.symlink = 0.2.3 docutils = 0.12 plone.recipe.command = 1.1 rubygemsrecipe = 0.2.2 slapos.recipe.template = 2.9 z3c.recipe.scripts = 1.0.1