-
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] Move teleport binaries to new path {deb,rpm} #49110
[teleport-update] Move teleport binaries to new path {deb,rpm} #49110
Conversation
…ort-update-for-dist-packages
Move teleport.service to new path
…ort-update-for-dist-packages
dev tag build: https://github.com/gravitational/teleport.e/actions/runs/11926871694 publish might be failing by removal script since command not yet implemented, checking this one |
Example of upgrade deb package from Install root@92f7b4e17c5b:/go/teleport# dpkg -i teleport_17.0.1_arm64.deb
(Reading database ... 59626 files and directories currently installed.)
Preparing to unpack teleport_17.0.1_arm64.deb ...
Unpacking teleport (17.0.1) ...
Setting up teleport (17.0.1) ...
root@92f7b4e17c5b:/go/teleport# ls -la /usr/local/bin/
drwxr-xr-x 1 root root 4096 Nov 20 15:13 .
drwxr-xr-x 1 root root 4096 Nov 19 19:59 ..
-rwxr-xr-x 1 root root 395672 Nov 16 08:11 fdpass-teleport
-rwxr-xr-x 1 root root 84934916 Nov 16 08:11 tbot
-rwxr-xr-x 1 root root 104273432 Nov 16 08:11 tctl
-rwxr-xr-x 1 root root 341960152 Nov 16 08:11 teleport
-rwxr-xr-x 1 root root 51904664 Nov 19 19:22 teleport-update
-rwxr-xr-x 1 root root 118778368 Nov 16 08:11 tsh Upgrade to
|
Systemd reload now managed by teleport-update Make safe unlink not to block package removal
…ort-update-for-dist-packages
…ort-update-for-dist-packages
…ort-update-for-dist-packages
Latest tag build and publish: I also added changes for AMI build script, to move binaries according new path and @fheinecke @hugoShaka could you please review |
…ort-update-for-dist-packages
Latest ✅ https://github.com/gravitational/teleport.e/actions/runs/12172791313 Installing previous version first 17.0.1:
Upgrade to teleport_18.0.0-dev.vapopov.16_arm64.deb root@6ddfa2f2f9e9:/go/teleport# dpkg -i teleport_18.0.0-dev.vapopov.16_arm64.deb
(Reading database ... 51838 files and directories currently installed.)
Preparing to unpack teleport_18.0.0-dev.vapopov.16_arm64.deb ...
Unpacking teleport (18.0.0-dev.vapopov.16) over (17.0.1) ...
dpkg: warning: unable to delete old directory '/usr/local/bin': Directory not empty
dpkg: warning: unable to delete old directory '/usr/local': Directory not empty
Setting up teleport (18.0.0-dev.vapopov.16) ...
Teleport system symlinks creation...
2024-12-05T20:01:53Z INFO [UPDATER] Systemd configuration synced. unit:teleport.service agent/process.go:259
2024-12-05T20:01:53Z INFO [UPDATER] Successfully linked system package installation. agent/updater.go:791
root@6ddfa2f2f9e9:/go/teleport# ls -la /usr/local/bin/
drwxr-xr-x 1 root root 4096 Dec 5 20:01 .
drwxr-xr-x 1 root root 4096 Nov 6 18:46 ..
lrwxrwxrwx 1 root root 40 Dec 5 20:01 fdpass-teleport -> /opt/teleport/system/bin/fdpass-teleport
lrwxrwxrwx 1 root root 29 Dec 5 20:01 tbot -> /opt/teleport/system/bin/tbot
lrwxrwxrwx 1 root root 29 Dec 5 20:01 tctl -> /opt/teleport/system/bin/tctl
lrwxrwxrwx 1 root root 33 Dec 5 20:01 teleport -> /opt/teleport/system/bin/teleport
lrwxrwxrwx 1 root root 40 Dec 5 20:01 teleport-update -> /opt/teleport/system/bin/teleport-update
lrwxrwxrwx 1 root root 28 Dec 5 20:01 tsh -> /opt/teleport/system/bin/tsh
root@6ddfa2f2f9e9:/go/teleport# ls -la /lib/systemd/system/teleport.service
-rw-r--r-- 1 root root 435 Dec 5 20:01 /lib/systemd/system/teleport.service
root@6ddfa2f2f9e9:/go/teleport# tree /opt/teleport/system/
/opt/teleport/system/
|-- bin
| |-- fdpass-teleport
| |-- tbot
| |-- tctl
| |-- teleport
| |-- teleport-update
| `-- tsh
`-- lib
`-- systemd
`-- system
`-- teleport.service
5 directories, 7 files
root@6ddfa2f2f9e9:/go/teleport# teleport-update version
Teleport v18.0.0-dev.vapopov.16 git:v18.0.0-dev.vapopov.16-0-g86eae8a go1.23.4 Package structure: root@6ddfa2f2f9e9:/go/teleport# dpkg-deb -c teleport_18.0.0-dev.vapopov.16_arm64.deb
drwxr-xr-x 0/0 0 2024-12-05 04:10 ./
drwxr-xr-x 0/0 0 2024-12-05 04:10 ./opt/
drwxr-xr-x 0/0 0 2024-12-05 04:10 ./opt/teleport/
drwxr-xr-x 0/0 0 2024-12-05 04:10 ./opt/teleport/system/
drwxr-xr-x 0/0 0 2024-12-05 04:10 ./opt/teleport/system/bin/
-rwxr-xr-x 0/0 395672 2024-12-05 04:04 ./opt/teleport/system/bin/fdpass-teleport
-rwxr-xr-x 0/0 85459204 2024-12-05 04:04 ./opt/teleport/system/bin/tbot
-rwxr-xr-x 0/0 104877336 2024-12-05 04:04 ./opt/teleport/system/bin/tctl
-rwxr-xr-x 0/0 331659256 2024-12-05 04:04 ./opt/teleport/system/bin/teleport
-rwxr-xr-x 0/0 52232344 2024-12-05 04:04 ./opt/teleport/system/bin/teleport-update
-rwxr-xr-x 0/0 119314496 2024-12-05 04:04 ./opt/teleport/system/bin/tsh
drwxr-xr-x 0/0 0 2024-12-05 04:10 ./opt/teleport/system/lib/
drwxr-xr-x 0/0 0 2024-12-05 04:10 ./opt/teleport/system/lib/systemd/
drwxr-xr-x 0/0 0 2024-12-05 04:10 ./opt/teleport/system/lib/systemd/system/
-rw-r--r-- 0/0 435 2024-12-05 04:04 ./opt/teleport/system/lib/systemd/system/teleport.service
drwxr-xr-x 0/0 0 2024-12-05 04:10 ./var/
drwxr-xr-x 0/0 0 2024-12-05 04:10 ./var/lib/
drwxr-xr-x 0/0 0 2024-12-05 04:10 ./var/lib/teleport/
drwxr-xr-x 0/0 0 2024-12-05 04:10 ./var/lib/teleport/versions/
drwxr-xr-x 0/0 0 2024-12-05 04:10 ./usr/
drwxr-xr-x 0/0 0 2024-12-05 04:10 ./usr/share/
drwxr-xr-x 0/0 0 2024-12-05 04:10 ./usr/share/doc/
drwxr-xr-x 0/0 0 2024-12-05 04:10 ./usr/share/doc/teleport/
-rw-r--r-- 0/0 145 2024-12-05 04:10 ./usr/share/doc/teleport/changelog.gz |
@hugoShaka @fheinecke @avatus @camscale could you please review whenever you have time |
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.
LGTM but I'd rather have someone familiar with out deb/rpm packages to review this as well.
I can stamp if @fheinecke or @camscale are comfortable with the changeset.
+1 |
The reason for changing I do not see any testing that this will work for RPMs - the test runs shown are only the Otherwise this all looks good to me. |
Hey @camscale, this comment explains the selection of paths used by both For the
(It's also less common / compliant for OS packages to install into Let me know if you have questions / feedback. Definitely want to get this right 🙂 |
That all makes sense. I had assumed that /usr/local/teleport-system -> /opt/teleport/system was because is not typical to create application directories in /usr/local (that is what /opt is for). I assumed the |
@camscale rpm installation example [root@7af89957437b /]# rpm -i /dw/teleport-18.0.0-dev.vapopov.19-1.arm64.rpm
warning: /dw/teleport-18.0.0-dev.vapopov.19-1.arm64.rpm: Header V4 RSA/SHA512 Signature, key ID 2f67ad73: NOKEY
Teleport system symlinks creation...
2024-12-16T20:18:17Z INFO [UPDATER] Validating binary name:fdpass-teleport agent/validate.go:68
2024-12-16T20:18:17Z INFO [UPDATER] Binary does not support version command name:fdpass-teleport agent/validate.go:79
2024-12-16T20:18:17Z INFO [UPDATER] Validating binary name:tbot agent/validate.go:68
2024-12-16T20:18:17Z INFO [UPDATER] [stdout] Teleport v18.0.0-dev.vapopov.19 git:v18.0.0-dev.vapopov.19-0-g1122d7d go1.23.4 agent/logger.go:69
2024-12-16T20:18:17Z INFO [UPDATER] Validating binary name:tctl agent/validate.go:68
2024-12-16T20:18:17Z INFO [UPDATER] [stdout] Teleport v18.0.0-dev.vapopov.19 git:v18.0.0-dev.vapopov.19-0-g1122d7d go1.23.4 agent/logger.go:69
2024-12-16T20:18:17Z INFO [UPDATER] Validating binary name:teleport agent/validate.go:68
2024-12-16T20:18:17Z INFO [UPDATER] [stdout] Teleport v18.0.0-dev.vapopov.19 git:v18.0.0-dev.vapopov.19-0-g1122d7d go1.23.4 agent/logger.go:69
2024-12-16T20:18:17Z INFO [UPDATER] Validating binary name:teleport-update agent/validate.go:68
2024-12-16T20:18:17Z INFO [UPDATER] [stdout] Teleport v18.0.0-dev.vapopov.19 git:v18.0.0-dev.vapopov.19-0-g1122d7d go1.23.4 agent/logger.go:69
2024-12-16T20:18:17Z INFO [UPDATER] Validating binary name:tsh agent/validate.go:68
2024-12-16T20:18:17Z INFO [UPDATER] [stdout] Teleport v18.0.0-dev.vapopov.19 git:v18.0.0-dev.vapopov.19-0-g1122d7d go1.23.4 agent/logger.go:69
2024-12-16T20:18:17Z ERRO [UPDATER] This system does not support systemd, which is required by the updater. agent/process.go:319
2024-12-16T20:18:17Z WARN [UPDATER] Systemd is not installed. Skipping sync. agent/updater.go:797
2024-12-16T20:18:17Z INFO [UPDATER] Successfully linked system package installation. agent/updater.go:801 [root@7af89957437b /]# ls -la /opt/teleport/system/bin/
total 683072
drwxr-xr-x 2 root root 4096 Dec 16 20:18 .
drwxr-xr-x 4 root root 4096 Dec 16 20:18 ..
-rwxr-xr-x 1 root root 395672 Dec 16 18:27 fdpass-teleport
-rwxr-xr-x 1 root root 85786884 Dec 16 18:27 tbot
-rwxr-xr-x 1 root root 106600280 Dec 16 18:27 tctl
-rwxr-xr-x 1 root root 334658992 Dec 16 18:27 teleport
-rwxr-xr-x 1 root root 52494488 Dec 16 18:27 teleport-update
-rwxr-xr-x 1 root root 119491680 Dec 16 18:27 tsh
[root@7af89957437b /]# ls -la /usr/local/bin/
total 12
drwxr-xr-x 1 root root 4096 Dec 16 20:18 .
drwxr-xr-x 1 root root 4096 Sep 15 2021 ..
lrwxrwxrwx 1 root root 40 Dec 16 20:18 fdpass-teleport -> /opt/teleport/system/bin/fdpass-teleport
lrwxrwxrwx 1 root root 29 Dec 16 20:18 tbot -> /opt/teleport/system/bin/tbot
lrwxrwxrwx 1 root root 29 Dec 16 20:18 tctl -> /opt/teleport/system/bin/tctl
lrwxrwxrwx 1 root root 33 Dec 16 20:18 teleport -> /opt/teleport/system/bin/teleport
lrwxrwxrwx 1 root root 40 Dec 16 20:18 teleport-update -> /opt/teleport/system/bin/teleport-update
lrwxrwxrwx 1 root root 28 Dec 16 20:18 tsh -> /opt/teleport/system/bin/tsh
[root@7af89957437b /]# rpm -ql /dw/teleport-18.0.0-dev.vapopov.19-1.arm64.rpm
warning: /dw/teleport-18.0.0-dev.vapopov.19-1.arm64.rpm: Header V4 RSA/SHA512 Signature, key ID 2f67ad73: NOKEY
/opt/teleport/system/bin/fdpass-teleport
/opt/teleport/system/bin/tbot
/opt/teleport/system/bin/tctl
/opt/teleport/system/bin/teleport
/opt/teleport/system/bin/teleport-update
/opt/teleport/system/bin/tsh
/opt/teleport/system/lib/systemd/system/teleport.service
/var/lib/teleport
/var/lib/teleport/versions |
…ort-update-for-dist-packages
…ort-update-for-dist-packages
In this PR teleport binaries moved to new location according:
https://github.com/gravitational/teleport/blob/master/rfd/0184-agent-auto-updates.md?plain=1#L1774-L1780
Related: https://github.com/gravitational/cloud/issues/10289