Skip to content

Commit 1895658

Browse files
authored
Removed prompt sign from code blocks (#315)
* Removed prompt sign from code blocks * Added git-committers plugin
1 parent f41c19f commit 1895658

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+541
-483
lines changed

.github/styles/config/vocabularies/Percona/accept.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,5 @@ S3-compatible
2828
uncomment
2929
CAs
3030
Ceph
31+
Alibaba
32+
Alibaba Cloud

docs/details/authentication.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ etc. as the `mongo` shell or `mongodump` command does.
1717

1818
The `pbm-agent` processes should connect to their localhost `mongod` with a standalone type of connection.
1919

20-
```{.bash data-prompt="$"}
20+
```bash
2121
pbm-agent --mongodb-uri "mongodb://pbmuser:secretpwd@localhost:27017/?authSource=admin"
2222
```
2323

2424
Alternatively:
2525

26-
```{.bash data-prompt="$"}
26+
```bash
2727
export PBM_MONGODB_URI="mongodb://pbmuser:secretpwd@localhost:27017/?authSource=admin"
2828
pbm-agent
2929
```
@@ -32,15 +32,15 @@ etc. as the `mongo` shell or `mongodump` command does.
3232

3333
=== "The `pbm` CLI connection string"
3434

35-
```{.bash data-prompt="$"}
35+
```bash
3636
pbm status --mongodb-uri "mongodb://pbmuser:secretpwd@mongocsvr1:27017,mongocsvr2:27017,mongocsvr3:27017/?replicaSet=configrs&authSource=admin"
3737
```
3838

3939
Alternatively:
4040

41-
```{.bash data-prompt="$"}
41+
```bash
4242
export PBM_MONGODB_URI="mongodb://pbmuser:secretpwd@mongocsvr1:27017,mongocsvr2:27017,mongocsvr3:27017/?replicaSet=configrs&authSource=admin"
43-
$ pbm status
43+
pbm status
4444
```
4545
4646
Replace the `pbmuser:secretpwd` with the credentials of [the user who owns the pbm process](../install/configure-authentication.md#create-the-pbm-user)
@@ -86,28 +86,28 @@ Specify new values in MongoDB connection URI string as follows:
8686

8787
=== "The pbm-agent connection string"
8888

89-
```
89+
```bash
9090
pbm-agent --mongodb-uri "mongodb://pbmuser:secretpwd@localhost:27017/?authSource=admin&readConcernLevel=local&w=1"
9191
```
9292

9393
Alternatively:
9494

95-
```
95+
```bash
9696
export PBM_MONGODB_URI="mongodb://pbmuser:secretpwd@localhost:27017/?authSource=admin&readConcernLevel=local&w=1"
9797
pbm-agent
9898
```
9999

100100
=== "The `pbm` CLI connection string"
101101

102-
```{.bash data-prompt="$"}
102+
```bash
103103
pbm status --mongodb-uri "mongodb://pbmuser:secretpwd@mongocsvr1:27017,mongocsvr2:27017,mongocsvr3:27017/?replicaSet=configrs&authSource=admin&readConcernLevel=local&w=1"
104104
```
105105

106106
Alternatively:
107107

108-
```{.bash data-prompt="$"}
108+
```bash
109109
export PBM_MONGODB_URI="mongodb://pbmuser:secretpwd@mongocsvr1:27017,mongocsvr2:27017,mongocsvr3:27017/?replicaSet=configrs&authSource=admin&readConcernLevel=local&w=1"
110-
$ pbm status
110+
pbm status
111111
```
112112

113113
Supported values are:
@@ -131,14 +131,14 @@ For [Kerberos authentication :octicons-link-external-16:](https://docs.percona.c
131131

132132
Specify the following string for MongoDB connection URI:
133133

134-
```
134+
```bash
135135
PBM_MONGODB_URI="mongodb://<username>%40<KERBEROS_REALM>@<hostname>:27018/?authMechanism=GSSAPI&authSource=%24external&replSetName=xxxx"
136136
```
137137

138138
Note that you must first obtain the ticket for the `pbm` user with the `kinit` command before you start the **pbm-agent**:
139139

140-
```{.bash data-prompt="$"}
141-
$ sudo -u {USER} kinit pbm
140+
```bash
141+
sudo -u {USER} kinit pbm
142142
```
143143

144144
Note that the `{USER}` is the user that you will run the `pbm-agent` process.
@@ -147,7 +147,7 @@ Note that the `{USER}` is the user that you will run the `pbm-agent` process.
147147

148148
For [authentication and authorization via Native LDAP :octicons-link-external-16:](https://docs.percona.com/percona-server-for-mongodb/latest/authorization.html#authentication-and-authorization-with-direct-binding-to-ldap), you only create roles for LDAP groups in MongoDB as the users are stored and managed on the LDAP server. However, you still define the `$external` database as your authentication source:
149149

150-
```
150+
```bash
151151
PBM_MONGODB_URI="mongodb://<user>:<password>@<hostname>:27017/?authMechanism=PLAIN&authSource=%24external&replSetName=xxxx"
152152
```
153153

@@ -170,7 +170,7 @@ When using [AWS IAM authentication :octicons-link-external-16:](https://docs.per
170170

171171
The MongoDB connection URI string then looks like the following:
172172

173-
```
173+
```bash
174174
PBM_MONGODB_URI="mongodb://<aws_access_key_id>:<aws_secret_access_key>@<hostname>:27017/?authMechanism=MONGODB-AWS&authSource=%24external&replSetName=xxxx"
175175
```
176176

docs/details/azure.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,32 +26,32 @@ For either method you need a storage account.
2626
1. Install the [Azure CLI :octicons-link-external-16:](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli). After the installation, the `az` is available for you.
2727
2. Sign in to Azure CLI:
2828

29-
```{.bash data-prompt="$"}
30-
$ az login
29+
```bash
30+
az login
3131
```
3232

3333
3. Create a Resource group if it's not created for you:
3434

35-
```{.bash data-prompt="$"}
36-
$ az group create --name <your-resource-group> --location <your-location>
35+
```bash
36+
az group create --name <your-resource-group> --location <your-location>
3737
```
3838

3939
For the list of available locations, run:
4040

41-
```{.bash data-prompt="$"}
42-
$ az account list-locations
41+
```bash
42+
az account list-locations
4343
```
4444

4545
4. Create a storage account:
4646

47-
```{.bash data-prompt="$"}
48-
$ az storage account create --name <storage-account-name> --resource-group <your-resource-group> --location <your-location> --sku Standard_LRS
47+
```bash
48+
az storage account create --name <storage-account-name> --resource-group <your-resource-group> --location <your-location> --sku Standard_LRS
4949
```
5050

5151
4. Create a blob container:
5252

53-
```{.bash data-prompt="$"}
54-
$ az storage container create --account-name <storage-account-name> --name <your-container> --public-access off
53+
```bash
54+
az storage container create --account-name <storage-account-name> --name <your-container> --public-access off
5555
```
5656

5757
??? example "Expected output"

docs/details/gcs.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ To use GCS, you need the following:
3030

3131
2. Create a bucket
3232

33-
```{.bash data-prompt="$"}
34-
$ gcloud storage buckets create my-gcs-bucket --location=US
33+
```bash
34+
gcloud storage buckets create my-gcs-bucket --location=US
3535
```
3636

3737
3. Verify the bucket creation
3838

39-
```{.bash data-prompt="$"}
40-
$ gcloud storage buckets list
39+
```bash
40+
gcloud storage buckets list
4141
```
4242

4343
After the bucket is created, apply the proper [permissions for PBM to use the bucket](storage-configuration.md#permissions-setup).

docs/details/minio.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@ This document provides an overview of MinIO as the closest S3-compatible storage
1212

1313
2. Configure the `mc` command line tool with a MinIO Server
1414

15-
```{.bash data-prompt="$"}
16-
$ mc alias set myminio http://127.0.0.1:9000 MINIO_ACCESS_KEY MINIO_SECRET_KEY
15+
```bash
16+
mc alias set myminio http://127.0.0.1:9000 MINIO_ACCESS_KEY MINIO_SECRET_KEY
1717
```
1818

1919
3. Create a bucket
2020

21-
```{.bash data-prompt="$"}
22-
$ mc mb myminio/my-minio-bucket
21+
```bash
22+
mc mb myminio/my-minio-bucket
2323
```
2424

2525
4. Verify the bucket creation
2626

27-
```{.bash data-prompt="$"}
28-
$ mc ls myminio
27+
```bash
28+
mc ls myminio
2929
```
3030

3131
After the bucket is created, apply the proper [permissions for PBM to use the bucket](storage-configuration.md#permissions-setup).
@@ -105,25 +105,25 @@ Let's assume that your custom CA certificate is at `/etc/ssl/minio-ca.crt` path
105105

106106
2. Set the `SSL_CERT_FILE` environment variable to that file's path on each host where `pbm-agent` and PBM CLI are running:
107107
108-
```{.bash data-prompt="$"}
109-
$ export SSL_CERT_FILE=/etc/ssl/minio-ca.crt
108+
```bash
109+
export SSL_CERT_FILE=/etc/ssl/minio-ca.crt
110110
```
111111
112112
If this variable isn't set, PBM uses the system root certificates.
113113

114114
3. Restart `pbm-agent`:
115115

116-
```{.bash data-prompt="$"}
117-
$ sudo systemctl start pbm-agent
116+
```bash
117+
sudo systemctl start pbm-agent
118118
```
119119

120120
4. Verify that your custom certificate is recognized. Check PBM logs for successful storage access.
121121

122122

123123
Alternatively, you can turn off the TLS verification of the S3 storage in Percona Backup for MongoDB configuration:
124124

125-
```{.bash data-prompt="$"}
126-
$ pbm config --set storage.minio.insecureSkipTLSVerify=True
125+
```bash
126+
pbm config --set storage.minio.insecureSkipTLSVerify=True
127127
```
128128

129129
!!! warning

docs/details/oss.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,24 @@ You can create a bucket via the [Alibaba Cloud Management Console :octicons-link
2525
1. [Install](https://www.alibabacloud.com/help/en/oss/developer-reference/install-ossutil2#DAS) and configure the Alibaba Cloud OSS client. After the installation, the `ossutil` command line tool is available for you.
2626
2. Specify the region:
2727

28-
```{.bash data-prompt="$"}
29-
$ ossutil config
28+
```bash
29+
ossutil config
3030
```
3131

3232
Press Enter until you see the prompt `Please enter Region [cn-hangzhou]:` and specify the desired region.
3333

3434
3. Create a bucket:
3535

36-
```{.bash data-prompt="$"}
37-
$ ossutil mb oss://your-bucket-name
36+
```bash
37+
ossutil mb oss://your-bucket-name
3838
```
3939

4040
Replace `your-bucket-name` with the desired name for your bucket.
4141

4242
4. Verify that the bucket is created:
4343

44-
```{.bash data-prompt="$"}
45-
$ ossutil ls
44+
```bash
45+
ossutil ls
4646
```
4747

4848
After you created a bucket, apply the [necessary permissions](storage-configuration.md#permissions-setup) for the user identified by the access credentials you plan to use with PBM.

docs/details/s3-storage.md

Lines changed: 59 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ This document provides overview for the native AWS S3 services. To use MinIO and
99

1010
[Configuration example :material-arrow-down:](#configuration-example){.md-button}
1111

12+
1213
## Storage bucket creation
1314

1415
To create a bucket, do the following.
@@ -17,14 +18,14 @@ To create a bucket, do the following.
1718

1819
2. Create an S3 bucket
1920

20-
```{.bash data-prompt="$"}
21-
$ aws s3api create-bucket --bucket my-s3-bucket --region us-east-1
21+
```bash
22+
aws s3api create-bucket --bucket my-s3-bucket --region us-east-1
2223
```
2324

2425
3. Verify the bucket creation
2526

26-
```{.bash data-prompt="$"}
27-
$ aws s3 ls
27+
```bash
28+
aws s3 ls
2829
```
2930

3031
After the bucket is created, apply the proper [permissions for PBM to use the bucket](storage-configuration.md#permissions-setup).
@@ -149,5 +150,59 @@ retryer:
149150
150151
This upload retry increases the chances of data upload completion in cases of unstable connection.
151152
153+
<<<<<<< HEAD
154+
=======
155+
## Data upload to storage with self-signed TLS certificates
156+
157+
Percona Backup for MongoDB supports data upload to S3-compatible storage service over HTTPS with a self-signed or a private CA certificate. This feature is especially important when you use services like MinIO, Ceph, or internal S3 gateways that don't use certificates signed by public Certificate Authorities (CAs).
158+
159+
Providing a whole chain of certificates is recommended to ensure the connection is legit. The `SSL_CERT_FILE` environment variable specifies the path to a custom certificate chain file in PEM-format that PBM uses to validate TLS/SSL connection.
160+
161+
### Usage example
162+
163+
Let's assume that your custom CA certificate is at `/etc/ssl/minio-ca.crt` path and your S3 endpoint is `https://minio.internal.local:9000`. To use self-issued TLS certificates, do the following:
164+
165+
1. Ensure the cert file is in PEM format. Use the following command to check it:
166+
167+
```bash
168+
cat /etc/ssl/minio-ca.crt
169+
```
170+
171+
??? example "Sample output"
172+
173+
174+
```{text .no-copy}
175+
-----BEGIN CERTIFICATE-----
176+
MIIC+TCCAeGgAwIBAgIJANH3WljB...
177+
-----END CERTIFICATE-----
178+
```
179+
180+
2. Set the `SSL_CERT_FILE` environment variable to that file's path on each host where `pbm-agent` and PBM CLI are running:
181+
182+
```bash
183+
export SSL_CERT_FILE=/etc/ssl/minio-ca.crt
184+
```
185+
186+
If this variable isn't set, PBM uses the system root certificates.
187+
188+
3. Restart `pbm-agent`:
189+
190+
```bash
191+
sudo systemctl start pbm-agent
192+
```
193+
194+
4. Verify that your custom certificate is recognized. Check PBM logs for successful S3 access.
195+
196+
197+
Alternatively, you can disable the TLS verification of the S3 storage in Percona Backup for MongoDB configuration:
198+
199+
```bash
200+
pbm config --set storage.s3.insecureSkipTLSVerify=True
201+
```
202+
203+
!!! warning
204+
205+
Use this option with caution as it might leave a hole for man-in-the-middle attacks.
206+
>>>>>>> Removed prompt sign from code blocks
152207
153208

0 commit comments

Comments
 (0)