GitLab CE Quick install for our rpm

Posted on Apr 1, 2015

General

Official Install Documentation

Repositories

  1. use the repositories from devel:languages:ruby and home:darix:apps
  2. zypper in –from home:darix:apps redis gitlab-ce gitlab-shell

config redis:

See also: /usr/share/doc/packages/redis/README.SUSE

$ cd /etc/redis
$ cp default.conf.example gitlab.conf
$ vi gitlab.conf

* daemonize no
* pidfile /var/run/redis/gitlab.pid
* logfile /var/log/redis/gitlab.log
* dir /var/lib/redis/gitlab/

$ install -d -m 0750 -o redis -g redis /var/lib/redis/gitlab/
$ chown root:redis gitlab.conf
$ sc start redis@gitlab
$ sc enable redis@gitlab

GitLab Shell

  1. cd /usr/share/gitlab/shell/; cp config.yml{.example,}
  2. set up redis socket matching /etc/redis/gitlab.conf
  3. maybe enable audit_usernames (but see warning)

config rails app

  1. cd /srv/www/vhosts/gitlab-ce/
  2. configure database.yml (based on postgresql example)
  3. cp config/gitlab.yml.{example,}
  • host, port, https, email_from in gitlab section
  • optionally ldap settings
  1. cp config/resque.yml.{example,}
  • adapt socket for redis. should match /etc/redis/gitlab.conf
  1. export RAILS_ENV="${RAILS_ENV:=production}"
  2. gitlab-ce-update
  3. rake db:seed_fu
  4. check for new files which are now owned by root:root (e.g. .gitlab_shell_secret) they should be owned by root:gitlab with permissions u=rw,g=r,o=
  5. make sure you have the symlink .gitlab_shell_secret /srv/www/vhosts/gitlab-ce/.gitlab_shell_secret
  6. Configure git for gitlab user as seen in official docs
  7. sc start gitlab-ce-unicorn gitlab-ce-sidekiq gitlab-workhorse
  8. sc enable gitlab-ce-unicorn gitlab-ce-sidekiq gitlab-workhorse

Testing things

  1. ssh access
ssh -T gitlab@gitlab.suse.de
Welcome to GitLab, $yourusername!