Skip to content
Snippets Groups Projects
Commit e0ad2c52 authored by Aleksei Lipniagov's avatar Aleksei Lipniagov
Browse files

Remove Unicorn support: docs

Updates docs related to Unicorn support removal.
parent dfc52765
No related branches found
No related tags found
No related merge requests found
Pipeline #13031163 failed
Showing
with 26 additions and 71 deletions
Loading
Loading
@@ -68,9 +68,9 @@ GitLab is an open source project and we are very happy to accept community contr
 
To work on GitLab itself, we recommend setting up your development environment with [the GitLab Development Kit](https://gitlab.com/gitlab-org/gitlab-development-kit).
If you do not use the GitLab Development Kit you need to install and setup all the dependencies yourself, this is a lot of work and error prone.
One small thing you also have to do when installing it yourself is to copy the example development Unicorn configuration file:
One small thing you also have to do when installing it yourself is to copy the example development Puma configuration file:
 
cp config/unicorn.rb.example.development config/unicorn.rb
cp config/puma.rb.example.development config/puma.rb
 
Instructions on how to start GitLab and how to run the tests can be found in the [getting started section of the GitLab Development Kit](https://gitlab.com/gitlab-org/gitlab-development-kit#getting-started).
 
Loading
Loading
Loading
Loading
@@ -171,28 +171,6 @@ Some nameservers (like [Consul](https://www.consul.io/docs/discovery/dns#udp-bas
queried over UDP. To overcome this issue, you can use TCP for querying by setting
`use_tcp` to `true`.
 
### Forking
NOTE:
Starting with GitLab 13.0, Puma is the default web server used in GitLab
all-in-one package based installations as well as GitLab Helm chart deployments.
If you use an application server that forks, such as Unicorn, you _have to_
update your Unicorn configuration to start service discovery _after_ a fork.
Failure to do so leads to service discovery only running in the parent
process. If you are using Unicorn, then you can add the following to your
Unicorn configuration file:
```ruby
after_fork do |server, worker|
defined?(Gitlab::Database::LoadBalancing) &&
Gitlab::Database::LoadBalancing.start_service_discovery
end
```
This ensures that service discovery is started in both the parent and all
child processes.
## Balancing queries
 
Read-only `SELECT` queries balance among all the secondary hosts.
Loading
Loading
Loading
Loading
@@ -43,7 +43,7 @@ The following are GitLab upgrade validation tests we performed.
- Outcome: Partial success because we observed downtime during the upgrade of the primary and secondary sites.
- Follow up issues/actions:
- [Fix zero-downtime upgrade process/instructions for multi-node Geo deployments](https://gitlab.com/gitlab-org/gitlab/-/issues/225684)
- [Geo:check Rake task: Exclude AuthorizedKeysCommand check if node not running Puma/Unicorn](https://gitlab.com/gitlab-org/gitlab/-/issues/225454)
- [Geo:check Rake task: Exclude AuthorizedKeysCommand check if node not running Puma](https://gitlab.com/gitlab-org/gitlab/-/issues/225454)
- [Update instructions in the next upgrade issue to include monitoring HAProxy dashboards](https://gitlab.com/gitlab-org/gitlab/-/issues/225359)
 
[Upgrade Geo multi-node installation](https://gitlab.com/gitlab-org/gitlab/-/issues/208104):
Loading
Loading
@@ -53,7 +53,7 @@ The following are GitLab upgrade validation tests we performed.
- Outcome: Partial success because we did not run the looping pipeline during the demo to validate
zero-downtime.
- Follow up issues:
- [Clarify how Puma/Unicorn should include deploy node](https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/5460)
- [Clarify how Puma should include deploy node](https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/5460)
- [Investigate MR creation failure after upgrade to 12.9.10](https://gitlab.com/gitlab-org/gitlab/-/issues/223282) Closed as false positive.
 
### February 2020
Loading
Loading
Loading
Loading
@@ -222,7 +222,6 @@ the **primary** database. Use the following as a guide.
sidekiq['enable'] = false
sidekiq_cluster['enable'] = false
puma['enable'] = false
unicorn['enable'] = false
```
 
After making these changes, [reconfigure GitLab](../../restart_gitlab.md#omnibus-gitlab-reconfigure) so the changes take effect.
Loading
Loading
@@ -294,7 +293,6 @@ Configure the tracking database.
sidekiq['enable'] = false
sidekiq_cluster['enable'] = false
puma['enable'] = false
unicorn['enable'] = false
```
 
After making these changes, [reconfigure GitLab](../../restart_gitlab.md#omnibus-gitlab-reconfigure) so the changes take effect.
Loading
Loading
@@ -440,7 +438,6 @@ application servers above, with some changes to run only the `sidekiq` service:
redis_exporter['enable'] = false
repmgr['enable'] = false
puma['enable'] = false
unicorn['enable'] = false
 
##
## The unique identifier for the Geo node.
Loading
Loading
Loading
Loading
@@ -82,7 +82,7 @@ The following list depicts the network architecture of Gitaly:
- Gitaly addresses must be specified in such a way that they resolve correctly for **all** Gitaly
clients.
- Gitaly clients are:
- Puma or Unicorn.
- Puma.
- Sidekiq.
- GitLab Workhorse.
- GitLab Shell.
Loading
Loading
Loading
Loading
@@ -346,7 +346,6 @@ When GitLab calls a function that has a "Rugged patch", it performs two checks:
the GitLab use of "Rugged patch" code.
- If the feature flag is not set, GitLab tries accessing the file system underneath the
Gitaly server directly. If it can, it uses the "Rugged patch":
- If using Unicorn.
- If using Puma and [thread count](../../install/requirements.md#puma-threads) is set
to `1`.
 
Loading
Loading
Loading
Loading
@@ -739,7 +739,7 @@ When enabled, access logs are generated in
packages or in `/home/git/gitlab/log/sidekiq_exporter.log` for
installations from source.
 
If Prometheus metrics and the Web Exporter are both enabled, Puma/Unicorn
If Prometheus metrics and the Web Exporter are both enabled, Puma
starts a Web server and listen to the defined port (default: `8083`), and access logs
are generated:
 
Loading
Loading
Loading
Loading
@@ -227,7 +227,7 @@ To use an external Prometheus server:
gitlab_rails['monitoring_whitelist'] = ['127.0.0.0/8', '192.168.0.1']
```
 
1. On **all** GitLab Rails(Puma/Unicorn, Sidekiq) servers, set the Prometheus server IP address and listen port. For example:
1. On **all** GitLab Rails(Puma, Sidekiq) servers, set the Prometheus server IP address and listen port. For example:
 
```ruby
gitlab_rails['prometheus_address'] = '192.168.0.1:9090'
Loading
Loading
Loading
Loading
@@ -445,11 +445,11 @@ In case of NFS-related problems, it can be helpful to trace
the file system requests that are being made by using `perf`:
 
```shell
sudo perf trace -e 'nfs4:*' -p $(pgrep -fd ',' puma && pgrep -fd ',' unicorn)
sudo perf trace -e 'nfs4:*' -p $(pgrep -fd ',' puma)
```
 
On Ubuntu 16.04, use:
 
```shell
sudo perf trace --no-syscalls --event 'nfs4:*' -p $(pgrep -fd ',' puma && pgrep -fd ',' unicorn)
sudo perf trace --no-syscalls --event 'nfs4:*' -p $(pgrep -fd ',' puma)
```
Loading
Loading
@@ -219,5 +219,5 @@ the database. The following instructions can be used to build OpenSSH 7.5:
GitLab supports `authorized_keys` database lookups with [SELinux](https://en.wikipedia.org/wiki/Security-Enhanced_Linux).
 
Because the SELinux policy is static, GitLab doesn't support the ability to change
internal Unicorn ports at the moment. Administrators would have to create a special `.te`
internal webserver ports at the moment. Administrators would have to create a special `.te`
file for the environment, since it isn't generated dynamically.
Loading
Loading
@@ -7,8 +7,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
# Switching to Puma
 
As of GitLab 12.9, [Puma](https://github.com/puma/puma) has replaced [Unicorn](https://yhbt.net/unicorn/)
as the default web server. From GitLab 13.0, the following run Puma instead of Unicorn unless
explicitly configured not to:
as the default web server. From GitLab 14.0, the following run Puma:
 
- All-in-one package-based installations.
- Helm chart-based installations.
Loading
Loading
@@ -25,7 +24,7 @@ Multi-threaded Puma can therefore still serve more requests than a single proces
 
## Configuring Puma to replace Unicorn
 
Beginning with GitLab 13.0, Puma is the default application server. We plan to remove support for
Beginning with GitLab 13.0, Puma is the default application server. We removed support for
Unicorn in GitLab 14.0.
 
When switching to Puma, Unicorn server configuration
Loading
Loading
Loading
Loading
@@ -19,10 +19,10 @@ The configuration for doing so depends on your desired outcome.
The first thing you'll want to accomplish is to ensure that no changes can be
made to your repositories. There's two ways you can accomplish that:
 
- Either stop Unicorn/Puma to make the internal API unreachable:
- Either stop Puma to make the internal API unreachable:
 
```shell
sudo gitlab-ctl stop puma # or unicorn
sudo gitlab-ctl stop puma
```
 
- Or, open up a Rails console:
Loading
Loading
@@ -46,19 +46,19 @@ made to your repositories. There's two ways you can accomplish that:
## Shut down the GitLab UI
 
If you don't mind shutting down the GitLab UI, then the easiest approach is to
stop `sidekiq` and `puma`/`unicorn`, and you'll effectively ensure that no
stop `sidekiq` and `puma`, and you'll effectively ensure that no
changes can be made to GitLab:
 
```shell
sudo gitlab-ctl stop sidekiq
sudo gitlab-ctl stop puma # or unicorn
sudo gitlab-ctl stop puma
```
 
When you're ready to revert this:
 
```shell
sudo gitlab-ctl start sidekiq
sudo gitlab-ctl start puma # or unicorn
sudo gitlab-ctl start puma
```
 
## Make the database read-only
Loading
Loading
Loading
Loading
@@ -157,7 +157,7 @@ To set up GitLab and its components to accommodate up to 10,000 users:
provides access to the Git repositories.
1. [Configure Sidekiq](#configure-sidekiq).
1. [Configure the main GitLab Rails application](#configure-gitlab-rails)
to run Puma/Unicorn, Workhorse, GitLab Shell, and to serve all frontend
to run Puma, Workhorse, GitLab Shell, and to serve all frontend
requests (which include UI, API, and Git over HTTP/SSH).
1. [Configure Prometheus](#configure-prometheus) to monitor your GitLab
environment.
Loading
Loading
@@ -1538,7 +1538,6 @@ To configure the Praefect nodes, on each one:
redis['enable'] = false
nginx['enable'] = false
puma['enable'] = false
unicorn['enable'] = false
sidekiq['enable'] = false
gitlab_workhorse['enable'] = false
grafana['enable'] = false
Loading
Loading
@@ -1667,7 +1666,6 @@ On each node:
redis['enable'] = false
nginx['enable'] = false
puma['enable'] = false
unicorn['enable'] = false
sidekiq['enable'] = false
gitlab_workhorse['enable'] = false
grafana['enable'] = false
Loading
Loading
@@ -2235,7 +2233,6 @@ To configure the Monitoring node:
redis_exporter['enable'] = false
sidekiq['enable'] = false
puma['enable'] = false
unicorn['enable'] = false
node_exporter['enable'] = false
gitlab_exporter['enable'] = false
 
Loading
Loading
Loading
Loading
@@ -157,7 +157,7 @@ To set up GitLab and its components to accommodate up to 25,000 users:
provides access to the Git repositories.
1. [Configure Sidekiq](#configure-sidekiq).
1. [Configure the main GitLab Rails application](#configure-gitlab-rails)
to run Puma/Unicorn, Workhorse, GitLab Shell, and to serve all frontend
to run Puma, Workhorse, GitLab Shell, and to serve all frontend
requests (which include UI, API, and Git over HTTP/SSH).
1. [Configure Prometheus](#configure-prometheus) to monitor your GitLab
environment.
Loading
Loading
@@ -1540,7 +1540,6 @@ To configure the Praefect nodes, on each one:
redis['enable'] = false
nginx['enable'] = false
puma['enable'] = false
unicorn['enable'] = false
sidekiq['enable'] = false
gitlab_workhorse['enable'] = false
grafana['enable'] = false
Loading
Loading
@@ -1669,7 +1668,6 @@ On each node:
redis['enable'] = false
nginx['enable'] = false
puma['enable'] = false
unicorn['enable'] = false
sidekiq['enable'] = false
gitlab_workhorse['enable'] = false
grafana['enable'] = false
Loading
Loading
@@ -2239,7 +2237,6 @@ To configure the Monitoring node:
redis_exporter['enable'] = false
sidekiq['enable'] = false
puma['enable'] = false
unicorn['enable'] = false
node_exporter['enable'] = false
gitlab_exporter['enable'] = false
 
Loading
Loading
Loading
Loading
@@ -84,7 +84,7 @@ To set up GitLab and its components to accommodate up to 2,000 users:
1. [Configure Gitaly](#configure-gitaly), which provides access to the Git
repositories.
1. [Configure the main GitLab Rails application](#configure-gitlab-rails)
to run Puma/Unicorn, Workhorse, GitLab Shell, and to serve all frontend
to run Puma, Workhorse, GitLab Shell, and to serve all frontend
requests (which include UI, API, and Git over HTTP/SSH).
1. [Configure Prometheus](#configure-prometheus) to monitor your GitLab
environment.
Loading
Loading
@@ -351,7 +351,6 @@ Omnibus:
sidekiq['enable'] = false
gitlab_workhorse['enable'] = false
puma['enable'] = false
unicorn['enable'] = false
postgresql['enable'] = false
nginx['enable'] = false
prometheus['enable'] = false
Loading
Loading
@@ -457,7 +456,6 @@ To configure the Gitaly server, on the server node you want to use for Gitaly:
redis['enable'] = false
nginx['enable'] = false
puma['enable'] = false
unicorn['enable'] = false
sidekiq['enable'] = false
gitlab_workhorse['enable'] = false
grafana['enable'] = false
Loading
Loading
@@ -791,7 +789,6 @@ running [Prometheus](../monitoring/prometheus/index.md) and
redis_exporter['enable'] = false
sidekiq['enable'] = false
puma['enable'] = false
unicorn['enable'] = false
node_exporter['enable'] = false
gitlab_exporter['enable'] = false
 
Loading
Loading
Loading
Loading
@@ -169,7 +169,7 @@ To set up GitLab and its components to accommodate up to 3,000 users:
provides access to the Git repositories.
1. [Configure Sidekiq](#configure-sidekiq).
1. [Configure the main GitLab Rails application](#configure-gitlab-rails)
to run Puma/Unicorn, Workhorse, GitLab Shell, and to serve all frontend
to run Puma, Workhorse, GitLab Shell, and to serve all frontend
requests (which include UI, API, and Git over HTTP/SSH).
1. [Configure Prometheus](#configure-prometheus) to monitor your GitLab
environment.
Loading
Loading
@@ -1238,7 +1238,6 @@ To configure the Praefect nodes, on each one:
redis['enable'] = false
nginx['enable'] = false
puma['enable'] = false
unicorn['enable'] = false
sidekiq['enable'] = false
gitlab_workhorse['enable'] = false
grafana['enable'] = false
Loading
Loading
@@ -1367,7 +1366,6 @@ On each node:
redis['enable'] = false
nginx['enable'] = false
puma['enable'] = false
unicorn['enable'] = false
sidekiq['enable'] = false
gitlab_workhorse['enable'] = false
grafana['enable'] = false
Loading
Loading
@@ -1916,7 +1914,6 @@ running [Prometheus](../monitoring/prometheus/index.md) and
redis_exporter['enable'] = false
sidekiq['enable'] = false
puma['enable'] = false
unicorn['enable'] = false
node_exporter['enable'] = false
gitlab_exporter['enable'] = false
 
Loading
Loading
Loading
Loading
@@ -157,7 +157,7 @@ To set up GitLab and its components to accommodate up to 50,000 users:
provides access to the Git repositories.
1. [Configure Sidekiq](#configure-sidekiq).
1. [Configure the main GitLab Rails application](#configure-gitlab-rails)
to run Puma/Unicorn, Workhorse, GitLab Shell, and to serve all frontend
to run Puma, Workhorse, GitLab Shell, and to serve all frontend
requests (which include UI, API, and Git over HTTP/SSH).
1. [Configure Prometheus](#configure-prometheus) to monitor your GitLab
environment.
Loading
Loading
@@ -1547,7 +1547,6 @@ To configure the Praefect nodes, on each one:
redis['enable'] = false
nginx['enable'] = false
puma['enable'] = false
unicorn['enable'] = false
sidekiq['enable'] = false
gitlab_workhorse['enable'] = false
grafana['enable'] = false
Loading
Loading
@@ -1676,7 +1675,6 @@ On each node:
redis['enable'] = false
nginx['enable'] = false
puma['enable'] = false
unicorn['enable'] = false
sidekiq['enable'] = false
gitlab_workhorse['enable'] = false
grafana['enable'] = false
Loading
Loading
@@ -2253,7 +2251,6 @@ To configure the Monitoring node:
redis_exporter['enable'] = false
sidekiq['enable'] = false
puma['enable'] = false
unicorn['enable'] = false
node_exporter['enable'] = false
gitlab_exporter['enable'] = false
 
Loading
Loading
Loading
Loading
@@ -161,7 +161,7 @@ To set up GitLab and its components to accommodate up to 5,000 users:
provides access to the Git repositories.
1. [Configure Sidekiq](#configure-sidekiq).
1. [Configure the main GitLab Rails application](#configure-gitlab-rails)
to run Puma/Unicorn, Workhorse, GitLab Shell, and to serve all frontend
to run Puma, Workhorse, GitLab Shell, and to serve all frontend
requests (which include UI, API, and Git over HTTP/SSH).
1. [Configure Prometheus](#configure-prometheus) to monitor your GitLab
environment.
Loading
Loading
@@ -1229,7 +1229,6 @@ To configure the Praefect nodes, on each one:
redis['enable'] = false
nginx['enable'] = false
puma['enable'] = false
unicorn['enable'] = false
sidekiq['enable'] = false
gitlab_workhorse['enable'] = false
grafana['enable'] = false
Loading
Loading
@@ -1358,7 +1357,6 @@ On each node:
redis['enable'] = false
nginx['enable'] = false
puma['enable'] = false
unicorn['enable'] = false
sidekiq['enable'] = false
gitlab_workhorse['enable'] = false
grafana['enable'] = false
Loading
Loading
@@ -1904,7 +1902,6 @@ running [Prometheus](../monitoring/prometheus/index.md) and
redis_exporter['enable'] = false
sidekiq['enable'] = false
puma['enable'] = false
unicorn['enable'] = false
node_exporter['enable'] = false
gitlab_exporter['enable'] = false
 
Loading
Loading
Loading
Loading
@@ -155,7 +155,7 @@ and more. However, this is not enabled by default. To enable it, define the
gitlab_rails['env'] = {"ENABLE_RBTRACE" => "1"}
```
 
Then reconfigure the system and restart Unicorn and Sidekiq. To run this
Then reconfigure the system and restart Puma and Sidekiq. To run this
in Omnibus, run as root:
 
```ruby
Loading
Loading
Loading
Loading
@@ -177,8 +177,8 @@ strace -tt -T -f -y -yy -s 1024 -p <pid>
 
# -o output file
 
# run strace on all unicorn processes
ps auwx | grep unicorn | awk '{ print " -p " $2}' | xargs strace -tt -T -f -y -yy -s 1024 -o /tmp/unicorn.txt
# run strace on all puma processes
ps auwx | grep puma | awk '{ print " -p " $2}' | xargs strace -tt -T -f -y -yy -s 1024 -o /tmp/puma.txt
```
 
Be aware that strace can have major impacts to system performance when it is running.
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment