1. 10 Nov, 2015 9 commits
    • Kirill Smelkov's avatar
      Don't confuse users with http+unix:// and URL-encoding socket path at all · e13c4003
      Kirill Smelkov authored
      In 5c66f954 (Allow to configure gitlab socket just by path) we added
      gitlab_socket option to allow users to configure path to Unicorn socket
      just by path.
      
      But @jacobvosmaer asks for even more - make http+unix:// stuff internal
      and not even try to confuse users with e.g. description of URL-encoding
      socket path and possibility to configure sockets with gitlab_url and
      just direct unconditionally to gitlab_socket for that case.
      
      So be it - for users it is now shown that the only way to configure
      sockets is via gitlab_socket option. Internally we still use
      http+unix:// scheme and handle it even if it is given in gitlab_url.
      e13c4003
    • Kirill Smelkov's avatar
      Allow to configure gitlab socket just by path · 5c66f954
      Kirill Smelkov authored
      @jacobvosmaer noted that from user perspective it is not very handy to
      have URL-encoded paths for sockets, and this way it is also not
      consistent with everything else in GitLab where we use just
      unix://path/to/socket instead of unix://path%2Fto%2Fsocket .
      
      Be friends to users and allow them to configure socket path just with paths
      with secondary gitlab_socket option, handler for which just encodes the
      path and adds http+unix:// prefix, so internal handling is always by URL.
      
      To protect from inconsistent input, configuration handler checks that
      only one of gitlab_url or gitlab_socket can be given at a time.
      
      NOTE CGI::escape() is used instead of URL::escape() because the latter
      does not escape '/' characters by default:
      
          http://stackoverflow.com/questions/14989581/ruby-1-9-3-add-unsafe-characters-to-uri-escape
      5c66f954
    • Kirill Smelkov's avatar
      Add support to connect gitlab-shell to Unicorn via UNIX socket · 184385ac
      Kirill Smelkov authored
      It is well known that UNIX sockets are faster than TCP over loopback.
      
      E.g. on my machine according to lmbench[1] they have ~ 2 times
      lower latency and ~ 2-3 times more throughput compared to TCP over
      loopback:
      
          *Local* Communication latencies in microseconds - smaller is better
          ---------------------------------------------------------------------
          Host                 OS 2p/0K  Pipe AF     UDP  RPC/   TCP  RPC/ TCP
                                  ctxsw       UNIX         UDP         TCP conn
          --------- ------------- ----- ----- ---- ----- ----- ----- ----- ----
          teco      Linux 4.2.0-1  13.8  29.2 26.8  45.0  47.9  48.5  55.5  45.
      
          *Local* Communication bandwidths in MB/s - bigger is better
          -----------------------------------------------------------------------------
          Host                OS  Pipe AF    TCP  File   Mmap  Bcopy  Bcopy  Mem   Mem
                                       UNIX      reread reread (libc) (hand) read write
          --------- ------------- ---- ---- ---- ------ ------ ------ ------ ---- -----
          teco      Linux 4.2.0-1 1084 4353 1493 2329.1 3720.7 1613.8 1109.2 3402 1404.
      
      The same ratio usually holds for servers.
      
      Also UNIX sockets, since they reside on filesystem, besides being faster with
      less latency, have one another nice property: access permissions to them are
      managed the same way access to files is.
      
      Because of lower latencies and higher throughput - for performance reasons, and
      for easier security, it makes sense to interconnect services on one machine via
      UNIX sockets and talk via TCP only to outside world.
      
      All internal services inside GitLab can talk to each other via UNIX socket
      already and only gitlab-shell was missing support to talk to Unicorn via UNIX
      socket.
      
      Let's teach gitlab-shell to talk via UNIX sockets.
      
      [1] http://www.bitmover.com/lmbench/
      
      ~~~~
      
      In this patch we
      
      - add URI::HTTPUNIX to handle http+unix:// URI scheme
      - add Net::HTTPUNIX to handle "connect via unix socket and then talk http"
      - adjust GitlabNet#http_client_for() accordingly
      - adjust documentation in config.yml.example
      
      The http+unix:// scheme is not reinvented anew: the idea about its structure is
      quite logical an was already established at least in requests-unixsocket python
      package:
      
          http://fixall.online/theres-no-need-to-reinvent-the-wheelhttpsgithubcommsabramorequests-unixsocketurl/241810/
          https://github.com/msabramo/requests-unixsocket
      184385ac
    • Jacob Vosmaer's avatar
      Merge branch 'shared-runner' into 'master' · 79fdf65c
      Jacob Vosmaer authored
      Adapt gitlab-ci.yml for shared runners
      
      After merging this we should disconnect the specific runner on gitlab-org/gitlab-shell.
      
      See merge request !27
      79fdf65c
    • Jacob Vosmaer's avatar
      Mess with PATH · 94babbbc
      Jacob Vosmaer authored
      94babbbc
    • Jacob Vosmaer's avatar
      Just install everything · 8bc03b34
      Jacob Vosmaer authored
      8bc03b34
    • Jacob Vosmaer's avatar
      Add apt-get update · e3331ff8
      Jacob Vosmaer authored
      e3331ff8
    • Jacob Vosmaer's avatar
      Install git-annex (as root) during tests · ebd89472
      Jacob Vosmaer authored
      ebd89472
    • Jacob Vosmaer's avatar
      Adapt gitlab-ci.yml for shared runners · c625bbd2
      Jacob Vosmaer authored
      c625bbd2
  2. 22 Oct, 2015 1 commit
  3. 21 Oct, 2015 2 commits
  4. 01 Oct, 2015 3 commits
  5. 29 Sep, 2015 1 commit
  6. 27 Sep, 2015 1 commit
  7. 10 Sep, 2015 2 commits
  8. 09 Sep, 2015 2 commits
  9. 08 Sep, 2015 1 commit
  10. 17 Aug, 2015 1 commit
    • Douwe Maan's avatar
      Merge branch 'create-hooks-broken-symlink' into 'master' · 836ace5b
      Douwe Maan authored
      Handle broken symlinks in create-hooks
      
      If a repository contained a broken symlink named 'hooks', this would
      raise ENOENT in lib/gitlab_projects.rb, which got ignored in
      bin/create-hooks. This commit fixes that by making sure we handle
      broken symlinks in lib/gitlab_projects.rb.
      
      See merge request !19
      836ace5b
  11. 12 Aug, 2015 1 commit
    • Jacob Vosmaer's avatar
      Handle broken symlinks in create-hooks · a10d4723
      Jacob Vosmaer authored
      If a repository contained a broken symlink named 'hooks', this would
      raise ENOENT in lib/gitlab_projects.rb, which got ignored in
      bin/create-hooks. This commit fixes that by making sure we handle
      broken symlinks in lib/gitlab_projects.rb.
      a10d4723
  12. 11 Aug, 2015 1 commit
  13. 05 Aug, 2015 2 commits
  14. 04 Aug, 2015 1 commit
  15. 17 Jul, 2015 2 commits
  16. 16 Jul, 2015 4 commits
  17. 06 Jul, 2015 1 commit
  18. 03 Jul, 2015 1 commit
  19. 01 Jul, 2015 2 commits
  20. 29 Jun, 2015 1 commit
  21. 15 Jun, 2015 1 commit