Skip to content

[teleport-update] Use teleport config package to generate systemd services#55499

Merged
sclevine merged 6 commits intomasterfrom
sclevine/autoupdates-systemd-refactor
Jul 6, 2025
Merged

[teleport-update] Use teleport config package to generate systemd services#55499
sclevine merged 6 commits intomasterfrom
sclevine/autoupdates-systemd-refactor

Conversation

@sclevine
Copy link
Copy Markdown
Member

@sclevine sclevine commented Jun 6, 2025

This PR switches teleport-update to the lib/config/systemd package to generate the teleport.service systemd service. This is equivalent to running teleport install systemd with the target Teleport version, as teleport-update always re-execs the target version of teleport-update before writing configuration.

This PR also refactors teleport-update to support creating a systemd service for each binary. This will be used in a follow-up PR to add support for installing a tbot service and reloading tbot.

Finally, this PR also appends the target version of Teleport to all configuration file headers. This will make it easier for humans to determine which configuration files are being updated, and allows teleport-update to verify which files belong to each version of Teleport.

Note: systemd functions in lib/config are moved into lib/config/systemd to prevent pulling a large number of dependencies into teleport-update (some of which prevent it from building on Linux).


changelog: Append headers to configuration files generated by teleport-update

Goal: https://github.com/gravitational/cloud/issues/13207 (internal)

@sclevine sclevine force-pushed the sclevine/autoupdates-systemd-refactor branch from 8d3f7db to 48cfda7 Compare June 30, 2025 16:25
@sclevine sclevine marked this pull request as ready for review June 30, 2025 18:07
@sclevine sclevine requested review from hugoShaka and vapopov June 30, 2025 18:07
@github-actions github-actions bot requested review from boxofrad and nklaassen June 30, 2025 18:07
@sclevine sclevine force-pushed the sclevine/autoupdates-systemd-refactor branch from 556bb9a to 445a594 Compare June 30, 2025 18:31
@sclevine sclevine force-pushed the sclevine/autoupdates-systemd-refactor branch from 98cea03 to b23baa7 Compare July 1, 2025 16:26
@sclevine sclevine force-pushed the sclevine/autoupdates-systemd-refactor branch from c5f86bf to f043a9d Compare July 1, 2025 17:21
@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from nklaassen July 3, 2025 15:39
@sclevine sclevine enabled auto-merge July 6, 2025 00:33
@sclevine sclevine added this pull request to the merge queue Jul 6, 2025
Merged via the queue into master with commit 5ea0f2a Jul 6, 2025
47 checks passed
@sclevine sclevine deleted the sclevine/autoupdates-systemd-refactor branch July 6, 2025 00:55
@backport-bot-workflows
Copy link
Copy Markdown
Contributor

@sclevine See the table below for backport results.

Branch Result
branch/v15 Failed
branch/v16 Failed
branch/v17 Failed
branch/v18 Failed

sclevine added a commit that referenced this pull request Jul 8, 2025
…vices (#55499)

* Refactor systemd services

* cleanup

* use FIPS in config test

* cleanup

* prevent large package import

* rename testdata file
sclevine added a commit that referenced this pull request Jul 8, 2025
…vices (#55499)

* Refactor systemd services

* cleanup

* use FIPS in config test

* cleanup

* prevent large package import

* rename testdata file
sclevine added a commit that referenced this pull request Jul 8, 2025
…vices (#55499)

* Refactor systemd services

* cleanup

* use FIPS in config test

* cleanup

* prevent large package import

* rename testdata file
sclevine added a commit that referenced this pull request Jul 8, 2025
…vices (#55499)

* Refactor systemd services

* cleanup

* use FIPS in config test

* cleanup

* prevent large package import

* rename testdata file
sclevine added a commit that referenced this pull request Jul 8, 2025
…vices (#55499)

* Refactor systemd services

* cleanup

* use FIPS in config test

* cleanup

* prevent large package import

* rename testdata file
github-merge-queue bot pushed a commit that referenced this pull request Jul 25, 2025
…vices (#55499) (#56577)

* Refactor systemd services

* cleanup

* use FIPS in config test

* cleanup

* prevent large package import

* rename testdata file
github-merge-queue bot pushed a commit that referenced this pull request Sep 5, 2025
…vices (#55499) (#56578)

* Refactor systemd services

* cleanup

* use FIPS in config test

* cleanup

* prevent large package import

* rename testdata file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants