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 3, 2022
1 parent 210a8c8 commit 8780da8
Show file tree
Hide file tree
Showing 10 changed files with 300 additions and 63 deletions.
122 changes: 100 additions & 22 deletions docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,47 +40,125 @@
{
"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"
}
]
},
{
"title": "Operations",
"slug": "/setup/operations/",
"entries": [
{ "title": "Scaling", "slug": "/setup/operations/scaling/" },
{ "title": "Upgrading", "slug": "/setup/operations/upgrading/" },
{ "title": "Backup and Restore", "slug": "/setup/operations/backup-restore/" },
{ "title": "Cert Authority Rotation", "slug": "/setup/operations/ca-rotation/" }
{
"title": "Scaling",
"slug": "/setup/operations/scaling/",
"hideInScopes": "cloud"
},
{
"title": "Upgrading a Cluster",
"slug": "/setup/operations/upgrading/"
},
{
"title": "Backup and Restore",
"slug": "/setup/operations/backup-restore/"
},
{
"title": "Cert Authority Rotation",
"slug": "/setup/operations/ca-rotation/"
}
]
},
{
"title": "Security",
"slug": "/setup/security/",
"entries": [
{
"title": "Reducing the Blast Radius of Attacks",
"slug": "/setup/security/reduce-blast-radius/"
}
]
},
{
"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 in AWS",
"slug": "/setup/guides/joining-nodes-aws/"
}
]
},
{
"title": "Reference",
"slug": "/setup/reference/",
"entries": [
{ "title": "Config File", "slug": "/setup/reference/config/" },
{ "title": "Config Resources", "slug": "/setup/reference/resources/" },
{ "title": "Command Line", "slug": "/setup/reference/cli/" },
{ "title": "Metrics", "slug": "/setup/reference/metrics/" },
{ "title": "Terraform Resources", "slug": "/setup/reference/terraform-provider/" },
{ "title": "Audit Events and Records", "slug": "/setup/reference/audit/" },
{ "title": "Authentication", "slug": "/setup/reference/authentication/" },
{ "title": "Storage Backends", "slug": "/setup/reference/backends/" },
{ "title": "Networking", "slug": "/setup/reference/networking/" },
{ "title": "Enterprise License File", "slug": "/setup/reference/license/" },
{
"title": "Config File",
"slug": "/setup/reference/config/"
},
{
"title": "Config Resources",
"slug": "/setup/reference/resources/"
},
{
"title": "Command Line",
"slug": "/setup/reference/cli/"
},
{
"title": "Metrics",
"slug": "/setup/reference/metrics/"
},
{
"title": "Terraform Resources",
"slug": "/setup/reference/terraform-provider/"
},
{
"title": "Audit Events and Records",
"slug": "/setup/reference/audit/"
},
{
"title": "Authentication",
"slug": "/setup/reference/authentication/"
},
{
"title": "Storage Backends",
"slug": "/setup/reference/backends/",
"hideInScopes": "cloud"
},
{
"title": "Networking",
"slug": "/setup/reference/networking/"
},
{
"title": "Signals",
"slug": "/setup/reference/signals/"
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>
53 changes: 52 additions & 1 deletion docs/pages/setup/deployments/aws-terraform.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +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.

<ScopedBlock scope="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:

<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 @@ -834,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 in AWS](./guides/joining-nodes-aws.mdx). How to join Nodes and Proxy Service instances on EC2.
- [Using Teleport's Certificate Authority with GitHub](./guides/ssh-key-extensions.mdx). Use Teleport's short-lived certificates with GitHub's Certificate Authority.
Loading

0 comments on commit 8780da8

Please sign in to comment.