Commit 3d13b601 authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch '207445-remove-puma-experimental-status' into 'master'

Drop 'experimental' references to Puma

See merge request gitlab-org/gitlab!27303
parents b06177af 61c9e4c6
...@@ -182,7 +182,7 @@ Unicorn specific metrics, when Unicorn is used. ...@@ -182,7 +182,7 @@ Unicorn specific metrics, when Unicorn is used.
| `unicorn_queued_connections` | Gauge | 11.0 | The number of queued Unicorn connections | | `unicorn_queued_connections` | Gauge | 11.0 | The number of queued Unicorn connections |
| `unicorn_workers` | Gauge | 12.0 | The number of Unicorn workers | | `unicorn_workers` | Gauge | 12.0 | The number of Unicorn workers |
## Puma Metrics **(EXPERIMENTAL)** ## Puma Metrics
When Puma is used instead of Unicorn, the following metrics are available: When Puma is used instead of Unicorn, the following metrics are available:
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
## Puma ## Puma
GitLab plans to use [Puma](https://github.com/puma/puma) to replace As of GitLab 12.9, [Puma](https://github.com/puma/puma) has replaced [Unicorn](https://bogomips.org/unicorn/).
[Unicorn](https://bogomips.org/unicorn/). as the default web server.
## Why switch to Puma? ## Why switch to Puma?
......
...@@ -11,9 +11,8 @@ dependency proxies, see the [user guide](../../user/group/dependency_proxy/index ...@@ -11,9 +11,8 @@ dependency proxies, see the [user guide](../../user/group/dependency_proxy/index
NOTE: **Note:** NOTE: **Note:**
Dependency proxy requires the Puma web server to be enabled. Dependency proxy requires the Puma web server to be enabled.
Puma support is EXPERIMENTAL at this time.
To enable the Dependency proxy feature: To enable the dependency proxy feature:
**Omnibus GitLab installations** **Omnibus GitLab installations**
...@@ -37,7 +36,9 @@ To enable the Dependency proxy feature: ...@@ -37,7 +36,9 @@ To enable the Dependency proxy feature:
``` ```
1. [Restart GitLab](../restart_gitlab.md#installations-from-source "How to restart GitLab") for the changes to take effect. 1. [Restart GitLab](../restart_gitlab.md#installations-from-source "How to restart GitLab") for the changes to take effect.
1. Enable the [Puma web server](../../install/installation.md#using-puma).
Since Puma is already the default web server for installations from source as of GitLab 12.9,
no further changes are needed.
## Changing the storage path ## Changing the storage path
......
...@@ -457,16 +457,13 @@ sudo chmod -R u+rwX shared/artifacts/ ...@@ -457,16 +457,13 @@ sudo chmod -R u+rwX shared/artifacts/
# Change the permissions of the directory where GitLab Pages are stored # Change the permissions of the directory where GitLab Pages are stored
sudo chmod -R ug+rwX shared/pages/ sudo chmod -R ug+rwX shared/pages/
# Copy the example Unicorn config # Copy the example Puma config
sudo -u git -H cp config/unicorn.rb.example config/unicorn.rb sudo -u git -H cp config/puma.rb.example config/puma.rb
# Find number of cores # Refer to https://github.com/puma/puma#configuration for more information.
nproc # You should scale Puma workers and threads based on the number of CPU
# cores you have available. You can get that number via the `nproc` command.
# Enable cluster mode if you expect to have a high load instance sudo -u git -H editor config/puma.rb
# Set the number of workers to at least the number of cores
# Ex. change the amount of workers to 3 for 2GB RAM server
sudo -u git -H editor config/unicorn.rb
# Copy the example Rack attack config # Copy the example Rack attack config
sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb
...@@ -495,8 +492,8 @@ sudo -u git -H editor config/resque.yml ...@@ -495,8 +492,8 @@ sudo -u git -H editor config/resque.yml
``` ```
CAUTION: **Caution:** CAUTION: **Caution:**
Make sure to edit both `gitlab.yml` and `unicorn.rb` to match your setup. Make sure to edit both `gitlab.yml` and `puma.rb` to match your setup.
If you want to use Puma web server, see [Using Puma](#using-puma) for the additional steps. If you want to use the Unicorn web server, see [Using Unicorn](#using-unicorn) for the additional steps.
NOTE: **Note:** NOTE: **Note:**
If you want to use HTTPS, see [Using HTTPS](#using-https) for the additional steps. If you want to use HTTPS, see [Using HTTPS](#using-https) for the additional steps.
...@@ -947,23 +944,22 @@ You also need to change the corresponding options (e.g. `ssh_user`, `ssh_host`, ...@@ -947,23 +944,22 @@ You also need to change the corresponding options (e.g. `ssh_user`, `ssh_host`,
Apart from the always supported Markdown style, there are other rich text files that GitLab can display. But you might have to install a dependency to do so. See the [`github-markup` gem README](https://github.com/gitlabhq/markup#markups) for more information. Apart from the always supported Markdown style, there are other rich text files that GitLab can display. But you might have to install a dependency to do so. See the [`github-markup` gem README](https://github.com/gitlabhq/markup#markups) for more information.
### Using Puma ### Using Unicorn
Puma is a multi-threaded HTTP 1.1 server for Ruby applications.
To use GitLab with Puma: As of GitLab 12.9, [Puma](https://github.com/puma/puma) has replaced Unicorn as the default web server for installations from source.
If you want to switch back to Unicorn, follow these steps:
1. Finish GitLab setup so you have it up and running. 1. Finish the GitLab setup so you have it up and running.
1. Copy the supplied example Puma config file into place: 1. Copy the supplied example Unicorn config file into place:
```shell ```shell
cd /home/git/gitlab cd /home/git/gitlab
# Copy config file for the web server # Copy config file for the web server
sudo -u git -H cp config/puma.rb.example config/puma.rb sudo -u git -H cp config/unicorn.rb.example config/unicorn.rb
``` ```
1. Edit the system `init.d` script to use `EXPERIMENTAL_PUMA=1` flag. If you have `/etc/default/gitlab`, then you should edit it instead. 1. Edit the system `init.d` script to set the `USE_UNICORN=1` flag. If you have `/etc/default/gitlab`, then you should edit it instead.
1. Restart GitLab. 1. Restart GitLab.
## Troubleshooting ## Troubleshooting
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
### Environment variables ### Environment variables
RAILS_ENV="production" RAILS_ENV="production"
EXPERIMENTAL_PUMA="" USE_UNICORN=""
# Script variable names should be lower-case not to conflict with # Script variable names should be lower-case not to conflict with
# internal /bin/sh variables such as PATH, EDITOR or SHELL. # internal /bin/sh variables such as PATH, EDITOR or SHELL.
...@@ -68,10 +68,10 @@ if ! cd "$app_root" ; then ...@@ -68,10 +68,10 @@ if ! cd "$app_root" ; then
fi fi
# Select the web server to use # Select the web server to use
if [ -z "$EXPERIMENTAL_PUMA" ]; then if [ -z "$USE_UNICORN" ]; then
use_web_server="unicorn"
else
use_web_server="puma" use_web_server="puma"
else
use_web_server="unicorn"
fi fi
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
# Normal values are "production", "test" and "development". # Normal values are "production", "test" and "development".
RAILS_ENV="production" RAILS_ENV="production"
# Uncomment the line below to enable Puma web server instead of Unicorn. # Uncomment the line below to enable the Unicorn web server instead of Puma.
# EXPERIMENTAL_PUMA=1 # USE_UNICORN=1
# app_user defines the user that GitLab is run as. # app_user defines the user that GitLab is run as.
# The default is "git". # The default is "git".
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment