From b6c93bd63915dac9436e9cee868ca28c34a0b2cc Mon Sep 17 00:00:00 2001 From: Andrew Burke Date: Mon, 20 Nov 2023 16:17:10 -0800 Subject: [PATCH 1/2] Fix yum config manager invocation --- api/types/installers/agentless-installer.sh.tmpl | 2 +- api/types/installers/installer.sh.tmpl | 2 +- docs/pages/includes/cloud/install-linux-cloud.mdx | 2 +- docs/pages/includes/install-linux-ent-self-hosted.mdx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/types/installers/agentless-installer.sh.tmpl b/api/types/installers/agentless-installer.sh.tmpl index 0e99f134e374d..609f7fb46d542 100644 --- a/api/types/installers/agentless-installer.sh.tmpl +++ b/api/types/installers/agentless-installer.sh.tmpl @@ -106,7 +106,7 @@ install_teleport() { if [ "$ID" = "rhel" ]; then VERSION_ID=${VERSION_ID//\.*/} # convert version numbers like '7.2' to only include the major version fi - sudo yum-config-manager --add-repo \ + 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 ${PACKAGE_LIST} elif [ "$ID" = "sles" ] || [ "$ID" = "opensuse-tumbleweed" ] || [ "$ID" = "opensuse-leap" ]; then diff --git a/api/types/installers/installer.sh.tmpl b/api/types/installers/installer.sh.tmpl index ab4f7032f127f..bbc6f10b416ad 100644 --- a/api/types/installers/installer.sh.tmpl +++ b/api/types/installers/installer.sh.tmpl @@ -52,7 +52,7 @@ on_gcp() { if [ "$ID" = "rhel" ]; then VERSION_ID=${VERSION_ID//\.*/} # convert version numbers like '7.2' to only include the major version fi - sudo yum-config-manager --add-repo \ + 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 ${PACKAGE_LIST} elif [ "$ID" = "sles" ] || [ "$ID" = "opensuse-tumbleweed" ] || [ "$ID" = "opensuse-leap" ]; then diff --git a/docs/pages/includes/cloud/install-linux-cloud.mdx b/docs/pages/includes/cloud/install-linux-cloud.mdx index 0dead89572ab0..763a68c97ff8b 100644 --- a/docs/pages/includes/cloud/install-linux-cloud.mdx +++ b/docs/pages/includes/cloud/install-linux-cloud.mdx @@ -28,7 +28,7 @@ # First, get the OS major version from $VERSION_ID so this fetches the correct # package version. $ VERSION_ID=$(echo $VERSION_ID | grep -Eo "^[0-9]+") - $ sudo yum-config-manager --add-repo "$(rpm --eval "https://yum.releases.teleport.dev/$ID/$VERSION_ID/Teleport/%{_arch}/stable/cloud/teleport-yum.repo")" + $ sudo yum config-manager --add-repo "$(rpm --eval "https://yum.releases.teleport.dev/$ID/$VERSION_ID/Teleport/%{_arch}/stable/cloud/teleport-yum.repo")" $ sudo yum install teleport-ent-updater # # Tip: Add /usr/local/bin to path used by sudo (so 'sudo tctl users add' will work as per the docs) diff --git a/docs/pages/includes/install-linux-ent-self-hosted.mdx b/docs/pages/includes/install-linux-ent-self-hosted.mdx index 44e321b6dac05..101047a5a6ede 100644 --- a/docs/pages/includes/install-linux-ent-self-hosted.mdx +++ b/docs/pages/includes/install-linux-ent-self-hosted.mdx @@ -34,7 +34,7 @@ $ source /etc/os-release # First, get the major version from $VERSION_ID so this fetches the correct # package version. $ VERSION_ID=$(echo $VERSION_ID | grep -Eo "^[0-9]+") -$ sudo yum-config-manager --add-repo "$(rpm --eval "https://yum.releases.teleport.dev/$ID/$VERSION_ID/Teleport/%{_arch}/stable/v(=teleport.major_version=)/teleport.repo")" +$ sudo yum config-manager --add-repo "$(rpm --eval "https://yum.releases.teleport.dev/$ID/$VERSION_ID/Teleport/%{_arch}/stable/v(=teleport.major_version=)/teleport.repo")" $ sudo yum install teleport-ent # # Tip: Add /usr/local/bin to path used by sudo (so 'sudo tctl users add' will work as per the docs) From e593e052a93cea586e84df0af28788d286c41a12 Mon Sep 17 00:00:00 2001 From: Andrew Burke Date: Wed, 22 Nov 2023 09:27:17 -0800 Subject: [PATCH 2/2] Install yum-utils instead --- api/types/installers/agentless-installer.sh.tmpl | 3 ++- api/types/installers/installer.sh.tmpl | 3 ++- docs/pages/includes/cloud/install-linux-cloud.mdx | 3 ++- docs/pages/includes/install-linux-ent-self-hosted.mdx | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/api/types/installers/agentless-installer.sh.tmpl b/api/types/installers/agentless-installer.sh.tmpl index 609f7fb46d542..7aa9c841e09d3 100644 --- a/api/types/installers/agentless-installer.sh.tmpl +++ b/api/types/installers/agentless-installer.sh.tmpl @@ -106,7 +106,8 @@ install_teleport() { if [ "$ID" = "rhel" ]; then VERSION_ID=${VERSION_ID//\.*/} # convert version numbers like '7.2' to only include the major version fi - sudo yum config-manager --add-repo \ + sudo yum install -y yum-utils + 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 ${PACKAGE_LIST} elif [ "$ID" = "sles" ] || [ "$ID" = "opensuse-tumbleweed" ] || [ "$ID" = "opensuse-leap" ]; then diff --git a/api/types/installers/installer.sh.tmpl b/api/types/installers/installer.sh.tmpl index bbc6f10b416ad..bc4e09d1501cb 100644 --- a/api/types/installers/installer.sh.tmpl +++ b/api/types/installers/installer.sh.tmpl @@ -52,7 +52,8 @@ on_gcp() { if [ "$ID" = "rhel" ]; then VERSION_ID=${VERSION_ID//\.*/} # convert version numbers like '7.2' to only include the major version fi - sudo yum config-manager --add-repo \ + sudo yum install -y yum-utils + 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 ${PACKAGE_LIST} elif [ "$ID" = "sles" ] || [ "$ID" = "opensuse-tumbleweed" ] || [ "$ID" = "opensuse-leap" ]; then diff --git a/docs/pages/includes/cloud/install-linux-cloud.mdx b/docs/pages/includes/cloud/install-linux-cloud.mdx index 763a68c97ff8b..f6e0d0b4627b1 100644 --- a/docs/pages/includes/cloud/install-linux-cloud.mdx +++ b/docs/pages/includes/cloud/install-linux-cloud.mdx @@ -28,7 +28,8 @@ # First, get the OS major version from $VERSION_ID so this fetches the correct # package version. $ VERSION_ID=$(echo $VERSION_ID | grep -Eo "^[0-9]+") - $ sudo yum config-manager --add-repo "$(rpm --eval "https://yum.releases.teleport.dev/$ID/$VERSION_ID/Teleport/%{_arch}/stable/cloud/teleport-yum.repo")" + $ sudo yum install -y yum-utils + $ sudo yum-config-manager --add-repo "$(rpm --eval "https://yum.releases.teleport.dev/$ID/$VERSION_ID/Teleport/%{_arch}/stable/cloud/teleport-yum.repo")" $ sudo yum install teleport-ent-updater # # Tip: Add /usr/local/bin to path used by sudo (so 'sudo tctl users add' will work as per the docs) diff --git a/docs/pages/includes/install-linux-ent-self-hosted.mdx b/docs/pages/includes/install-linux-ent-self-hosted.mdx index 101047a5a6ede..d7a5260f18319 100644 --- a/docs/pages/includes/install-linux-ent-self-hosted.mdx +++ b/docs/pages/includes/install-linux-ent-self-hosted.mdx @@ -34,7 +34,8 @@ $ source /etc/os-release # First, get the major version from $VERSION_ID so this fetches the correct # package version. $ VERSION_ID=$(echo $VERSION_ID | grep -Eo "^[0-9]+") -$ sudo yum config-manager --add-repo "$(rpm --eval "https://yum.releases.teleport.dev/$ID/$VERSION_ID/Teleport/%{_arch}/stable/v(=teleport.major_version=)/teleport.repo")" +$ sudo yum install -y yum-utils +$ sudo yum-config-manager --add-repo "$(rpm --eval "https://yum.releases.teleport.dev/$ID/$VERSION_ID/Teleport/%{_arch}/stable/v(=teleport.major_version=)/teleport.repo")" $ sudo yum install teleport-ent # # Tip: Add /usr/local/bin to path used by sudo (so 'sudo tctl users add' will work as per the docs)