Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
fd11748fe8
commit
88141b43d5
|
|
@ -1,9 +1,6 @@
|
||||||
- if @page&.persisted?
|
- if @page&.persisted?
|
||||||
- if can?(current_user, :create_wiki, @wiki.container)
|
|
||||||
= link_to wiki_path(@wiki, action: :new), class: "btn gl-button btn-success", role: "button", data: { qa_selector: 'new_page_button' } do
|
|
||||||
= s_("Wiki|New page")
|
|
||||||
= link_to wiki_page_path(@wiki, @page, action: :history), class: "btn gl-button", role: "button", data: { qa_selector: 'page_history_button' } do
|
= link_to wiki_page_path(@wiki, @page, action: :history), class: "btn gl-button", role: "button", data: { qa_selector: 'page_history_button' } do
|
||||||
= s_("Wiki|Page history")
|
= s_("Wiki|Page history")
|
||||||
- if can?(current_user, :create_wiki, @wiki.container) && @page.latest? && @valid_encoding
|
- if can?(current_user, :create_wiki, @wiki.container)
|
||||||
= link_to wiki_page_path(@wiki, @page, action: :edit), class: "btn gl-button js-wiki-edit", role: "button", data: { qa_selector: 'edit_page_button' } do
|
= link_to wiki_path(@wiki, action: :new), class: "btn gl-button btn-success btn-inverted", role: "button", data: { qa_selector: 'new_page_button' } do
|
||||||
= _("Edit")
|
= s_("Wiki|New page")
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,11 @@
|
||||||
= (s_("WikiHistoricalPage|You can view the %{most_recent_link} or browse the %{history_link}.") % { most_recent_link: most_recent_link, history_link: history_link }).html_safe
|
= (s_("WikiHistoricalPage|You can view the %{most_recent_link} or browse the %{history_link}.") % { most_recent_link: most_recent_link, history_link: history_link }).html_safe
|
||||||
|
|
||||||
.gl-mt-5.gl-mb-3
|
.gl-mt-5.gl-mb-3
|
||||||
%h2.gl-mt-0.gl-mb-5{ data: { qa_selector: 'wiki_page_title', testid: 'wiki_page_title' } }= @page.human_title
|
.gl-display-flex.gl-justify-content-space-between
|
||||||
|
%h2.gl-mt-0.gl-mb-5{ data: { qa_selector: 'wiki_page_title', testid: 'wiki_page_title' } }= @page.human_title
|
||||||
|
%div
|
||||||
|
- if can?(current_user, :create_wiki, @wiki.container) && @page.latest? && @valid_encoding
|
||||||
|
= link_to sprite_icon('pencil', css_class: 'gl-icon'), wiki_page_path(@wiki, @page, action: :edit), title: 'Edit', role: "button", class: 'btn gl-button btn-icon btn-default js-wiki-edit', data: { qa_selector: 'edit_page_button', testid: 'wiki_edit_button' }
|
||||||
.js-wiki-page-content.md.gl-pt-2{ data: { qa_selector: 'wiki_page_content', testid: 'wiki_page_content', tracking_context: wiki_page_tracking_context(@page).to_json } }
|
.js-wiki-page-content.md.gl-pt-2{ data: { qa_selector: 'wiki_page_content', testid: 'wiki_page_content', tracking_context: wiki_page_tracking_context(@page).to_json } }
|
||||||
= render_wiki_content(@page)
|
= render_wiki_content(@page)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,9 @@ class BackgroundMigrationWorker # rubocop:disable Scalability/IdempotentWorker
|
||||||
#
|
#
|
||||||
# class_name - The class name of the background migration to run.
|
# class_name - The class name of the background migration to run.
|
||||||
# arguments - The arguments to pass to the migration class.
|
# arguments - The arguments to pass to the migration class.
|
||||||
def perform(class_name, arguments = [])
|
# lease_attempts - The number of times we will try to obtain an exclusive
|
||||||
|
# lease on the class before running anyway. Pass 0 to always run.
|
||||||
|
def perform(class_name, arguments = [], lease_attempts = 5)
|
||||||
with_context(caller_id: class_name.to_s) do
|
with_context(caller_id: class_name.to_s) do
|
||||||
should_perform, ttl = perform_and_ttl(class_name)
|
should_perform, ttl = perform_and_ttl(class_name)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Add support for manual bridges for CI pipelines
|
||||||
|
merge_request: 45368
|
||||||
|
author:
|
||||||
|
type: added
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Move wiki edit button inline with wiki title
|
||||||
|
merge_request: 44391
|
||||||
|
author:
|
||||||
|
type: changed
|
||||||
|
|
@ -4,4 +4,4 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/44011
|
||||||
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/263412
|
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/263412
|
||||||
type: development
|
type: development
|
||||||
group: group::pipeline authoring
|
group: group::pipeline authoring
|
||||||
default_enabled: false
|
default_enabled: true
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
name: two_factor_for_cli
|
||||||
|
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/39703
|
||||||
|
rollout_issue_url:
|
||||||
|
type: development
|
||||||
|
group: group::access
|
||||||
|
default_enabled: false
|
||||||
|
|
@ -248,14 +248,11 @@ with the other servers.
|
||||||
|
|
||||||
To configure Consul:
|
To configure Consul:
|
||||||
|
|
||||||
1. SSH into the server that will host Consul.
|
1. SSH in to the server that will host Consul.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
Omnibus GitLab Enterprise Edition package using **steps 1 and 2** from the
|
package of your choice. Be sure to both follow _only_ installation steps 1 and 2
|
||||||
GitLab downloads page.
|
on the page, and to select the correct Omnibus GitLab package, with the same version
|
||||||
- Make sure you select the correct Omnibus package, with the same version
|
and type (Community or Enterprise editions) as your current install.
|
||||||
the GitLab application is running.
|
|
||||||
- Do not complete any other steps on the download page.
|
|
||||||
|
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
@ -352,7 +349,7 @@ in the second step, do not supply the `EXTERNAL_URL` value.
|
||||||
|
|
||||||
#### PostgreSQL primary node
|
#### PostgreSQL primary node
|
||||||
|
|
||||||
1. SSH into the PostgreSQL primary node.
|
1. SSH in to the PostgreSQL primary node.
|
||||||
1. Generate a password hash for the PostgreSQL username/password pair. This assumes you will use the default
|
1. Generate a password hash for the PostgreSQL username/password pair. This assumes you will use the default
|
||||||
username of `gitlab` (recommended). The command will request a password
|
username of `gitlab` (recommended). The command will request a password
|
||||||
and confirmation. Use the value that is output by this command in the next
|
and confirmation. Use the value that is output by this command in the next
|
||||||
|
|
@ -513,7 +510,7 @@ are supported and can be added if needed.
|
||||||
|
|
||||||
#### PostgreSQL post-configuration
|
#### PostgreSQL post-configuration
|
||||||
|
|
||||||
SSH into the **primary node**:
|
SSH in to the **primary node**:
|
||||||
|
|
||||||
1. Open a database prompt:
|
1. Open a database prompt:
|
||||||
|
|
||||||
|
|
@ -548,7 +545,7 @@ SSH into the **primary node**:
|
||||||
is not an IP address, it will need to be a resolvable name (via DNS or
|
is not an IP address, it will need to be a resolvable name (via DNS or
|
||||||
`/etc/hosts`)
|
`/etc/hosts`)
|
||||||
|
|
||||||
SSH into the **secondary node**:
|
SSH in to the **secondary node**:
|
||||||
|
|
||||||
1. Set up the repmgr standby:
|
1. Set up the repmgr standby:
|
||||||
|
|
||||||
|
|
@ -815,13 +812,11 @@ a node and change its status from primary to replica (and vice versa).
|
||||||
|
|
||||||
#### Configure the primary Redis Cache node
|
#### Configure the primary Redis Cache node
|
||||||
|
|
||||||
1. SSH into the **Primary** Redis server.
|
1. SSH in to the **Primary** Redis server.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the Omnibus GitLab
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
package you want using **steps 1 and 2** from the GitLab downloads page.
|
package of your choice. Be sure to both follow _only_ installation steps 1 and 2
|
||||||
- Make sure you select the correct Omnibus package, with the same version
|
on the page, and to select the correct Omnibus GitLab package, with the same version
|
||||||
and type (Community, Enterprise editions) of your current install.
|
and type (Community or Enterprise editions) as your current install.
|
||||||
- Do not complete any other steps on the download page.
|
|
||||||
|
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
@ -871,13 +866,11 @@ You can specify multiple roles, like sentinel and Redis, as:
|
||||||
|
|
||||||
#### Configure the replica Redis Cache nodes
|
#### Configure the replica Redis Cache nodes
|
||||||
|
|
||||||
1. SSH into the **replica** Redis server.
|
1. SSH in to the **replica** Redis server.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the Omnibus GitLab
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
package you want using **steps 1 and 2** from the GitLab downloads page.
|
package of your choice. Be sure to both follow _only_ installation steps 1 and 2
|
||||||
- Make sure you select the correct Omnibus package, with the same version
|
on the page, and to select the correct Omnibus GitLab package, with the same version
|
||||||
and type (Community, Enterprise editions) of your current install.
|
and type (Community or Enterprise editions) as your current install.
|
||||||
- Do not complete any other steps on the download page.
|
|
||||||
|
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
@ -965,14 +958,11 @@ clients to report `NOAUTH Authentication required.`.
|
||||||
|
|
||||||
To configure the Sentinel Cache server:
|
To configure the Sentinel Cache server:
|
||||||
|
|
||||||
1. SSH into the server that will host Consul/Sentinel.
|
1. SSH in to the server that will host Consul/Sentinel.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
Omnibus GitLab Enterprise Edition package using **steps 1 and 2** from the
|
package of your choice. Be sure to both follow _only_ installation steps 1 and 2
|
||||||
GitLab downloads page.
|
on the page, and to select the correct Omnibus GitLab package, with the same version
|
||||||
- Make sure you select the correct Omnibus package, with the same version
|
and type (Community or Enterprise editions) as your current install.
|
||||||
the GitLab application is running.
|
|
||||||
- Do not complete any other steps on the download page.
|
|
||||||
|
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
@ -1081,13 +1071,11 @@ a node and change its status from primary to replica (and vice versa).
|
||||||
|
|
||||||
#### Configure the primary Redis Queues node
|
#### Configure the primary Redis Queues node
|
||||||
|
|
||||||
1. SSH into the **Primary** Redis server.
|
1. SSH in to the **Primary** Redis server.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the Omnibus GitLab
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
package you want using **steps 1 and 2** from the GitLab downloads page.
|
package of your choice. Be sure to both follow _only_ installation steps 1 and 2
|
||||||
- Make sure you select the correct Omnibus package, with the same version
|
on the page, and to select the correct Omnibus GitLab package, with the same version
|
||||||
and type (Community, Enterprise editions) of your current install.
|
and type (Community or Enterprise editions) as your current install.
|
||||||
- Do not complete any other steps on the download page.
|
|
||||||
|
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
@ -1142,13 +1130,11 @@ You can specify multiple roles, like sentinel and Redis, as:
|
||||||
|
|
||||||
#### Configure the replica Redis Queues nodes
|
#### Configure the replica Redis Queues nodes
|
||||||
|
|
||||||
1. SSH into the **replica** Redis Queue server.
|
1. SSH in to the **replica** Redis Queue server.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the Omnibus GitLab
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
package you want using **steps 1 and 2** from the GitLab downloads page.
|
package of your choice. Be sure to both follow _only_ installation steps 1 and 2
|
||||||
- Make sure you select the correct Omnibus package, with the same version
|
on the page, and to select the correct Omnibus GitLab package, with the same version
|
||||||
and type (Community, Enterprise editions) of your current install.
|
and type (Community or Enterprise editions) as your current install.
|
||||||
- Do not complete any other steps on the download page.
|
|
||||||
|
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
@ -1236,14 +1222,11 @@ clients to report `NOAUTH Authentication required.`.
|
||||||
|
|
||||||
To configure the Sentinel Queues server:
|
To configure the Sentinel Queues server:
|
||||||
|
|
||||||
1. SSH into the server that will host Sentinel.
|
1. SSH in to the server that will host Sentinel.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
Omnibus GitLab Enterprise Edition package using **steps 1 and 2** from the
|
package of your choice. Be sure to both follow _only_ installation steps 1 and 2
|
||||||
GitLab downloads page.
|
on the page, and to select the correct Omnibus GitLab package, with the same version
|
||||||
- Make sure you select the correct Omnibus package, with the same version
|
and type (Community or Enterprise editions) as your current install.
|
||||||
the GitLab application is running.
|
|
||||||
- Do not complete any other steps on the download page.
|
|
||||||
|
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
@ -1402,8 +1385,8 @@ and that your GitLab installation has three repository storages:
|
||||||
On each node:
|
On each node:
|
||||||
|
|
||||||
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
package you want (based on _steps 1 and 2_ on the GitLab downloads page), but
|
package of your choice. Be sure to follow _only_ installation steps 1 and 2
|
||||||
_without_ providing the `EXTERNAL_URL` value.
|
on the page, and _do not_ provide the `EXTERNAL_URL` value.
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` to configure the storage paths, enable
|
1. Edit `/etc/gitlab/gitlab.rb` to configure the storage paths, enable
|
||||||
the network listener, and configure the token:
|
the network listener, and configure the token:
|
||||||
|
|
||||||
|
|
@ -1565,10 +1548,10 @@ The following IPs will be used as an example:
|
||||||
|
|
||||||
To configure the Sidekiq nodes, on each one:
|
To configure the Sidekiq nodes, on each one:
|
||||||
|
|
||||||
1. SSH into the Sidekiq server.
|
1. SSH in to the Sidekiq server.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the Omnibus GitLab package
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
you want using steps 1 and 2 from the GitLab downloads page.
|
package of your choice. Be sure to follow _only_ installation steps 1 and 2
|
||||||
**Do not complete any other steps on the download page.**
|
on the page.
|
||||||
1. Open `/etc/gitlab/gitlab.rb` with your editor:
|
1. Open `/etc/gitlab/gitlab.rb` with your editor:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
@ -1702,10 +1685,9 @@ The following IPs will be used as an example:
|
||||||
|
|
||||||
On each node perform the following:
|
On each node perform the following:
|
||||||
|
|
||||||
1. Download and install Omnibus GitLab using **steps 1 and 2** from
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
[GitLab downloads](https://about.gitlab.com/install/). Do not complete other
|
package of your choice. Be sure to follow _only_ installation steps 1 and 2
|
||||||
steps on the download page.
|
on the page.
|
||||||
|
|
||||||
1. Copy the `/etc/gitlab/gitlab-secrets.json` file from your Consul server, and replace
|
1. Copy the `/etc/gitlab/gitlab-secrets.json` file from your Consul server, and replace
|
||||||
the file of the same name on this server. If that file is not on this server,
|
the file of the same name on this server. If that file is not on this server,
|
||||||
add the file from your Consul server to this server.
|
add the file from your Consul server to this server.
|
||||||
|
|
@ -1905,11 +1887,10 @@ The following IP will be used as an example:
|
||||||
|
|
||||||
To configure the Monitoring node:
|
To configure the Monitoring node:
|
||||||
|
|
||||||
1. SSH into the Monitoring node.
|
1. SSH in to the Monitoring node.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the Omnibus GitLab
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
package you want using **steps 1 and 2** from the GitLab downloads page.
|
package of your choice. Be sure to follow _only_ installation steps 1 and 2
|
||||||
Do not complete any other steps on the download page.
|
on the page.
|
||||||
|
|
||||||
1. Copy the `/etc/gitlab/gitlab-secrets.json` file from your Consul server, and replace
|
1. Copy the `/etc/gitlab/gitlab-secrets.json` file from your Consul server, and replace
|
||||||
the file of the same name on this server. If that file is not on this server,
|
the file of the same name on this server. If that file is not on this server,
|
||||||
add the file from your Consul server to this server.
|
add the file from your Consul server to this server.
|
||||||
|
|
|
||||||
|
|
@ -248,14 +248,11 @@ with the other servers.
|
||||||
|
|
||||||
To configure Consul:
|
To configure Consul:
|
||||||
|
|
||||||
1. SSH into the server that will host Consul.
|
1. SSH in to the server that will host Consul.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
Omnibus GitLab Enterprise Edition package using **steps 1 and 2** from the
|
package of your choice. Be sure to both follow _only_ installation steps 1 and 2
|
||||||
GitLab downloads page.
|
on the page, and to select the correct Omnibus GitLab package, with the same version
|
||||||
- Make sure you select the correct Omnibus package, with the same version
|
and type (Community or Enterprise editions) as your current install.
|
||||||
the GitLab application is running.
|
|
||||||
- Do not complete any other steps on the download page.
|
|
||||||
|
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
@ -352,7 +349,7 @@ in the second step, do not supply the `EXTERNAL_URL` value.
|
||||||
|
|
||||||
#### PostgreSQL primary node
|
#### PostgreSQL primary node
|
||||||
|
|
||||||
1. SSH into the PostgreSQL primary node.
|
1. SSH in to the PostgreSQL primary node.
|
||||||
1. Generate a password hash for the PostgreSQL username/password pair. This assumes you will use the default
|
1. Generate a password hash for the PostgreSQL username/password pair. This assumes you will use the default
|
||||||
username of `gitlab` (recommended). The command will request a password
|
username of `gitlab` (recommended). The command will request a password
|
||||||
and confirmation. Use the value that is output by this command in the next
|
and confirmation. Use the value that is output by this command in the next
|
||||||
|
|
@ -513,7 +510,7 @@ are supported and can be added if needed.
|
||||||
|
|
||||||
#### PostgreSQL post-configuration
|
#### PostgreSQL post-configuration
|
||||||
|
|
||||||
SSH into the **primary node**:
|
SSH in to the **primary node**:
|
||||||
|
|
||||||
1. Open a database prompt:
|
1. Open a database prompt:
|
||||||
|
|
||||||
|
|
@ -548,7 +545,7 @@ SSH into the **primary node**:
|
||||||
is not an IP address, it will need to be a resolvable name (via DNS or
|
is not an IP address, it will need to be a resolvable name (via DNS or
|
||||||
`/etc/hosts`)
|
`/etc/hosts`)
|
||||||
|
|
||||||
SSH into the **secondary node**:
|
SSH in to the **secondary node**:
|
||||||
|
|
||||||
1. Set up the repmgr standby:
|
1. Set up the repmgr standby:
|
||||||
|
|
||||||
|
|
@ -815,13 +812,11 @@ a node and change its status from primary to replica (and vice versa).
|
||||||
|
|
||||||
#### Configure the primary Redis Cache node
|
#### Configure the primary Redis Cache node
|
||||||
|
|
||||||
1. SSH into the **Primary** Redis server.
|
1. SSH in to the **Primary** Redis server.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the Omnibus GitLab
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
package you want using **steps 1 and 2** from the GitLab downloads page.
|
package of your choice. Be sure to both follow _only_ installation steps 1 and 2
|
||||||
- Make sure you select the correct Omnibus package, with the same version
|
on the page, and to select the correct Omnibus GitLab package, with the same version
|
||||||
and type (Community, Enterprise editions) of your current install.
|
and type (Community or Enterprise editions) as your current install.
|
||||||
- Do not complete any other steps on the download page.
|
|
||||||
|
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
@ -871,13 +866,11 @@ You can specify multiple roles, like sentinel and Redis, as:
|
||||||
|
|
||||||
#### Configure the replica Redis Cache nodes
|
#### Configure the replica Redis Cache nodes
|
||||||
|
|
||||||
1. SSH into the **replica** Redis server.
|
1. SSH in to the **replica** Redis server.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the Omnibus GitLab
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
package you want using **steps 1 and 2** from the GitLab downloads page.
|
package of your choice. Be sure to both follow _only_ installation steps 1 and 2
|
||||||
- Make sure you select the correct Omnibus package, with the same version
|
on the page, and to select the correct Omnibus GitLab package, with the same version
|
||||||
and type (Community, Enterprise editions) of your current install.
|
and type (Community or Enterprise editions) as your current install.
|
||||||
- Do not complete any other steps on the download page.
|
|
||||||
|
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
@ -965,14 +958,11 @@ clients to report `NOAUTH Authentication required.`.
|
||||||
|
|
||||||
To configure the Sentinel Cache server:
|
To configure the Sentinel Cache server:
|
||||||
|
|
||||||
1. SSH into the server that will host Consul/Sentinel.
|
1. SSH in to the server that will host Consul/Sentinel.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
Omnibus GitLab Enterprise Edition package using **steps 1 and 2** from the
|
package of your choice. Be sure to both follow _only_ installation steps 1 and 2
|
||||||
GitLab downloads page.
|
on the page, and to select the correct Omnibus GitLab package, with the same version
|
||||||
- Make sure you select the correct Omnibus package, with the same version
|
and type (Community or Enterprise editions) as your current install.
|
||||||
the GitLab application is running.
|
|
||||||
- Do not complete any other steps on the download page.
|
|
||||||
|
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
@ -1081,13 +1071,11 @@ a node and change its status from primary to replica (and vice versa).
|
||||||
|
|
||||||
#### Configure the primary Redis Queues node
|
#### Configure the primary Redis Queues node
|
||||||
|
|
||||||
1. SSH into the **Primary** Redis server.
|
1. SSH in to the **Primary** Redis server.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the Omnibus GitLab
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
package you want using **steps 1 and 2** from the GitLab downloads page.
|
package of your choice. Be sure to both follow _only_ installation steps 1 and 2
|
||||||
- Make sure you select the correct Omnibus package, with the same version
|
on the page, and to select the correct Omnibus GitLab package, with the same version
|
||||||
and type (Community, Enterprise editions) of your current install.
|
and type (Community or Enterprise editions) as your current install.
|
||||||
- Do not complete any other steps on the download page.
|
|
||||||
|
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
@ -1142,13 +1130,11 @@ You can specify multiple roles, like sentinel and Redis, as:
|
||||||
|
|
||||||
#### Configure the replica Redis Queues nodes
|
#### Configure the replica Redis Queues nodes
|
||||||
|
|
||||||
1. SSH into the **replica** Redis Queue server.
|
1. SSH in to the **replica** Redis Queue server.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the Omnibus GitLab
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
package you want using **steps 1 and 2** from the GitLab downloads page.
|
package of your choice. Be sure to both follow _only_ installation steps 1 and 2
|
||||||
- Make sure you select the correct Omnibus package, with the same version
|
on the page, and to select the correct Omnibus GitLab package, with the same version
|
||||||
and type (Community, Enterprise editions) of your current install.
|
and type (Community or Enterprise editions) as your current install.
|
||||||
- Do not complete any other steps on the download page.
|
|
||||||
|
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
@ -1236,14 +1222,11 @@ clients to report `NOAUTH Authentication required.`.
|
||||||
|
|
||||||
To configure the Sentinel Queues server:
|
To configure the Sentinel Queues server:
|
||||||
|
|
||||||
1. SSH into the server that will host Sentinel.
|
1. SSH in to the server that will host Sentinel.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
Omnibus GitLab Enterprise Edition package using **steps 1 and 2** from the
|
package of your choice. Be sure to both follow _only_ installation steps 1 and 2
|
||||||
GitLab downloads page.
|
on the page, and to select the correct Omnibus package, with the same version
|
||||||
- Make sure you select the correct Omnibus package, with the same version
|
and type (Community or Enterprise editions) as your current install.
|
||||||
the GitLab application is running.
|
|
||||||
- Do not complete any other steps on the download page.
|
|
||||||
|
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
@ -1402,8 +1385,8 @@ and that your GitLab installation has three repository storages:
|
||||||
On each node:
|
On each node:
|
||||||
|
|
||||||
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
package you want (based on _steps 1 and 2_ on the GitLab downloads page), but
|
package of your choice. Be sure to follow _only_ installation steps 1 and 2
|
||||||
_without_ providing the `EXTERNAL_URL` value.
|
on the page, and _do not_ provide the `EXTERNAL_URL` value.
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` to configure the storage paths, enable
|
1. Edit `/etc/gitlab/gitlab.rb` to configure the storage paths, enable
|
||||||
the network listener, and configure the token:
|
the network listener, and configure the token:
|
||||||
|
|
||||||
|
|
@ -1565,10 +1548,10 @@ The following IPs will be used as an example:
|
||||||
|
|
||||||
To configure the Sidekiq nodes, on each one:
|
To configure the Sidekiq nodes, on each one:
|
||||||
|
|
||||||
1. SSH into the Sidekiq server.
|
1. SSH in to the Sidekiq server.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the Omnibus GitLab package
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
you want using steps 1 and 2 from the GitLab downloads page.
|
package of your choice. Be sure to follow _only_ installation steps 1 and 2
|
||||||
**Do not complete any other steps on the download page.**
|
on the page.
|
||||||
1. Open `/etc/gitlab/gitlab.rb` with your editor:
|
1. Open `/etc/gitlab/gitlab.rb` with your editor:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
@ -1702,10 +1685,9 @@ The following IPs will be used as an example:
|
||||||
|
|
||||||
On each node perform the following:
|
On each node perform the following:
|
||||||
|
|
||||||
1. Download and install Omnibus GitLab using **steps 1 and 2** from
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
[GitLab downloads](https://about.gitlab.com/install/). Do not complete other
|
package of your choice. Be sure to follow _only_ installation steps 1 and 2
|
||||||
steps on the download page.
|
on the page.
|
||||||
|
|
||||||
1. Copy the `/etc/gitlab/gitlab-secrets.json` file from your Consul server, and replace
|
1. Copy the `/etc/gitlab/gitlab-secrets.json` file from your Consul server, and replace
|
||||||
the file of the same name on this server. If that file is not on this server,
|
the file of the same name on this server. If that file is not on this server,
|
||||||
add the file from your Consul server to this server.
|
add the file from your Consul server to this server.
|
||||||
|
|
@ -1905,11 +1887,10 @@ The following IP will be used as an example:
|
||||||
|
|
||||||
To configure the Monitoring node:
|
To configure the Monitoring node:
|
||||||
|
|
||||||
1. SSH into the Monitoring node.
|
1. SSH in to the Monitoring node.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the Omnibus GitLab
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
package you want using **steps 1 and 2** from the GitLab downloads page.
|
package of your choice. Be sure to follow _only_ installation steps 1 and 2
|
||||||
Do not complete any other steps on the download page.
|
on the page.
|
||||||
|
|
||||||
1. Copy the `/etc/gitlab/gitlab-secrets.json` file from your Consul server, and replace
|
1. Copy the `/etc/gitlab/gitlab-secrets.json` file from your Consul server, and replace
|
||||||
the file of the same name on this server. If that file is not on this server,
|
the file of the same name on this server. If that file is not on this server,
|
||||||
add the file from your Consul server to this server.
|
add the file from your Consul server to this server.
|
||||||
|
|
|
||||||
|
|
@ -207,10 +207,10 @@ further configuration steps.
|
||||||
|
|
||||||
### Standalone PostgreSQL using Omnibus GitLab
|
### Standalone PostgreSQL using Omnibus GitLab
|
||||||
|
|
||||||
1. SSH into the PostgreSQL server.
|
1. SSH in to the PostgreSQL server.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the Omnibus GitLab
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
package you want using **steps 1 and 2** from the GitLab downloads page.
|
package of your choice. Be sure to follow _only_ installation steps 1 and 2
|
||||||
- Do not complete any other steps on the download page.
|
on the page.
|
||||||
1. Generate a password hash for PostgreSQL. This assumes you will use the default
|
1. Generate a password hash for PostgreSQL. This assumes you will use the default
|
||||||
username of `gitlab` (recommended). The command will request a password
|
username of `gitlab` (recommended). The command will request a password
|
||||||
and confirmation. Use the value that is output by this command in the next
|
and confirmation. Use the value that is output by this command in the next
|
||||||
|
|
@ -301,11 +301,10 @@ The Omnibus GitLab package can be used to configure a standalone Redis server.
|
||||||
The steps below are the minimum necessary to configure a Redis server with
|
The steps below are the minimum necessary to configure a Redis server with
|
||||||
Omnibus:
|
Omnibus:
|
||||||
|
|
||||||
1. SSH into the Redis server.
|
1. SSH in to the Redis server.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the Omnibus GitLab
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
package you want using **steps 1 and 2** from the GitLab downloads page.
|
package of your choice. Be sure to follow _only_ installation steps 1 and 2
|
||||||
- Do not complete any other steps on the download page.
|
on the page.
|
||||||
|
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
@ -394,12 +393,11 @@ The following procedure describes how to configure a single Gitaly server named
|
||||||
`gitaly1.internal` with the secret token `gitalysecret`. We assume your GitLab
|
`gitaly1.internal` with the secret token `gitalysecret`. We assume your GitLab
|
||||||
installation has two repository storages: `default` and `storage1`.
|
installation has two repository storages: `default` and `storage1`.
|
||||||
|
|
||||||
To configure the Gitaly server:
|
To configure the Gitaly server, on the server node you want to use for Gitaly:
|
||||||
|
|
||||||
1. On the server node you want to use for Gitaly,
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
[download and install](https://about.gitlab.com/install/) your selected
|
package of your choice. Be sure to follow _only_ installation steps 1 and 2
|
||||||
Omnibus GitLab package using *steps 1 and 2* from the GitLab downloads page,
|
on the page, and _do not_ provide the `EXTERNAL_URL` value.
|
||||||
but *without* providing the `EXTERNAL_URL` value.
|
|
||||||
1. Edit the Gitaly server node's `/etc/gitlab/gitlab.rb` file to configure
|
1. Edit the Gitaly server node's `/etc/gitlab/gitlab.rb` file to configure
|
||||||
storage paths, enable the network listener, and to configure the token:
|
storage paths, enable the network listener, and to configure the token:
|
||||||
|
|
||||||
|
|
@ -570,9 +568,9 @@ On each node perform the following:
|
||||||
mkdir -p /var/opt/gitlab/.ssh /var/opt/gitlab/gitlab-rails/uploads /var/opt/gitlab/gitlab-rails/shared /var/opt/gitlab/gitlab-ci/builds /var/opt/gitlab/git-data
|
mkdir -p /var/opt/gitlab/.ssh /var/opt/gitlab/gitlab-rails/uploads /var/opt/gitlab/gitlab-rails/shared /var/opt/gitlab/gitlab-ci/builds /var/opt/gitlab/git-data
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Download and install Omnibus GitLab using **steps 1 and 2** from
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
[GitLab downloads](https://about.gitlab.com/install/). Do not complete other
|
package of your choice. Be sure to follow _only_ installation steps 1 and 2
|
||||||
steps on the download page.
|
on the page.
|
||||||
1. Create or edit `/etc/gitlab/gitlab.rb` and use the following configuration.
|
1. Create or edit `/etc/gitlab/gitlab.rb` and use the following configuration.
|
||||||
To maintain uniformity of links across nodes, the `external_url`
|
To maintain uniformity of links across nodes, the `external_url`
|
||||||
on the application server should point to the external URL that users will use
|
on the application server should point to the external URL that users will use
|
||||||
|
|
@ -704,10 +702,10 @@ The Omnibus GitLab package can be used to configure a standalone Monitoring node
|
||||||
running [Prometheus](../monitoring/prometheus/index.md) and
|
running [Prometheus](../monitoring/prometheus/index.md) and
|
||||||
[Grafana](../monitoring/performance/grafana_configuration.md):
|
[Grafana](../monitoring/performance/grafana_configuration.md):
|
||||||
|
|
||||||
1. SSH into the Monitoring node.
|
1. SSH in to the Monitoring node.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the Omnibus GitLab
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
package you want using **steps 1 and 2** from the GitLab downloads page.
|
package of your choice. Be sure to follow _only_ installation steps 1 and 2
|
||||||
Do not complete any other steps on the download page.
|
on the page.
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
|
||||||
|
|
@ -285,12 +285,10 @@ a node and change its status from primary to replica (and vice versa).
|
||||||
#### Configuring the primary Redis instance
|
#### Configuring the primary Redis instance
|
||||||
|
|
||||||
1. SSH in to the **Primary** Redis server.
|
1. SSH in to the **Primary** Redis server.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the Omnibus GitLab
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
package you want using **steps 1 and 2** from the GitLab downloads page.
|
package of your choice. Be sure to both follow _only_ installation steps 1 and 2
|
||||||
- Make sure you select the correct Omnibus package, with the same version
|
on the page, and to select the correct Omnibus GitLab package, with the same version
|
||||||
and type (Community, Enterprise editions) of your current install.
|
and type (Community or Enterprise editions) as your current install.
|
||||||
- Do not complete any other steps on the download page.
|
|
||||||
|
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
@ -363,12 +361,10 @@ run: redis-exporter: (pid 30075) 76861s; run: log: (pid 29674) 76896s
|
||||||
#### Configuring the replica Redis instances
|
#### Configuring the replica Redis instances
|
||||||
|
|
||||||
1. SSH in to the **replica** Redis server.
|
1. SSH in to the **replica** Redis server.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the Omnibus GitLab
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
package you want using **steps 1 and 2** from the GitLab downloads page.
|
package of your choice. Be sure to both follow _only_ installation steps 1 and 2
|
||||||
- Make sure you select the correct Omnibus package, with the same version
|
on the page, and to select the correct Omnibus GitLab package, with the same version
|
||||||
and type (Community, Enterprise editions) of your current install.
|
and type (Community or Enterprise editions) as your current install.
|
||||||
- Do not complete any other steps on the download page.
|
|
||||||
|
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
@ -456,14 +452,11 @@ clients to report `NOAUTH Authentication required.`.
|
||||||
|
|
||||||
To configure the Sentinel:
|
To configure the Sentinel:
|
||||||
|
|
||||||
1. SSH into the server that will host Consul/Sentinel.
|
1. SSH in to the server that will host Consul/Sentinel.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
Omnibus GitLab Enterprise Edition package using **steps 1 and 2** from the
|
package of your choice. Be sure to both follow _only_ installation steps 1 and 2
|
||||||
GitLab downloads page.
|
on the page, and to select the correct Omnibus GitLab package, with the same version
|
||||||
- Make sure you select the correct Omnibus package, with the same version
|
and type (Community or Enterprise editions) as your current install.
|
||||||
the GitLab application is running.
|
|
||||||
- Do not complete any other steps on the download page.
|
|
||||||
|
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
@ -623,7 +616,7 @@ in the second step, do not supply the `EXTERNAL_URL` value.
|
||||||
|
|
||||||
#### PostgreSQL primary node
|
#### PostgreSQL primary node
|
||||||
|
|
||||||
1. SSH into the PostgreSQL primary node.
|
1. SSH in to the PostgreSQL primary node.
|
||||||
1. Generate a password hash for the PostgreSQL username/password pair. This assumes you will use the default
|
1. Generate a password hash for the PostgreSQL username/password pair. This assumes you will use the default
|
||||||
username of `gitlab` (recommended). The command will request a password
|
username of `gitlab` (recommended). The command will request a password
|
||||||
and confirmation. Use the value that is output by this command in the next
|
and confirmation. Use the value that is output by this command in the next
|
||||||
|
|
@ -808,7 +801,7 @@ are supported and can be added if needed.
|
||||||
|
|
||||||
#### PostgreSQL post-configuration
|
#### PostgreSQL post-configuration
|
||||||
|
|
||||||
SSH into the **primary node**:
|
SSH in to the **primary node**:
|
||||||
|
|
||||||
1. Open a database prompt:
|
1. Open a database prompt:
|
||||||
|
|
||||||
|
|
@ -844,7 +837,7 @@ SSH into the **primary node**:
|
||||||
is not an IP address, it will need to be a resolvable name (via DNS or
|
is not an IP address, it will need to be a resolvable name (via DNS or
|
||||||
`/etc/hosts`)
|
`/etc/hosts`)
|
||||||
|
|
||||||
SSH into the **secondary node**:
|
SSH in to the **secondary node**:
|
||||||
|
|
||||||
1. Set up the repmgr standby:
|
1. Set up the repmgr standby:
|
||||||
|
|
||||||
|
|
@ -1115,8 +1108,8 @@ and that your GitLab installation has three repository storages:
|
||||||
On each node:
|
On each node:
|
||||||
|
|
||||||
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
package you want (based on _steps 1 and 2_ on the GitLab downloads page), but
|
package of your choice. Be sure to follow _only_ installation steps 1 and 2
|
||||||
_without_ providing the `EXTERNAL_URL` value.
|
on the page, and _do not_ provide the `EXTERNAL_URL` value.
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` to configure the storage paths, enable
|
1. Edit `/etc/gitlab/gitlab.rb` to configure the storage paths, enable
|
||||||
the network listener, and configure the token:
|
the network listener, and configure the token:
|
||||||
|
|
||||||
|
|
@ -1309,10 +1302,10 @@ The following IPs will be used as an example:
|
||||||
|
|
||||||
To configure the Sidekiq nodes, one each one:
|
To configure the Sidekiq nodes, one each one:
|
||||||
|
|
||||||
1. SSH into the Sidekiq server.
|
1. SSH in to the Sidekiq server.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the Omnibus GitLab package
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
you want using steps 1 and 2 from the GitLab downloads page.
|
package of your choice. Be sure to follow _only_ installation steps 1 and 2
|
||||||
**Do not complete any other steps on the download page.**
|
on the page.
|
||||||
1. Open `/etc/gitlab/gitlab.rb` with your editor:
|
1. Open `/etc/gitlab/gitlab.rb` with your editor:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
@ -1458,9 +1451,9 @@ On each node perform the following:
|
||||||
mkdir -p /var/opt/gitlab/.ssh /var/opt/gitlab/gitlab-rails/uploads /var/opt/gitlab/gitlab-rails/shared /var/opt/gitlab/gitlab-ci/builds /var/opt/gitlab/git-data
|
mkdir -p /var/opt/gitlab/.ssh /var/opt/gitlab/gitlab-rails/uploads /var/opt/gitlab/gitlab-rails/shared /var/opt/gitlab/gitlab-ci/builds /var/opt/gitlab/git-data
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Download and install Omnibus GitLab using **steps 1 and 2** from
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
[GitLab downloads](https://about.gitlab.com/install/). Do not complete other
|
package of your choice. Be sure to follow _only_ installation steps 1 and 2
|
||||||
steps on the download page.
|
on the page.
|
||||||
1. Create or edit `/etc/gitlab/gitlab.rb` and use the following configuration.
|
1. Create or edit `/etc/gitlab/gitlab.rb` and use the following configuration.
|
||||||
To maintain uniformity of links across nodes, the `external_url`
|
To maintain uniformity of links across nodes, the `external_url`
|
||||||
on the application server should point to the external URL that users will use
|
on the application server should point to the external URL that users will use
|
||||||
|
|
@ -1630,10 +1623,10 @@ The Omnibus GitLab package can be used to configure a standalone Monitoring node
|
||||||
running [Prometheus](../monitoring/prometheus/index.md) and
|
running [Prometheus](../monitoring/prometheus/index.md) and
|
||||||
[Grafana](../monitoring/performance/grafana_configuration.md):
|
[Grafana](../monitoring/performance/grafana_configuration.md):
|
||||||
|
|
||||||
1. SSH into the Monitoring node.
|
1. SSH in to the Monitoring node.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the Omnibus GitLab
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
package you want using **steps 1 and 2** from the GitLab downloads page.
|
package of your choice. Be sure to follow _only_ installation steps 1 and 2
|
||||||
Do not complete any other steps on the download page.
|
on the page.
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
|
||||||
|
|
@ -248,14 +248,11 @@ with the other servers.
|
||||||
|
|
||||||
To configure Consul:
|
To configure Consul:
|
||||||
|
|
||||||
1. SSH into the server that will host Consul.
|
1. SSH in to the server that will host Consul.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
Omnibus GitLab Enterprise Edition package using **steps 1 and 2** from the
|
package of your choice. Be sure to both follow _only_ installation steps 1 and 2
|
||||||
GitLab downloads page.
|
on the page, and to select the correct Omnibus GitLab package, with the same version
|
||||||
- Make sure you select the correct Omnibus package, with the same version
|
and type (Community or Enterprise editions) as your current install.
|
||||||
the GitLab application is running.
|
|
||||||
- Do not complete any other steps on the download page.
|
|
||||||
|
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
@ -352,7 +349,7 @@ in the second step, do not supply the `EXTERNAL_URL` value.
|
||||||
|
|
||||||
#### PostgreSQL primary node
|
#### PostgreSQL primary node
|
||||||
|
|
||||||
1. SSH into the PostgreSQL primary node.
|
1. SSH in to the PostgreSQL primary node.
|
||||||
1. Generate a password hash for the PostgreSQL username/password pair. This assumes you will use the default
|
1. Generate a password hash for the PostgreSQL username/password pair. This assumes you will use the default
|
||||||
username of `gitlab` (recommended). The command will request a password
|
username of `gitlab` (recommended). The command will request a password
|
||||||
and confirmation. Use the value that is output by this command in the next
|
and confirmation. Use the value that is output by this command in the next
|
||||||
|
|
@ -513,7 +510,7 @@ are supported and can be added if needed.
|
||||||
|
|
||||||
#### PostgreSQL post-configuration
|
#### PostgreSQL post-configuration
|
||||||
|
|
||||||
SSH into the **primary node**:
|
SSH in to the **primary node**:
|
||||||
|
|
||||||
1. Open a database prompt:
|
1. Open a database prompt:
|
||||||
|
|
||||||
|
|
@ -548,7 +545,7 @@ SSH into the **primary node**:
|
||||||
is not an IP address, it will need to be a resolvable name (via DNS or
|
is not an IP address, it will need to be a resolvable name (via DNS or
|
||||||
`/etc/hosts`)
|
`/etc/hosts`)
|
||||||
|
|
||||||
SSH into the **secondary node**:
|
SSH in to the **secondary node**:
|
||||||
|
|
||||||
1. Set up the repmgr standby:
|
1. Set up the repmgr standby:
|
||||||
|
|
||||||
|
|
@ -815,13 +812,11 @@ a node and change its status from primary to replica (and vice versa).
|
||||||
|
|
||||||
#### Configure the primary Redis Cache node
|
#### Configure the primary Redis Cache node
|
||||||
|
|
||||||
1. SSH into the **Primary** Redis server.
|
1. SSH in to the **Primary** Redis server.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the Omnibus GitLab
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
package you want using **steps 1 and 2** from the GitLab downloads page.
|
package of your choice. Be sure to both follow _only_ installation steps 1 and 2
|
||||||
- Make sure you select the correct Omnibus package, with the same version
|
on the page, and to select the correct Omnibus GitLab package, with the same version
|
||||||
and type (Community, Enterprise editions) of your current install.
|
and type (Community or Enterprise editions) as your current install.
|
||||||
- Do not complete any other steps on the download page.
|
|
||||||
|
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
@ -871,13 +866,11 @@ You can specify multiple roles, like sentinel and Redis, as:
|
||||||
|
|
||||||
#### Configure the replica Redis Cache nodes
|
#### Configure the replica Redis Cache nodes
|
||||||
|
|
||||||
1. SSH into the **replica** Redis server.
|
1. SSH in to the **replica** Redis server.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the Omnibus GitLab
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
package you want using **steps 1 and 2** from the GitLab downloads page.
|
package of your choice. Be sure to both follow _only_ installation steps 1 and 2
|
||||||
- Make sure you select the correct Omnibus package, with the same version
|
on the page, and to select the correct Omnibus GitLab package, with the same version
|
||||||
and type (Community, Enterprise editions) of your current install.
|
and type (Community or Enterprise editions) as your current install.
|
||||||
- Do not complete any other steps on the download page.
|
|
||||||
|
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
@ -965,14 +958,11 @@ clients to report `NOAUTH Authentication required.`.
|
||||||
|
|
||||||
To configure the Sentinel Cache server:
|
To configure the Sentinel Cache server:
|
||||||
|
|
||||||
1. SSH into the server that will host Consul/Sentinel.
|
1. SSH in to the server that will host Consul/Sentinel.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
Omnibus GitLab Enterprise Edition package using **steps 1 and 2** from the
|
package of your choice. Be sure to both follow _only_ installation steps 1 and 2
|
||||||
GitLab downloads page.
|
on the page, and to select the correct Omnibus GitLab package, with the same version
|
||||||
- Make sure you select the correct Omnibus package, with the same version
|
and type (Community or Enterprise editions) as your current install.
|
||||||
the GitLab application is running.
|
|
||||||
- Do not complete any other steps on the download page.
|
|
||||||
|
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
@ -1081,13 +1071,11 @@ a node and change its status from primary to replica (and vice versa).
|
||||||
|
|
||||||
#### Configure the primary Redis Queues node
|
#### Configure the primary Redis Queues node
|
||||||
|
|
||||||
1. SSH into the **Primary** Redis server.
|
1. SSH in to the **Primary** Redis server.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the Omnibus GitLab
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
package you want using **steps 1 and 2** from the GitLab downloads page.
|
package of your choice. Be sure to both follow _only_ installation steps 1 and 2
|
||||||
- Make sure you select the correct Omnibus package, with the same version
|
on the page, and to select the correct Omnibus GitLab package, with the same version
|
||||||
and type (Community, Enterprise editions) of your current install.
|
and type (Community or Enterprise editions) as your current install.
|
||||||
- Do not complete any other steps on the download page.
|
|
||||||
|
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
@ -1142,13 +1130,11 @@ You can specify multiple roles, like sentinel and Redis, as:
|
||||||
|
|
||||||
#### Configure the replica Redis Queues nodes
|
#### Configure the replica Redis Queues nodes
|
||||||
|
|
||||||
1. SSH into the **replica** Redis Queue server.
|
1. SSH in to the **replica** Redis Queue server.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the Omnibus GitLab
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
package you want using **steps 1 and 2** from the GitLab downloads page.
|
package of your choice. Be sure to both follow _only_ installation steps 1 and 2
|
||||||
- Make sure you select the correct Omnibus package, with the same version
|
on the page, and to select the correct Omnibus GitLab package, with the same version
|
||||||
and type (Community, Enterprise editions) of your current install.
|
and type (Community or Enterprise editions) as your current install.
|
||||||
- Do not complete any other steps on the download page.
|
|
||||||
|
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
@ -1236,14 +1222,11 @@ clients to report `NOAUTH Authentication required.`.
|
||||||
|
|
||||||
To configure the Sentinel Queues server:
|
To configure the Sentinel Queues server:
|
||||||
|
|
||||||
1. SSH into the server that will host Sentinel.
|
1. SSH in to the server that will host Sentinel.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
Omnibus GitLab Enterprise Edition package using **steps 1 and 2** from the
|
package of your choice. Be sure to both follow _only_ installation steps 1 and 2
|
||||||
GitLab downloads page.
|
on the page, and to select the correct Omnibus GitLab package, with the same version
|
||||||
- Make sure you select the correct Omnibus package, with the same version
|
and type (Community or Enterprise editions) as your current install.
|
||||||
the GitLab application is running.
|
|
||||||
- Do not complete any other steps on the download page.
|
|
||||||
|
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
@ -1402,8 +1385,8 @@ and that your GitLab installation has three repository storages:
|
||||||
On each node:
|
On each node:
|
||||||
|
|
||||||
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
package you want (based on _steps 1 and 2_ on the GitLab downloads page), but
|
package of your choice. Be sure to follow _only_ installation steps 1 and 2
|
||||||
_without_ providing the `EXTERNAL_URL` value.
|
on the page, and _do not_ provide the `EXTERNAL_URL` value.
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` to configure the storage paths, enable
|
1. Edit `/etc/gitlab/gitlab.rb` to configure the storage paths, enable
|
||||||
the network listener, and configure the token:
|
the network listener, and configure the token:
|
||||||
|
|
||||||
|
|
@ -1565,10 +1548,10 @@ The following IPs will be used as an example:
|
||||||
|
|
||||||
To configure the Sidekiq nodes, on each one:
|
To configure the Sidekiq nodes, on each one:
|
||||||
|
|
||||||
1. SSH into the Sidekiq server.
|
1. SSH in to the Sidekiq server.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the Omnibus GitLab package
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
you want using steps 1 and 2 from the GitLab downloads page.
|
package of your choice. Be sure to follow _only_ installation steps 1 and 2
|
||||||
**Do not complete any other steps on the download page.**
|
on the page.
|
||||||
1. Open `/etc/gitlab/gitlab.rb` with your editor:
|
1. Open `/etc/gitlab/gitlab.rb` with your editor:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
@ -1702,10 +1685,9 @@ The following IPs will be used as an example:
|
||||||
|
|
||||||
On each node perform the following:
|
On each node perform the following:
|
||||||
|
|
||||||
1. Download and install Omnibus GitLab using **steps 1 and 2** from
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
[GitLab downloads](https://about.gitlab.com/install/). Do not complete other
|
package of your choice. Be sure to follow _only_ installation steps 1 and 2
|
||||||
steps on the download page.
|
on the page.
|
||||||
|
|
||||||
1. Copy the `/etc/gitlab/gitlab-secrets.json` file from your Consul server, and replace
|
1. Copy the `/etc/gitlab/gitlab-secrets.json` file from your Consul server, and replace
|
||||||
the file of the same name on this server. If that file is not on this server,
|
the file of the same name on this server. If that file is not on this server,
|
||||||
add the file from your Consul server to this server.
|
add the file from your Consul server to this server.
|
||||||
|
|
@ -1905,11 +1887,10 @@ The following IP will be used as an example:
|
||||||
|
|
||||||
To configure the Monitoring node:
|
To configure the Monitoring node:
|
||||||
|
|
||||||
1. SSH into the Monitoring node.
|
1. SSH in to the Monitoring node.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the Omnibus GitLab
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
package you want using **steps 1 and 2** from the GitLab downloads page.
|
package of your choice. Be sure to follow _only_ installation steps 1 and 2
|
||||||
Do not complete any other steps on the download page.
|
on the page.
|
||||||
|
|
||||||
1. Copy the `/etc/gitlab/gitlab-secrets.json` file from your Consul server, and replace
|
1. Copy the `/etc/gitlab/gitlab-secrets.json` file from your Consul server, and replace
|
||||||
the file of the same name on this server. If that file is not on this server,
|
the file of the same name on this server. If that file is not on this server,
|
||||||
add the file from your Consul server to this server.
|
add the file from your Consul server to this server.
|
||||||
|
|
|
||||||
|
|
@ -284,13 +284,11 @@ a node and change its status from primary to replica (and vice versa).
|
||||||
|
|
||||||
#### Configuring the primary Redis instance
|
#### Configuring the primary Redis instance
|
||||||
|
|
||||||
1. SSH into the **Primary** Redis server.
|
1. SSH in to the **Primary** Redis server.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the Omnibus GitLab
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
package you want using **steps 1 and 2** from the GitLab downloads page.
|
package of your choice. Be sure to both follow _only_ installation steps 1 and 2
|
||||||
- Make sure you select the correct Omnibus package, with the same version
|
on the page, and to select the correct Omnibus GitLab package, with the same version
|
||||||
and type (Community, Enterprise editions) of your current install.
|
and type (Community or Enterprise editions) as your current install.
|
||||||
- Do not complete any other steps on the download page.
|
|
||||||
|
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
@ -362,13 +360,11 @@ run: redis-exporter: (pid 30075) 76861s; run: log: (pid 29674) 76896s
|
||||||
|
|
||||||
#### Configuring the replica Redis instances
|
#### Configuring the replica Redis instances
|
||||||
|
|
||||||
1. SSH into the **replica** Redis server.
|
1. SSH in to the **replica** Redis server.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the Omnibus GitLab
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
package you want using **steps 1 and 2** from the GitLab downloads page.
|
package of your choice. Be sure to both follow _only_ installation steps 1 and 2
|
||||||
- Make sure you select the correct Omnibus package, with the same version
|
on the page, and to select the correct Omnibus GitLab package, with the same version
|
||||||
and type (Community, Enterprise editions) of your current install.
|
and type (Community or Enterprise editions) as your current install.
|
||||||
- Do not complete any other steps on the download page.
|
|
||||||
|
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
@ -456,14 +452,11 @@ clients to report `NOAUTH Authentication required.`.
|
||||||
|
|
||||||
To configure the Sentinel:
|
To configure the Sentinel:
|
||||||
|
|
||||||
1. SSH into the server that will host Consul/Sentinel.
|
1. SSH in to the server that will host Consul/Sentinel.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
Omnibus GitLab Enterprise Edition package using **steps 1 and 2** from the
|
package of your choice. Be sure to both follow _only_ installation steps 1 and 2
|
||||||
GitLab downloads page.
|
on the page, and to select the correct Omnibus GitLab package, with the same version
|
||||||
- Make sure you select the correct Omnibus package, with the same version
|
and type (Community or Enterprise editions) as your current install.
|
||||||
the GitLab application is running.
|
|
||||||
- Do not complete any other steps on the download page.
|
|
||||||
|
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
@ -623,7 +616,7 @@ in the second step, do not supply the `EXTERNAL_URL` value.
|
||||||
|
|
||||||
#### PostgreSQL primary node
|
#### PostgreSQL primary node
|
||||||
|
|
||||||
1. SSH into the PostgreSQL primary node.
|
1. SSH in to the PostgreSQL primary node.
|
||||||
1. Generate a password hash for the PostgreSQL username/password pair. This assumes you will use the default
|
1. Generate a password hash for the PostgreSQL username/password pair. This assumes you will use the default
|
||||||
username of `gitlab` (recommended). The command will request a password
|
username of `gitlab` (recommended). The command will request a password
|
||||||
and confirmation. Use the value that is output by this command in the next
|
and confirmation. Use the value that is output by this command in the next
|
||||||
|
|
@ -808,7 +801,7 @@ are supported and can be added if needed.
|
||||||
|
|
||||||
#### PostgreSQL post-configuration
|
#### PostgreSQL post-configuration
|
||||||
|
|
||||||
SSH into the **primary node**:
|
SSH in to the **primary node**:
|
||||||
|
|
||||||
1. Open a database prompt:
|
1. Open a database prompt:
|
||||||
|
|
||||||
|
|
@ -843,7 +836,7 @@ SSH into the **primary node**:
|
||||||
is not an IP address, it will need to be a resolvable name (via DNS or
|
is not an IP address, it will need to be a resolvable name (via DNS or
|
||||||
`/etc/hosts`)
|
`/etc/hosts`)
|
||||||
|
|
||||||
SSH into the **secondary node**:
|
SSH in to the **secondary node**:
|
||||||
|
|
||||||
1. Set up the repmgr standby:
|
1. Set up the repmgr standby:
|
||||||
|
|
||||||
|
|
@ -1114,8 +1107,8 @@ and that your GitLab installation has three repository storages:
|
||||||
On each node:
|
On each node:
|
||||||
|
|
||||||
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
package you want (based on _steps 1 and 2_ on the GitLab downloads page), but
|
package of your choice. Be sure to follow _only_ installation steps 1 and 2
|
||||||
_without_ providing the `EXTERNAL_URL` value.
|
on the page, and _do not_ provide the `EXTERNAL_URL` value.
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` to configure the storage paths, enable
|
1. Edit `/etc/gitlab/gitlab.rb` to configure the storage paths, enable
|
||||||
the network listener, and configure the token:
|
the network listener, and configure the token:
|
||||||
|
|
||||||
|
|
@ -1308,10 +1301,10 @@ The following IPs will be used as an example:
|
||||||
|
|
||||||
To configure the Sidekiq nodes, one each one:
|
To configure the Sidekiq nodes, one each one:
|
||||||
|
|
||||||
1. SSH into the Sidekiq server.
|
1. SSH in to the Sidekiq server.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the Omnibus GitLab package
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
you want using steps 1 and 2 from the GitLab downloads page.
|
package of your choice. Be sure to follow _only_ installation steps 1 and 2
|
||||||
**Do not complete any other steps on the download page.**
|
on the page.
|
||||||
1. Open `/etc/gitlab/gitlab.rb` with your editor:
|
1. Open `/etc/gitlab/gitlab.rb` with your editor:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
@ -1457,9 +1450,9 @@ On each node perform the following:
|
||||||
mkdir -p /var/opt/gitlab/.ssh /var/opt/gitlab/gitlab-rails/uploads /var/opt/gitlab/gitlab-rails/shared /var/opt/gitlab/gitlab-ci/builds /var/opt/gitlab/git-data
|
mkdir -p /var/opt/gitlab/.ssh /var/opt/gitlab/gitlab-rails/uploads /var/opt/gitlab/gitlab-rails/shared /var/opt/gitlab/gitlab-ci/builds /var/opt/gitlab/git-data
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Download and install Omnibus GitLab using **steps 1 and 2** from
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
[GitLab downloads](https://about.gitlab.com/install/). Do not complete other
|
package of your choice. Be sure to follow _only_ installation steps 1 and 2
|
||||||
steps on the download page.
|
on the page.
|
||||||
1. Create or edit `/etc/gitlab/gitlab.rb` and use the following configuration.
|
1. Create or edit `/etc/gitlab/gitlab.rb` and use the following configuration.
|
||||||
To maintain uniformity of links across nodes, the `external_url`
|
To maintain uniformity of links across nodes, the `external_url`
|
||||||
on the application server should point to the external URL that users will use
|
on the application server should point to the external URL that users will use
|
||||||
|
|
@ -1629,10 +1622,10 @@ The Omnibus GitLab package can be used to configure a standalone Monitoring node
|
||||||
running [Prometheus](../monitoring/prometheus/index.md) and
|
running [Prometheus](../monitoring/prometheus/index.md) and
|
||||||
[Grafana](../monitoring/performance/grafana_configuration.md):
|
[Grafana](../monitoring/performance/grafana_configuration.md):
|
||||||
|
|
||||||
1. SSH into the Monitoring node.
|
1. SSH in to the Monitoring node.
|
||||||
1. [Download/install](https://about.gitlab.com/install/) the Omnibus GitLab
|
1. [Download and install](https://about.gitlab.com/install/) the Omnibus GitLab
|
||||||
package you want using **steps 1 and 2** from the GitLab downloads page.
|
package of your choice. Be sure to follow _only_ installation steps 1 and 2
|
||||||
Do not complete any other steps on the download page.
|
on the page.
|
||||||
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
1. Edit `/etc/gitlab/gitlab.rb` and add the contents:
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ The following API resources are available in the project context:
|
||||||
| [Issues Statistics](issues_statistics.md) | `/projects/:id/issues_statistics` (also available for groups and standalone) |
|
| [Issues Statistics](issues_statistics.md) | `/projects/:id/issues_statistics` (also available for groups and standalone) |
|
||||||
| [Issue boards](boards.md) | `/projects/:id/boards` |
|
| [Issue boards](boards.md) | `/projects/:id/boards` |
|
||||||
| [Issue links](issue_links.md) **(STARTER)** | `/projects/:id/issues/.../links` |
|
| [Issue links](issue_links.md) **(STARTER)** | `/projects/:id/issues/.../links` |
|
||||||
|
| [Iterations](iterations.md) **(STARTER)** | `/projects/:id/iterations` (also available for groups) |
|
||||||
| [Jobs](jobs.md) | `/projects/:id/jobs`, `/projects/:id/pipelines/.../jobs` |
|
| [Jobs](jobs.md) | `/projects/:id/jobs`, `/projects/:id/pipelines/.../jobs` |
|
||||||
| [Labels](labels.md) | `/projects/:id/labels` |
|
| [Labels](labels.md) | `/projects/:id/labels` |
|
||||||
| [Managed licenses](managed_licenses.md) **(ULTIMATE)** | `/projects/:id/managed_licenses` |
|
| [Managed licenses](managed_licenses.md) **(ULTIMATE)** | `/projects/:id/managed_licenses` |
|
||||||
|
|
@ -97,6 +98,7 @@ The following API resources are available in the group context:
|
||||||
| [Groups](groups.md) | `/groups`, `/groups/.../subgroups` |
|
| [Groups](groups.md) | `/groups`, `/groups/.../subgroups` |
|
||||||
| [Group badges](group_badges.md) | `/groups/:id/badges` |
|
| [Group badges](group_badges.md) | `/groups/:id/badges` |
|
||||||
| [Group issue boards](group_boards.md) | `/groups/:id/boards` |
|
| [Group issue boards](group_boards.md) | `/groups/:id/boards` |
|
||||||
|
| [Group iterations](group_iterations.md) **(STARTER)** | `/groups/:id/iterations` (also available for projects) |
|
||||||
| [Group labels](group_labels.md) | `/groups/:id/labels` |
|
| [Group labels](group_labels.md) | `/groups/:id/labels` |
|
||||||
| [Group-level variables](group_level_variables.md) | `/groups/:id/variables` |
|
| [Group-level variables](group_level_variables.md) | `/groups/:id/variables` |
|
||||||
| [Group milestones](group_milestones.md) | `/groups/:id/milestones` |
|
| [Group milestones](group_milestones.md) | `/groups/:id/milestones` |
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
---
|
||||||
|
stage: Plan
|
||||||
|
group: Project Management
|
||||||
|
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers
|
||||||
|
---
|
||||||
|
|
||||||
|
# Group iterations API **(STARTER)**
|
||||||
|
|
||||||
|
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/118742) in [GitLab Starter](https://about.gitlab.com/pricing/) 13.5.
|
||||||
|
|
||||||
|
This page describes the group iterations API.
|
||||||
|
There's a separate [project iterations API](./iterations.md) page.
|
||||||
|
|
||||||
|
## List group iterations
|
||||||
|
|
||||||
|
Returns a list of group iterations.
|
||||||
|
|
||||||
|
```plaintext
|
||||||
|
GET /groups/:id/iterations
|
||||||
|
GET /groups/:id/iterations?state=opened
|
||||||
|
GET /groups/:id/iterations?state=closed
|
||||||
|
GET /groups/:id/iterations?title=1.0
|
||||||
|
GET /groups/:id/iterations?search=version
|
||||||
|
```
|
||||||
|
|
||||||
|
| Attribute | Type | Required | Description |
|
||||||
|
| ------------------- | ------- | -------- | ----------- |
|
||||||
|
| `state` | string | no | Return only `opened`, `upcoming`, `started`, `closed`, or `all` iterations. Defaults to `all`. |
|
||||||
|
| `search` | string | no | Return only iterations with a title matching the provided string. |
|
||||||
|
| `include_ancestors` | boolean | no | Include iterations from parent group and its ancestors. Defaults to `true`. |
|
||||||
|
|
||||||
|
Example request:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/groups/5/iterations"
|
||||||
|
```
|
||||||
|
|
||||||
|
Example response:
|
||||||
|
|
||||||
|
```json
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"id": 53,
|
||||||
|
"iid": 13,
|
||||||
|
"group_id": 5,
|
||||||
|
"title": "Iteration II",
|
||||||
|
"description": "Ipsum Lorem ipsum",
|
||||||
|
"state": 2,
|
||||||
|
"created_at": "2020-01-27T05:07:12.573Z",
|
||||||
|
"updated_at": "2020-01-27T05:07:12.573Z",
|
||||||
|
"due_date": "2020-02-01",
|
||||||
|
"start_date": "2020-02-14"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
@ -9,7 +9,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
|
||||||
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/12819) in GitLab 9.5.
|
> [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/12819) in GitLab 9.5.
|
||||||
|
|
||||||
This page describes the group milestones API.
|
This page describes the group milestones API.
|
||||||
There's a separate [project milestones API](./group_milestones.md) page.
|
There's a separate [project milestones API](./milestones.md) page.
|
||||||
|
|
||||||
## List group milestones
|
## List group milestones
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
---
|
||||||
|
stage: Plan
|
||||||
|
group: Project Management
|
||||||
|
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#designated-technical-writers
|
||||||
|
---
|
||||||
|
|
||||||
|
# Project iterations API **(STARTER)**
|
||||||
|
|
||||||
|
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/118742) in [GitLab Starter](https://about.gitlab.com/pricing/) 13.5.
|
||||||
|
|
||||||
|
This page describes the project iterations API.
|
||||||
|
There's a separate [group iterations API](./group_iterations.md) page.
|
||||||
|
|
||||||
|
As of GitLab 13.5, we don't have project-level iterations, but you can use this endpoint to fetch the iterations of the project's ancestor groups.
|
||||||
|
|
||||||
|
## List project iterations
|
||||||
|
|
||||||
|
Returns a list of project iterations.
|
||||||
|
|
||||||
|
```plaintext
|
||||||
|
GET /projects/:id/iterations
|
||||||
|
GET /projects/:id/iterations?state=opened
|
||||||
|
GET /projects/:id/iterations?state=closed
|
||||||
|
GET /projects/:id/iterations?title=1.0
|
||||||
|
GET /projects/:id/iterations?search=version
|
||||||
|
```
|
||||||
|
|
||||||
|
| Attribute | Type | Required | Description |
|
||||||
|
| ------------------- | ------- | -------- | ----------- |
|
||||||
|
| `state` | string | no | Return only `opened`, `upcoming`, `started`, `closed`, or `all` iterations. Defaults to `all`. |
|
||||||
|
| `search` | string | no | Return only iterations with a title matching the provided string. |
|
||||||
|
| `include_ancestors` | boolean | no | Include iterations from parent group and its ancestors. Defaults to `true`. |
|
||||||
|
|
||||||
|
Example request:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/5/iterations"
|
||||||
|
```
|
||||||
|
|
||||||
|
Example response:
|
||||||
|
|
||||||
|
```json
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"id": 53,
|
||||||
|
"iid": 13,
|
||||||
|
"group_id": 5,
|
||||||
|
"title": "Iteration II",
|
||||||
|
"description": "Ipsum Lorem ipsum",
|
||||||
|
"state": 2,
|
||||||
|
"created_at": "2020-01-27T05:07:12.573Z",
|
||||||
|
"updated_at": "2020-01-27T05:07:12.573Z",
|
||||||
|
"due_date": "2020-02-01",
|
||||||
|
"start_date": "2020-02-14"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
@ -99,6 +99,14 @@ module API
|
||||||
@project = @container = access_checker.container
|
@project = @container = access_checker.container
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def validate_actor_key(actor, key_id)
|
||||||
|
return 'Could not find a user without a key' unless key_id
|
||||||
|
|
||||||
|
return 'Could not find the given key' unless actor.key
|
||||||
|
|
||||||
|
'Could not find a user for the given key' unless actor.user
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
namespace 'internal' do
|
namespace 'internal' do
|
||||||
|
|
@ -163,28 +171,23 @@ module API
|
||||||
redis: redis_ping
|
redis: redis_ping
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
post '/two_factor_recovery_codes' do
|
post '/two_factor_recovery_codes' do
|
||||||
status 200
|
status 200
|
||||||
|
|
||||||
actor.update_last_used_at!
|
actor.update_last_used_at!
|
||||||
user = actor.user
|
user = actor.user
|
||||||
|
|
||||||
if params[:key_id]
|
error_message = validate_actor_key(actor, params[:key_id])
|
||||||
unless actor.key
|
|
||||||
break { success: false, message: 'Could not find the given key' }
|
|
||||||
end
|
|
||||||
|
|
||||||
if actor.key.is_a?(DeployKey)
|
if params[:user_id] && user.nil?
|
||||||
break { success: false, message: 'Deploy keys cannot be used to retrieve recovery codes' }
|
|
||||||
end
|
|
||||||
|
|
||||||
unless user
|
|
||||||
break { success: false, message: 'Could not find a user for the given key' }
|
|
||||||
end
|
|
||||||
elsif params[:user_id] && user.nil?
|
|
||||||
break { success: false, message: 'Could not find the given user' }
|
break { success: false, message: 'Could not find the given user' }
|
||||||
|
elsif error_message
|
||||||
|
break { success: false, message: error_message }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
break { success: false, message: 'Deploy keys cannot be used to retrieve recovery codes' } if actor.key.is_a?(DeployKey)
|
||||||
|
|
||||||
unless user.two_factor_enabled?
|
unless user.two_factor_enabled?
|
||||||
break { success: false, message: 'Two-factor authentication is not enabled for this user' }
|
break { success: false, message: 'Two-factor authentication is not enabled for this user' }
|
||||||
end
|
end
|
||||||
|
|
@ -204,20 +207,14 @@ module API
|
||||||
actor.update_last_used_at!
|
actor.update_last_used_at!
|
||||||
user = actor.user
|
user = actor.user
|
||||||
|
|
||||||
if params[:key_id]
|
error_message = validate_actor_key(actor, params[:key_id])
|
||||||
unless actor.key
|
|
||||||
break { success: false, message: 'Could not find the given key' }
|
|
||||||
end
|
|
||||||
|
|
||||||
if actor.key.is_a?(DeployKey)
|
break { success: false, message: 'Deploy keys cannot be used to create personal access tokens' } if actor.key.is_a?(DeployKey)
|
||||||
break { success: false, message: 'Deploy keys cannot be used to create personal access tokens' }
|
|
||||||
end
|
|
||||||
|
|
||||||
unless user
|
if params[:user_id] && user.nil?
|
||||||
break { success: false, message: 'Could not find a user for the given key' }
|
|
||||||
end
|
|
||||||
elsif params[:user_id] && user.nil?
|
|
||||||
break { success: false, message: 'Could not find the given user' }
|
break { success: false, message: 'Could not find the given user' }
|
||||||
|
elsif error_message
|
||||||
|
break { success: false, message: error_message }
|
||||||
end
|
end
|
||||||
|
|
||||||
if params[:name].blank?
|
if params[:name].blank?
|
||||||
|
|
@ -269,6 +266,28 @@ module API
|
||||||
|
|
||||||
present response, with: Entities::InternalPostReceive::Response
|
present response, with: Entities::InternalPostReceive::Response
|
||||||
end
|
end
|
||||||
|
|
||||||
|
post '/two_factor_config' do
|
||||||
|
status 200
|
||||||
|
|
||||||
|
break { success: false } unless Feature.enabled?(:two_factor_for_cli)
|
||||||
|
|
||||||
|
actor.update_last_used_at!
|
||||||
|
user = actor.user
|
||||||
|
|
||||||
|
error_message = validate_actor_key(actor, params[:key_id])
|
||||||
|
|
||||||
|
if error_message
|
||||||
|
{ success: false, message: error_message }
|
||||||
|
elsif actor.key.is_a?(DeployKey)
|
||||||
|
{ success: true, two_factor_required: false }
|
||||||
|
else
|
||||||
|
{
|
||||||
|
success: true,
|
||||||
|
two_factor_required: user.two_factor_enabled?
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ module Gitlab
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.manual_bridges_enabled?(project)
|
def self.manual_bridges_enabled?(project)
|
||||||
::Feature.enabled?(:ci_manual_bridges, project, default_enabled: false)
|
::Feature.enabled?(:ci_manual_bridges, project, default_enabled: true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -28440,6 +28440,9 @@ msgstr ""
|
||||||
msgid "UsageQuota|%{help_link_start}Shared runners%{help_link_end} are disabled, so there are no limits set on pipeline usage"
|
msgid "UsageQuota|%{help_link_start}Shared runners%{help_link_end} are disabled, so there are no limits set on pipeline usage"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "UsageQuota|%{percentageLeft} of purchased storage is available"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "UsageQuota|Artifacts"
|
msgid "UsageQuota|Artifacts"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
@ -28530,15 +28533,27 @@ msgstr ""
|
||||||
msgid "UsageQuota|Usage since"
|
msgid "UsageQuota|Usage since"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "UsageQuota|When you purchase additional storage, we automatically unlock projects that were locked when you reached the %{actualRepositorySizeLimit} limit."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "UsageQuota|Wiki"
|
msgid "UsageQuota|Wiki"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "UsageQuota|Wikis"
|
msgid "UsageQuota|Wikis"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "UsageQuota|You have consumed all of your additional storage, please purchase more to unlock your projects over the free %{actualRepositorySizeLimit} limit."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "UsageQuota|You have reached the free storage limit of %{actualRepositorySizeLimit} on %{projectsLockedText}. To unlock them, please purchase additional storage."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "UsageQuota|You used: %{usage} %{limit}"
|
msgid "UsageQuota|You used: %{usage} %{limit}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "UsageQuota|Your purchased storage is running low. To avoid locked projects, please purchase more storage."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "UsageQuota|out of %{formattedLimit} of your namespace storage"
|
msgid "UsageQuota|out of %{formattedLimit} of your namespace storage"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
@ -30585,9 +30600,6 @@ msgstr ""
|
||||||
msgid "Your projects"
|
msgid "Your projects"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Your purchased storage is running low. To avoid locked projects, please purchase more storage."
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "Your request for access could not be processed: %{error_meesage}"
|
msgid "Your request for access could not be processed: %{error_meesage}"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,12 +11,12 @@ module QA
|
||||||
view 'app/views/shared/wikis/show.html.haml' do
|
view 'app/views/shared/wikis/show.html.haml' do
|
||||||
element :wiki_page_title
|
element :wiki_page_title
|
||||||
element :wiki_page_content
|
element :wiki_page_content
|
||||||
|
element :edit_page_button
|
||||||
end
|
end
|
||||||
|
|
||||||
view 'app/views/shared/wikis/_main_links.html.haml' do
|
view 'app/views/shared/wikis/_main_links.html.haml' do
|
||||||
element :new_page_button
|
element :new_page_button
|
||||||
element :page_history_button
|
element :page_history_button
|
||||||
element :edit_page_button
|
|
||||||
end
|
end
|
||||||
|
|
||||||
view 'app/views/shared/empty_states/_wikis.html.haml' do
|
view 'app/views/shared/empty_states/_wikis.html.haml' do
|
||||||
|
|
|
||||||
|
|
@ -50,43 +50,63 @@ RSpec.describe API::Internal::Base do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
shared_examples 'actor key validations' do
|
||||||
|
context 'key id is not provided' do
|
||||||
|
let(:key_id) { nil }
|
||||||
|
|
||||||
|
it 'returns an error message' do
|
||||||
|
subject
|
||||||
|
|
||||||
|
expect(json_response['success']).to be_falsey
|
||||||
|
expect(json_response['message']).to eq('Could not find a user without a key')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'key does not exist' do
|
||||||
|
let(:key_id) { non_existing_record_id }
|
||||||
|
|
||||||
|
it 'returns an error message' do
|
||||||
|
subject
|
||||||
|
|
||||||
|
expect(json_response['success']).to be_falsey
|
||||||
|
expect(json_response['message']).to eq('Could not find the given key')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'key without user' do
|
||||||
|
let(:key_id) { create(:key, user: nil).id }
|
||||||
|
|
||||||
|
it 'returns an error message' do
|
||||||
|
subject
|
||||||
|
|
||||||
|
expect(json_response['success']).to be_falsey
|
||||||
|
expect(json_response['message']).to eq('Could not find a user for the given key')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
describe 'GET /internal/two_factor_recovery_codes' do
|
describe 'GET /internal/two_factor_recovery_codes' do
|
||||||
it 'returns an error message when the key does not exist' do
|
let(:key_id) { key.id }
|
||||||
|
|
||||||
|
subject do
|
||||||
post api('/internal/two_factor_recovery_codes'),
|
post api('/internal/two_factor_recovery_codes'),
|
||||||
params: {
|
params: {
|
||||||
secret_token: secret_token,
|
secret_token: secret_token,
|
||||||
key_id: non_existing_record_id
|
key_id: key_id
|
||||||
}
|
}
|
||||||
|
|
||||||
expect(json_response['success']).to be_falsey
|
|
||||||
expect(json_response['message']).to eq('Could not find the given key')
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'returns an error message when the key is a deploy key' do
|
it_behaves_like 'actor key validations'
|
||||||
deploy_key = create(:deploy_key)
|
|
||||||
|
|
||||||
post api('/internal/two_factor_recovery_codes'),
|
context 'key is a deploy key' do
|
||||||
params: {
|
let(:key_id) { create(:deploy_key).id }
|
||||||
secret_token: secret_token,
|
|
||||||
key_id: deploy_key.id
|
|
||||||
}
|
|
||||||
|
|
||||||
expect(json_response['success']).to be_falsey
|
it 'returns an error message' do
|
||||||
expect(json_response['message']).to eq('Deploy keys cannot be used to retrieve recovery codes')
|
subject
|
||||||
end
|
|
||||||
|
|
||||||
it 'returns an error message when the user does not exist' do
|
expect(json_response['success']).to be_falsey
|
||||||
key_without_user = create(:key, user: nil)
|
expect(json_response['message']).to eq('Deploy keys cannot be used to retrieve recovery codes')
|
||||||
|
end
|
||||||
post api('/internal/two_factor_recovery_codes'),
|
|
||||||
params: {
|
|
||||||
secret_token: secret_token,
|
|
||||||
key_id: key_without_user.id
|
|
||||||
}
|
|
||||||
|
|
||||||
expect(json_response['success']).to be_falsey
|
|
||||||
expect(json_response['message']).to eq('Could not find a user for the given key')
|
|
||||||
expect(json_response['recovery_codes']).to be_nil
|
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when two-factor is enabled' do
|
context 'when two-factor is enabled' do
|
||||||
|
|
@ -95,11 +115,7 @@ RSpec.describe API::Internal::Base do
|
||||||
allow_any_instance_of(User)
|
allow_any_instance_of(User)
|
||||||
.to receive(:generate_otp_backup_codes!).and_return(%w(119135e5a3ebce8e 34bd7b74adbc8861))
|
.to receive(:generate_otp_backup_codes!).and_return(%w(119135e5a3ebce8e 34bd7b74adbc8861))
|
||||||
|
|
||||||
post api('/internal/two_factor_recovery_codes'),
|
subject
|
||||||
params: {
|
|
||||||
secret_token: secret_token,
|
|
||||||
key_id: key.id
|
|
||||||
}
|
|
||||||
|
|
||||||
expect(json_response['success']).to be_truthy
|
expect(json_response['success']).to be_truthy
|
||||||
expect(json_response['recovery_codes']).to match_array(%w(119135e5a3ebce8e 34bd7b74adbc8861))
|
expect(json_response['recovery_codes']).to match_array(%w(119135e5a3ebce8e 34bd7b74adbc8861))
|
||||||
|
|
@ -110,11 +126,7 @@ RSpec.describe API::Internal::Base do
|
||||||
it 'returns an error message' do
|
it 'returns an error message' do
|
||||||
allow_any_instance_of(User).to receive(:two_factor_enabled?).and_return(false)
|
allow_any_instance_of(User).to receive(:two_factor_enabled?).and_return(false)
|
||||||
|
|
||||||
post api('/internal/two_factor_recovery_codes'),
|
subject
|
||||||
params: {
|
|
||||||
secret_token: secret_token,
|
|
||||||
key_id: key.id
|
|
||||||
}
|
|
||||||
|
|
||||||
expect(json_response['success']).to be_falsey
|
expect(json_response['success']).to be_falsey
|
||||||
expect(json_response['recovery_codes']).to be_nil
|
expect(json_response['recovery_codes']).to be_nil
|
||||||
|
|
@ -123,42 +135,27 @@ RSpec.describe API::Internal::Base do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'POST /internal/personal_access_token' do
|
describe 'POST /internal/personal_access_token' do
|
||||||
it 'returns an error message when the key does not exist' do
|
let(:key_id) { key.id }
|
||||||
|
|
||||||
|
subject do
|
||||||
post api('/internal/personal_access_token'),
|
post api('/internal/personal_access_token'),
|
||||||
params: {
|
params: {
|
||||||
secret_token: secret_token,
|
secret_token: secret_token,
|
||||||
key_id: non_existing_record_id
|
key_id: key_id
|
||||||
}
|
}
|
||||||
|
|
||||||
expect(json_response['success']).to be_falsey
|
|
||||||
expect(json_response['message']).to eq('Could not find the given key')
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'returns an error message when the key is a deploy key' do
|
it_behaves_like 'actor key validations'
|
||||||
deploy_key = create(:deploy_key)
|
|
||||||
|
|
||||||
post api('/internal/personal_access_token'),
|
context 'key is a deploy key' do
|
||||||
params: {
|
let(:key_id) { create(:deploy_key).id }
|
||||||
secret_token: secret_token,
|
|
||||||
key_id: deploy_key.id
|
|
||||||
}
|
|
||||||
|
|
||||||
expect(json_response['success']).to be_falsey
|
it 'returns an error message' do
|
||||||
expect(json_response['message']).to eq('Deploy keys cannot be used to create personal access tokens')
|
subject
|
||||||
end
|
|
||||||
|
|
||||||
it 'returns an error message when the user does not exist' do
|
expect(json_response['success']).to be_falsey
|
||||||
key_without_user = create(:key, user: nil)
|
expect(json_response['message']).to eq('Deploy keys cannot be used to create personal access tokens')
|
||||||
|
end
|
||||||
post api('/internal/personal_access_token'),
|
|
||||||
params: {
|
|
||||||
secret_token: secret_token,
|
|
||||||
key_id: key_without_user.id
|
|
||||||
}
|
|
||||||
|
|
||||||
expect(json_response['success']).to be_falsey
|
|
||||||
expect(json_response['message']).to eq('Could not find a user for the given key')
|
|
||||||
expect(json_response['token']).to be_nil
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'returns an error message when given an non existent user' do
|
it 'returns an error message when given an non existent user' do
|
||||||
|
|
@ -1209,6 +1206,73 @@ RSpec.describe API::Internal::Base do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe 'POST /internal/two_factor_config' do
|
||||||
|
let(:key_id) { key.id }
|
||||||
|
|
||||||
|
before do
|
||||||
|
stub_feature_flags(two_factor_for_cli: true)
|
||||||
|
end
|
||||||
|
|
||||||
|
subject do
|
||||||
|
post api('/internal/two_factor_config'),
|
||||||
|
params: {
|
||||||
|
secret_token: secret_token,
|
||||||
|
key_id: key_id
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
it_behaves_like 'actor key validations'
|
||||||
|
|
||||||
|
context 'when the key is a deploy key' do
|
||||||
|
let(:key) { create(:deploy_key) }
|
||||||
|
|
||||||
|
it 'does not required two factor' do
|
||||||
|
subject
|
||||||
|
|
||||||
|
expect(json_response['success']).to be_truthy
|
||||||
|
expect(json_response['two_factor_required']).to be_falsey
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'when two-factor is enabled' do
|
||||||
|
it 'returns user two factor config' do
|
||||||
|
allow_any_instance_of(User).to receive(:two_factor_enabled?).and_return(true)
|
||||||
|
|
||||||
|
subject
|
||||||
|
|
||||||
|
expect(json_response['success']).to be_truthy
|
||||||
|
expect(json_response['two_factor_required']).to be_truthy
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'when two-factor is not enabled' do
|
||||||
|
it 'returns an error message' do
|
||||||
|
allow_any_instance_of(User).to receive(:two_factor_enabled?).and_return(false)
|
||||||
|
|
||||||
|
subject
|
||||||
|
|
||||||
|
expect(json_response['success']).to be_truthy
|
||||||
|
expect(json_response['two_factor_required']).to be_falsey
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'two_factor_for_cli feature is disabled' do
|
||||||
|
before do
|
||||||
|
stub_feature_flags(two_factor_for_cli: false)
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'when two-factor is enabled for the user' do
|
||||||
|
it 'returns user two factor config' do
|
||||||
|
allow_any_instance_of(User).to receive(:two_factor_enabled?).and_return(true)
|
||||||
|
|
||||||
|
subject
|
||||||
|
|
||||||
|
expect(json_response['success']).to be_falsey
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def lfs_auth_project(project)
|
def lfs_auth_project(project)
|
||||||
post(
|
post(
|
||||||
api("/internal/lfs_authenticate"),
|
api("/internal/lfs_authenticate"),
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@ RSpec.shared_examples 'User views a wiki page' do
|
||||||
it 'shows the page history' do
|
it 'shows the page history' do
|
||||||
visit(wiki_page_path(wiki, wiki_page))
|
visit(wiki_page_path(wiki, wiki_page))
|
||||||
|
|
||||||
expect(page).to have_selector('a.btn', text: 'Edit')
|
expect(page).to have_selector('[data-testid="wiki_edit_button"]')
|
||||||
|
|
||||||
click_on('Page history')
|
click_on('Page history')
|
||||||
|
|
||||||
|
|
@ -133,7 +133,7 @@ RSpec.shared_examples 'User views a wiki page' do
|
||||||
it 'does not show the "Edit" button' do
|
it 'does not show the "Edit" button' do
|
||||||
visit(wiki_page_path(wiki, wiki_page, version_id: wiki_page.versions.last.id))
|
visit(wiki_page_path(wiki, wiki_page, version_id: wiki_page.versions.last.id))
|
||||||
|
|
||||||
expect(page).not_to have_selector('a.btn', text: 'Edit')
|
expect(page).not_to have_selector('[data-testid="wiki_edit_button"]')
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'show the diff' do
|
context 'show the diff' do
|
||||||
|
|
@ -250,7 +250,7 @@ RSpec.shared_examples 'User views a wiki page' do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'does not show "Edit" button' do
|
it 'does not show "Edit" button' do
|
||||||
expect(page).not_to have_selector('a.btn', text: 'Edit')
|
expect(page).not_to have_selector('[data-testid="wiki_edit_button"]')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'shows error' do
|
it 'shows error' do
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue