Skip to content

Commit d33a0fd

Browse files
HD-27769-Documented how to run PSMDB-pro in Docker (#1033) (#1037)
HD-27769-Documented how to run PSMDB-pro in Docker --------- Co-authored-by: radoslawszulgo <radoslaw.szulgo@percona.com>
1 parent 69c9bcf commit d33a0fd

4 files changed

Lines changed: 89 additions & 6 deletions

File tree

docs/install/docker.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,26 @@ and restart it if the container exits.
4242
* `percona/percona-server-mongodb` is the name of the image to derive the container from.
4343

4444
* `<TAG>` is the tag specifying the version you need. For example, `{{release}}`. Docker automatically identifies the architecture (x86_64 or ARM64) and pulls the respective image. [See the full list of tags](https://hub.docker.com/r/percona/percona-server-mongodb/tags).
45-
45+
46+
## Access container shell
47+
48+
--8<-- [start:shell]
49+
50+
Run the following command to start the bash session and run commands inside the container:
51+
52+
```{.bash data-prompt="$"}
53+
$ docker exec -it <container-name>
54+
```
55+
56+
where `<container-name>` is the name of your database container.
57+
58+
For example, to connect to Percona Server for MongoDB, run:
59+
60+
```{.bash data-prompt="$"}
61+
$ mongosh
62+
```
63+
--8<-- [end:shell]
64+
4665
## Connecting from another Docker container
4766

4867
The Percona Server for MongoDB container exposes standard MongoDB port (27017),
@@ -57,8 +76,6 @@ For example, to set up a replica set for testing purposes, you have the followin
5776

5877
The following example demonstrates the setup on x86_64 platforms. The `rs101`, `rs102`, `rs103` are the container names for Percona Server for MongoDB and `rs` is the replica set name.
5978

60-
For ARM64 architectures, change the image to `percona/percona-server-mongodb:<TAG>-arm64`.
61-
6279
=== "Bridge network"
6380

6481
When you start Docker, a default `bridge` network is created and all containers are automatically attached to it unless otherwise specified.
@@ -249,3 +266,8 @@ You can get the IP address by running this command:
249266
$ docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' psmdb
250267
```
251268
{% endraw %}
269+
270+
## Next steps
271+
272+
[Run simple queries :material-arrow-right:](../crud.md){.md-button}
273+

docs/install/install-pro.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,65 @@ The steps below describe the installation on Ubuntu 22.04. Replace the link to t
149149
5. Make sure that you have read and write permissions for the data
150150
directory and run `mongod`.
151151

152+
## Run Percona Server for MongoDB Pro in Docker
153+
154+
You can run Percona Server for MongoDB Pro in Docker using the official image available in a private registry on [Docker Hub](https://hub.docker.com/r/percona/percona-server-mongodb-pro).
155+
156+
We gather [Telemetry data](../telemetry.md) to understand the use of the software and improve our products.x
157+
158+
To access this image, you must authenticate in DockerHub. For this you must have a valid Percona Server for MongoDB Pro subscription.
159+
160+
### Authenticate in Docker Hub
161+
162+
1. Contact your Percona Representative to get authentication credentials for Docker Hub. You will receive a username and an access token.
163+
2. Authenticate in Docker Hub:
164+
165+
```{.bash data-prompt="$"}
166+
$ docker login --username <Username>
167+
```
168+
169+
When prompted for a password, enter your access token.
170+
152171
## Next steps
153172

154173
[Connect to MongoDB :material-arrow-right:](../connect.md){.md-button}
174+
175+
176+
### Run Percona Server for MongoDB Pro
177+
178+
To run Percona Server for MongoDB Pro in Docker, use the following command:
179+
180+
```{.bash data-prompt="$"}
181+
$ docker run -d --name psmdb-pro -p 27017:27017 --restart always percona/percona-server-mongodb-pro:<TAG>
182+
```
183+
184+
The command does the following:
185+
186+
* The `docker run` command instructs the `docker` daemon
187+
to run a container from an image.
188+
189+
* The `-d` option starts the container in detached mode
190+
(that is, in the background).
191+
192+
* The `--name` option assigns a custom name for the container
193+
that you can use to reference the container within a Docker network.
194+
In this case: `psmdb-pro`.
195+
196+
* The `-p` option binds the container's port `27017` to TCP port `27017` on all host network interfaces. This makes the container accessible externally.
197+
198+
* The `--restart` option defines the container’s restart policy.
199+
Setting it to `always` ensures that the Docker daemon
200+
will start the container on startup
201+
and restart it if the container exits.
202+
203+
* `percona/percona-server-mongodb-pro` is the name of the image to derive the container from.
204+
205+
* `<TAG>` is the tag specifying the version you need. For example, `{{release}}`. Docker automatically identifies the architecture (x86_64 or ARM64) and pulls the respective image. [See the full list of tags](https://hub.docker.com/r/percona/percona-server-mongodb-pro/tags).
206+
207+
### Access the container shell
208+
209+
--8<-- "docker.md:shell"
210+
211+
## Next steps
212+
213+
[Run simple queries :material-arrow-right:](../crud.md){.md-button}

docs/psmdb-pro.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Percona Server for MongoDB Pro is a build of Percona Server for MongoDB that con
44

55
[Become a Percona Customer](https://www.percona.com/about/contact){.md-button}
66

7-
Non-paying Percona software users can also benefit from Percona Pro Builds, but theyll have to [build them from the source code](install/source.md) provided by Percona and available to everyone.
7+
Non-paying Percona software users can also benefit from Percona Pro Builds, but they'll have to [build them from the source code](install/source.md) provided by Percona and available to everyone.
88

99
## Features
1010

@@ -13,7 +13,7 @@ Find the list of solutions available in Percona Server for MongoDB Pro builds:
1313
| Name | Version added | Description |
1414
| ----------------------------------- | ------------- | -------------
1515
| [FIPS support ](fips.md)| 8.0.4-1 | FIPS mode provides a way to use FIPS-compliant encryption and run the Percona Server for MongoDB with the FIPS-140 certified library for OpenSSL. This helps customers meet minimum security requirements for cryptographic modules and testing in both hardware and software. |
16-
| Binaries with debug symbols | 8.0.8-3](release_notes/8.0.8-3.md) | By including debug symbols in the binary, Percona Server for MongoDB enables deeper integration with monitoring agent-based solutions. These agents can instrument the binary at runtime, providing more detailed telemetry data, such as performance metrics, error tracking, and function-level diagnostics. This enhanced observability allows for better monitoring of system health, faster identification of issues, and more granular insights into how the application performs in production environments.<br> Including this information empowers teams to respond proactively to performance bottlenecks, optimize resource allocation, and improve the overall stability of the application with real-time insights. |
16+
| Binaries with debug symbols | [8.0.8-3](release_notes/8.0.8-3.md) | By including debug symbols in the binary, Percona Server for MongoDB enables deeper integration with monitoring agent-based solutions. These agents can instrument the binary at runtime, providing more detailed telemetry data, such as performance metrics, error tracking, and function-level diagnostics. This enhanced observability allows for better monitoring of system health, faster identification of issues, and more granular insights into how the application performs in production environments.<br> Including this information empowers teams to respond proactively to performance bottlenecks, optimize resource allocation, and improve the overall stability of the application with real-time insights. |
1717

1818

1919
## Benefits

mkdocs-base.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ markdown_extensions:
109109
linenums: false
110110
pymdownx.inlinehilite: {}
111111
pymdownx.snippets:
112-
base_path: ["snippets"]
112+
base_path:
113+
- snippets
114+
- docs/install
113115
# auto_append:
114116
# - services-banner.md
115117
pymdownx.tasklist:

0 commit comments

Comments
 (0)