Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
923d2428
Commit
923d2428
authored
May 02, 2017
by
Mike Ricketts
Committed by
Rémy Coutable
May 02, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#31560 Add repo parameter to gitaly:install and workhorse:install
parent
d048d926
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
6 deletions
+21
-6
changelogs/unreleased/31560-workhose-gitaly-from-mirror.yml
changelogs/unreleased/31560-workhose-gitaly-from-mirror.yml
+4
-0
doc/install/installation.md
doc/install/installation.md
+11
-0
lib/tasks/gitlab/gitaly.rake
lib/tasks/gitlab/gitaly.rake
+3
-3
lib/tasks/gitlab/workhorse.rake
lib/tasks/gitlab/workhorse.rake
+3
-3
No files found.
changelogs/unreleased/31560-workhose-gitaly-from-mirror.yml
0 → 100644
View file @
923d2428
---
title
:
rickettm Add repo parameter to gitaly:install and workhorse:install rake tasks
merge_request
:
10979
author
:
M. Ricketts
doc/install/installation.md
View file @
923d2428
...
@@ -423,6 +423,11 @@ which is the recommended location.
...
@@ -423,6 +423,11 @@ which is the recommended location.
sudo -u git -H bundle exec rake "gitlab:workhorse:install[/home/git/gitlab-workhorse]" RAILS_ENV=production
sudo -u git -H bundle exec rake "gitlab:workhorse:install[/home/git/gitlab-workhorse]" RAILS_ENV=production
You can specify a different Git repository by providing it as an extra paramter:
sudo -u git -H bundle exec rake "gitlab:workhorse:install[/home/git/gitlab-workhorse,https://example.com/gitlab-workhorse.git]" RAILS_ENV=production
### Initialize Database and Activate Advanced Features
### Initialize Database and Activate Advanced Features
sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production
sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production
...
@@ -466,6 +471,12 @@ with setting up Gitaly until you upgrade to GitLab 9.2 or later.
...
@@ -466,6 +471,12 @@ with setting up Gitaly until you upgrade to GitLab 9.2 or later.
# Fetch Gitaly source with Git and compile with Go
# Fetch Gitaly source with Git and compile with Go
sudo -u git -H bundle exec rake "gitlab:gitaly:install[/home/git/gitaly]" RAILS_ENV=production
sudo -u git -H bundle exec rake "gitlab:gitaly:install[/home/git/gitaly]" RAILS_ENV=production
You can specify a different Git repository by providing it as an extra paramter:
sudo -u git -H bundle exec rake "gitlab:gitaly:install[/home/git/gitaly,https://example.com/gitaly.git]" RAILS_ENV=production
Next, make sure gitaly configured:
# Restrict Gitaly socket access
# Restrict Gitaly socket access
sudo chmod 0700 /home/git/gitlab/tmp/sockets/private
sudo chmod 0700 /home/git/gitlab/tmp/sockets/private
sudo chown git /home/git/gitlab/tmp/sockets/private
sudo chown git /home/git/gitlab/tmp/sockets/private
...
...
lib/tasks/gitlab/gitaly.rake
View file @
923d2428
namespace
:gitlab
do
namespace
:gitlab
do
namespace
:gitaly
do
namespace
:gitaly
do
desc
"GitLab | Install or upgrade gitaly"
desc
"GitLab | Install or upgrade gitaly"
task
:install
,
[
:dir
]
=>
:environment
do
|
t
,
args
|
task
:install
,
[
:dir
,
:repo
]
=>
:environment
do
|
t
,
args
|
require
'toml'
require
'toml'
warn_user_is_not_gitlab
warn_user_is_not_gitlab
unless
args
.
dir
.
present?
unless
args
.
dir
.
present?
abort
%(Please specify the directory where you want to install gitaly:\n rake "gitlab:gitaly:install[/home/git/gitaly]")
abort
%(Please specify the directory where you want to install gitaly:\n rake "gitlab:gitaly:install[/home/git/gitaly]")
end
end
args
.
with_defaults
(
repo:
'https://gitlab.com/gitlab-org/gitaly.git'
)
version
=
Gitlab
::
GitalyClient
.
expected_server_version
version
=
Gitlab
::
GitalyClient
.
expected_server_version
repo
=
'https://gitlab.com/gitlab-org/gitaly.git'
checkout_or_clone_version
(
version:
version
,
repo:
repo
,
target_dir:
args
.
dir
)
checkout_or_clone_version
(
version:
version
,
repo:
args
.
repo
,
target_dir:
args
.
dir
)
_
,
status
=
Gitlab
::
Popen
.
popen
(
%w[which gmake]
)
_
,
status
=
Gitlab
::
Popen
.
popen
(
%w[which gmake]
)
command
=
status
.
zero?
?
'gmake'
:
'make'
command
=
status
.
zero?
?
'gmake'
:
'make'
...
...
lib/tasks/gitlab/workhorse.rake
View file @
923d2428
namespace
:gitlab
do
namespace
:gitlab
do
namespace
:workhorse
do
namespace
:workhorse
do
desc
"GitLab | Install or upgrade gitlab-workhorse"
desc
"GitLab | Install or upgrade gitlab-workhorse"
task
:install
,
[
:dir
]
=>
:environment
do
|
t
,
args
|
task
:install
,
[
:dir
,
:repo
]
=>
:environment
do
|
t
,
args
|
warn_user_is_not_gitlab
warn_user_is_not_gitlab
unless
args
.
dir
.
present?
unless
args
.
dir
.
present?
abort
%(Please specify the directory where you want to install gitlab-workhorse:\n rake "gitlab:workhorse:install[/home/git/gitlab-workhorse]")
abort
%(Please specify the directory where you want to install gitlab-workhorse:\n rake "gitlab:workhorse:install[/home/git/gitlab-workhorse]")
end
end
args
.
with_defaults
(
repo:
'https://gitlab.com/gitlab-org/gitlab-workhorse.git'
)
version
=
Gitlab
::
Workhorse
.
version
version
=
Gitlab
::
Workhorse
.
version
repo
=
'https://gitlab.com/gitlab-org/gitlab-workhorse.git'
checkout_or_clone_version
(
version:
version
,
repo:
repo
,
target_dir:
args
.
dir
)
checkout_or_clone_version
(
version:
version
,
repo:
args
.
repo
,
target_dir:
args
.
dir
)
_
,
status
=
Gitlab
::
Popen
.
popen
(
%w[which gmake]
)
_
,
status
=
Gitlab
::
Popen
.
popen
(
%w[which gmake]
)
command
=
status
.
zero?
?
'gmake'
:
'make'
command
=
status
.
zero?
?
'gmake'
:
'make'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment