From 536db28cbce85126abfde737edc30e47d6bcf50c Mon Sep 17 00:00:00 2001 From: Nizamudeen A Date: Fri, 12 Aug 2022 17:12:24 +0530 Subject: [PATCH 1/2] deps: move nodejs installation to e2e script to fix the issue happening in these runs https://jenkins.ceph.com/job/ceph-dashboard-cephadm-e2e-nightly-quincy/201/console ``` + sudo apt-get update Ign:1 https://chacra.ceph.com/r/vagrant/latest/HEAD/ubuntu/jammy/flavors/default jammy InRelease Hit:2 https://chacra.ceph.com/r/vagrant/latest/HEAD/ubuntu/jammy/flavors/default jammy Release Ign:3 https://chacra.ceph.com/r/vagrant/latest/HEAD/ubuntu/jammy/flavors/default jammy Release.gpg Hit:4 https://dl.google.com/linux/chrome/deb stable InRelease Ign:5 https://4.chacra.ceph.com/r/cortx-motr/master/39f89fa1c6945040433a913f2687c4b4e6cbeb3f/ubuntu/jammy/flavors/default jammy InRelease Hit:6 https://4.chacra.ceph.com/r/cortx-motr/master/39f89fa1c6945040433a913f2687c4b4e6cbeb3f/ubuntu/jammy/flavors/default jammy Release Hit:7 http://archive.ubuntu.com/ubuntu jammy InRelease Get:8 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB] Ign:9 https://4.chacra.ceph.com/r/cortx-motr/master/39f89fa1c6945040433a913f2687c4b4e6cbeb3f/ubuntu/jammy/flavors/default jammy Release.gpg Get:10 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [114 kB] Get:11 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [99.8 kB] Get:12 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [502 kB] Ign:13 https://deb.nodesource.com/node_12.x jammy InRelease Get:14 http://archive.ubuntu.com/ubuntu jammy-updates/main i386 Packages [269 kB] Get:15 http://archive.ubuntu.com/ubuntu jammy-updates/main Translation-en [119 kB] Get:16 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [210 kB] Get:17 http://archive.ubuntu.com/ubuntu jammy-updates/universe i386 Packages [113 kB] Get:18 http://archive.ubuntu.com/ubuntu jammy-updates/universe Translation-en [69.8 kB] Err:19 https://deb.nodesource.com/node_12.x jammy Release 404 Not Found [IP: 23.34.63.88 443] Reading package lists... E: The repository 'https://deb.nodesource.com/node_12.x jammy Release' does not have a Release file. ``` Signed-off-by: Nizamudeen A --- scripts/dashboard/install-cephadm-e2e-deps.sh | 19 ------------------- scripts/dashboard/install-e2e-test-deps.sh | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/scripts/dashboard/install-cephadm-e2e-deps.sh b/scripts/dashboard/install-cephadm-e2e-deps.sh index 0db1a89a0..8bc01c7dd 100644 --- a/scripts/dashboard/install-cephadm-e2e-deps.sh +++ b/scripts/dashboard/install-cephadm-e2e-deps.sh @@ -20,25 +20,6 @@ sudo apt update -y sudo apt install -y apt-transport-https ca-certificates curl gnupg lsb-release \ openssh-server software-properties-common -NODEJS_MAJOR_VERSION=14 -DISTRO="$(lsb_release -cs)" -if [[ ! $(command -v node) || $(node --version | grep -oE "v([0-9])+" | cut -c 2-) < ${NODEJS_MAJOR_VERSION} ]]; then - sudo add-apt-repository -y -r ppa:chris-lea/node.js - sudo rm -f /etc/apt/sources.list.d/chris-lea-node_js-*.list - sudo rm -f /etc/apt/sources.list.d/chris-lea-node_js-*.list.save - - NODEJS_KEYRING=/usr/share/keyrings/nodesource.gpg - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | sudo tee "${NODEJS_KEYRING}" >/dev/null - gpg --no-default-keyring --keyring "${NODEJS_KEYRING}" --list-keys - - NODEJS_VERSION="node_${NODEJS_MAJOR_VERSION}.x" - echo "deb [signed-by=${NODEJS_KEYRING}] https://deb.nodesource.com/${NODEJS_VERSION} ${DISTRO} main" | sudo tee /etc/apt/sources.list.d/nodesource.list - echo "deb-src [signed-by=${NODEJS_KEYRING}] https://deb.nodesource.com/${NODEJS_VERSION} ${DISTRO} main" | sudo tee -a /etc/apt/sources.list.d/nodesource.list - - sudo apt update -y - sudo apt install -y nodejs - sudo rm -f /etc/apt/sources.list.d/nodesource.list -fi sudo apt install -y libvirt-daemon-system libvirt-daemon-driver-qemu qemu-kvm libvirt-clients runc sudo usermod -aG libvirt $(id -un) diff --git a/scripts/dashboard/install-e2e-test-deps.sh b/scripts/dashboard/install-e2e-test-deps.sh index ba0673f92..ee4a21ab2 100644 --- a/scripts/dashboard/install-e2e-test-deps.sh +++ b/scripts/dashboard/install-e2e-test-deps.sh @@ -7,6 +7,25 @@ if [[ ! $(arch) =~ (i386|x86_64|amd64) ]]; then fi if grep -q debian /etc/*-release; then + NODEJS_MAJOR_VERSION=14 + DISTRO="$(lsb_release -cs)" + if [[ ! $(command -v node) || $(node --version | grep -oE "v([0-9])+" | cut -c 2-) < ${NODEJS_MAJOR_VERSION} ]]; then + sudo apt-get purge nodejs -y + sudo dpkg --remove --force-remove-reinstreq libnode-dev + sudo dpkg --remove --force-remove-reinstreq libnode72:amd64 + + NODEJS_KEYRING=/usr/share/keyrings/nodesource.gpg + curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | sudo tee "${NODEJS_KEYRING}" >/dev/null + gpg --no-default-keyring --keyring "${NODEJS_KEYRING}" --list-keys + + NODEJS_VERSION="node_${NODEJS_MAJOR_VERSION}.x" + echo "deb [signed-by=${NODEJS_KEYRING}] https://deb.nodesource.com/${NODEJS_VERSION} ${DISTRO} main" | sudo tee /etc/apt/sources.list.d/nodesource.list + echo "deb-src [signed-by=${NODEJS_KEYRING}] https://deb.nodesource.com/${NODEJS_VERSION} ${DISTRO} main" | sudo tee -a /etc/apt/sources.list.d/nodesource.list + + sudo apt update -y + sudo apt install -y nodejs + sudo rm -f /etc/apt/sources.list.d/nodesource.list + fi sudo bash -c 'echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list' curl -fsSL https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add - sudo apt-get update From cd89c2bc14a8fb7cb0a91aa0ceddcda5dba4b7c1 Mon Sep 17 00:00:00 2001 From: Nizamudeen A Date: Wed, 4 Oct 2023 11:11:41 +0530 Subject: [PATCH 2/2] deps: upgrade the node version to 16 the reasoning for choosing the node 16 is because it supports angular version 13, 14 and 15. We have angular 13 in the pacific Signed-off-by: Nizamudeen A --- scripts/dashboard/install-e2e-test-deps.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/dashboard/install-e2e-test-deps.sh b/scripts/dashboard/install-e2e-test-deps.sh index ee4a21ab2..30f200a2c 100644 --- a/scripts/dashboard/install-e2e-test-deps.sh +++ b/scripts/dashboard/install-e2e-test-deps.sh @@ -7,7 +7,7 @@ if [[ ! $(arch) =~ (i386|x86_64|amd64) ]]; then fi if grep -q debian /etc/*-release; then - NODEJS_MAJOR_VERSION=14 + NODEJS_MAJOR_VERSION=16 DISTRO="$(lsb_release -cs)" if [[ ! $(command -v node) || $(node --version | grep -oE "v([0-9])+" | cut -c 2-) < ${NODEJS_MAJOR_VERSION} ]]; then sudo apt-get purge nodejs -y