Skip to content

Commit

Permalink
docs(refactor): add code format to long commands
Browse files Browse the repository at this point in the history
Signed-off-by: Evgeniy Frolov <[email protected]>
  • Loading branch information
Fral738 committed Nov 7, 2024
1 parent 937ab3c commit f83a231
Show file tree
Hide file tree
Showing 14 changed files with 66 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,8 @@ Follow these steps on the GitLab Runner host to install Buildah:

* The `sysctl -n user.max_user_namespaces` command should return `15000` or more, otherwise run `echo 'user.max_user_namespaces = 15000' | sudo tee -a /etc/sysctl.conf && sudo sysctl -p`.

* (For Ubuntu 23.10 and later) set values `kernel.apparmor_restrict_unprivileged_unconfined` and `kernel.apparmor_restrict_unprivileged_userns` to `0` with the command `{ echo "kernel.apparmor_restrict_unprivileged_userns = 0" && echo "kernel.apparmor_restrict_unprivileged_unconfined = 0";} | sudo tee -a /etc/sysctl.d/20-apparmor-donotrestrict.conf && sudo sysctl -p /etc/sysctl.d/20-apparmor-donotrestrict.conf`
* (For Ubuntu 23.10 and later) set values `kernel.apparmor_restrict_unprivileged_unconfined` and `kernel.apparmor_restrict_unprivileged_userns` to `0` with the command:

```shell
{ echo "kernel.apparmor_restrict_unprivileged_userns = 0" && echo "kernel.apparmor_restrict_unprivileged_unconfined = 0";} | sudo tee -a /etc/sysctl.d/20-apparmor-donotrestrict.conf && sudo sysctl -p /etc/sysctl.d/20-apparmor-donotrestrict.conf
```
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@

### Prepare the environment

(For Ubuntu 23.10 and later) on the GitLab Runner host the `sysctl -ne kernel.apparmor_restrict_unprivileged_userns` command should not return 1, otherwise run `echo "kernel.apparmor_restrict_unprivileged_userns = 0" | sudo tee -a /etc/sysctl.d/20-apparmor-donotrestrict.conf && sudo sysctl -p /etc/sysctl.d/20-apparmor-donotrestrict.conf`
(For Ubuntu 23.10 and later) on the GitLab Runner host run:

```shell
{ echo "kernel.apparmor_restrict_unprivileged_userns = 0" && echo "kernel.apparmor_restrict_unprivileged_unconfined = 0";} | sudo tee -a /etc/sysctl.d/20-apparmor-donotrestrict.conf && sudo sysctl -p /etc/sysctl.d/20-apparmor-donotrestrict.conf
```

