Add rake task to install or upgrade gitlab-shell installation.
Created by: crohr
I think it would be nice if Gitlab came with a rake task to streamline the gitlab-shell installation, based on the existing Gitlab configuration. This task does just that, and allows for upgrading to a newer version of gitlab-shell as well.
rake gitlab:shell:install
# or, with specific version
rake gitlab:shell:install[v1.9.3]
What this does:
- fetch gitlab-shell code from github, at the given tag/branch/commit given.
- write gitlab-shell/config.yml based on the existing gitlab config
- launch the installation process of gitlab-shell
- write the current PATH to
$gitlab-shell-home/.ssh/environment
, so that the#!/usr/bin/env ruby
shebang in gitlab-shell files returns the right ruby version (i.e. the one currently used by the gitlab app).
The last point requires a change in the sshd configuration to take effect, with potential security issues if the server is also used by normal users (http://www.openssh.org/cgi-bin/man.cgi?query=sshd_config), so if this is an issue I'm happy to remove lines 50 to 58, as it would not apply to an 'install-everything-from-source' gitlab installation anyway.
Created by: MrKeiKun
questions
- What if I want the latest gitlab shell? is there way to do that?
- What is gitlab is not installed over /home/git/? (example:
/var/git/gitlab
) is there way to install gitlab-shell in/var/git/gitlab-shell
?
By Administrator on 2014-04-08T15:11:52 (imported from GitLab project)
Created by: crohr
@MrKeiKun
- just run
rake gitlab:shell:install[master]
, and it should reset to the latest commit on the master branch. - That task is using the gitlab settings to know in which place it needs to install stuff. So yes, if you configure
user_home
to be/var/git
(ingitlab.yml
), then it will install gitlab-shell at/var/git/gitlab-shell
.
By Administrator on 2014-04-08T15:17:21 (imported from GitLab project)
- just run