Skip to content

Commit

Permalink
feat: clarify doc for port forward and managed DB
Browse files Browse the repository at this point in the history
  • Loading branch information
deimosfr committed Jan 17, 2025
1 parent f6177f1 commit 21e8272
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
22 changes: 22 additions & 0 deletions website/docs/using-qovery/interface/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,28 @@ $ qovery port-forward -p 8000:80 -pod app-5f65fb5c4-frontend-5f65db5c4b-q4w11
```
NOTE: you can get the list of pods by running the `qovery list-pods` command.

### Port-forward a dedicated managed database

Before connecting to your database, it is important to review the requirements from the Cloud Provider's documentation. A common mistake is to overlook this documentation, which can lead to hours of troubleshooting.

In this example we'll refer to the [DocumentDB (MongoDB) documentation](https://docs.aws.amazon.com/documentdb/latest/developerguide/connect_programmatically.html) from AWS.
As noted, you need to use TLS to connect to the database. First, download the TLS certificate:

```bash
wget https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem
```

Next, run the Qovery port forward command, which you can obtain directly from the console:

<p align="center">
<img src="/img/port_forward_docdb.png" alt="Get DB connectivity" />
</p>

Finally, validate the connectivity with the following command:
```bash
mongosh --tls --host localhost:27017 --tlsCAFile global-bundle.pem --tlsAllowInvalidHostnames true --username <sample-user> --password <password>
```

## Generate API token

To use the Qovery API you will need to generate an authentication token. To generate an API token you can install the CLI and type
Expand Down
22 changes: 22 additions & 0 deletions website/docs/using-qovery/interface/cli.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,28 @@ $ qovery port-forward -p 8000:80 -pod app-5f65fb5c4-frontend-5f65db5c4b-q4w11
```
NOTE: you can get the list of pods by running the `qovery list-pods` command.

### Port-forward a dedicated managed database

Before connecting to your database, it is important to review the requirements from the Cloud Provider's documentation. A common mistake is to overlook this documentation, which can lead to hours of troubleshooting.

In this example we'll refer to the [DocumentDB (MongoDB) documentation](https://docs.aws.amazon.com/documentdb/latest/developerguide/connect_programmatically.html) from AWS.
As noted, you need to use TLS to connect to the database. First, download the TLS certificate:

```bash
wget https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem
```

Next, run the Qovery port forward command, which you can obtain directly from the console:

<p align="center">
<img src="/img/port_forward_docdb.png" alt="Get DB connectivity" />
</p>

Finally, validate the connectivity with the following command:
```bash
mongosh --tls --host localhost:27017 --tlsCAFile global-bundle.pem --tlsAllowInvalidHostnames true --username <sample-user> --password <password>
```

## Generate API token

To use the Qovery API you will need to generate an authentication token. To generate an API token you can install the CLI and type
Expand Down
Binary file added website/static/img/port_forward_docdb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 21e8272

Please sign in to comment.