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.
| `unicorn_queued_connections` | Gauge | 11.0 | The number of queued Unicorn connections |
| `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:
......
......@@ -2,8 +2,8 @@
## Puma
GitLab plans to use [Puma](https://github.com/puma/puma) to replace
[Unicorn](https://bogomips.org/unicorn/).
As of GitLab 12.9, [Puma](https://github.com/puma/puma) has replaced [Unicorn](https://bogomips.org/unicorn/).
as the default web server.
## Why switch to Puma?
......
......@@ -11,9 +11,8 @@ dependency proxies, see the [user guide](../../user/group/dependency_proxy/index
NOTE: **Note:**
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**
......@@ -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. 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
......
......@@ -457,16 +457,13 @@ sudo chmod -R u+rwX shared/artifacts/
# Change the permissions of the directory where GitLab Pages are stored
sudo chmod -R ug+rwX shared/pages/
# Copy the example Unicorn config
sudo -u git -H cp config/unicorn.rb.example config/unicorn.rb
# Copy the example Puma config
sudo -u git -H cp config/puma.rb.example config/puma.rb
# Find number of cores
nproc
# Enable cluster mode if you expect to have a high load instance
# 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
# Refer to https://github.com/puma/puma#configuration for more information.
# 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.
sudo -u git -H editor config/puma.rb
# Copy the example Rack attack config
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
```
CAUTION: **Caution:**
Make sure to edit both `gitlab.yml` and `unicorn.rb` to match your setup.
If you want to use Puma web server, see [Using Puma](#using-puma) for the additional steps.
Make sure to edit both `gitlab.yml` and `puma.rb` to match your setup.
If you want to use the Unicorn web server, see [Using Unicorn](#using-unicorn) for the additional steps.
NOTE: **Note:**
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`,
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
Puma is a multi-threaded HTTP 1.1 server for Ruby applications.
### Using Unicorn
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. Copy the supplied example Puma config file into place:
1. Finish the GitLab setup so you have it up and running.
1. Copy the supplied example Unicorn config file into place:
```shell
cd /home/git/gitlab
# 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.
## Troubleshooting
......
......@@ -26,7 +26,7 @@
### Environment variables
RAILS_ENV="production"
EXPERIMENTAL_PUMA=""
USE_UNICORN=""
# Script variable names should be lower-case not to conflict with
# internal /bin/sh variables such as PATH, EDITOR or SHELL.
......@@ -68,10 +68,10 @@ if ! cd "$app_root" ; then
fi
# Select the web server to use
if [ -z "$EXPERIMENTAL_PUMA" ]; then
use_web_server="unicorn"
else
if [ -z "$USE_UNICORN" ]; then
use_web_server="puma"
else
use_web_server="unicorn"
fi
......
......@@ -5,8 +5,8 @@
# Normal values are "production", "test" and "development".
RAILS_ENV="production"
# Uncomment the line below to enable Puma web server instead of Unicorn.
# EXPERIMENTAL_PUMA=1
# Uncomment the line below to enable the Unicorn web server instead of Puma.
# USE_UNICORN=1
# app_user defines the user that GitLab is run as.
# 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