-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[teleport-update] Add linking into /usr/local #47879
Conversation
This pull request is automatically being deployed by Amplify Hosting (learn more). |
This pull request is automatically being deployed by Amplify Hosting (learn more). |
Reviews appreciated, since this is blocking #47929 🙂 |
} | ||
|
||
// servicePath contains the path to the Teleport SystemD service within the version directory. | ||
servicePath = filepath.Join("etc", "systemd", "teleport.service") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should it be /etc/systemd/system/
path? since we have such help message c431630#diff-39c53543c507ce0bdbd34343ad186bc7d95006d8a62171be800239fb556a8522R66-R78
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the path within the versions
directory (e.g., /var/lib/teleport/versions/1.2.3/etc/systemd/teleport.service
), which uses the same subpath as the examples
directory in the Teleport tgz (examples/systemd/teleport.service
). It's not related to the system /etc/systemd/system/
directory, which is for custom service files.
Not strongly opinionated on if we introduce /system/
, since only the symlink location matters to systemd. Happy to change it if anyone feel strongly. It might make more sense as /var/lib/teleport/versions/1.2.3/lib/systemd/system/teleport.service
, to better match the symlink location.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merging as-is for now, since theoretically we could add options for linking to other places (e.g., /usr/local/systemd/user/
, /etc/systemd/system
) in the future. Also worried that we may have to change the linking destination if systemd isn't compiled with /usr/local
paths in a supported distro (CoreOS does not support it).
Happy to change in a follow-up PR if there are any concerns.
This PR adds support for linking the Teleport binaries and systemd service into /usr/local when the
enable
subcommand to theteleport-update
binary is executed. Additionally, the PR cleans up old versions of Teleport aside from the last installed ("backup") version.This PR also adds:
This is the third in a series of PRs implementing
teleport-update
:Enable Command: #47565
Initial scaffolding PR: #46418
The
teleport-update
binary will be used to enable, disable, and trigger automatic Teleport agent updates. The new auto-updates system manages a local installation of the cluster-specified version of Teleport stored in/var/lib/teleport/versions
.RFD: #47126
Goal (internal): https://github.com/gravitational/cloud/issues/10289
Example: