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

RFD: Automatic AWS Server Discovery #12410

Merged
merged 6 commits into from
Sep 1, 2022
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Clarify that installer scripts are no longer singletons
  • Loading branch information
Alex McGrath committed Aug 31, 2022
commit df1a6c50c9a52e7d204e37c1f53292492c29dd20
4 changes: 3 additions & 1 deletion rfd/0057-automatic-aws-server-discovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,14 @@ Example:
## Agent installation

In order to install the Teleport agent on EC2 instances, Teleport will serve an
install script at `/webapi/scripts/installer`. This will be editable as a resource.
install script at `/webapi/scripts/{installer-resource-name}`. Installer scripts will
be editable as a resource.

Example resource script:
```yaml
kind: installer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a singleton resource? Wouldn't it be better to have multiple script names available for different instance types and specify the script per label?

Copy link
Collaborator

@r0mant r0mant Aug 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now it's a singleton, yes. Users can replace it with their own if they want to e.g. to detect instance type, etc. but if we wanted to have ability to have multiple scripts we could make this a non-singleton resource and for example add a field to auto-discovery configuration to optionally specify which install script to use.

ssh_service:
  enabled: "yes"
  aws:
   - types: ["ec2"]
     regions: ["eu-central-1"]
     tags:
       "arch": "ubuntu"
     install:
       script_name: "install-script-ubuntu"
   - types: ["ec2"]
     regions: ["eu-central-1"]
     tags:
       "arch": "centos"
     install:
       script_name: "install-script-centos"

This would require users to mark their AWS nodes with appropriate tags if they want to use different install scripts. Auto-discovery configuration will become dynamic as a part of Teleport Discover Day-2 work so they will be able to update this mapping dynamically as well when we implement it.

@klizhentas @lxea What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems good to me, would the script_name option here just be used for parameterize the SSM command run?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lxea yes

metadata:
name: "installer" # default value
spec:
# shell script that will be downloaded an run by the EC2 node
script: |
Expand Down