-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Install Scripts: add updater package #25479
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,6 +12,11 @@ set -o nounset | |
|
|
||
| . /etc/os-release | ||
|
|
||
| PACKAGE_LIST="{{ .TeleportPackage }}" | ||
| if [[ "{{ .AutomaticUpgrades }}" == "true" ]]; then | ||
| PACKAGE_LIST="${PACKAGE_LIST} {{ .TeleportPackage }}-updater" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there any condition where
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It won't 👍
So, it will only be true for Enterprise builds |
||
| fi | ||
|
|
||
| if [ "$ID" = "debian" ] || [ "$ID" = "ubuntu" ]; then | ||
| # old versions of ubuntu require that keys get added by `apt-key add`, without | ||
| # adding the key apt shows a key signing error when installing teleport. | ||
|
|
@@ -25,14 +30,14 @@ set -o nounset | |
| echo "deb [signed-by=/usr/share/keyrings/teleport-archive-keyring.asc] https://apt.releases.teleport.dev/${ID?} ${VERSION_CODENAME?} {{ .RepoChannel }}" | sudo tee /etc/apt/sources.list.d/teleport.list >/dev/null | ||
| fi | ||
| sudo apt-get update | ||
| sudo apt-get install -y {{ .TeleportPackage }} | ||
| sudo apt-get install -y ${PACKAGE_LIST} | ||
| elif [ "$ID" = "amzn" ] || [ "$ID" = "rhel" ]; then | ||
| if [ "$ID" = "rhel" ]; then | ||
| VERSION_ID=$(echo "$VERSION_ID" | sed 's/\..*//') # convert version numbers like '7.2' to only include the major version | ||
| fi | ||
| sudo yum-config-manager --add-repo \ | ||
| "$(rpm --eval "https://yum.releases.teleport.dev/$ID/$VERSION_ID/Teleport/%{_arch}/{{ .RepoChannel }}/teleport.repo")" | ||
| sudo yum install -y {{ .TeleportPackage }} | ||
| sudo yum install -y ${PACKAGE_LIST} | ||
| else | ||
| echo "Unsupported distro: $ID" | ||
| exit 1 | ||
|
|
||
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.
Don't we need to install only
xxx-updaterpackage? I think it will pull teleport package as dependency?@hugoShaka @fheinecke Am I wrong?
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.
It does 👍

https://apt.releases.development.teleport.dev/ubuntu/dists/bionic/stable/v13/binary-amd64/Packages
We can remove it, however I would like to clarify something first:
teleport-ent-updaterdepends onteleportteleportandteleport-entboth provideteleport.So, when we try to install only
teleport-ent-updaterwhich package is going to be pulled? Is itteleportorteleport-ent?Uh oh!
There was an error while loading. Please reload this page.
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.
Yes, but we don't want the
teleport-entpackage to be deleted if the user wants to uninstall the updater. IMO it makes sense to mark both as wanted, soteleport-entwon't be auto-removed.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.
@hugoShaka In your documentation guide we instruct people to just
apt install teleport-ent-updater. Is that for scenario when you already have an agent and want to add updater to it?@fheinecke I think
teleport-ent-updatershould depend onteleport-ent, notteleport. Can we update that?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.
Yes, the guide explains how to enroll an existing agent into automatic updates
Uh oh!
There was an error while loading. Please reload this page.
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.
@r0mant it has been (tested before I went on vacation, see https://github.com/gravitational/teleport.e/pull/1177)
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.
I'll keep both packages then 👍