Skip to content

Install Node Script: respect version variable#25885

Merged
marcoandredinis merged 1 commit intomasterfrom
marco/install_script_allow_setting_version
May 16, 2023
Merged

Install Node Script: respect version variable#25885
marcoandredinis merged 1 commit intomasterfrom
marco/install_script_allow_setting_version

Conversation

@marcoandredinis
Copy link
Copy Markdown
Contributor

@marcoandredinis marcoandredinis commented May 9, 2023

We were always installing the latest version available even if the requested version was different

This PR changes the installation command and the version is now pinned to the one received in the TELEPORT_VERSION variable.

Tested on a APT and YUM repo:

root@tmpubuntu2204:/# curl -fsSL -k https://127.0.0.1.nip.io:3080/scripts/b51fb867634d61aa975d04b885d2e353/install-node.sh > install-node.sh
root@tmpubuntu2204:/# grep 14 install-node.sh 
TELEPORT_VERSION='14.0.0-dev'
root@tmpubuntu2204:/# bash install-node.sh -v 13.0.0       
2023-05-09 12:53:35 UTC [teleport-installer] TELEPORT_VERSION: 13.0.0
...
root@tmpubuntu2204:/# apt show teleport
Package: teleport
Version: 13.0.0
Priority: extra
Section: default
Maintainer: info@goteleport.com
Installed-Size: 436 MB
Provides: teleport
Homepage: https://goteleport.com/docs
License: Apache-2.0
Vendor: Gravitational
Download-Size: 126 MB
APT-Manual-Installed: yes
APT-Sources: https://apt.releases.teleport.dev/ubuntu jammy/stable/v13 amd64 Packages
Description: Teleport is a gateway for managing access to clusters of Linux servers via SSH or the Kubernetes API [64-bit x86 Open source edition]

root@tmpubuntu2204:/#
[root@tmpcentos7 /]# curl -fsSL -k https://127.0.0.1.nip.io:3080/scripts/b51fb867634d61aa975d04b885d2e353/install-node.sh > install-node.sh
[root@tmpcentos7 /]# grep 14 install-node.sh 
TELEPORT_VERSION='14.0.0-dev'
[root@tmpcentos7 /]# bash install-node.sh -v 13.0.0    
2023-05-09 12:55:31 UTC [teleport-installer] TELEPORT_VERSION: 13.0.0
...
root@tmpcentos7 /]# yum info teleport
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: mirrors.up.pt
 * extras: mirrors.up.pt
 * updates: mirrors.up.pt
Installed Packages
Name        : teleport
Arch        : x86_64
Version     : 13.0.0
Release     : 1
Size        : 416 M
Repo        : installed
From repo   : teleport
Summary     : Teleport is a gateway for managing access to clusters of Linux servers via SSH or the Kubernetes API [64-bit x86 Open source
            : edition]
URL         : https://goteleport.com/docs
License     : Apache-2.0
Description : Teleport is a gateway for managing access to clusters of Linux servers via SSH or the Kubernetes API [64-bit x86 Open source
            : edition]

[root@tmpcentos7 /]# 

Fixes #25867

@github-actions github-actions Bot requested review from AntonAM and fspmarshall May 9, 2023 13:13
@marcoandredinis marcoandredinis force-pushed the marco/install_script_allow_setting_version branch from 110f705 to 77792a1 Compare May 9, 2023 13:30
Comment thread lib/web/scripts/node-join/install.sh Outdated
@marcoandredinis marcoandredinis force-pushed the marco/install_script_allow_setting_version branch 2 times, most recently from 4fcc711 to 44fb693 Compare May 10, 2023 10:43
@marcoandredinis marcoandredinis force-pushed the marco/install_script_allow_setting_version branch 2 times, most recently from dc566a8 to 27b2ece Compare May 12, 2023 16:46
@marcoandredinis
Copy link
Copy Markdown
Contributor Author

@fspmarshall Can you please take another look?

@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from AntonAM May 15, 2023 12:51
@marcoandredinis marcoandredinis added this pull request to the merge queue May 15, 2023
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks May 15, 2023
@marcoandredinis marcoandredinis force-pushed the marco/install_script_allow_setting_version branch from 27b2ece to 95d51e9 Compare May 15, 2023 13:31
@marcoandredinis marcoandredinis enabled auto-merge May 15, 2023 14:29
We were always installing the latest version available even if the
requested version was different

This PR changes the installation command and the version is now pinned
to the one received in the `TELEPORT_VERSION` variable.
@marcoandredinis marcoandredinis force-pushed the marco/install_script_allow_setting_version branch from 95d51e9 to ef664da Compare May 16, 2023 06:47
@marcoandredinis marcoandredinis added this pull request to the merge queue May 16, 2023
Merged via the queue into master with commit 328182e May 16, 2023
@marcoandredinis marcoandredinis deleted the marco/install_script_allow_setting_version branch May 16, 2023 07:18
@public-teleport-github-review-bot
Copy link
Copy Markdown

@marcoandredinis See the table below for backport results.

Branch Result
branch/v12 Failed
branch/v13 Create PR

marcoandredinis added a commit that referenced this pull request May 17, 2023
We were always installing the latest version available even if the
requested version was different

This PR changes the installation command and the version is now pinned
to the one received in the `TELEPORT_VERSION` variable.
marcoandredinis added a commit that referenced this pull request May 17, 2023
* Install Scripts: add updater package (#25479)

* Install Node Script: respect version variable (#25885)

We were always installing the latest version available even if the
requested version was different

This PR changes the installation command and the version is now pinned
to the one received in the `TELEPORT_VERSION` variable.

* revert teleport-upgrade installation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Install script ignores version when installing from package repos

3 participants