Closed ptgott closed 2 months ago
Closing as complete:
teleport-cluster
chart, all of which are described in the deploy-a-cluster
section of the docs.If there are more specific issues that make IaC less prominent than it can be in the docs, we should track these as separate GitHub issues, as this issue is very broadly defined.
Applies To
Determining the correct pages is part of the project.
How will we know this is resolved?
The following tracking table is complete. See below for a description of each learning track.
toy/terraform/self-hosted
toy/terraform/cloud
production/terraform/self-hosted
production/helm/self-hosted
production/terraform/cloud
production/helm/cloud
Related Issues
25423 overlaps with this work. Since that PR focuses on a particular implementation detail, let's address #27379 first, since it is focused on use cases and audiences.
Details
The problem
Currently, our instructions for using infrastructure-as-code tools with Teleport are confined to a couple guides that are buried within subsections of the docs, and it's not clear to users that Teleport deeply integrates with these tools.
Conceptualizing setting up Teleport via IAC
Tools
Teleport has good support for two infrastructure as code tools:
Categorizing IAC flows
An infrastructure-as-code approach to Teleport depends on the following attributes of a prospective user:
For the purpose of infrastructure-as-code instructions, we can condense our guidance for Teleport Community Edition and Teleport Enterprise Self-Hosted. Architecturally, deploying the two editions via Helm and Terraform are the same, as are the methods you would use for applying resources and deploying agents. The only difference from the perspective of deploying is how to make the license file available to an Enterprise deployment.
Each combination of qualities determines a user's track through the docs and use of IAC with Teleport.
Here are all the permutations:
toy/terraform/self-hosted
toy/helm/self-hosted
toy/terraform/cloud
toy/helm/cloud
production/terraform/self-hosted
production/helm/self-hosted
production/terraform/cloud
production/helm/cloud
Possible Steps
Users can achieve several Teleport tasks using IAC solutions. Here are some broad categories:
For now, we'll ignore the steps in the "Manage your Cluster" section of the docs to focus on the steps above.
Tracks
Each combination of the user attributes listed above influences the procedure for setting up Teleport using IAC.
toy/terraform/self-hosted
Deploy the Auth/Proxy Service: Single Linux server (i.e., the Linux Server Guide), using the AWS Terraform AMI with an "aws_instance" resource or a Digital Ocean droplet with the "digitalocean_droplet" resource and a startup script.
Deploy a pool of agents: Linux server for each agent using an "aws_instance" or "digitalocean_droplet". Create a token resource for each agent and use that token within a startup script that runs on each node.
Manage access (RBAC): How to use the Terraform provider to create roles, users, CAPs, and SSO connectors.
Enroll resources: How to use the Terraform provider to enroll infrastructure resources via dynamic configuration resources.
toy/helm/self-hosted
We don\'t support this track, as Kubernetes doesn\'t lend itself to small-scale toy clusters and a minikube-hosted Teleport cluster would make it difficult to add resources.
toy/terraform/cloud
toy/helm/cloud
We don\'t support this track, as we imagine that users of toy clusters want to add actual infrastructure resources to their cluster, and Kubernetes doesn\'t lend itself to small toy clusters. If a user wants to play with minikube, for example, we would need to show examples of enrolling local demo resources in a Teleport cluster.
production/terraform/self-hosted
production/helm/self-hosted
teleport-kube-agent
chart to deploy a pool of agents. The Teleport Kubernetes Operator can create provision tokens for these. Note that the Kubernetes Operator does not yet allow you to apply dynamic infrastructure resources, so we will need to use a static configuration file for each agent.production/terraform/cloud
production/helm/cloud