diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-11 15:07:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-11 15:07:02 +0300 |
commit | bcd11d993d80d46053a97ee3b0344ed4d2b4571b (patch) | |
tree | e3b4047cafd580d3a3d7d8cde094c183ee9aabfc /doc/administration/operations | |
parent | 871b886a1794e5baefd6b2f96caf2ac4ce5da6ca (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/administration/operations')
-rw-r--r-- | doc/administration/operations/fast_ssh_key_lookup.md | 9 | ||||
-rw-r--r-- | doc/administration/operations/gitlab_sshd.md | 4 | ||||
-rw-r--r-- | doc/administration/operations/puma.md | 4 | ||||
-rw-r--r-- | doc/administration/operations/rails_console.md | 48 |
4 files changed, 36 insertions, 29 deletions
diff --git a/doc/administration/operations/fast_ssh_key_lookup.md b/doc/administration/operations/fast_ssh_key_lookup.md index d54d286c19d..8382f3aa8b5 100644 --- a/doc/administration/operations/fast_ssh_key_lookup.md +++ b/doc/administration/operations/fast_ssh_key_lookup.md @@ -27,8 +27,8 @@ lookup of authorized SSH keys. ## Fast lookup is required for Geo **(PREMIUM)** -Unlike [Cloud Native GitLab](https://docs.gitlab.com/charts/), Omnibus GitLab by default -manages an `authorized_keys` file that is located in the +Unlike [Cloud Native GitLab](https://docs.gitlab.com/charts/), by default Linux package installations +manage an `authorized_keys` file that is located in the `git` user's home directory. For most installations, this file is located under `/var/opt/gitlab/.ssh/authorized_keys`, but you can use the following command to locate the `authorized_keys` on your system: @@ -74,7 +74,7 @@ able to accept a fingerprint. Check the version of OpenSSH on your server with ` Add the following to your `sshd_config` file. This file is usually located at `/etc/ssh/sshd_config`, but it is at `/assets/sshd_config` if you're using -Omnibus Docker: +Docker from a Linux package installation: ```plaintext Match User git # Apply the AuthorizedKeysCommands to the git user only @@ -146,7 +146,8 @@ This overview is brief. Refer to the above instructions for more context. 1. On the left sidebar, select **Settings > Network**. 1. Expand **Performance optimization**. 1. Select the **Use authorized_keys file to authenticate SSH keys** checkbox. -1. Remove the `AuthorizedKeysCommand` lines from `/etc/ssh/sshd_config` or from `/assets/sshd_config` if you are using Omnibus Docker. +1. Remove the `AuthorizedKeysCommand` lines from `/etc/ssh/sshd_config` or from `/assets/sshd_config` if you are using Docker + from a Linux package installation. 1. Reload `sshd`: `sudo service sshd reload`. ## SELinux support and limitations diff --git a/doc/administration/operations/gitlab_sshd.md b/doc/administration/operations/gitlab_sshd.md index 5c4af32fc3d..2707c8f08a0 100644 --- a/doc/administration/operations/gitlab_sshd.md +++ b/doc/administration/operations/gitlab_sshd.md @@ -7,7 +7,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w # `gitlab-sshd` **(FREE SELF)** > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/299109) in GitLab 14.5 as an Experiment for self-managed customers. -> - Ready for production use with [Cloud Native GitLab in GitLab 15.1](https://gitlab.com/gitlab-org/charts/gitlab/-/issues/2540) and [Omnibus GitLab in GitLab 15.9](https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/5937). +> - Ready for production use with [Cloud Native GitLab in GitLab 15.1](https://gitlab.com/gitlab-org/charts/gitlab/-/issues/2540) and [Linux packages in GitLab 15.9](https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/5937). `gitlab-sshd` is [a standalone SSH server](https://gitlab.com/gitlab-org/gitlab-shell/-/tree/main/internal/sshd) written in Go. It is provided as a part of the `gitlab-shell` package. It has a lower memory @@ -47,7 +47,7 @@ The following instructions enable `gitlab-sshd` on a different port than OpenSSH gitlab_sshd['listen_address'] = '[::]:2222' # Adjust the port accordingly ``` -1. Optional. By default, Omnibus GitLab generates SSH host keys for `gitlab-sshd` if +1. Optional. By default, Linux package installations generate SSH host keys for `gitlab-sshd` if they do not exist in `/var/opt/gitlab/gitlab-sshd`. If you wish to disable this automatic generation, add this line: ```ruby diff --git a/doc/administration/operations/puma.md b/doc/administration/operations/puma.md index c732365c57b..f471dcd44b0 100644 --- a/doc/administration/operations/puma.md +++ b/doc/administration/operations/puma.md @@ -173,7 +173,7 @@ optimal configuration: ## Configuring Puma to listen over SSL -Puma, when deployed with Omnibus GitLab, listens over a Unix socket by +Puma, when deployed with a Linux package installation, listens over a Unix socket by default. To configure Puma to listen over an HTTPS port instead, follow the steps below: @@ -386,7 +386,7 @@ downtime. Otherwise, skip to the next section. GDB reports an error if the Puma process terminates before you can run these commands. To buy more time, you can always raise the -Puma worker timeout. For omnibus users, you can edit `/etc/gitlab/gitlab.rb` and +Puma worker timeout. For Linux package installation users, you can edit `/etc/gitlab/gitlab.rb` and increase it from 60 seconds to 600: ```ruby diff --git a/doc/administration/operations/rails_console.md b/doc/administration/operations/rails_console.md index 8edd20edf57..311bae0a040 100644 --- a/doc/administration/operations/rails_console.md +++ b/doc/administration/operations/rails_console.md @@ -25,28 +25,34 @@ Rails experience is useful but not required. ## Starting a Rails console session -**For Omnibus installations** +The process for starting a Rails console session depends on the type of GitLab installation. + +::Tabs + +:::TabTitle Linux package (Omnibus) ```shell sudo gitlab-rails console ``` -**For Docker installations** +:::TabTitle Docker ```shell docker exec -it <container-id> gitlab-rails console ``` -**For installations from source** +:::TabTitle Self-compiled (source) ```shell sudo -u git -H bundle exec rails console -e production ``` -**For Kubernetes deployments** +:::TabTitle Helm chart (Kubernetes) The console is in the toolbox pod. Refer to our [Kubernetes cheat sheet](https://docs.gitlab.com/charts/troubleshooting/kubernetes_cheat_sheet.html#gitlab-specific-kubernetes-information) for details. +::EndTabs + To exit the console, type: `quit`. ## Enable Active Record logging @@ -130,31 +136,31 @@ environment, you can do so using the [Rails Runner](https://guides.rubyonrails.o When executing a script file, the script must be accessible by the `git` user. When the command or script completes, the Rails Runner process finishes. -It is useful for running within other scripts or cron jobs for example. +It is useful for running in other scripts or cron jobs for example. -**For Omnibus installations** +- For Linux package installations: -```shell -sudo gitlab-rails runner "RAILS_COMMAND" + ```shell + sudo gitlab-rails runner "RAILS_COMMAND" -# Example with a two-line Ruby script -sudo gitlab-rails runner "user = User.first; puts user.username" + # Example with a two-line Ruby script + sudo gitlab-rails runner "user = User.first; puts user.username" -# Example with a ruby script file (make sure to use the full path) -sudo gitlab-rails runner /path/to/script.rb -``` + # Example with a ruby script file (make sure to use the full path) + sudo gitlab-rails runner /path/to/script.rb + ``` -**For installations from source** +- For self-compiled installations: -```shell -sudo -u git -H bundle exec rails runner -e production "RAILS_COMMAND" + ```shell + sudo -u git -H bundle exec rails runner -e production "RAILS_COMMAND" -# Example with a two-line Ruby script -sudo -u git -H bundle exec rails runner -e production "user = User.first; puts user.username" + # Example with a two-line Ruby script + sudo -u git -H bundle exec rails runner -e production "user = User.first; puts user.username" -# Example with a ruby script file (make sure to use the full path) -sudo -u git -H bundle exec rails runner -e production /path/to/script.rb -``` + # Example with a ruby script file (make sure to use the full path) + sudo -u git -H bundle exec rails runner -e production /path/to/script.rb + ``` Rails Runner does not produce the same output as the console. |