Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Redis docs #10693

Merged
merged 17 commits into from
Mar 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,10 @@
"title": "Self-Hosted CockroachDB",
"slug": "/database-access/guides/cockroachdb-self-hosted/"
},
{
"title": "Self-Hosted Redis",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Maybe move this above SQL Server section? To keep it grouped with other self-hosted guides and also move the preview SQL Server to the bottom.

"slug": "/database-access/guides/redis/"
},
{
"title": "SQL Server (Preview)",
"slug": "/database-access/guides/sql-server-ad/"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions docs/pages/database-access/guides/gui-clients.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,34 @@ keep the Password field empty:
![DataGrip connection options](../../../img/database-access/guides/sqlserver/[email protected])

Click OK to connect.

## Redis Insight

<Admonition type="note">
Teleport's Redis Insight integration only supports Redis standalone instances.
</Admonition>

After opening Redis Insight click `ADD REDIS DATABASE`.

![Redis Insight Startup Screen](../../../img/database-access/guides/redis/redisinsight-startup.png)

Log in to your Redis instance with a Redis user first by using:

`tsh db login --db-user=alice redis-db-name`.

Click `Add Database Manually`. Use `127.0.0.1` as the `Host` and port printed by `tsh proxy db` as described [here](#get-connection-information).

Provide your Redis username as `Username` and password as `Password`.

![Redis Insight Configuration](../../../img/database-access/guides/redis/redisinsight-add-config.png)

Next, check the `Use TLS` and `Verify TLS Certificates` boxes and copy the CA certificate returned by `tsh proxy db`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should include the instructions to copy the certificate when we first tell the reader to run tsh proxy db. Otherwise, they may have cleared the terminal at this point. (Unless the proxy runs in the foreground? I haven't run this command myself.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, tsh proxy runs in the foreground. Here is an example:

 % tsh proxy db redis
Started DB proxy on 127.0.0.1:51823

Use following credentials to connect to the redis proxy:
  ca_file=/Users/jnyckowski/.tsh/keys/example.com/cas/example.com.pem
  cert_file=/Users/jnyckowski/.tsh/keys/example.com/bob-db/example.com/redis-x509.pem
  key_file=/Users/jnyckowski/.tsh/keys/example.com/bob

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's helpful, thanks. To make this clearer, I think we should replace line 210 with something like the following (removing the code fence escapes):

Run the following command to start the Database Access proxy for your
Redis instance.

\`\`\`code
$ tsh proxy db redis 
Started DB proxy on 127.0.0.1:51823
Use following credentials to connect to the redis proxy: 
  ca_file=path/to/example.com.pem 
  cert_file=path/to/example.com/redis-x509.pem
  key_file=path/to/example.com/bob
\`\`\`


In Redis Insight, click `Add Database Manually`. Use `127.0.0.1` as the
`Host`. Copy the port printed by `tsh proxy db` and use it for the 
`Port` field.

Copy the private key and certificate to corresponding fields.

Click `Add Redis Database`.

![Redis Insight TLS Configuration](../../../img/database-access/guides/redis/redisinsight-tls-config.png)

Congratulations! You have just connected to your Redis instance.

![Redis Insight Connected](../../../img/database-access/guides/redis/redisinsight-connected.png)
Loading