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

deps: move nodejs installation to e2e script #2062

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions scripts/dashboard/install-cephadm-e2e-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
19 changes: 19 additions & 0 deletions scripts/dashboard/install-e2e-test-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,25 @@ if [[ ! $(arch) =~ (i386|x86_64|amd64) ]]; then
fi

if grep -q debian /etc/*-release; then
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
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
Expand Down