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

Collate fio installations at one place #1506

Merged
merged 3 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
45 changes: 45 additions & 0 deletions perfmetrics/scripts/fio/install_fio.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash
# Copyright 2023 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:#www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Args:
# $1: <path-to-clone-fio-source-code> e.g. ~/github/

set -e

if [[ $# -eq 0 ]] ; then
echo 'No argument passed.'
echo 'Args: <path-to-clone-fio-source-code>'
exit 1
fi

SRC_DIR="$1"
FIO_SRC_DIR="${SRC_DIR}/fio"

echo "Installing fio ..."
# install libaio as fio has a dependency on libaio
sudo apt-get install -y libaio-dev

# We are building fio from source because of the issue: https://github.com/axboe/fio/issues/1668.
sudo rm -rf "$FIO_SRC_DIR" && \
git clone https://github.com/axboe/fio.git "$FIO_SRC_DIR" && \
cd "$FIO_SRC_DIR" && \
gargnitingoogle marked this conversation as resolved.
Show resolved Hide resolved
git checkout fio-3.36 && \
ashmeenkaur marked this conversation as resolved.
Show resolved Hide resolved
./configure && make && sudo make install

# Now, print the installed fio version for verification
echo 'fio version='$(fio -version)

# go back to the original directory
cd -
13 changes: 1 addition & 12 deletions perfmetrics/scripts/presubmit_test/pr_perf_test/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,7 @@ function install_requirements() {
pip install google-cloud-vision
pip install google-api-python-client
pip install prettytable
# install libaio as fio has a dependency on libaio
sudo apt-get install libaio-dev
# We are building fio from source because of issue: https://github.com/axboe/fio/issues/1640.
# The fix is not currently released in a package as of 20th Oct, 2023.
# TODO: install fio via package when release > 3.35 is available.
echo Installing fio
sudo rm -rf "${KOKORO_ARTIFACTS_DIR}/github/fio"
git clone https://github.com/axboe/fio.git "${KOKORO_ARTIFACTS_DIR}/github/fio"
cd "${KOKORO_ARTIFACTS_DIR}/github/fio" && \
git checkout c5d8ce3fc736210ded83b126c71e3225c7ffd7c9 && \
./configure && make && sudo make install
fio --version
"${KOKORO_ARTIFACTS_DIR}/github/gcsfuse/perfmetrics/scripts/fio/install_fio.sh" "${KOKORO_ARTIFACTS_DIR}/github"
cd "${KOKORO_ARTIFACTS_DIR}/github/gcsfuse"
}

Expand Down
12 changes: 1 addition & 11 deletions perfmetrics/scripts/run_load_test_and_fetch_metrics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,7 @@ set -e

echo "Installing pip"
sudo apt-get install pip -y
echo "Installing fio"
# install libaio as fio has a dependency on libaio
sudo apt-get install libaio-dev
# We are building fio from source because of issue: https://github.com/axboe/fio/issues/1640.
# The fix is not currently released in a package as of 20th Oct, 2023.
# TODO: install fio via package when release > 3.35 is available.
sudo rm -rf "${KOKORO_ARTIFACTS_DIR}/github/fio"
git clone https://github.com/axboe/fio.git "${KOKORO_ARTIFACTS_DIR}/github/fio"
cd "${KOKORO_ARTIFACTS_DIR}/github/fio" && \
git checkout c5d8ce3fc736210ded83b126c71e3225c7ffd7c9 && \
./configure && make && sudo make install
"${KOKORO_ARTIFACTS_DIR}/github/gcsfuse/perfmetrics/scripts/fio/install_fio.sh" "${KOKORO_ARTIFACTS_DIR}/github"

cd "${KOKORO_ARTIFACTS_DIR}/github/gcsfuse/perfmetrics/scripts"

Expand Down