Skip to content

Conversation

@pspoerri
Copy link

Overwrite script gitlab-shell script location in config.yml.
Possible uses:

  • Setup a custom Ruby Environment and wrap gitlab shell script
  • Add some additional checks

I'm aware of issue https://github.com/gitlabhq/gitlab-shell/issues/12 . But the suggested solution namely setting

PermitUserEnvironment yes 

in the SSH config will introduce additional problems which we don't want:

  • We increase the risk for an incursion.
  • It makes the management of a machine running gitlab a nightmare. Since the sshd config needs to be managed somehow.

Hence I suggest the following solution which allows overwriting the gitlab-shell binary with a custom script defined in the gitlab-shell config:

  • The config can be deployed with puppet.
  • The binary can contain whichever ruby version settings want.
  • The default config will still use the default script.
  • The solution is gitlab-shell version agnostic: Update gitlab-shell, keep the edited script.

An alternative would be to just overwrite gitlab-shell script and edit with every update. Which makes upgrading a pain.

Overwrite script gitlab-shell script location in config.yml. Possible uses: - Setup a custom Ruby Environment and wrap gitlab shell script - Add some additional checks
@coveralls
Copy link

Coverage Status

Coverage increased (+0%) when pulling 8679bff on minusinf:master into 2fb506d on gitlabhq:master.

@pspoerri
Copy link
Author

This pull request can be closed since I didn't notice that it is sufficient to setup the environment in /home/git/.bashrc in the following way:

export PATH=/usr/local/rvm/gems/ruby-1.9.3-p429@gitlab/bin:/usr/local/rvm/gems/ruby-1.9.3-p429/bin:/usr/local/rvm/gems/ruby-1.9.3-p429@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p429/bin:/usr/local/rvm/bin:/usr/bin:/bin export GEM_PATH=/usr/local/rvm/gems/ruby-1.9.3-p429@gitlab:/usr/local/rvm/gems/ruby-1.9.3-p429@global # If not running interactively, don't do anything [ -z "$PS1" ] && return # rest of the .bashrc 
@pspoerri pspoerri closed this Jun 11, 2013
maxlazio pushed a commit that referenced this pull request Dec 26, 2016
This removes the need for configuring anything extra. To make scraping easier each line is prefixed by "metrics:". Fixes #64
maxlazio added a commit that referenced this pull request Dec 26, 2016
 Re-use the default logger for performance metrics See #64 for the discussion leading up to this. See merge request !100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants