Fix whitespace in many administration docs

Many code blocks are 4spaced, and they render in GitLab
without coloring as a result, even though they are
fenced with a language label. If in a list, other items
will render as being in a code block too, even if not
meant to. This fixes all these issues for many admin
docs (part 2)
This commit is contained in:
Marcel Amirault 2019-07-10 18:23:55 +00:00 committed by Achilleas Pipinellis
parent c62ac54a11
commit 4633604424
15 changed files with 434 additions and 429 deletions

View File

@ -57,9 +57,9 @@ you can change these defaults by editing the `/etc/tomcat7/server.xml` file.
You need to enable PlantUML integration from Settings under Admin Area. To do You need to enable PlantUML integration from Settings under Admin Area. To do
that, login with an Admin account and do following: that, login with an Admin account and do following:
- in GitLab go to **Admin Area**->**Settings**->**Integrations**->**PlantUML** - in GitLab go to **Admin Area**->**Settings**->**Integrations**->**PlantUML**
- check **Enable PlantUML** checkbox - check **Enable PlantUML** checkbox
- set the PlantUML instance as **PlantUML URL** - set the PlantUML instance as **PlantUML URL**
## Creating Diagrams ## Creating Diagrams
@ -68,33 +68,34 @@ our AsciiDoc snippets, wikis and repos using delimited blocks:
- **Markdown** - **Markdown**
<pre> <pre>
```plantuml ```plantuml
Bob -> Alice : hello Bob -> Alice : hello
Alice -> Bob : Go Away Alice -> Bob : Go Away
```</pre> ```</pre>
- **AsciiDoc** - **AsciiDoc**
``` ```
[plantuml, format="png", id="myDiagram", width="200px"] [plantuml, format="png", id="myDiagram", width="200px"]
---- ----
Bob->Alice : hello Bob->Alice : hello
Alice -> Bob : Go Away Alice -> Bob : Go Away
---- ----
``` ```
- **reStructuredText** - **reStructuredText**
``` ```
.. plantuml:: .. plantuml::
:caption: Caption with **bold** and *italic* :caption: Caption with **bold** and *italic*
Bob -> Alice: hello Bob -> Alice: hello
Alice -> Bob: Go Away Alice -> Bob: Go Away
``` ```
You can also use the `uml::` directive for compatibility with [sphinxcontrib-plantuml](https://pypi.org/project/sphinxcontrib-plantuml/), but please note that we currently only support the `caption` option. You can also use the `uml::` directive for compatibility with [sphinxcontrib-plantuml](https://pypi.org/project/sphinxcontrib-plantuml/), but please note that we currently only support the `caption` option.
The above blocks will be converted to an HTML img tag with source pointing to the The above blocks will be converted to an HTML img tag with source pointing to the
PlantUML instance. If the PlantUML server is correctly configured, this should PlantUML instance. If the PlantUML server is correctly configured, this should
@ -111,11 +112,11 @@ diagram delimiters `@startuml`/`@enduml` as these are replaced by the AsciiDoc `
Some parameters can be added to the AsciiDoc block definition: Some parameters can be added to the AsciiDoc block definition:
- *format*: Can be either `png` or `svg`. Note that `svg` is not supported by - *format*: Can be either `png` or `svg`. Note that `svg` is not supported by
all browsers so use with care. The default is `png`. all browsers so use with care. The default is `png`.
- *id*: A CSS id added to the diagram HTML tag. - *id*: A CSS id added to the diagram HTML tag.
- *width*: Width attribute added to the img tag. - *width*: Width attribute added to the img tag.
- *height*: Height attribute added to the img tag. - *height*: Height attribute added to the img tag.
Markdown does not support any parameters and will always use PNG format. Markdown does not support any parameters and will always use PNG format.

View File

@ -95,9 +95,9 @@ If job traces have already been archived into local storage, and you want to mig
1. Ensure [Object storage integration for Job Artifacts](job_artifacts.md#object-storage-settings) is enabled 1. Ensure [Object storage integration for Job Artifacts](job_artifacts.md#object-storage-settings) is enabled
1. Execute the following command 1. Execute the following command
```bash ```bash
gitlab-rake gitlab:traces:migrate gitlab-rake gitlab:traces:migrate
``` ```
## How to remove job traces ## How to remove job traces

View File

@ -12,9 +12,9 @@ hosts or use IP ranges:
1. Open `/etc/gitlab/gitlab.rb` and add or uncomment the following: 1. Open `/etc/gitlab/gitlab.rb` and add or uncomment the following:
```ruby ```ruby
gitlab_rails['monitoring_whitelist'] = ['127.0.0.0/8', '192.168.0.1'] gitlab_rails['monitoring_whitelist'] = ['127.0.0.0/8', '192.168.0.1']
``` ```
1. Save the file and [reconfigure] GitLab for the changes to take effect. 1. Save the file and [reconfigure] GitLab for the changes to take effect.
@ -24,13 +24,13 @@ hosts or use IP ranges:
1. Edit `config/gitlab.yml`: 1. Edit `config/gitlab.yml`:
```yaml ```yaml
monitoring: monitoring:
# by default only local IPs are allowed to access monitoring resources # by default only local IPs are allowed to access monitoring resources
ip_whitelist: ip_whitelist:
- 127.0.0.0/8 - 127.0.0.0/8
- 192.168.0.1 - 192.168.0.1
``` ```
1. Save the file and [restart] GitLab for the changes to take effect. 1. Save the file and [restart] GitLab for the changes to take effect.

View File

@ -12,9 +12,9 @@ To enable the GitLab monitor exporter:
1. Edit `/etc/gitlab/gitlab.rb` 1. Edit `/etc/gitlab/gitlab.rb`
1. Add or find and uncomment the following line, making sure it's set to `true`: 1. Add or find and uncomment the following line, making sure it's set to `true`:
```ruby ```ruby
gitlab_monitor['enable'] = true gitlab_monitor['enable'] = true
``` ```
1. Save the file and [reconfigure GitLab][reconfigure] for the changes to 1. Save the file and [reconfigure GitLab][reconfigure] for the changes to
take effect take effect

View File

@ -39,9 +39,9 @@ To disable Prometheus and all of its exporters, as well as any added in the futu
1. Edit `/etc/gitlab/gitlab.rb` 1. Edit `/etc/gitlab/gitlab.rb`
1. Add or find and uncomment the following line, making sure it's set to `false`: 1. Add or find and uncomment the following line, making sure it's set to `false`:
```ruby ```ruby
prometheus_monitoring['enable'] = false prometheus_monitoring['enable'] = false
``` ```
1. Save the file and [reconfigure GitLab][reconfigure] for the changes to 1. Save the file and [reconfigure GitLab][reconfigure] for the changes to
take effect. take effect.
@ -61,19 +61,19 @@ To change the address/port that Prometheus listens on:
1. Edit `/etc/gitlab/gitlab.rb` 1. Edit `/etc/gitlab/gitlab.rb`
1. Add or find and uncomment the following line: 1. Add or find and uncomment the following line:
```ruby ```ruby
prometheus['listen_address'] = 'localhost:9090' prometheus['listen_address'] = 'localhost:9090'
``` ```
Replace `localhost:9090` with the address/port you want Prometheus to Replace `localhost:9090` with the address/port you want Prometheus to
listen on. If you would like to allow access to Prometheus to hosts other listen on. If you would like to allow access to Prometheus to hosts other
than `localhost`, leave out the host, or use `0.0.0.0` to allow public access: than `localhost`, leave out the host, or use `0.0.0.0` to allow public access:
```ruby ```ruby
prometheus['listen_address'] = ':9090' prometheus['listen_address'] = ':9090'
# or # or
prometheus['listen_address'] = '0.0.0.0:9090' prometheus['listen_address'] = '0.0.0.0:9090'
``` ```
1. Save the file and [reconfigure GitLab][reconfigure] for the changes to 1. Save the file and [reconfigure GitLab][reconfigure] for the changes to
take effect take effect
@ -90,22 +90,22 @@ To use an external Prometheus server:
1. Edit `/etc/gitlab/gitlab.rb`. 1. Edit `/etc/gitlab/gitlab.rb`.
1. Disable the bundled Prometheus: 1. Disable the bundled Prometheus:
```ruby ```ruby
prometheus['enable'] = false prometheus['enable'] = false
``` ```
1. Set each bundled service's [exporter](#bundled-software-metrics) to listen on a network address, for example: 1. Set each bundled service's [exporter](#bundled-software-metrics) to listen on a network address, for example:
```ruby ```ruby
gitlab_monitor['listen_address'] = '0.0.0.0' gitlab_monitor['listen_address'] = '0.0.0.0'
sidekiq['listen_address'] = '0.0.0.0' sidekiq['listen_address'] = '0.0.0.0'
gitlab_monitor['listen_port'] = '9168' gitlab_monitor['listen_port'] = '9168'
node_exporter['listen_address'] = '0.0.0.0:9100' node_exporter['listen_address'] = '0.0.0.0:9100'
redis_exporter['listen_address'] = '0.0.0.0:9121' redis_exporter['listen_address'] = '0.0.0.0:9121'
postgres_exporter['listen_address'] = '0.0.0.0:9187' postgres_exporter['listen_address'] = '0.0.0.0:9187'
gitaly['prometheus_listen_addr'] = "0.0.0.0:9236" gitaly['prometheus_listen_addr'] = "0.0.0.0:9236"
gitlab_workhorse['prometheus_listen_addr'] = "0.0.0.0:9229" gitlab_workhorse['prometheus_listen_addr'] = "0.0.0.0:9229"
``` ```
1. Install and set up a dedicated Prometheus instance, if necessary, using the [official installation instructions](https://prometheus.io/docs/prometheus/latest/installation/). 1. Install and set up a dedicated Prometheus instance, if necessary, using the [official installation instructions](https://prometheus.io/docs/prometheus/latest/installation/).
1. Add the Prometheus server IP address to the [monitoring IP whitelist](../ip_whitelist.html). For example: 1. Add the Prometheus server IP address to the [monitoring IP whitelist](../ip_whitelist.html). For example:
@ -117,14 +117,14 @@ To use an external Prometheus server:
1. To scrape nginx metrics, you'll also need to configure nginx to allow the Prometheus server 1. To scrape nginx metrics, you'll also need to configure nginx to allow the Prometheus server
IP. For example: IP. For example:
```ruby ```ruby
nginx['status']['options'] = { nginx['status']['options'] = {
"server_tokens" => "off", "server_tokens" => "off",
"access_log" => "off", "access_log" => "off",
"allow" => "192.168.0.1", "allow" => "192.168.0.1",
"deny" => "all", "deny" => "all",
} }
``` ```
1. [Reconfigure GitLab][reconfigure] to apply the changes 1. [Reconfigure GitLab][reconfigure] to apply the changes
1. Edit the Prometheus server's configuration file. 1. Edit the Prometheus server's configuration file.
@ -132,17 +132,17 @@ To use an external Prometheus server:
[scrape target configuration](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#%3Cscrape_config%3E). [scrape target configuration](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#%3Cscrape_config%3E).
For example, a sample snippet using `static_configs`: For example, a sample snippet using `static_configs`:
```yaml ```yaml
scrape_configs: scrape_configs:
- job_name: 'gitlab_exporters' - job_name: 'gitlab_exporters'
static_configs: static_configs:
- targets: ['1.1.1.1:9168', '1.1.1.1:9236', '1.1.1.1:9236', '1.1.1.1:9100', '1.1.1.1:9121', '1.1.1.1:9187'] - targets: ['1.1.1.1:9168', '1.1.1.1:9236', '1.1.1.1:9236', '1.1.1.1:9100', '1.1.1.1:9121', '1.1.1.1:9187']
- job_name: 'gitlab_metrics' - job_name: 'gitlab_metrics'
metrics_path: /-/metrics metrics_path: /-/metrics
static_configs: static_configs:
- targets: ['1.1.1.1:443'] - targets: ['1.1.1.1:443']
``` ```
1. Restart the Prometheus server. 1. Restart the Prometheus server.
@ -241,9 +241,9 @@ To disable the monitoring of Kubernetes:
1. Edit `/etc/gitlab/gitlab.rb`. 1. Edit `/etc/gitlab/gitlab.rb`.
1. Add or find and uncomment the following line and set it to `false`: 1. Add or find and uncomment the following line and set it to `false`:
```ruby ```ruby
prometheus['monitor_kubernetes'] = false prometheus['monitor_kubernetes'] = false
``` ```
1. Save the file and [reconfigure GitLab][reconfigure] for the changes to 1. Save the file and [reconfigure GitLab][reconfigure] for the changes to
take effect. take effect.

View File

@ -13,9 +13,9 @@ To enable the node exporter:
1. Edit `/etc/gitlab/gitlab.rb` 1. Edit `/etc/gitlab/gitlab.rb`
1. Add or find and uncomment the following line, making sure it's set to `true`: 1. Add or find and uncomment the following line, making sure it's set to `true`:
```ruby ```ruby
node_exporter['enable'] = true node_exporter['enable'] = true
``` ```
1. Save the file and [reconfigure GitLab][reconfigure] for the changes to 1. Save the file and [reconfigure GitLab][reconfigure] for the changes to
take effect take effect

View File

@ -12,9 +12,9 @@ To enable the PgBouncer exporter:
1. Edit `/etc/gitlab/gitlab.rb` 1. Edit `/etc/gitlab/gitlab.rb`
1. Add or find and uncomment the following line, making sure it's set to `true`: 1. Add or find and uncomment the following line, making sure it's set to `true`:
```ruby ```ruby
pgbouncer_exporter['enable'] = true pgbouncer_exporter['enable'] = true
``` ```
1. Save the file and [reconfigure GitLab][reconfigure] for the changes to 1. Save the file and [reconfigure GitLab][reconfigure] for the changes to
take effect. take effect.

View File

@ -12,9 +12,9 @@ To enable the postgres exporter:
1. Edit `/etc/gitlab/gitlab.rb` 1. Edit `/etc/gitlab/gitlab.rb`
1. Add or find and uncomment the following line, making sure it's set to `true`: 1. Add or find and uncomment the following line, making sure it's set to `true`:
```ruby ```ruby
postgres_exporter['enable'] = true postgres_exporter['enable'] = true
``` ```
1. Save the file and [reconfigure GitLab][reconfigure] for the changes to 1. Save the file and [reconfigure GitLab][reconfigure] for the changes to
take effect take effect

View File

@ -13,9 +13,9 @@ To enable the Redis exporter:
1. Edit `/etc/gitlab/gitlab.rb` 1. Edit `/etc/gitlab/gitlab.rb`
1. Add or find and uncomment the following line, making sure it's set to `true`: 1. Add or find and uncomment the following line, making sure it's set to `true`:
```ruby ```ruby
redis_exporter['enable'] = true redis_exporter['enable'] = true
``` ```
1. Save the file and [reconfigure GitLab][reconfigure] for the changes to 1. Save the file and [reconfigure GitLab][reconfigure] for the changes to
take effect take effect

View File

@ -117,81 +117,81 @@ the database. The following instructions can be used to build OpenSSH 7.5:
1. First, download the package and install the required packages: 1. First, download the package and install the required packages:
``` ```
sudo su - sudo su -
cd /tmp cd /tmp
curl --remote-name https://mirrors.evowise.com/pub/OpenBSD/OpenSSH/portable/openssh-7.5p1.tar.gz curl --remote-name https://mirrors.evowise.com/pub/OpenBSD/OpenSSH/portable/openssh-7.5p1.tar.gz
tar xzvf openssh-7.5p1.tar.gz tar xzvf openssh-7.5p1.tar.gz
yum install rpm-build gcc make wget openssl-devel krb5-devel pam-devel libX11-devel xmkmf libXt-devel yum install rpm-build gcc make wget openssl-devel krb5-devel pam-devel libX11-devel xmkmf libXt-devel
``` ```
1. Prepare the build by copying files to the right place: 1. Prepare the build by copying files to the right place:
``` ```
mkdir -p /root/rpmbuild/{SOURCES,SPECS} mkdir -p /root/rpmbuild/{SOURCES,SPECS}
cp ./openssh-7.5p1/contrib/redhat/openssh.spec /root/rpmbuild/SPECS/ cp ./openssh-7.5p1/contrib/redhat/openssh.spec /root/rpmbuild/SPECS/
cp openssh-7.5p1.tar.gz /root/rpmbuild/SOURCES/ cp openssh-7.5p1.tar.gz /root/rpmbuild/SOURCES/
cd /root/rpmbuild/SPECS cd /root/rpmbuild/SPECS
``` ```
1. Next, set the spec settings properly: 1. Next, set the spec settings properly:
``` ```
sed -i -e "s/%define no_gnome_askpass 0/%define no_gnome_askpass 1/g" openssh.spec sed -i -e "s/%define no_gnome_askpass 0/%define no_gnome_askpass 1/g" openssh.spec
sed -i -e "s/%define no_x11_askpass 0/%define no_x11_askpass 1/g" openssh.spec sed -i -e "s/%define no_x11_askpass 0/%define no_x11_askpass 1/g" openssh.spec
sed -i -e "s/BuildPreReq/BuildRequires/g" openssh.spec sed -i -e "s/BuildPreReq/BuildRequires/g" openssh.spec
``` ```
1. Build the RPMs: 1. Build the RPMs:
``` ```
rpmbuild -bb openssh.spec rpmbuild -bb openssh.spec
``` ```
1. Ensure the RPMs were built: 1. Ensure the RPMs were built:
``` ```
ls -al /root/rpmbuild/RPMS/x86_64/ ls -al /root/rpmbuild/RPMS/x86_64/
``` ```
You should see something as the following: You should see something as the following:
``` ```
total 1324 total 1324
drwxr-xr-x. 2 root root 4096 Jun 20 19:37 . drwxr-xr-x. 2 root root 4096 Jun 20 19:37 .
drwxr-xr-x. 3 root root 19 Jun 20 19:37 .. drwxr-xr-x. 3 root root 19 Jun 20 19:37 ..
-rw-r--r--. 1 root root 470828 Jun 20 19:37 openssh-7.5p1-1.x86_64.rpm -rw-r--r--. 1 root root 470828 Jun 20 19:37 openssh-7.5p1-1.x86_64.rpm
-rw-r--r--. 1 root root 490716 Jun 20 19:37 openssh-clients-7.5p1-1.x86_64.rpm -rw-r--r--. 1 root root 490716 Jun 20 19:37 openssh-clients-7.5p1-1.x86_64.rpm
-rw-r--r--. 1 root root 17020 Jun 20 19:37 openssh-debuginfo-7.5p1-1.x86_64.rpm -rw-r--r--. 1 root root 17020 Jun 20 19:37 openssh-debuginfo-7.5p1-1.x86_64.rpm
-rw-r--r--. 1 root root 367516 Jun 20 19:37 openssh-server-7.5p1-1.x86_64.rpm -rw-r--r--. 1 root root 367516 Jun 20 19:37 openssh-server-7.5p1-1.x86_64.rpm
``` ```
1. Install the packages. OpenSSH packages will replace `/etc/pam.d/sshd` 1. Install the packages. OpenSSH packages will replace `/etc/pam.d/sshd`
with its own version, which may prevent users from logging in, so be sure with its own version, which may prevent users from logging in, so be sure
that the file is backed up and restored after installation: that the file is backed up and restored after installation:
``` ```
timestamp=$(date +%s) timestamp=$(date +%s)
cp /etc/pam.d/sshd pam-ssh-conf-$timestamp cp /etc/pam.d/sshd pam-ssh-conf-$timestamp
rpm -Uvh /root/rpmbuild/RPMS/x86_64/*.rpm rpm -Uvh /root/rpmbuild/RPMS/x86_64/*.rpm
yes | cp pam-ssh-conf-$timestamp /etc/pam.d/sshd yes | cp pam-ssh-conf-$timestamp /etc/pam.d/sshd
``` ```
1. Verify the installed version. In another window, attempt to login to the server: 1. Verify the installed version. In another window, attempt to login to the server:
``` ```
ssh -v <your-centos-machine> ssh -v <your-centos-machine>
``` ```
You should see a line that reads: "debug1: Remote protocol version 2.0, remote software version OpenSSH_7.5" You should see a line that reads: "debug1: Remote protocol version 2.0, remote software version OpenSSH_7.5"
If not, you may need to restart sshd (e.g. `systemctl restart sshd.service`). If not, you may need to restart sshd (e.g. `systemctl restart sshd.service`).
1. *IMPORTANT!* Open a new SSH session to your server before exiting to make 1. *IMPORTANT!* Open a new SSH session to your server before exiting to make
sure everything is working! If you need to downgrade, simple install the sure everything is working! If you need to downgrade, simple install the
older package: older package:
``` ```
# Only run this if you run into a problem logging in # Only run this if you run into a problem logging in
yum downgrade openssh-server openssh openssh-clients yum downgrade openssh-server openssh openssh-clients
``` ```

View File

@ -78,24 +78,27 @@ executed, and then read the same 1,000 files.
[repository storage path](../repository_storage_paths.md). [repository storage path](../repository_storage_paths.md).
1. Create a temporary directory for the test so it's easy to remove the files later: 1. Create a temporary directory for the test so it's easy to remove the files later:
```sh ```sh
mkdir test; cd test mkdir test; cd test
``` ```
1. Run the command: 1. Run the command:
```sh ```sh
time for i in {0..1000}; do echo 'test' > "test${i}.txt"; done time for i in {0..1000}; do echo 'test' > "test${i}.txt"; done
``` ```
1. To benchmark read performance, run the command: 1. To benchmark read performance, run the command:
```sh ```sh
time for i in {0..1000}; do cat "test${i}.txt" > /dev/null; done time for i in {0..1000}; do cat "test${i}.txt" > /dev/null; done
``` ```
1. Remove the test files: 1. Remove the test files:
```sh ```sh
cd ../; rm -rf test cd ../; rm -rf test
``` ```
The output of the `time for ...` commands will look similar to the following. The The output of the `time for ...` commands will look similar to the following. The
important metric is the `real` time. important metric is the `real` time.

View File

@ -124,9 +124,9 @@ The Pages daemon doesn't listen to the outside world.
1. Set the external URL for GitLab Pages in `/etc/gitlab/gitlab.rb`: 1. Set the external URL for GitLab Pages in `/etc/gitlab/gitlab.rb`:
```shell ```shell
pages_external_url 'http://example.io' pages_external_url 'http://example.io'
``` ```
1. [Reconfigure GitLab][reconfigure]. 1. [Reconfigure GitLab][reconfigure].
@ -149,16 +149,16 @@ outside world.
1. Place the certificate and key inside `/etc/gitlab/ssl` 1. Place the certificate and key inside `/etc/gitlab/ssl`
1. In `/etc/gitlab/gitlab.rb` specify the following configuration: 1. In `/etc/gitlab/gitlab.rb` specify the following configuration:
```shell ```shell
pages_external_url 'https://example.io' pages_external_url 'https://example.io'
pages_nginx['redirect_http_to_https'] = true pages_nginx['redirect_http_to_https'] = true
pages_nginx['ssl_certificate'] = "/etc/gitlab/ssl/pages-nginx.crt" pages_nginx['ssl_certificate'] = "/etc/gitlab/ssl/pages-nginx.crt"
pages_nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/pages-nginx.key" pages_nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/pages-nginx.key"
``` ```
where `pages-nginx.crt` and `pages-nginx.key` are the SSL cert and key, where `pages-nginx.crt` and `pages-nginx.key` are the SSL cert and key,
respectively. respectively.
1. [Reconfigure GitLab][reconfigure]. 1. [Reconfigure GitLab][reconfigure].
@ -171,9 +171,9 @@ behavior:
1. Edit `/etc/gitlab/gitlab.rb`. 1. Edit `/etc/gitlab/gitlab.rb`.
1. Set the `inplace_chroot` to `true` for GitLab Pages: 1. Set the `inplace_chroot` to `true` for GitLab Pages:
```shell ```shell
gitlab_pages['inplace_chroot'] = true gitlab_pages['inplace_chroot'] = true
``` ```
1. [Reconfigure GitLab][reconfigure]. 1. [Reconfigure GitLab][reconfigure].
@ -206,16 +206,16 @@ world. Custom domains are supported, but no TLS.
1. Edit `/etc/gitlab/gitlab.rb`: 1. Edit `/etc/gitlab/gitlab.rb`:
```shell ```shell
pages_external_url "http://example.io" pages_external_url "http://example.io"
nginx['listen_addresses'] = ['192.0.2.1'] nginx['listen_addresses'] = ['192.0.2.1']
pages_nginx['enable'] = false pages_nginx['enable'] = false
gitlab_pages['external_http'] = ['192.0.2.2:80', '[2001::2]:80'] gitlab_pages['external_http'] = ['192.0.2.2:80', '[2001::2]:80']
``` ```
where `192.0.2.1` is the primary IP address that GitLab is listening to and where `192.0.2.1` is the primary IP address that GitLab is listening to and
`192.0.2.2` and `2001::2` are the secondary IPs the GitLab Pages daemon `192.0.2.2` and `2001::2` are the secondary IPs the GitLab Pages daemon
listens on. If you don't have IPv6, you can omit the IPv6 address. listens on. If you don't have IPv6, you can omit the IPv6 address.
1. [Reconfigure GitLab][reconfigure]. 1. [Reconfigure GitLab][reconfigure].
@ -237,19 +237,19 @@ world. Custom domains and TLS are supported.
1. Edit `/etc/gitlab/gitlab.rb`: 1. Edit `/etc/gitlab/gitlab.rb`:
```shell ```shell
pages_external_url "https://example.io" pages_external_url "https://example.io"
nginx['listen_addresses'] = ['192.0.2.1'] nginx['listen_addresses'] = ['192.0.2.1']
pages_nginx['enable'] = false pages_nginx['enable'] = false
gitlab_pages['cert'] = "/etc/gitlab/ssl/example.io.crt" gitlab_pages['cert'] = "/etc/gitlab/ssl/example.io.crt"
gitlab_pages['cert_key'] = "/etc/gitlab/ssl/example.io.key" gitlab_pages['cert_key'] = "/etc/gitlab/ssl/example.io.key"
gitlab_pages['external_http'] = ['192.0.2.2:80', '[2001::2]:80'] gitlab_pages['external_http'] = ['192.0.2.2:80', '[2001::2]:80']
gitlab_pages['external_https'] = ['192.0.2.2:443', '[2001::2]:443'] gitlab_pages['external_https'] = ['192.0.2.2:443', '[2001::2]:443']
``` ```
where `192.0.2.1` is the primary IP address that GitLab is listening to and where `192.0.2.1` is the primary IP address that GitLab is listening to and
`192.0.2.2` and `2001::2` are the secondary IPs where the GitLab Pages daemon `192.0.2.2` and `2001::2` are the secondary IPs where the GitLab Pages daemon
listens on. If you don't have IPv6, you can omit the IPv6 address. listens on. If you don't have IPv6, you can omit the IPv6 address.
1. [Reconfigure GitLab][reconfigure]. 1. [Reconfigure GitLab][reconfigure].
@ -287,9 +287,9 @@ Pages access control is disabled by default. To enable it:
1. Enable it in `/etc/gitlab/gitlab.rb`: 1. Enable it in `/etc/gitlab/gitlab.rb`:
```ruby ```ruby
gitlab_pages['access_control'] = true gitlab_pages['access_control'] = true
``` ```
1. [Reconfigure GitLab][reconfigure]. 1. [Reconfigure GitLab][reconfigure].
1. Users can now configure it in their [projects' settings](../../user/project/pages/introduction.md#gitlab-pages-access-control-core-only). 1. Users can now configure it in their [projects' settings](../../user/project/pages/introduction.md#gitlab-pages-access-control-core-only).
@ -302,9 +302,9 @@ pages:
1. Configure in `/etc/gitlab/gitlab.rb`: 1. Configure in `/etc/gitlab/gitlab.rb`:
```ruby ```ruby
gitlab_pages['http_proxy'] = 'http://example:8080' gitlab_pages['http_proxy'] = 'http://example:8080'
``` ```
1. [Reconfigure Gitlab][reconfigure] for the changes to take effect. 1. [Reconfigure Gitlab][reconfigure] for the changes to take effect.
@ -319,9 +319,9 @@ Follow the steps below to configure verbose logging of GitLab Pages daemon.
If you wish to make it log events with level `DEBUG` you must configure this in If you wish to make it log events with level `DEBUG` you must configure this in
`/etc/gitlab/gitlab.rb`: `/etc/gitlab/gitlab.rb`:
```shell ```shell
gitlab_pages['log_verbose'] = true gitlab_pages['log_verbose'] = true
``` ```
1. [Reconfigure GitLab][reconfigure]. 1. [Reconfigure GitLab][reconfigure].
@ -334,9 +334,9 @@ are stored.
If you wish to store them in another location you must set it up in If you wish to store them in another location you must set it up in
`/etc/gitlab/gitlab.rb`: `/etc/gitlab/gitlab.rb`:
```shell ```shell
gitlab_rails['pages_path'] = "/mnt/storage/pages" gitlab_rails['pages_path'] = "/mnt/storage/pages"
``` ```
1. [Reconfigure GitLab][reconfigure]. 1. [Reconfigure GitLab][reconfigure].
@ -347,19 +347,19 @@ Omnibus GitLab 11.1.
1. By default the listener is configured to listen for requests on `localhost:8090`. 1. By default the listener is configured to listen for requests on `localhost:8090`.
If you wish to disable it you must configure this in If you wish to disable it you must configure this in
`/etc/gitlab/gitlab.rb`: `/etc/gitlab/gitlab.rb`:
```shell ```shell
gitlab_pages['listen_proxy'] = nil gitlab_pages['listen_proxy'] = nil
``` ```
If you wish to make it listen on a different port you must configure this also in If you wish to make it listen on a different port you must configure this also in
`/etc/gitlab/gitlab.rb`: `/etc/gitlab/gitlab.rb`:
```shell ```shell
gitlab_pages['listen_proxy'] = "localhost:10080" gitlab_pages['listen_proxy'] = "localhost:10080"
``` ```
1. [Reconfigure GitLab][reconfigure]. 1. [Reconfigure GitLab][reconfigure].
@ -381,28 +381,29 @@ Follow the steps below to configure GitLab Pages in a separate server.
1. On `app2` install GitLab omnibus and modify `/etc/gitlab/gitlab.rb` this way: 1. On `app2` install GitLab omnibus and modify `/etc/gitlab/gitlab.rb` this way:
```shell ```shell
external_url 'http://<ip-address-of-the-server>' external_url 'http://<ip-address-of-the-server>'
pages_external_url "http://<your-pages-domain>" pages_external_url "http://<your-pages-domain>"
postgresql['enable'] = false postgresql['enable'] = false
redis['enable'] = false redis['enable'] = false
prometheus['enable'] = false prometheus['enable'] = false
unicorn['enable'] = false unicorn['enable'] = false
sidekiq['enable'] = false sidekiq['enable'] = false
gitlab_workhorse['enable'] = false gitlab_workhorse['enable'] = false
gitaly['enable'] = false gitaly['enable'] = false
alertmanager['enable'] = false alertmanager['enable'] = false
node_exporter['enable'] = false node_exporter['enable'] = false
gitlab_rails['auto_migrate'] = false gitlab_rails['auto_migrate'] = false
``` ```
1. Run `sudo gitlab-ctl reconfigure`. 1. Run `sudo gitlab-ctl reconfigure`.
1. On `app1` apply the following changes to `/etc/gitlab/gitlab.rb`: 1. On `app1` apply the following changes to `/etc/gitlab/gitlab.rb`:
```shell ```shell
gitlab_pages['enable'] = false gitlab_pages['enable'] = false
pages_external_url "http://<your-pages-domain>" pages_external_url "http://<your-pages-domain>"
gitlab_rails['pages_path'] = "/mnt/pages" gitlab_rails['pages_path'] = "/mnt/pages"
``` ```
1. Run `sudo gitlab-ctl reconfigure`. 1. Run `sudo gitlab-ctl reconfigure`.

View File

@ -102,50 +102,50 @@ The Pages daemon doesn't listen to the outside world.
1. Install the Pages daemon: 1. Install the Pages daemon:
``` ```
cd /home/git cd /home/git
sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-pages.git sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-pages.git
cd gitlab-pages cd gitlab-pages
sudo -u git -H git checkout v$(</home/git/gitlab/GITLAB_PAGES_VERSION) sudo -u git -H git checkout v$(</home/git/gitlab/GITLAB_PAGES_VERSION)
sudo -u git -H make sudo -u git -H make
``` ```
1. Go to the GitLab installation directory: 1. Go to the GitLab installation directory:
```bash ```bash
cd /home/git/gitlab cd /home/git/gitlab
``` ```
1. Edit `gitlab.yml` and under the `pages` setting, set `enabled` to `true` and 1. Edit `gitlab.yml` and under the `pages` setting, set `enabled` to `true` and
the `host` to the FQDN under which GitLab Pages will be served: the `host` to the FQDN under which GitLab Pages will be served:
```yaml ```yaml
## GitLab Pages ## GitLab Pages
pages: pages:
enabled: true enabled: true
# The location where pages are stored (default: shared/pages). # The location where pages are stored (default: shared/pages).
# path: shared/pages # path: shared/pages
host: example.io host: example.io
port: 80 port: 80
https: false https: false
``` ```
1. Edit `/etc/default/gitlab` and set `gitlab_pages_enabled` to `true` in 1. Edit `/etc/default/gitlab` and set `gitlab_pages_enabled` to `true` in
order to enable the pages daemon. In `gitlab_pages_options` the order to enable the pages daemon. In `gitlab_pages_options` the
`-pages-domain` must match the `host` setting that you set above. `-pages-domain` must match the `host` setting that you set above.
``` ```
gitlab_pages_enabled=true gitlab_pages_enabled=true
gitlab_pages_options="-pages-domain example.io -pages-root $app_root/shared/pages -listen-proxy 127.0.0.1:8090" gitlab_pages_options="-pages-domain example.io -pages-root $app_root/shared/pages -listen-proxy 127.0.0.1:8090"
``` ```
1. Copy the `gitlab-pages` Nginx configuration file: 1. Copy the `gitlab-pages` Nginx configuration file:
```bash ```bash
sudo cp lib/support/nginx/gitlab-pages /etc/nginx/sites-available/gitlab-pages.conf sudo cp lib/support/nginx/gitlab-pages /etc/nginx/sites-available/gitlab-pages.conf
sudo ln -sf /etc/nginx/sites-{available,enabled}/gitlab-pages.conf sudo ln -sf /etc/nginx/sites-{available,enabled}/gitlab-pages.conf
``` ```
1. Restart NGINX 1. Restart NGINX
1. [Restart GitLab][restart] 1. [Restart GitLab][restart]
@ -165,27 +165,27 @@ outside world.
1. Install the Pages daemon: 1. Install the Pages daemon:
``` ```
cd /home/git cd /home/git
sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-pages.git sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-pages.git
cd gitlab-pages cd gitlab-pages
sudo -u git -H git checkout v$(</home/git/gitlab/GITLAB_PAGES_VERSION) sudo -u git -H git checkout v$(</home/git/gitlab/GITLAB_PAGES_VERSION)
sudo -u git -H make sudo -u git -H make
``` ```
1. In `gitlab.yml`, set the port to `443` and https to `true`: 1. In `gitlab.yml`, set the port to `443` and https to `true`:
```bash ```bash
## GitLab Pages ## GitLab Pages
pages: pages:
enabled: true enabled: true
# The location where pages are stored (default: shared/pages). # The location where pages are stored (default: shared/pages).
# path: shared/pages # path: shared/pages
host: example.io host: example.io
port: 443 port: 443
https: true https: true
``` ```
1. Edit `/etc/default/gitlab` and set `gitlab_pages_enabled` to `true` in 1. Edit `/etc/default/gitlab` and set `gitlab_pages_enabled` to `true` in
order to enable the pages daemon. In `gitlab_pages_options` the order to enable the pages daemon. In `gitlab_pages_options` the
@ -193,17 +193,17 @@ outside world.
The `-root-cert` and `-root-key` settings are the wildcard TLS certificates The `-root-cert` and `-root-key` settings are the wildcard TLS certificates
of the `example.io` domain: of the `example.io` domain:
``` ```
gitlab_pages_enabled=true gitlab_pages_enabled=true
gitlab_pages_options="-pages-domain example.io -pages-root $app_root/shared/pages -listen-proxy 127.0.0.1:8090 -root-cert /path/to/example.io.crt -root-key /path/to/example.io.key gitlab_pages_options="-pages-domain example.io -pages-root $app_root/shared/pages -listen-proxy 127.0.0.1:8090 -root-cert /path/to/example.io.crt -root-key /path/to/example.io.key
``` ```
1. Copy the `gitlab-pages-ssl` Nginx configuration file: 1. Copy the `gitlab-pages-ssl` Nginx configuration file:
```bash ```bash
sudo cp lib/support/nginx/gitlab-pages-ssl /etc/nginx/sites-available/gitlab-pages-ssl.conf sudo cp lib/support/nginx/gitlab-pages-ssl /etc/nginx/sites-available/gitlab-pages-ssl.conf
sudo ln -sf /etc/nginx/sites-{available,enabled}/gitlab-pages-ssl.conf sudo ln -sf /etc/nginx/sites-{available,enabled}/gitlab-pages-ssl.conf
``` ```
1. Restart NGINX 1. Restart NGINX
1. [Restart GitLab][restart] 1. [Restart GitLab][restart]
@ -231,48 +231,48 @@ world. Custom domains are supported, but no TLS.
1. Install the Pages daemon: 1. Install the Pages daemon:
``` ```
cd /home/git cd /home/git
sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-pages.git sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-pages.git
cd gitlab-pages cd gitlab-pages
sudo -u git -H git checkout v$(</home/git/gitlab/GITLAB_PAGES_VERSION) sudo -u git -H git checkout v$(</home/git/gitlab/GITLAB_PAGES_VERSION)
sudo -u git -H make sudo -u git -H make
``` ```
1. Edit `gitlab.yml` to look like the example below. You need to change the 1. Edit `gitlab.yml` to look like the example below. You need to change the
`host` to the FQDN under which GitLab Pages will be served. Set `host` to the FQDN under which GitLab Pages will be served. Set
`external_http` to the secondary IP on which the pages daemon will listen `external_http` to the secondary IP on which the pages daemon will listen
for connections: for connections:
```yaml ```yaml
pages: pages:
enabled: true enabled: true
# The location where pages are stored (default: shared/pages). # The location where pages are stored (default: shared/pages).
# path: shared/pages # path: shared/pages
host: example.io host: example.io
port: 80 port: 80
https: false https: false
external_http: 192.0.2.2:80 external_http: 192.0.2.2:80
``` ```
1. Edit `/etc/default/gitlab` and set `gitlab_pages_enabled` to `true` in 1. Edit `/etc/default/gitlab` and set `gitlab_pages_enabled` to `true` in
order to enable the pages daemon. In `gitlab_pages_options` the order to enable the pages daemon. In `gitlab_pages_options` the
`-pages-domain` and `-listen-http` must match the `host` and `external_http` `-pages-domain` and `-listen-http` must match the `host` and `external_http`
settings that you set above respectively: settings that you set above respectively:
``` ```
gitlab_pages_enabled=true gitlab_pages_enabled=true
gitlab_pages_options="-pages-domain example.io -pages-root $app_root/shared/pages -listen-proxy 127.0.0.1:8090 -listen-http 192.0.2.2:80" gitlab_pages_options="-pages-domain example.io -pages-root $app_root/shared/pages -listen-proxy 127.0.0.1:8090 -listen-http 192.0.2.2:80"
``` ```
1. Copy the `gitlab-pages-ssl` Nginx configuration file: 1. Copy the `gitlab-pages-ssl` Nginx configuration file:
```bash ```bash
sudo cp lib/support/nginx/gitlab-pages /etc/nginx/sites-available/gitlab-pages.conf sudo cp lib/support/nginx/gitlab-pages /etc/nginx/sites-available/gitlab-pages.conf
sudo ln -sf /etc/nginx/sites-{available,enabled}/gitlab-pages.conf sudo ln -sf /etc/nginx/sites-{available,enabled}/gitlab-pages.conf
``` ```
1. Edit all GitLab related configs in `/etc/nginx/site-available/` and replace 1. Edit all GitLab related configs in `/etc/nginx/site-available/` and replace
`0.0.0.0` with `192.0.2.1`, where `192.0.2.1` the primary IP where GitLab `0.0.0.0` with `192.0.2.1`, where `192.0.2.1` the primary IP where GitLab
@ -297,33 +297,33 @@ world. Custom domains and TLS are supported.
1. Install the Pages daemon: 1. Install the Pages daemon:
``` ```
cd /home/git cd /home/git
sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-pages.git sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-pages.git
cd gitlab-pages cd gitlab-pages
sudo -u git -H git checkout v$(</home/git/gitlab/GITLAB_PAGES_VERSION) sudo -u git -H git checkout v$(</home/git/gitlab/GITLAB_PAGES_VERSION)
sudo -u git -H make sudo -u git -H make
``` ```
1. Edit `gitlab.yml` to look like the example below. You need to change the 1. Edit `gitlab.yml` to look like the example below. You need to change the
`host` to the FQDN under which GitLab Pages will be served. Set `host` to the FQDN under which GitLab Pages will be served. Set
`external_http` and `external_https` to the secondary IP on which the pages `external_http` and `external_https` to the secondary IP on which the pages
daemon will listen for connections: daemon will listen for connections:
```yaml ```yaml
## GitLab Pages ## GitLab Pages
pages: pages:
enabled: true enabled: true
# The location where pages are stored (default: shared/pages). # The location where pages are stored (default: shared/pages).
# path: shared/pages # path: shared/pages
host: example.io host: example.io
port: 443 port: 443
https: true https: true
external_http: 192.0.2.2:80 external_http: 192.0.2.2:80
external_https: 192.0.2.2:443 external_https: 192.0.2.2:443
``` ```
1. Edit `/etc/default/gitlab` and set `gitlab_pages_enabled` to `true` in 1. Edit `/etc/default/gitlab` and set `gitlab_pages_enabled` to `true` in
order to enable the pages daemon. In `gitlab_pages_options` the order to enable the pages daemon. In `gitlab_pages_options` the
@ -332,17 +332,17 @@ world. Custom domains and TLS are supported.
The `-root-cert` and `-root-key` settings are the wildcard TLS certificates The `-root-cert` and `-root-key` settings are the wildcard TLS certificates
of the `example.io` domain: of the `example.io` domain:
``` ```
gitlab_pages_enabled=true gitlab_pages_enabled=true
gitlab_pages_options="-pages-domain example.io -pages-root $app_root/shared/pages -listen-proxy 127.0.0.1:8090 -listen-http 192.0.2.2:80 -listen-https 192.0.2.2:443 -root-cert /path/to/example.io.crt -root-key /path/to/example.io.key gitlab_pages_options="-pages-domain example.io -pages-root $app_root/shared/pages -listen-proxy 127.0.0.1:8090 -listen-http 192.0.2.2:80 -listen-https 192.0.2.2:443 -root-cert /path/to/example.io.crt -root-key /path/to/example.io.key
``` ```
1. Copy the `gitlab-pages-ssl` Nginx configuration file: 1. Copy the `gitlab-pages-ssl` Nginx configuration file:
```bash ```bash
sudo cp lib/support/nginx/gitlab-pages-ssl /etc/nginx/sites-available/gitlab-pages-ssl.conf sudo cp lib/support/nginx/gitlab-pages-ssl /etc/nginx/sites-available/gitlab-pages-ssl.conf
sudo ln -sf /etc/nginx/sites-{available,enabled}/gitlab-pages-ssl.conf sudo ln -sf /etc/nginx/sites-{available,enabled}/gitlab-pages-ssl.conf
``` ```
1. Edit all GitLab related configs in `/etc/nginx/site-available/` and replace 1. Edit all GitLab related configs in `/etc/nginx/site-available/` and replace
`0.0.0.0` with `192.0.2.1`, where `192.0.2.1` the primary IP where GitLab `0.0.0.0` with `192.0.2.1`, where `192.0.2.1` the primary IP where GitLab
@ -359,9 +359,9 @@ are stored.
If you wish to store them in another location you must set it up in If you wish to store them in another location you must set it up in
`/etc/gitlab/gitlab.rb`: `/etc/gitlab/gitlab.rb`:
```ruby ```ruby
gitlab_rails['pages_path'] = "/mnt/storage/pages" gitlab_rails['pages_path'] = "/mnt/storage/pages"
``` ```
1. [Reconfigure GitLab][reconfigure] 1. [Reconfigure GitLab][reconfigure]
@ -414,10 +414,10 @@ Pages access control is disabled by default. To enable it:
1. Modify your `config/gitlab.yml` file: 1. Modify your `config/gitlab.yml` file:
```yaml ```yaml
pages: pages:
access_control: true access_control: true
``` ```
1. [Restart GitLab][restart]. 1. [Restart GitLab][restart].
1. Create a new [system OAuth application](../../integration/oauth_provider.md#adding-an-application-through-the-profile). 1. Create a new [system OAuth application](../../integration/oauth_provider.md#adding-an-application-through-the-profile).
@ -426,12 +426,12 @@ Pages access control is disabled by default. To enable it:
application, but it does need the "api" scope. application, but it does need the "api" scope.
1. Start the Pages daemon with the following additional arguments: 1. Start the Pages daemon with the following additional arguments:
```shell ```shell
-auth-client-secret <OAuth code generated by GitLab> \ -auth-client-secret <OAuth code generated by GitLab> \
-auth-redirect-uri http://projects.example.io/auth \ -auth-redirect-uri http://projects.example.io/auth \
-auth-secret <40 random hex characters> \ -auth-secret <40 random hex characters> \
-auth-server <URL of the GitLab instance> -auth-server <URL of the GitLab instance>
``` ```
1. Users can now configure it in their [projects' settings](../../user/project/pages/introduction.md#gitlab-pages-access-control-core-only). 1. Users can now configure it in their [projects' settings](../../user/project/pages/introduction.md#gitlab-pages-access-control-core-only).
@ -444,12 +444,12 @@ are stored.
If you wish to store them in another location you must set it up in If you wish to store them in another location you must set it up in
`gitlab.yml` under the `pages` section: `gitlab.yml` under the `pages` section:
```yaml ```yaml
pages: pages:
enabled: true enabled: true
# The location where pages are stored (default: shared/pages). # The location where pages are stored (default: shared/pages).
path: /mnt/storage/pages path: /mnt/storage/pages
``` ```
1. [Restart GitLab][restart] 1. [Restart GitLab][restart]

View File

@ -4,16 +4,16 @@
You need `exiftool` installed on your system. If you installed GitLab: You need `exiftool` installed on your system. If you installed GitLab:
- Using the Omnibus package, you're all set. - Using the Omnibus package, you're all set.
- From source, make sure `exiftool` is installed: - From source, make sure `exiftool` is installed:
```sh ```sh
# Debian/Ubuntu # Debian/Ubuntu
sudo apt-get install libimage-exiftool-perl sudo apt-get install libimage-exiftool-perl
# RHEL/CentOS # RHEL/CentOS
sudo yum install perl-Image-ExifTool sudo yum install perl-Image-ExifTool
``` ```
## Remove EXIF data from existing uploads ## Remove EXIF data from existing uploads

View File

@ -10,43 +10,43 @@ an SMTP server, but you're not seeing mail delivered. Here's how to check the se
1. Run a Rails console: 1. Run a Rails console:
```sh ```sh
sudo gitlab-rails console production sudo gitlab-rails console production
``` ```
or for source installs: or for source installs:
```sh ```sh
bundle exec rails console production bundle exec rails console production
``` ```
1. Look at the ActionMailer `delivery_method` to make sure it matches what you 1. Look at the ActionMailer `delivery_method` to make sure it matches what you
intended. If you configured SMTP, it should say `:smtp`. If you're using intended. If you configured SMTP, it should say `:smtp`. If you're using
Sendmail, it should say `:sendmail`: Sendmail, it should say `:sendmail`:
```ruby ```ruby
irb(main):001:0> ActionMailer::Base.delivery_method irb(main):001:0> ActionMailer::Base.delivery_method
=> :smtp => :smtp
``` ```
1. If you're using SMTP, check the mail settings: 1. If you're using SMTP, check the mail settings:
```ruby ```ruby
irb(main):002:0> ActionMailer::Base.smtp_settings irb(main):002:0> ActionMailer::Base.smtp_settings
=> {:address=>"localhost", :port=>25, :domain=>"localhost.localdomain", :user_name=>nil, :password=>nil, :authentication=>nil, :enable_starttls_auto=>true}``` => {:address=>"localhost", :port=>25, :domain=>"localhost.localdomain", :user_name=>nil, :password=>nil, :authentication=>nil, :enable_starttls_auto=>true}```
``` ```
In the example above, the SMTP server is configured for the local machine. If this is intended, you may need to check your local mail In the example above, the SMTP server is configured for the local machine. If this is intended, you may need to check your local mail
logs (e.g. `/var/log/mail.log`) for more details. logs (e.g. `/var/log/mail.log`) for more details.
1. Send a test message via the console. 1. Send a test message via the console.
```ruby ```ruby
irb(main):003:0> Notify.test_email('youremail@email.com', 'Hello World', 'This is a test message').deliver_now irb(main):003:0> Notify.test_email('youremail@email.com', 'Hello World', 'This is a test message').deliver_now
``` ```
If you do not receive an e-mail and/or see an error message, then check If you do not receive an e-mail and/or see an error message, then check
your mail server settings. your mail server settings.
## Advanced Issues ## Advanced Issues
@ -103,37 +103,37 @@ downtime. Otherwise skip to the next section.
1. Run `sudo gdb -p <PID>` to attach to the unicorn process. 1. Run `sudo gdb -p <PID>` to attach to the unicorn process.
1. In the gdb window, type: 1. In the gdb window, type:
``` ```
call (void) rb_backtrace() call (void) rb_backtrace()
``` ```
1. This forces the process to generate a Ruby backtrace. Check 1. This forces the process to generate a Ruby backtrace. Check
`/var/log/gitlab/unicorn/unicorn_stderr.log` for the backtace. For example, you may see: `/var/log/gitlab/unicorn/unicorn_stderr.log` for the backtace. For example, you may see:
```ruby ```ruby
from /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/metrics/sampler.rb:33:in `block in start' from /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/metrics/sampler.rb:33:in `block in start'
from /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/metrics/sampler.rb:33:in `loop' from /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/metrics/sampler.rb:33:in `loop'
from /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/metrics/sampler.rb:36:in `block (2 levels) in start' from /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/metrics/sampler.rb:36:in `block (2 levels) in start'
from /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/metrics/sampler.rb:44:in `sample' from /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/metrics/sampler.rb:44:in `sample'
from /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/metrics/sampler.rb:68:in `sample_objects' from /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/metrics/sampler.rb:68:in `sample_objects'
from /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/metrics/sampler.rb:68:in `each_with_object' from /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/metrics/sampler.rb:68:in `each_with_object'
from /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/metrics/sampler.rb:68:in `each' from /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/metrics/sampler.rb:68:in `each'
from /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/metrics/sampler.rb:69:in `block in sample_objects' from /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/metrics/sampler.rb:69:in `block in sample_objects'
from /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/metrics/sampler.rb:69:in `name' from /opt/gitlab/embedded/service/gitlab-rails/lib/gitlab/metrics/sampler.rb:69:in `name'
``` ```
1. To see the current threads, run: 1. To see the current threads, run:
``` ```
thread apply all bt thread apply all bt
``` ```
1. Once you're done debugging with `gdb`, be sure to detach from the process and exit: 1. Once you're done debugging with `gdb`, be sure to detach from the process and exit:
``` ```
detach detach
exit exit
``` ```
Note that if the unicorn process terminates before you are able to run these Note that if the unicorn process terminates before you are able to run these
commands, gdb will report an error. To buy more time, you can always raise the commands, gdb will report an error. To buy more time, you can always raise the
@ -162,21 +162,21 @@ separate Rails process to debug the issue:
1. Create a Personal Access Token for your user (Profile Settings -> Access Tokens). 1. Create a Personal Access Token for your user (Profile Settings -> Access Tokens).
1. Bring up the GitLab Rails console. For omnibus users, run: 1. Bring up the GitLab Rails console. For omnibus users, run:
``` ```
sudo gitlab-rails console sudo gitlab-rails console
``` ```
1. At the Rails console, run: 1. At the Rails console, run:
```ruby ```ruby
[1] pry(main)> app.get '<URL FROM STEP 2>/?private_token=<TOKEN FROM STEP 3>' [1] pry(main)> app.get '<URL FROM STEP 2>/?private_token=<TOKEN FROM STEP 3>'
``` ```
For example: For example:
```ruby ```ruby
[1] pry(main)> app.get 'https://gitlab.com/gitlab-org/gitlab-ce/issues/1?private_token=123456' [1] pry(main)> app.get 'https://gitlab.com/gitlab-org/gitlab-ce/issues/1?private_token=123456'
``` ```
1. In a new window, run `top`. It should show this ruby process using 100% CPU. Write down the PID. 1. In a new window, run `top`. It should show this ruby process using 100% CPU. Write down the PID.
1. Follow step 2 from the previous section on using gdb. 1. Follow step 2 from the previous section on using gdb.