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

[docs] generalize tctl token partial #43137

Merged
merged 3 commits into from
Jun 21, 2024
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
10 changes: 1 addition & 9 deletions docs/pages/auto-discovery/databases.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,7 @@ discover AWS-hosted databases automatically.

## Step 1/4. Generate a join token

The Discovery Service requires a valid join token to connect to the cluster.

Generate a join token by running the following command against your Teleport
Auth Service and save it in `/tmp/token` on the host that will run the
Discovery Service.

```code
$ tctl tokens add --type=discovery
```
(!docs/pages/includes/tctl-token.mdx serviceName="Discovery" tokenType="discovery" tokenFile="/tmp/token" !)
GavinFrazar marked this conversation as resolved.
Show resolved Hide resolved

(!docs/pages/includes/database-access/alternative-methods-join.mdx!)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ description: How to configure Teleport database access with Amazon Keyspaces (Ap

## Step 1/5. Set up the Teleport Database Service

(!docs/pages/includes/database-access/token.mdx!)
(!docs/pages/includes/tctl-token.mdx serviceName="Database" tokenType="db" tokenFile="/tmp/token"!)

(!docs/pages/includes/database-access/alternative-methods-join.mdx!)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ the correct STS endpoint.

(!docs/pages/includes/database-access/alternative-methods-join.mdx!)

(!docs/pages/includes/database-access/token.mdx!)
(!docs/pages/includes/tctl-token.mdx serviceName="Database" tokenType="db" tokenFile="/tmp/token"!)

### Install and start Teleport

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ Teleport:

</Details>

(!docs/pages/includes/database-access/token.mdx!)
(!docs/pages/includes/tctl-token.mdx serviceName="Database" tokenType="db" tokenFile="/tmp/token"!)

Use the token provided by the output of this command in the next step.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ automatically enroll all AWS databases in your infrastructure.

## Step 2/6. Create a Database Service configuration

(!docs/pages/includes/database-access/token.mdx!)
(!docs/pages/includes/tctl-token.mdx serviceName="Database" tokenType="db" tokenFile="/tmp/token"!)

(!docs/pages/includes/database-access/alternative-methods-join.mdx!)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ databases in your infrastructure.

## Step 2/6. Create a Database Service configuration

(!docs/pages/includes/database-access/token.mdx!)
(!docs/pages/includes/tctl-token.mdx serviceName="Database" tokenType="db" tokenFile="/tmp/token"!)

(!docs/pages/includes/database-access/alternative-methods-join.mdx!)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ KVNO Principal

## Step 4/7. Set up the Teleport Database Service

(!docs/pages/includes/database-access/token.mdx!)
(!docs/pages/includes/tctl-token.mdx serviceName="Database" tokenType="db" tokenFile="/tmp/token"!)

(!docs/pages/includes/install-linux.mdx!)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ database.

## Step 1/5. Install the Teleport Database Service

(!docs/pages/includes/database-access/token.mdx!)
(!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:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ Cloud documentation for more info.

### Create a join token

(!docs/pages/includes/database-access/token.mdx tokenFile="/tmp/token" !)
(!docs/pages/includes/tctl-token.mdx serviceName="Database" tokenType="db" tokenFile="/tmp/token" !)

### (Optional) Download the Cloud SQL CA certificate

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ in Google Cloud documentation for more info.

### Create a join token

(!docs/pages/includes/database-access/token.mdx tokenFile="/tmp/token"!)
(!docs/pages/includes/tctl-token.mdx serviceName="Database" tokenType="db" tokenFile="/tmp/token"!)

### (Optional) Download the Cloud SQL CA certificate

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Select the "Service Account Token Creator" role and save the change:

## Step 4/8. Configure the Teleport Database Service

(!docs/pages/includes/database-access/token.mdx tokenFile="/tmp/token" !)
(!docs/pages/includes/tctl-token.mdx serviceName="Database" tokenType="db" tokenFile="/tmp/token" !)

Provide the following information and then generate a configuration file for the
Teleport Database Service:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ forwards user traffic to MongoDB Atlas.

## Step 1/4. Set up the Teleport Database Service

(!docs/pages/includes/database-access/token.mdx!)
(!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:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ forwards the user's requests to Snowflake as Teleport-authenticated messages.

## Step 1/5. Set up the Teleport Database Service

(!docs/pages/includes/database-access/token.mdx!)
(!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:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ description: How to configure Teleport database access with Cassandra and Scylla

## Step 1/5. Set up the Teleport Database Service

(!docs/pages/includes/database-access/token.mdx!)
(!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:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ choose:

## Step 1/5. Create a Teleport token and user

(!docs/pages/includes/database-access/token.mdx!)
(!docs/pages/includes/tctl-token.mdx serviceName="Database" tokenType="db" tokenFile="/tmp/token"!)

(!docs/pages/includes/database-access/create-user.mdx!)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ description: How to configure Teleport database access with self-hosted Cockroac

## Step 1/4. Set up the Teleport Database Service

(!docs/pages/includes/database-access/token.mdx!)
(!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:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ description: How to configure Teleport database access with Elasticsearch.

## Step 1/5. Set up the Teleport Database Service

(!docs/pages/includes/database-access/token.mdx!)
(!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:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ videoBanner: 6lgVObxoLkc

### Set up the Teleport Database service

(!docs/pages/includes/database-access/token.mdx!)
(!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:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ description: How to configure Teleport database access with self-hosted MySQL/Ma

## Step 1/4. Create the Teleport Database Token

(!docs/pages/includes/database-access/token.mdx!)
(!docs/pages/includes/tctl-token.mdx serviceName="Database" tokenType="db" tokenFile="/tmp/token"!)

## Step 2/4. Create a certificate/key pair

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ description: How to configure Teleport database access with Oracle.

## Step 1/6. Create a Teleport token and user

(!docs/pages/includes/database-access/token.mdx!)
(!docs/pages/includes/tctl-token.mdx serviceName="Database" tokenType="db" tokenFile="/tmp/token"!)

<Admonition type="tip">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ description: How to configure Teleport database access with self-hosted PostgreS

## Step 1/5. Create a Teleport token and user

(!docs/pages/includes/database-access/token.mdx!)
(!docs/pages/includes/tctl-token.mdx serviceName="Database" tokenType="db" tokenFile="/tmp/token"!)

### Create a Teleport user

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ If you want to configure Redis Standalone, please read [Database Access with Red

## Step 1/6. Set up the Teleport Database Service

(!docs/pages/includes/database-access/token.mdx!)
(!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:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ If you want to configure Redis Cluster, please read [Database Access with Redis

## Step 1/5. Set up the Teleport Database Service

(!docs/pages/includes/database-access/token.mdx!)
(!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:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ from there, you can copy and use it on your database configuration.

## Step 4/7. Set up the Teleport Database Service

(!docs/pages/includes/database-access/token.mdx!)
(!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:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ description: How to configure Teleport database access for Vitess (MySQL protoco

## Step 1/4. Create the Teleport Database Token

(!docs/pages/includes/database-access/token.mdx!)
(!docs/pages/includes/tctl-token.mdx serviceName="Database" tokenType="db" tokenFile="/tmp/token"!)

## Step 2/4. Create a certificate/key pair

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/database-access/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ See the [Automatic User Provisioning](./rbac.mdx) guide for how to configure Tel

## Step 2/5. Configure the Teleport Database Service

(!docs/pages/includes/database-access/token.mdx!)
(!docs/pages/includes/tctl-token.mdx serviceName="Database" tokenType="db" tokenFile="/tmp/token"!)

(!docs/pages/includes/database-access/alternative-methods-join.mdx!)

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/includes/database-access/rds-proxy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ automatically enroll all AWS databases in your infrastructure.

## Step 2/7. Create a Teleport Database Service configuration

(!docs/pages/includes/database-access/token.mdx!)
(!docs/pages/includes/tctl-token.mdx serviceName="Database" tokenType="db" tokenFile="/tmp/token"!)

(!docs/pages/includes/database-access/alternative-methods-join.mdx!)

Expand Down
9 changes: 0 additions & 9 deletions docs/pages/includes/database-access/token.mdx

This file was deleted.

8 changes: 8 additions & 0 deletions docs/pages/includes/tctl-token.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
The {{ serviceName }} Service requires a valid join token to join your Teleport cluster.
Run the following `tctl` command and save the token output in `{{ tokenFile }}`
on the server that will run the {{ serviceName }} Service:

```code
$ tctl tokens add --type={{ tokenType }} --format=text
(=presets.tokens.first=)
```
Loading