Using MachineID to Generate Join Tokens #15404
corkrean
started this conversation in
Show and tell
Replies: 2 comments 1 reply
-
This is useful, however the Something like
|
Beta Was this translation helpful? Give feedback.
1 reply
-
Another small nit, I believe you have to include the auth-server as a param when using identity file. https://goteleport.com/docs/reference/cli/#on-a-remote-host-with-an-identity-file
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This article will detail how to use Teleport MachineID to generate join tokens for CICD systems. After you've completed this guide, you will always have a valid token (/var/lib/teleport/join_token) that can be used by your CICD system to join resources to a Teleport cluster.
If you're an AWS user, you should consider IAM joining instead of the method described here.
1. Create a Teleport role for your bot user
Populate a file with the following then run the
tctl create -f example.yaml
command.2. Configure MachineID
tctl bots add token-generator --roles=token-role
systemctl daemon-reload ; systemctl enable tbot.service ; systemctl start tbot.service
3. Create a join token generation script
Recommended location is /usr/local/bin/token-generator.sh
4. Configure SystemD timer and service for the MachineID bot
For most configurations, these files should be stored in /etc/systemd/system.
token.timer:
token.service:
5. CICD setup
Configure your CICD tooling to use the join token that is stored at /var/lib/teleport/join_token to add resources to your Teleport cluster.
Beta Was this translation helpful? Give feedback.
All reactions