-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
docs: update managed dbs #48725
Open
stevenGravy
wants to merge
3
commits into
master
Choose a base branch
from
stevenGravy/cloud-managed-db
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
docs: update managed dbs #48725
Changes from 2 commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,98 +40,7 @@ or AWS IAM: | |
Service. | ||
- (!docs/pages/includes/tctl.mdx!) | ||
|
||
## Step 1/4. Set up the Teleport Database Service | ||
|
||
(!docs/pages/includes/tctl-token.mdx serviceName="Database" tokenType="db" tokenFile="/tmp/token"!) | ||
|
||
Install Teleport on the host where you will run the Teleport Database Service: | ||
|
||
(!docs/pages/includes/install-linux.mdx!) | ||
|
||
Next, start the Database Service. | ||
|
||
<Tabs> | ||
<TabItem label="Teleport CLI"> | ||
|
||
On the node where you will run the Database Service, start Teleport, pointing | ||
the `--auth-server` flag at the address of your Teleport Proxy Service: | ||
|
||
```code | ||
$ sudo teleport db start \ | ||
--token=/tmp/token \ | ||
--auth-server=<Var name="example.teleport.sh:443" /> \ | ||
--name=mongodb-atlas \ | ||
--protocol=mongodb \ | ||
--uri=mongodb+srv://cluster0.abcde.mongodb.net \ | ||
--labels=env=dev | ||
``` | ||
|
||
<Admonition type="note"> | ||
The `--auth-server` flag must point to the Teleport cluster's Proxy Service endpoint | ||
because the Database Service always connects back to the cluster over a reverse | ||
tunnel. | ||
</Admonition> | ||
|
||
</TabItem> | ||
<TabItem label="Configuration file"> | ||
|
||
On the node where you will run the Teleport Database Service, add the following | ||
in `/etc/teleport.yaml`: | ||
|
||
```yaml | ||
version: v3 | ||
teleport: | ||
auth_token: "/tmp/token" | ||
proxy_server: <Var name="example.teleport.sh:443" /> | ||
|
||
# disable services that are on by default | ||
ssh_service: { enabled: no } | ||
proxy_service: { enabled: no } | ||
auth_service: { enabled: no } | ||
|
||
db_service: | ||
enabled: "yes" | ||
databases: | ||
- name: "mongodb-atlas" | ||
protocol: "mongodb" | ||
uri: "mongodb+srv://cluster0.abcde.mongodb.net" | ||
static_labels: | ||
env: "dev" | ||
``` | ||
|
||
(!docs/pages/includes/start-teleport.mdx service="the Teleport Database Service"!) | ||
|
||
See the full [YAML reference](../../../reference/agent-services/database-access-reference/configuration.mdx) for details. | ||
|
||
</TabItem> | ||
</Tabs> | ||
|
||
See below for details on how to configure the Teleport Database Service. | ||
|
||
### Connection endpoint | ||
|
||
You will need to provide your Atlas cluster's connection endpoint for the `db_service.databases[*].uri` configuration option or `--uri` CLI flag. You can find this via the Connect dialog on the Database Deployments overview page: | ||
|
||
![Connect](../../../../img/database-access/guides/atlas/[email protected]) | ||
|
||
Go through the "Setup connection security" step and select "Connect with the | ||
MongoDB shell" to view the connection string: | ||
|
||
![Connection string](../../../../img/database-access/guides/atlas/[email protected]) | ||
|
||
Use only the scheme and hostname parts of the connection string in the URI: | ||
|
||
```code | ||
$ --uri=mongodb+srv://cluster0.abcde.mongodb.net | ||
``` | ||
|
||
## Step 2/4. Create a Teleport user | ||
|
||
(!docs/pages/includes/database-access/create-user.mdx!) | ||
|
||
(!docs/pages/includes/database-access/mongodb-required-database-access.mdx!) | ||
|
||
## Step 3/4. Configure Atlas | ||
## Step 1/4. Configure Atlas | ||
|
||
Teleport MongoDB Atlas integration supports two methods of authentication: | ||
- Self-managed X.509: This method relies on certificates for authentication, | ||
|
@@ -229,6 +138,54 @@ it exclusively supports authentication using AWS IAM roles. | |
</TabItem> | ||
</Tabs> | ||
|
||
## Step 2/4. Create a Teleport user | ||
|
||
(!docs/pages/includes/database-access/create-user.mdx!) | ||
|
||
(!docs/pages/includes/database-access/mongodb-required-database-access.mdx!) | ||
|
||
## Step 3/4. Set up the Teleport Database Service | ||
|
||
(!docs/pages/includes/tctl-token.mdx serviceName="Database" tokenType="db" tokenFile="/tmp/token"!) | ||
|
||
Install and configure Teleport where you will run the Teleport Database Service: | ||
|
||
<Tabs> | ||
<TabItem label="Linux Server"> | ||
|
||
(!docs/pages/includes/install-linux.mdx!) | ||
|
||
(!docs/pages/includes/database-access/db-configure-start.mdx dbName="mongodb-atlas" dbProtocol="mongodb" databaseAddress="mongodb+srv://cluster0.abcde.mongodb.net" !) | ||
|
||
</TabItem> | ||
<TabItem label="Kubernetes Cluster"> | ||
Teleport provides Helm charts for installing the Teleport Database Service in Kubernetes Clusters. | ||
|
||
(!docs/pages/includes/kubernetes-access/helm/helm-repo-add.mdx!) | ||
|
||
(!docs/pages/includes/database-access/db-helm-install.mdx dbName="mongodb-atlas" dbProtocol="mongodb" databaseAddress="mongodb+srv://cluster0.abcde.mongodb.net" !) | ||
</TabItem> | ||
</Tabs> | ||
|
||
(!docs/pages/includes/database-access/multiple-instances-tip.mdx !) | ||
|
||
### Connection endpoint | ||
|
||
You will need to provide your Atlas cluster's connection endpoint for the `db_service.databases[*].uri` configuration option or `--uri` CLI flag. You can find this via the Connect dialog on the Database Deployments overview page: | ||
|
||
![Connect](../../../../img/database-access/guides/atlas/[email protected]) | ||
|
||
Go through the "Setup connection security" step and select "Connect with the | ||
MongoDB shell" to view the connection string: | ||
|
||
![Connection string](../../../../img/database-access/guides/atlas/[email protected]) | ||
|
||
Use only the scheme and hostname parts of the connection string in the URI: | ||
|
||
```code | ||
$ --uri=mongodb+srv://cluster0.abcde.mongodb.net | ||
``` | ||
|
||
## Step 4/4. Connect | ||
|
||
Log into your Teleport cluster and see available databases: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,36 +37,7 @@ forwards the user's requests to Snowflake as Teleport-authenticated messages. | |
|
||
- (!docs/pages/includes/tctl.mdx!) | ||
|
||
## Step 1/5. Set up the Teleport Database Service | ||
|
||
(!docs/pages/includes/tctl-token.mdx serviceName="Database" tokenType="db" tokenFile="/tmp/token"!) | ||
|
||
Install and configure Teleport where you will run the Teleport Database Service: | ||
|
||
<Tabs> | ||
<TabItem label="Linux Server"> | ||
|
||
(!docs/pages/includes/install-linux.mdx!) | ||
|
||
(!docs/pages/includes/database-access/db-configure-start.mdx dbName="example-snowflake" dbProtocol="snowflake" databaseAddress="abc12345.snowflakecomputing.com" !) | ||
|
||
</TabItem> | ||
<TabItem label="Kubernetes Cluster"> | ||
Teleport provides Helm charts for installing the Teleport Database Service in Kubernetes Clusters. | ||
|
||
(!docs/pages/includes/kubernetes-access/helm/helm-repo-add.mdx!) | ||
|
||
(!docs/pages/includes/database-access/db-helm-install.mdx dbName="example-snowflake" dbProtocol="snowflake" databaseAddress="abc12345.snowflakecomputing.com" !) | ||
</TabItem> | ||
</Tabs> | ||
|
||
(!docs/pages/includes/database-access/multiple-instances-tip.mdx !) | ||
|
||
## Step 2/5. Create a Teleport user | ||
|
||
(!docs/pages/includes/database-access/create-user.mdx!) | ||
|
||
## Step 3/5. Export a public key | ||
## Step 1/5. Export a public key | ||
|
||
Use the `tctl auth sign` command below to export a public key for your Snowflake user: | ||
|
||
|
@@ -78,7 +49,7 @@ The command will create a `server.pub` file with Teleport's public key. Teleport | |
generate a JWT (JSON Web Token) that will be used to authenticate to Snowflake. | ||
|
||
|
||
## Step 4/5. Add the public key to your Snowflake user | ||
## Step 2/5. Add the public key to your Snowflake user | ||
|
||
Use the public key you generated earlier to enable key pair authentication. | ||
|
||
|
@@ -100,6 +71,35 @@ desc user alice; | |
See the [Snowflake documentation](https://docs.snowflake.com/en/user-guide/key-pair-auth.html#step-4-assign-the-public-key-to-a-snowflake-user) | ||
for more details. | ||
|
||
## Step 3/5. Create a Teleport user | ||
|
||
(!docs/pages/includes/database-access/create-user.mdx!) | ||
|
||
## Step 4/5. Set up the Teleport Database Service | ||
|
||
(!docs/pages/includes/tctl-token.mdx serviceName="Database" tokenType="db" tokenFile="/tmp/token"!) | ||
|
||
Install and configure Teleport where you will run the Teleport Database Service: | ||
stevenGravy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
<Tabs> | ||
<TabItem label="Linux Server"> | ||
|
||
(!docs/pages/includes/install-linux.mdx!) | ||
|
||
(!docs/pages/includes/database-access/db-configure-start.mdx dbName="example-snowflake" dbProtocol="snowflake" databaseAddress="abc12345.snowflakecomputing.com" !) | ||
|
||
</TabItem> | ||
<TabItem label="Kubernetes Cluster"> | ||
Teleport provides Helm charts for installing the Teleport Database Service in Kubernetes Clusters. | ||
stevenGravy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
(!docs/pages/includes/kubernetes-access/helm/helm-repo-add.mdx!) | ||
|
||
(!docs/pages/includes/database-access/db-helm-install.mdx dbName="example-snowflake" dbProtocol="snowflake" databaseAddress="abc12345.snowflakecomputing.com" !) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This partial also includes a |
||
</TabItem> | ||
</Tabs> | ||
|
||
(!docs/pages/includes/database-access/multiple-instances-tip.mdx !) | ||
|
||
## Step 5/5. Connect | ||
|
||
Log in to your Teleport cluster and see the available databases: | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should change this partial so it doesn't include tabs. Otherwise, we get a nested
Tabs
component, which is a poor user experience.