### Installing GitLab Runner

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ Follow [official instructions](https://docs.gitlab.com/runner/install/) to insta

### Prepare the environment

(For Ubuntu 23.10 and later) on the GitLab Runner nodes run `{ echo "kernel.apparmor_restrict_unprivileged_userns = 0" && echo "kernel.apparmor_restrict_unprivileged_unconfined = 0";} | sudo tee -a /etc/sysctl.d/20-apparmor-donotrestrict.conf && sudo sysctl -p /etc/sysctl.d/20-apparmor-donotrestrict.conf`
(For Ubuntu 23.10 and later) on the GitLab Runner nodes run:

```shell
{ echo "kernel.apparmor_restrict_unprivileged_userns = 0" && echo "kernel.apparmor_restrict_unprivileged_unconfined = 0";} | sudo tee -a /etc/sysctl.d/20-apparmor-donotrestrict.conf && sudo sysctl -p /etc/sysctl.d/20-apparmor-donotrestrict.conf
```

### Basic GitLab Runner configuration (no caching)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@

### Prepare the environment

(For Ubuntu 23.10 and later) on the GitLab Runner host run `{ echo "kernel.apparmor_restrict_unprivileged_userns = 0" && echo "kernel.apparmor_restrict_unprivileged_unconfined = 0";} | sudo tee -a /etc/sysctl.d/20-apparmor-donotrestrict.conf && sudo sysctl -p /etc/sysctl.d/20-apparmor-donotrestrict.conf`
(For Ubuntu 23.10 and later) on the GitLab Runner host run:

```shell
{ echo "kernel.apparmor_restrict_unprivileged_userns = 0" && echo "kernel.apparmor_restrict_unprivileged_unconfined = 0";} | sudo tee -a /etc/sysctl.d/20-apparmor-donotrestrict.conf && sudo sysctl -p /etc/sysctl.d/20-apparmor-donotrestrict.conf
```

### Installing GitLab Runner

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@

### Prepare the environment

(For Ubuntu 23.10 and later) on the GitLab Runner nodes run `{ echo "kernel.apparmor_restrict_unprivileged_userns = 0" && echo "kernel.apparmor_restrict_unprivileged_unconfined = 0";} | sudo tee -a /etc/sysctl.d/20-apparmor-donotrestrict.conf && sudo sysctl -p /etc/sysctl.d/20-apparmor-donotrestrict.conf`
(For Ubuntu 23.10 and later) on the GitLab Runner nodes run:

```shell
{ echo "kernel.apparmor_restrict_unprivileged_userns = 0" && echo "kernel.apparmor_restrict_unprivileged_unconfined = 0";} | sudo tee -a /etc/sysctl.d/20-apparmor-donotrestrict.conf && sudo sysctl -p /etc/sysctl.d/20-apparmor-donotrestrict.conf
```

### Install GitLab Runner

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@

### Prepare the environment

(For Ubuntu 23.10 and later) on the GitLab Runner host run `{ echo "kernel.apparmor_restrict_unprivileged_userns = 0" && echo "kernel.apparmor_restrict_unprivileged_unconfined = 0";} | sudo tee -a /etc/sysctl.d/20-apparmor-donotrestrict.conf && sudo sysctl -p /etc/sysctl.d/20-apparmor-donotrestrict.conf`
(For Ubuntu 23.10 and later) on the GitLab Runner host run:

```shell
{ echo "kernel.apparmor_restrict_unprivileged_userns = 0" && echo "kernel.apparmor_restrict_unprivileged_unconfined = 0";} | sudo tee -a /etc/sysctl.d/20-apparmor-donotrestrict.conf && sudo sysctl -p /etc/sysctl.d/20-apparmor-donotrestrict.conf
```

### Configuring the Runner

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@

### Prepare the environment

(For Ubuntu 23.10 and later) on the GitLab Runner nodes run `{ echo "kernel.apparmor_restrict_unprivileged_userns = 0" && echo "kernel.apparmor_restrict_unprivileged_unconfined = 0";} | sudo tee -a /etc/sysctl.d/20-apparmor-donotrestrict.conf && sudo sysctl -p /etc/sysctl.d/20-apparmor-donotrestrict.conf`
(For Ubuntu 23.10 and later) on the GitLab Runner nodes run:

```shell
{ echo "kernel.apparmor_restrict_unprivileged_userns = 0" && echo "kernel.apparmor_restrict_unprivileged_unconfined = 0";} | sudo tee -a /etc/sysctl.d/20-apparmor-donotrestrict.conf && sudo sysctl -p /etc/sysctl.d/20-apparmor-donotrestrict.conf
```

### Basic Runner configuration (no caching)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,8 @@

* Команда `sysctl -n user.max_user_namespaces` должна вернуть `15000` или больше, а иначе выполните `echo 'user.max_user_namespaces = 15000' | sudo tee -a /etc/sysctl.conf && sudo sysctl -p`.

* (Для Ubuntu 23.10 и выше) установите значения `kernel.apparmor_restrict_unprivileged_unconfined` и `kernel.apparmor_restrict_unprivileged_userns` в `0` командой `{ echo "kernel.apparmor_restrict_unprivileged_userns = 0" && echo "kernel.apparmor_restrict_unprivileged_unconfined = 0";} | sudo tee -a /etc/sysctl.d/20-apparmor-donotrestrict.conf && sudo sysctl -p /etc/sysctl.d/20-apparmor-donotrestrict.conf`
* (Для Ubuntu 23.10 и выше) установите значения `kernel.apparmor_restrict_unprivileged_unconfined` и `kernel.apparmor_restrict_unprivileged_userns` в `0` командой:

```shell
{ echo "kernel.apparmor_restrict_unprivileged_userns = 0" && echo "kernel.apparmor_restrict_unprivileged_unconfined = 0";} | sudo tee -a /etc/sysctl.d/20-apparmor-donotrestrict.conf && sudo sysctl -p /etc/sysctl.d/20-apparmor-donotrestrict.conf
```
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

### Подготовка окружения

(Для Ubuntu 23.10 и выше) на хосте GitLab Runner команда `sysctl -ne kernel.apparmor_restrict_unprivileged_userns` не должна возвращать 1, в противном случае запустите `echo "kernel.apparmor_restrict_unprivileged_userns = 0" | sudo tee -a /etc/sysctl.d/20-apparmor-donotrestrict.conf && sudo sysctl -p /etc/sysctl.d/20-apparmor-donotrestrict.conf`
(Для Ubuntu 23.10 и выше) на хосте GitLab Runner запустите `{ echo "kernel.apparmor_restrict_unprivileged_userns = 0" && echo "kernel.apparmor_restrict_unprivileged_unconfined = 0";} | sudo tee -a /etc/sysctl.d/20-apparmor-donotrestrict.conf && sudo sysctl -p /etc/sysctl.d/20-apparmor-donotrestrict.conf`

### Установка GitLab Runner

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@

### Подготовка окружения

(Для Ubuntu 23.10 и выше) на нодах GitLab Runner запустите `{ echo "kernel.apparmor_restrict_unprivileged_userns = 0" && echo "kernel.apparmor_restrict_unprivileged_unconfined = 0";} | sudo tee -a /etc/sysctl.d/20-apparmor-donotrestrict.conf && sudo sysctl -p /etc/sysctl.d/20-apparmor-donotrestrict.conf`
(Для Ubuntu 23.10 и выше) на нодах GitLab Runner запустите:

```shell
{ echo "kernel.apparmor_restrict_unprivileged_userns = 0" && echo "kernel.apparmor_restrict_unprivileged_unconfined = 0";} | sudo tee -a /etc/sysctl.d/20-apparmor-donotrestrict.conf && sudo sysctl -p /etc/sysctl.d/20-apparmor-donotrestrict.conf
```

### Установка GitLab Runner

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@

### Подготовка окружения

(Для Ubuntu 23.10 и выше) на хосте GitLab Runner запустите `{ echo "kernel.apparmor_restrict_unprivileged_userns = 0" && echo "kernel.apparmor_restrict_unprivileged_unconfined = 0";} | sudo tee -a /etc/sysctl.d/20-apparmor-donotrestrict.conf && sudo sysctl -p /etc/sysctl.d/20-apparmor-donotrestrict.conf`
(Для Ubuntu 23.10 и выше) на хосте GitLab Runner запустите:

```shell
{ echo "kernel.apparmor_restrict_unprivileged_userns = 0" && echo "kernel.apparmor_restrict_unprivileged_unconfined = 0";} | sudo tee -a /etc/sysctl.d/20-apparmor-donotrestrict.conf && sudo sysctl -p /etc/sysctl.d/20-apparmor-donotrestrict.conf
```

### Установка GitLab Runner

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@

### Подготовка окружения

(Для Ubuntu 23.10 и выше) на нодах GitLab Runner запустите `{ echo "kernel.apparmor_restrict_unprivileged_userns = 0" && echo "kernel.apparmor_restrict_unprivileged_unconfined = 0";} | sudo tee -a /etc/sysctl.d/20-apparmor-donotrestrict.conf && sudo sysctl -p /etc/sysctl.d/20-apparmor-donotrestrict.conf`
(Для Ubuntu 23.10 и выше) на нодах GitLab Runner запустите:

```shell
{ echo "kernel.apparmor_restrict_unprivileged_userns = 0" && echo "kernel.apparmor_restrict_unprivileged_unconfined = 0";} | sudo tee -a /etc/sysctl.d/20-apparmor-donotrestrict.conf && sudo sysctl -p /etc/sysctl.d/20-apparmor-donotrestrict.conf
```

### Установка GitLab Runner

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@

### Подготовка окружения

(Для Ubuntu 23.10 и выше) на хосте GitLab Runner запустите `{ echo "kernel.apparmor_restrict_unprivileged_userns = 0" && echo "kernel.apparmor_restrict_unprivileged_unconfined = 0";} | sudo tee -a /etc/sysctl.d/20-apparmor-donotrestrict.conf && sudo sysctl -p /etc/sysctl.d/20-apparmor-donotrestrict.conf`
(Для Ubuntu 23.10 и выше) на хосте GitLab Runner запустите:

```shell
{ echo "kernel.apparmor_restrict_unprivileged_userns = 0" && echo "kernel.apparmor_restrict_unprivileged_unconfined = 0";} | sudo tee -a /etc/sysctl.d/20-apparmor-donotrestrict.conf && sudo sysctl -p /etc/sysctl.d/20-apparmor-donotrestrict.conf
```

### Настройка Runner'а

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@

### Подготовка окружения

(Для Ubuntu 23.10 и выше) на хосте GitLab Runner запустите `{ echo "kernel.apparmor_restrict_unprivileged_userns = 0" && echo "kernel.apparmor_restrict_unprivileged_unconfined = 0";} | sudo tee -a /etc/sysctl.d/20-apparmor-donotrestrict.conf && sudo sysctl -p /etc/sysctl.d/20-apparmor-donotrestrict.conf`
(Для Ubuntu 23.10 и выше) на хосте GitLab Runner запустите:

```shell
{ echo "kernel.apparmor_restrict_unprivileged_userns = 0" && echo "kernel.apparmor_restrict_unprivileged_unconfined = 0";} | sudo tee -a /etc/sysctl.d/20-apparmor-donotrestrict.conf && sudo sysctl -p /etc/sysctl.d/20-apparmor-donotrestrict.conf
```

### Базовая настройка Runner (без кэширования)

Expand Down

0 comments on commit f83a231

Please sign in to comment.