Skip to content

Commit

Permalink
Hide Setup menu items based on scope
Browse files Browse the repository at this point in the history
Backports #12742

See #11383

Help ensure that no visitor to the Teleport docs site sees content that
is irrelevant to their scope (e.g., Cloud, Open Source, or Enterprise) by
hiding scope-irrelevant content from the navigation menu and menu
pages.

For pages that aren't step-by-step guides and are meant to convey
general information about a Teleport edition, show these pages in all
scopes so users who are curious about another scope can get the
information they need.

This PR focuses on the Setup section.
  • Loading branch information
ptgott committed Jun 6, 2022
1 parent 57d4900 commit d2a87a6
Show file tree
Hide file tree
Showing 10 changed files with 246 additions and 56 deletions.
59 changes: 49 additions & 10 deletions docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,23 @@
{
"title": "Deployments",
"slug": "/setup/deployments/",
"hideInScopes": "cloud",
"entries": [
{ "title": "AWS Terraform", "slug": "/setup/deployments/aws-terraform/" },
{ "title": "GCP", "slug": "/setup/deployments/gcp/" },
{ "title": "IBM", "slug": "/setup/deployments/ibm/" }
{
"title": "AWS Terraform",
"slug": "/setup/deployments/aws-terraform/",
"hideInScopes": "cloud"
},
{
"title": "GCP",
"slug": "/setup/deployments/gcp/",
"hideInScopes": "cloud"
},
{
"title": "IBM",
"slug": "/setup/deployments/ibm/",
"hideInScopes": "cloud"
}
]
},
{
Expand All @@ -77,7 +90,8 @@
"entries": [
{
"title": "Scaling",
"slug": "/setup/operations/scaling/"
"slug": "/setup/operations/scaling/",
"hideInScopes": "cloud"
},
{
"title": "Upgrading a Cluster",
Expand Down Expand Up @@ -108,11 +122,35 @@
"title": "Integrations",
"slug": "/setup/guides/",
"entries": [
{ "title": "Terraform Provider", "slug": "/setup/guides/terraform-provider/" },
{ "title": "Docker", "slug": "/setup/guides/docker/" },
{ "title": "Fluentd", "slug": "/setup/guides/fluentd/" },
{ "title": "EC2 Tags", "slug": "/setup/guides/ec2-tags/" },
{ "title": "Joining Nodes in AWS", "slug": "/setup/guides/joining-nodes-aws/" }
{
"title": "Terraform Provider",
"slug": "/setup/guides/terraform-provider/"
},
{
"title": "Docker",
"slug": "/setup/guides/docker/"
},
{
"title": "Fluentd",
"slug": "/setup/guides/fluentd/"
},
{
"title": "EC2 Tags",
"slug": "/setup/guides/ec2-tags/"
},
{
"title": "Joining Nodes via AWS IAM",
"slug": "/setup/guides/joining-nodes-aws-iam/"
},
{
"title": "Joining Nodes via AWS EC2",
"slug": "/setup/guides/joining-nodes-aws-ec2/",
"hideInScopes": "cloud"
},
{
"title": "Using Teleport's CA with GitHub",
"slug": "/setup/guides/ssh-key-extensions/"
}
]
},
{
Expand Down Expand Up @@ -149,7 +187,8 @@
},
{
"title": "Storage Backends",
"slug": "/setup/reference/backends/"
"slug": "/setup/reference/backends/",
"hideInScopes": "cloud"
},
{
"title": "Networking",
Expand Down
24 changes: 24 additions & 0 deletions docs/pages/setup/deployments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,29 @@ description: Teleport Installation and Configuration Reference Deployment Guides
layout: tocless-doc
---

These guides show you how to set up a full self-hosted Teleport deployment on
the platform of your choice.

<ScopedBlock scope="cloud">
<TileSet>
<Tile
icon="wrench"
title="Open Source Teleport"
href="./deployments.mdx/?scope=oss"
>
View our deployment guides as an Open Source Teleport user.
</Tile>
<Tile
icon="wrench"
title="Teleport Enterprise"
href="./deployments.mdx/?scope=enterprise"
>
View our deployment guides as a Teleport Enterprise user.
</Tile>
</TileSet>
</ScopedBlock>

<ScopedBlock scope={["oss", "enterprise"]}>
<ul>
<li>
[AWS Terraform](./deployments/aws-terraform.mdx). Deploy HA Teleport with Terraform Provider on AWS.
Expand All @@ -15,3 +38,4 @@ layout: tocless-doc
[IBM Cloud](./deployments/ibm.mdx). Deploy HA Teleport on IBM cloud.
</li>
</ul>
</ScopedBlock>
56 changes: 50 additions & 6 deletions docs/pages/setup/deployments/aws-terraform.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,56 @@ h1: Running Teleport Enterprise in High Availability mode on AWS
---

This guide is designed to accompany our [reference Terraform code](https://github.com/gravitational/teleport/tree/master/examples/aws/terraform/ha-autoscale-cluster#terraform-based-provisioning-example-amazon-single-ami)
and describe how to use and administrate the resulting Teleport deployment.
and describe how to manage the resulting Teleport deployment.

<Details scope={["cloud"]} scopeOnly={true} opened={true} title="Teleport Cloud">
Our reference Terraform code deploys self-hosted instances of the Teleport Auth Service and Proxy Service. Since Teleport Cloud manages these services for you, users interested in Terraform should consult the following guides instead of this one:
<ScopedBlock scope="cloud">

- To get started with Teleport and Terraform: [Terraform Provider](../guides/terraform-provider.mdx)
- For a full reference: [Terraform Provider Resources](../reference/terraform-provider.mdx)
</Details>
Our reference Terraform code deploys self-hosted instances of the Teleport Auth
Service and Proxy Service. Since Teleport Cloud manages these services for you,
users interested in Terraform should consult the following guides instead of
this one:

<TileSet>
<Tile
href="../guides/terraform-provider.mdx"
title="Getting started"
icon="wrench"
>

Read our guide to using Teleport and Terraform

</Tile>
<Tile
href="../reference/terraform-provider.mdx"
title="Reference"
icon="wrench"
>

Read our Terraform provider reference

</Tile>
</TileSet>

You can also view this guide as a user of another Teleport edition:

<TileSet>
<Tile
title="Open Source Teleport"
href="./aws-terraform.mdx/?scope=oss"
icon="stack"
>
</Tile>
<Tile
title="Teleport Enterprise"
href="./aws-terraform.mdx/?scope=enterprise"
icon="building"
>
</Tile>
</TileSet>

</ScopedBlock>

<ScopedBlock scope={["oss", "enterprise"]}>

## Prerequisites

Expand Down Expand Up @@ -841,3 +883,5 @@ $ ./connect.sh proxy 1
# connect to the node
$ ./connect.sh node
```

</ScopedBlock>
34 changes: 27 additions & 7 deletions docs/pages/setup/deployments/gcp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,35 @@ title: Running Teleport on GCP
description: How to install and configure Gravitational Teleport on GCP for SSH and Kubernetes access.
---

We've created this guide to give customers a high level overview of how to use Teleport
on [Google Cloud](https://cloud.google.com/gcp/) (GCP). This guide provides a high level
introduction leading to a deep dive into how to setup and run Teleport in production.
We've created this guide to give customers an overview of how to use Teleport on
[Google Cloud](https://cloud.google.com/gcp/) (GCP). This guide provides a
high-level introduction to setting up and running Teleport in production.

<Notice type="warning" scope={["cloud"]}>
<ScopedBlock scope="cloud">

This guide shows you how to deploy the Auth Service and Proxy Service, which
Teleport Cloud manages for you. You can read this guide if you are interested in
learning about self-hosting Teleport on Google Cloud.
Teleport Cloud manages for you.

</Notice>
You can view this guide as a user of another Teleport edition:

<TileSet>
<Tile
title="Open Source Teleport"
href="./gcp.mdx/?scope=oss"
icon="stack"
>
</Tile>
<Tile
title="Teleport Enterprise"
href="./gcp.mdx/?scope=enterprise"
icon="building"
>
</Tile>
</TileSet>

</ScopedBlock>

<ScopedBlock scope={["oss", "enterprise"]}>

We have split this guide into:

Expand Down Expand Up @@ -221,3 +239,5 @@ proxy_service:
**4. Add Users**

Follow [adding users](../../enterprise/getting-started.mdx#adding-users) or integrate with [Google Workspace](../../enterprise/sso/google-workspace.mdx) to provide SSO access.

</ScopedBlock>
34 changes: 27 additions & 7 deletions docs/pages/setup/deployments/ibm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,35 @@ title: Running Teleport on IBM Cloud
description: How to install and configure Gravitational Teleport on IBM cloud for SSH and Kubernetes access.
---

We've created this guide to give customers a high level overview of how to use Teleport
on the [IBM Cloud](https://www.ibm.com/cloud). This guide provides a high level
introduction leading to a deep dive into how to setup and run Teleport in production.
We've created this guide to give customers an overview of how to use Teleport on
[IBM Cloud](https://www.ibm.com/cloud). This guide provides a high-level
introduction to setting up and running Teleport in production.

<Notice type="warning" scope={["cloud"]}>
<ScopedBlock scope="cloud">

This guide shows you how to deploy the Auth Service and Proxy Service, which
Teleport Cloud manages for you. You can read this guide if you are interested in
learning about self-hosting Teleport on IBM Cloud.
Teleport Cloud manages for you.

</Notice>
You can view this guide as a user of another Teleport edition:

<TileSet>
<Tile
title="Open Source Teleport"
href="./ibm.mdx/?scope=oss"
icon="stack"
>
</Tile>
<Tile
title="Teleport Enterprise"
href="./ibm.mdx/?scope=enterprise"
icon="building"
>
</Tile>
</TileSet>

</ScopedBlock>

<ScopedBlock scope={["oss", "enterprise"]}>

We have split this guide into:

Expand Down Expand Up @@ -198,3 +216,5 @@ the Teleport Proxy public address.
# (see public_addr section below)
public_addr: proxy.example.com:3080
```

</ScopedBlock>
23 changes: 6 additions & 17 deletions docs/pages/setup/guides.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,9 @@ description: Teleport Installation and Configuration Guides.
layout: tocless-doc
---

<ul>
<li>
[Terraform Provider](./guides/terraform-provider.mdx). How to configure Teleport Cloud, Open Source, and Enterprise with Terraform Provider.
</li>
<li>
[Docker](./guides/docker.mdx). Getting started with Teleport Open Source using Docker.
</li>
<li>
[Fluentd Event Forwarder](./guides/fluentd.mdx). Forwarding events with Fluentd and Teleport Events Handler.
</li>
<li>
[EC2 tags as Teleport Nodes](./guides/ec2-tags.mdx). How to setup Teleport node labels based on EC2 tags.
</li>
<li>
[Joining Nodes in AWS](./guides/joining-nodes-aws.mdx). How to join nodes and proxies on EC2.
</li>
</ul>
- [Terraform Provider](./guides/terraform-provider.mdx). How to configure Teleport Cloud, Open Source, and Enterprise with the Terraform Provider for Teleport.
- [Docker](./guides/docker.mdx). Getting started with Teleport Open Source using Docker.
- [Fluentd Event Forwarder](./guides/fluentd.mdx). Forwarding events with Fluentd and the Teleport Events Handler.
- [EC2 tags as Teleport Nodes](./guides/ec2-tags.mdx). How to set up Teleport Node labels based on EC2 tags.
- [Joining Nodes via AWS IAM Role](./guides/joining-nodes-aws-iam.mdx). Use the IAM join method to add Nodes to your Teleport cluster on AWS.
- [Using Teleport's Certificate Authority with GitHub](./guides/ssh-key-extensions.mdx). Use Teleport's short-lived certificates with GitHub's Certificate Authority.
16 changes: 10 additions & 6 deletions docs/pages/setup/operations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ For guides on the fundamentals of setting up your cluster, you should consult
the [Cluster Administration Guides](./admin.mdx) section.

<TileSet>
<Tile href="./operations/scaling.mdx" title="Scaling" icon="wrench">
How to configure Teleport for large-scale deployments.
</Tile>
<ScopedBlock scope={["oss", "enterprise"]}>
<Tile href="./operations/scaling.mdx" title="Scaling" icon="wrench">
How to configure Teleport for large-scale deployments.
</Tile>
</ScopedBlock>
<Tile href="./operations/upgrading.mdx" title="Upgrading" icon="wrench">
Learn about how to upgrade your Teleport cluster while ensuring that components remain compatible.
</Tile>
Expand All @@ -23,7 +25,9 @@ the [Cluster Administration Guides](./admin.mdx) section.
<Tile href="./operations/ca-rotation.mdx" title="CA Rotation" icon="wrench">
Rotating Teleport certificate authorities.
</Tile>
<Tile href="./operations/tls-routing.mdx" title="TLS Routing Migration" icon="wrench">
Migrating your Teleport cluster to single-port TLS routing mode.
</Tile>
<ScopedBlock scope={["oss", "enterprise"]}>
<Tile href="./operations/tls-routing.mdx" title="TLS Routing Migration" icon="wrench">
Migrating your Teleport cluster to single-port TLS routing mode.
</Tile>
</ScopedBlock>
</TileSet>
30 changes: 29 additions & 1 deletion docs/pages/setup/operations/scaling.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,35 @@ title: Scaling
description: How to configure Teleport for large-scale deployments
---

This section covers recommended configurations for large-scale
This section explains the recommended configuration settings for large-scale
deployments of Teleport.

<ScopedBlock scope="cloud">

For Teleport Cloud customers, the settings in this guide are configured
automatically.

You can view this guide as a user of another Teleport edition:

<TileSet>
<Tile
title="Open Source Teleport"
href="./scaling.mdx/?scope=oss"
icon="stack"
>
</Tile>
<Tile
title="Teleport Enterprise"
href="./scaling.mdx/?scope=enterprise"
icon="building"
>
</Tile>
</TileSet>

</ScopedBlock>

<ScopedBlock scope={["oss", "enterprise"]}>

## Prerequisites

- Teleport v(=teleport.version=) Open Source or Enterprise.
Expand Down Expand Up @@ -68,3 +94,5 @@ $ cat /proc/$(pidof teleport)/limits
# Limit Soft Limit Hard Limit Units
# Max open files 65536 65536 files
```

</ScopedBlock>
Loading

0 comments on commit d2a87a6

Please sign in to comment.