Skip to content

Commit

Permalink
borrow fixes from merge-branches
Browse files Browse the repository at this point in the history
  • Loading branch information
gargnitingoogle committed Aug 22, 2024
1 parent 7165674 commit b62b517
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions perfmetrics/scripts/testing_on_gke/examples/run-gke-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -192,22 +192,24 @@ function installDependencies() {
# Ensure that realpath is installed.
which realpath
# Ensure that make is installed.
which make || (sudo apt-get update && sudo apt-get install -y make time)
which make || sudo apt-get install -y make time
# Ensure that go is installed.
which go || (version=1.22.4 && wget -O go_tar.tar.gz https://go.dev/dl/go${version}.linux-amd64.tar.gz 1>/dev/null && sudo rm -rf /usr/local/go && tar -xzf go_tar.tar.gz 1>/dev/null && sudo mv go /usr/local && echo $PATH && export PATH=$PATH:/usr/local/go/bin && echo $PATH && echo 'export PATH=$PATH:/usr/local/go/bin'>>~/.bashrc && go version)
# for some reason, the above is unable to update the value of $PATH, so doing it explicitly below.
export PATH=$PATH:/usr/local/go/bin
which go
# Ensure that python3 is installed.
which python3 || sudo apt-get install -y python3
# Install more python tools.
sudo apt-get -y install python3-dev python3-venv python3-pip
# Enable python virtual environment.
python3 -m venv .venv
source .venv/bin/activate
# Ensure that python-absl is installed.
sudo apt-get update && sudo apt-get install -y pip
# Ensure that pip is installed.
sudo apt-get install -y pip
# python3 -m pip install --upgrade pip
# python3 -m pip --version
# Ensure that python-absl is installed.
pip install absl-py
# Ensure that helm is installed
which helm || (cd "${src_dir}" && (test -d "./helm" || git clone https://github.com/helm/helm.git) && cd helm && make && ls -lh bin/ && mkdir -pv ~/bin && cp -fv bin/helm ~/bin/ && chmod +x ~/bin/helm && export PATH=$PATH:$HOME/bin && echo $PATH && which helm && cd - && cd -)
Expand All @@ -227,10 +229,9 @@ function installDependencies() {
(gcloud components install kubectl && kubectl version --client) || (sudo apt-get update && sudo apt-get install -y kubectl && kubectl version --client)
fi
# Ensure that gke-gcloud-auth-plugin is installed.
gke-gcloud-auth-plugin --version || (gcloud components install gke-gcloud-auth-plugin && gke-gcloud-auth-plugin --version) || (sudo apt-get update -y && sudo apt-get install -y google-cloud-cli-gke-gcloud-auth-plugin && gke-gcloud-auth-plugin --version)
gke-gcloud-auth-plugin --version || (gcloud components install gke-gcloud-auth-plugin && gke-gcloud-auth-plugin --version) || (sudo apt-get install -y google-cloud-cli-gke-gcloud-auth-plugin && gke-gcloud-auth-plugin --version)
# Ensure that docker is installed.
if ! which docker ; then
sudo apt-get update
sudo apt install apt-transport-https ca-certificates curl software-properties-common -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
Expand Down

0 comments on commit b62b517

Please sign in to comment.