Commit 0bf68c0c authored by Robert Speicher's avatar Robert Speicher

Merge branch 'workhorse-path' into 'master'

Init script changes for gitlab-workhorse in 8.4

Goes with https://gitlab.com/gitlab-org/gitlab-workhorse/merge_requests/31

Also bumps gitlab-workhorse to 0.6.1.

[ci skip]

See merge request !2529
parents 597d3bbe 1c1590a5
...@@ -48,7 +48,7 @@ which should already be on your system from GitLab 8.1. ...@@ -48,7 +48,7 @@ which should already be on your system from GitLab 8.1.
```bash ```bash
cd /home/git/gitlab-workhorse cd /home/git/gitlab-workhorse
sudo -u git -H git fetch --all sudo -u git -H git fetch --all
sudo -u git -H git checkout 0.6.0 sudo -u git -H git checkout 0.6.1
sudo -u git -H make sudo -u git -H make
``` ```
...@@ -104,10 +104,7 @@ via [/etc/default/gitlab]. ...@@ -104,10 +104,7 @@ via [/etc/default/gitlab].
#### Init script #### Init script
We updated the init script for GitLab in order to pass new We updated the init script for GitLab in order to set a specific PATH for gitlab-workhorse.
configuration options to gitlab-workhorse. We let gitlab-workhorse
connect to the Rails application via a Unix domain socket and we tell
it where the 'public' directory of GitLab is.
``` ```
cd /home/git/gitlab cd /home/git/gitlab
......
...@@ -38,6 +38,7 @@ web_server_pid_path="$pid_path/unicorn.pid" ...@@ -38,6 +38,7 @@ web_server_pid_path="$pid_path/unicorn.pid"
sidekiq_pid_path="$pid_path/sidekiq.pid" sidekiq_pid_path="$pid_path/sidekiq.pid"
mail_room_enabled=false mail_room_enabled=false
mail_room_pid_path="$pid_path/mail_room.pid" mail_room_pid_path="$pid_path/mail_room.pid"
gitlab_workhorse_dir=$(cd $app_root/../gitlab-workhorse && pwd)
gitlab_workhorse_pid_path="$pid_path/gitlab-workhorse.pid" gitlab_workhorse_pid_path="$pid_path/gitlab-workhorse.pid"
gitlab_workhorse_options="-listenUmask 0 -listenNetwork unix -listenAddr $socket_path/gitlab-workhorse.socket -authBackend http://127.0.0.1:8080 -authSocket $rails_socket -documentRoot $app_root/public" gitlab_workhorse_options="-listenUmask 0 -listenNetwork unix -listenAddr $socket_path/gitlab-workhorse.socket -authBackend http://127.0.0.1:8080 -authSocket $rails_socket -documentRoot $app_root/public"
gitlab_workhorse_log="$app_root/log/gitlab-workhorse.log" gitlab_workhorse_log="$app_root/log/gitlab-workhorse.log"
...@@ -233,10 +234,12 @@ start_gitlab() { ...@@ -233,10 +234,12 @@ start_gitlab() {
if [ "$gitlab_workhorse_status" = "0" ]; then if [ "$gitlab_workhorse_status" = "0" ]; then
echo "The gitlab-workhorse is already running with pid $spid, not restarting" echo "The gitlab-workhorse is already running with pid $spid, not restarting"
else else
# No need to remove a socket, gitlab-workhorse does this itself # No need to remove a socket, gitlab-workhorse does this itself.
# Because gitlab-workhorse has multiple executables we need to fix
# the PATH.
$app_root/bin/daemon_with_pidfile $gitlab_workhorse_pid_path \ $app_root/bin/daemon_with_pidfile $gitlab_workhorse_pid_path \
$app_root/../gitlab-workhorse/gitlab-workhorse \ /usr/bin/env PATH=$gitlab_workhorse_dir:$PATH \
$gitlab_workhorse_options \ gitlab-workhorse $gitlab_workhorse_options \
>> $gitlab_workhorse_log 2>&1 & >> $gitlab_workhorse_log 2>&1 &
fi fi
......
...@@ -30,6 +30,9 @@ web_server_pid_path="$pid_path/unicorn.pid" ...@@ -30,6 +30,9 @@ web_server_pid_path="$pid_path/unicorn.pid"
# The default is "$pid_path/sidekiq.pid" # The default is "$pid_path/sidekiq.pid"
sidekiq_pid_path="$pid_path/sidekiq.pid" sidekiq_pid_path="$pid_path/sidekiq.pid"
# The directory where the gitlab-workhorse binaries are. Usually
# /home/git/gitlab-workhorse .
gitlab_workhorse_dir=$(cd $app_root/../gitlab-workhorse && pwd)
gitlab_workhorse_pid_path="$pid_path/gitlab-workhorse.pid" gitlab_workhorse_pid_path="$pid_path/gitlab-workhorse.pid"
# The -listenXxx settings determine where gitlab-workhorse # The -listenXxx settings determine where gitlab-workhorse
# listens for connections from NGINX. To listen on localhost:8181, write # listens for connections from NGINX. To listen on localhost:8181, write
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment