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

[teleport-update] Add teleport-update to build and archive #48839

Merged
merged 7 commits into from
Nov 13, 2024

Conversation

vapopov
Copy link
Contributor

@vapopov vapopov commented Nov 12, 2024

In this PR added teleport-update binary to full target and into install scripts, similar going to be created for teleport.e

Related: https://github.com/gravitational/cloud/issues/10289

@vapopov vapopov added the no-changelog Indicates that a PR does not require a changelog entry label Nov 12, 2024
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-48839.d3pp5qlev8mo18.amplifyapp.com

Copy link
Contributor

@fheinecke fheinecke left a comment

Choose a reason for hiding this comment

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

Please produce a dev tag build and check every release asset to ensure that the file is included as expected, and that the other binaries and config files have the correct values

We have previously avoided using ^teleport for new binary names because it is highly likely that we are matching against this (or equivocal) pattern in the build/release process. Tangentially related, this will cause some minor annoyance for users who use tab completion in their shell.

@@ -240,7 +240,7 @@ endif

# On Windows only build tsh. On all other platforms build teleport, tctl,
# and tsh.
BINS_default = teleport tctl tsh tbot fdpass-teleport
BINS_default = teleport tctl tsh tbot fdpass-teleport teleport-update
Copy link
Contributor

Choose a reason for hiding this comment

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

Where is the actual target for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

teleport/Makefile

Lines 398 to 400 in c7d8791

.PHONY: $(BUILDDIR)/teleport-update
$(BUILDDIR)/teleport-update:
GOOS=$(OS) GOARCH=$(ARCH) CGO_ENABLED=0 go build -o $(BUILDDIR)/teleport-update $(BUILDFLAGS) ./tool/teleport-update

@vapopov
Copy link
Contributor Author

vapopov commented Nov 13, 2024

Dev tag build: https://github.com/gravitational/teleport.e/actions/runs/11807261743

Executed from these test branches with version commit:

checked:

  • teleport-ent-v18.0.0-dev.vapopov.2-linux-386-bin.tar.gz
  • teleport-ent-v18.0.0-dev.vapopov.2-linux-amd64-bin.tar.gz
  • teleport-ent-v18.0.0-dev.vapopov.2-linux-amd64-centos7-bin.tar.gz
  • teleport-ent-v18.0.0-dev.vapopov.2-linux-amd64-centos7-fips-bin.tar.gz
  • teleport-ent-v18.0.0-dev.vapopov.2-linux-amd64-fips-bin.tar.gz
  • teleport-ent-v18.0.0-dev.vapopov.2-linux-arm-bin.tar.gz
  • teleport-ent-v18.0.0-dev.vapopov.2-linux-arm64-bin.tar.gz
  • teleport-ent-v18.0.0-dev.vapopov.2-linux-arm64-fips-bin.tar.gz
  • teleport-v18.0.0-dev.vapopov.2-linux-386-bin.tar.gz
  • teleport-v18.0.0-dev.vapopov.2-linux-amd64-bin.tar.gz
  • teleport-v18.0.0-dev.vapopov.2-linux-amd64-centos7-bin.tar.gz
  • teleport-v18.0.0-dev.vapopov.2-linux-arm-bin.tar.gz
  • teleport-v18.0.0-dev.vapopov.2-linux-arm64-bin.tar.gz
# teleport-ent-v18.0.0-dev.vapopov.2-linux-arm64-bin.tar.gz
root@d21716aae82e:/go/teleport# ./teleport-update version
Teleport v18.0.0-dev.vapopov.2 git:v18.0.0-dev.vapopov.2-0-g0c973b4 go1.23.3
# teleport-ent-v18.0.0-dev.vapopov.2-linux-arm64-fips-bin.tar.gz
root@d21716aae82e:/go/teleport# ./teleport-update version
Teleport v18.0.0-dev.vapopov.2 git:v18.0.0-dev.vapopov.2-0-g0c973b4 go1.23.3 X:boringcrypto
# teleport-v18.0.0-dev.vapopov.2-linux-arm64-bin.tar.gz
root@d21716aae82e:/go/teleport# ./teleport-update version
Teleport v18.0.0-dev.vapopov.2 git:v18.0.0-dev.vapopov.2-0-g0c973b4 go1.23.3

@vapopov
Copy link
Contributor Author

vapopov commented Nov 13, 2024

Couple of findings after testing with tag build, deb and rpm packages were missing teleport-update, but tar package for darwin platform had teleport-update binary, but we don't support agent auto-update for darwin platform.

Fixed in last tag build: https://github.com/gravitational/teleport.e/actions/runs/11809885061

root@d21716aae82e:/go/teleport# dpkg-deb -c teleport-ent_18.0.0-dev.vapopov.4_amd64.deb
drwxr-xr-x 0/0               0 2024-11-13 03:32 ./
drwxr-xr-x 0/0               0 2024-11-13 03:32 ./var/
drwxr-xr-x 0/0               0 2024-11-13 03:32 ./var/lib/
drwx------ 0/0               0 2024-11-13 03:32 ./var/lib/teleport/
drwxr-xr-x 0/0               0 2024-11-13 03:32 ./lib/
drwxr-xr-x 0/0               0 2024-11-13 03:32 ./lib/systemd/
drwxr-xr-x 0/0               0 2024-11-13 03:32 ./lib/systemd/system/
-rw-r--r-- 0/0             435 2024-11-13 03:23 ./lib/systemd/system/teleport.service
drwxr-xr-x 0/0               0 2024-11-13 03:32 ./usr/
drwxr-xr-x 0/0               0 2024-11-13 03:32 ./usr/local/
drwxr-xr-x 0/0               0 2024-11-13 03:32 ./usr/local/bin/
-rwxr-xr-x 0/0       106517752 2024-11-13 03:23 ./usr/local/bin/tctl
-rwxr-xr-x 0/0        53067928 2024-11-13 03:23 ./usr/local/bin/teleport-update
-rwxr-xr-x 0/0       395906616 2024-11-13 03:23 ./usr/local/bin/teleport
-rwxr-xr-x 0/0          383352 2024-11-13 03:23 ./usr/local/bin/fdpass-teleport
-rwxr-xr-x 0/0        86569112 2024-11-13 03:23 ./usr/local/bin/tbot
-rwxr-xr-x 0/0       121371264 2024-11-13 03:23 ./usr/local/bin/tsh
drwxr-xr-x 0/0               0 2024-11-13 03:32 ./usr/share/
drwxr-xr-x 0/0               0 2024-11-13 03:32 ./usr/share/doc/
drwxr-xr-x 0/0               0 2024-11-13 03:32 ./usr/share/doc/teleport-ent/
-rw-r--r-- 0/0             145 2024-11-13 03:32 ./usr/share/doc/teleport-ent/changelog.gz
root@d21716aae82e:/go/teleport# tar -tvf teleport-ent-v18.0.0-dev.vapopov.4-darwin-amd64-bin.tar | grep -v 'teleport-ent/examples'
drwxr-xr-x runner/staff      0 2024-11-13 03:31 teleport-ent/
-rwxr-xr-x runner/staff   2038 2024-11-13 03:31 teleport-ent/install
-rwxr-xr-x runner/staff 89370944 2024-11-13 03:31 teleport-ent/tbot
-rw-r--r-- runner/staff   260996 2024-11-13 03:31 teleport-ent/CHANGELOG.md
-rwxr-xr-x runner/staff   387552 2024-11-13 03:31 teleport-ent/fdpass-teleport
-rwxr-xr-x runner/staff 362399728 2024-11-13 03:31 teleport-ent/teleport
drwxr-xr-x runner/staff         0 2024-11-13 03:31 teleport-ent/tctl.app/
drwxr-xr-x runner/staff         0 2024-11-13 03:31 teleport-ent/tsh.app/
-rw-r--r-- runner/staff     17316 2024-11-13 03:31 teleport-ent/README.md
-rw-r--r-- runner/staff        22 2024-11-13 03:31 teleport-ent/VERSION
drwxr-xr-x runner/staff         0 2024-11-13 03:31 teleport-ent/tsh.app/Contents/
drwxr-xr-x runner/staff         0 2024-11-13 03:31 teleport-ent/tsh.app/Contents/_CodeSignature/
drwxr-xr-x runner/staff         0 2024-11-13 03:31 teleport-ent/tsh.app/Contents/MacOS/
drwxr-xr-x runner/staff         0 2024-11-13 03:31 teleport-ent/tsh.app/Contents/Library/
-rw-r--r-- runner/staff     12258 2024-11-13 03:31 teleport-ent/tsh.app/Contents/embedded.provisionprofile
-rw-r--r-- runner/staff      1486 2024-11-13 03:31 teleport-ent/tsh.app/Contents/Info.plist
-rw-r--r-- runner/staff         8 2024-11-13 03:31 teleport-ent/tsh.app/Contents/PkgInfo
drwxr-xr-x runner/staff         0 2024-11-13 03:31 teleport-ent/tsh.app/Contents/Library/LaunchDaemons/
-rw-r--r-- runner/staff       691 2024-11-13 03:31 teleport-ent/tsh.app/Contents/Library/LaunchDaemons/com.goteleport.tshdev.vnetd.plist
-rwxr-xr-x runner/staff 111914160 2024-11-13 03:31 teleport-ent/tsh.app/Contents/MacOS/tsh
-rw-r--r-- runner/staff      2532 2024-11-13 03:31 teleport-ent/tsh.app/Contents/_CodeSignature/CodeResources
drwxr-xr-x runner/staff         0 2024-11-13 03:31 teleport-ent/tctl.app/Contents/
drwxr-xr-x runner/staff         0 2024-11-13 03:31 teleport-ent/tctl.app/Contents/_CodeSignature/
drwxr-xr-x runner/staff         0 2024-11-13 03:31 teleport-ent/tctl.app/Contents/MacOS/
drwxr-xr-x runner/staff         0 2024-11-13 03:31 teleport-ent/tctl.app/Contents/Resources/
-rw-r--r-- runner/staff     12217 2024-11-13 03:31 teleport-ent/tctl.app/Contents/embedded.provisionprofile
-rw-r--r-- runner/staff      1489 2024-11-13 03:31 teleport-ent/tctl.app/Contents/Info.plist
-rw-r--r-- runner/staff         8 2024-11-13 03:31 teleport-ent/tctl.app/Contents/PkgInfo
-rw-r--r-- runner/staff    705577 2024-11-13 03:31 teleport-ent/tctl.app/Contents/Resources/app.icns
-rwxr-xr-x runner/staff  97947504 2024-11-13 03:31 teleport-ent/tctl.app/Contents/MacOS/tctl
-rw-r--r-- runner/staff      2585 2024-11-13 03:31 teleport-ent/tctl.app/Contents/_CodeSignature/CodeResources

@sclevine
Copy link
Member

Ideally, teleport-update would only be added to Linux tarballs for now. Packages will need to be restructured to move their binaries to /usr/local/teleport-system/bin (with a postinst script to link to /usr/local/bin) before teleport-update can be used with them. See: #48712

That said, if this only applies to unreleased v18 builds, I don't see an issue with including it in rpm/debs prematurely.

Copy link
Contributor

@fheinecke fheinecke left a comment

Choose a reason for hiding this comment

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

Can you publish this build as well?

Makefile Show resolved Hide resolved
Add comment for the buildflags
@vapopov
Copy link
Contributor Author

vapopov commented Nov 13, 2024

@fheinecke tag publish: https://github.com/gravitational/teleport.e/actions/runs/11824945136/job/32949041367
I've spoken with Stephen, we have to remove teleport-update from distributive packages deb, rpm since they must have different structure

@vapopov vapopov added this pull request to the merge queue Nov 13, 2024
Merged via the queue into master with commit 9f3ef20 Nov 13, 2024
41 checks passed
@vapopov vapopov deleted the vapopov/add-teleport-update-to-build branch November 13, 2024 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Indicates that a PR does not require a changelog entry size/sm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants