Skip to content

Commit

Permalink
Update configure-authentication.md
Browse files Browse the repository at this point in the history
Replace type of Info and Warning messages. Added further clarification about the differences in connection string used by pbm-agent vs pbm CLI
  • Loading branch information
igroene authored Nov 19, 2024
1 parent 65fa5b8 commit 8fee454
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions docs/install/configure-authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ Percona Backup for MongoDB uses the authentication and authorization subsystem

## Create the `pbm` user

<i info>:material-information: Info:</i> Execute this step on a primary node of each replica set. In a sharded cluster, this means on every shard replica set and the config server replica set.
{.power-number}
!!! info

Execute this step on a primary node of each replica set. In a sharded cluster, this means on every shard replica set and the config server replica set.

1. Create the role that allows any action on any resource.

Expand Down Expand Up @@ -54,18 +55,19 @@ You can specify the `username` and `password` values and other options of the `c

## Set the MongoDB connection URI for `pbm-agent`

<i info>:material-information: Info:</i> Execute this step needs on each node where `pbm-agent` is installed.
!!! Info

Execute this step needs on each node where `pbm-agent` is installed.

A **pbm-agent** process connects to its localhost `mongod` node with a standalone type of connection.
!!! Important

To set the MongoDB URI connection string means to configure a service init script (`pbm-agent.service` systemd unit file) that runs a **pbm-agent**.
Each **pbm-agent** process needs to connect to its localhost `mongod` node with a standalone type of connection. Avoid using the replica set URI with **pbm-agent** as it can lead to unexpected behaviour.
Note that this is different from the connection string required by pbm CLI.

The `pbm-agent.service` systemd unit file includes the environment file. You set the MongoDB URI connection string for the `PBM_MONGODB_URI` variable within the environment file for every **pbm-agent**.
The `pbm-agent.service` systemd unit file includes the location of the environment file. You set the MongoDB URI connection string for the `PBM_MONGODB_URI` variable within the environment file for every **pbm-agent**.

Check failure on line 67 in docs/install/configure-authentication.md

View workflow job for this annotation

GitHub Actions / vale

[vale] docs/install/configure-authentication.md#L67

[Vale.Spelling] Did you really mean 'systemd'?
Raw output
{"message": "[Vale.Spelling] Did you really mean 'systemd'?", "location": {"path": "docs/install/configure-authentication.md", "range": {"start": {"line": 67, "column": 25}}}, "severity": "ERROR"}

??? tip "How to find the environment file"

The path to the environment file is specified in the `pbm-agent.service` systemd unit file.

In Ubuntu and Debian, the pbm-agent.service systemd unit file is at the path `/lib/systemd/system/pbm-agent.service`.

In Red Hat and CentOS, the path to this file is `/usr/lib/systemd/system/pbm-agent.service`.
Expand Down Expand Up @@ -119,7 +121,14 @@ PBM_MONGODB_URI="mongodb://pbmuser:secret%23pwd@localhost:27017/?authSource=admi

## Set the MongoDB connection URI for `pbm CLI`

<i info>:material-information: Info:</i> Execute this step only on a host at which you will use `pbm` CLI.
!!! Info

Execute this step only on a host at which you will use `pbm` CLI.

!!! Important

The pbm CLI needs to connect to the replica set that stores PBM Control Collections. Note that this is different from the connection required by pbm-agent.
In a non-sharded replica set it is simply that replica set. In a sharded cluster it is the config server replica set.

Set the MongoDB URI connection string for `pbm` CLI in your shell. This allows you to call `pbm` commands without the `--mongodb-uri` flag.

Expand All @@ -136,4 +145,4 @@ If you are using external authentication methods in MongoDB, see [External authe

## Next steps

[Configure backup storage :material-arrow-right:](backup-storage.md){.md-button}
[Configure backup storage :material-arrow-right:](backup-storage.md){.md-button}

0 comments on commit 8fee454

Please sign in to comment.