-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #925 from barakda/new_runner_add
adding new runner for atom execution
- Loading branch information
Showing
6 changed files
with
117 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,52 @@ else | |
CEPH_SHA=$2 | ||
fi | ||
ATOM_SHA=$3 | ||
ACTION_URL=$4 | ||
NIGHTLY=$5 | ||
|
||
RUNNER_FILDER='/home/cephnvme/actions-runner-ceph' | ||
|
||
# Check if cluster is busy with another run | ||
while true; do | ||
if [ -f "/home/cephnvme/busyServer.txt" ]; then | ||
echo "The server is busy with another github action job, please wait..." | ||
sleep 90 | ||
else | ||
echo "The server is available for use!" | ||
echo $ACTION_URL > /home/cephnvme/busyServer.txt | ||
chmod +rx /home/cephnvme/busyServer.txt | ||
break | ||
fi | ||
done | ||
|
||
# Remove previous run data | ||
hostname | ||
rm -rf $RUNNER_FILDER/ceph-nvmeof-atom | ||
sudo rm -rf /root/.ssh/atom_backup/artifact/multiIBMCloudServers_m6/* | ||
sudo ls -lta /root/.ssh/atom_backup/artifact/multiIBMCloudServers_m6 | ||
|
||
# Cloning atom repo | ||
cd $RUNNER_FILDER | ||
git clone [email protected]:NVME-Over-Fiber/ceph-nvmeof-atom.git | ||
if [ $? -ne 0 ]; then | ||
echo "Error: Failed to clone the atom repository." | ||
exit 1 | ||
fi | ||
|
||
# Switch to given SHA | ||
cd ceph-nvmeof-atom | ||
git checkout $ATOM_SHA | ||
if [ $? -ne 0 ]; then | ||
echo "Error: Failed to checkout the specified SHA." | ||
exit 1 | ||
fi | ||
|
||
# Build atom images based on the cloned repo | ||
docker build -t nvmeof_atom:$ATOM_SHA . | ||
if [ $? -ne 0 ]; then | ||
echo "Error: Failed to build Docker image." | ||
exit 1 | ||
fi | ||
|
||
# Atom test script run | ||
# Description of the uncleared flags with their default values | ||
|
@@ -24,21 +70,45 @@ ATOM_SHA=$3 | |
# - RBD size (200M) | ||
# - Seed number (0) | ||
# - FIO use (1=run fio, 0=don't run fio) | ||
sudo docker run \ | ||
-v /root/.ssh:/root/.ssh \ | ||
nvmeof_atom:"$ATOM_SHA" \ | ||
python3 cephnvme_atom.py \ | ||
quay.ceph.io/ceph-ci/ceph:"$CEPH_SHA" \ | ||
quay.io/ceph/nvmeof:"$VERSION" \ | ||
quay.io/ceph/nvmeof-cli:"$VERSION" \ | ||
None None None None None None 4 1 1 2 4 1024 2 2 200M 0 1 20 20 1 \ | ||
--stopNvmeofDaemon \ | ||
--stopNvmeofSystemctl \ | ||
--stopMonLeader \ | ||
--rmNvmeofDaemon \ | ||
--gitHubActionDeployment \ | ||
--dontUseMTLS \ | ||
--skiplbTest \ | ||
--journalctlToConsole \ | ||
--dontPowerOffCloudVMs noKey noKey \ | ||
--multiIBMCloudServers_m2 | ||
|
||
set -x | ||
if [ "$5" != "nightly" ]; then | ||
sudo docker run \ | ||
-v /root/.ssh:/root/.ssh \ | ||
nvmeof_atom:"$ATOM_SHA" \ | ||
python3 cephnvme_atom.py \ | ||
quay.ceph.io/ceph-ci/ceph:"$CEPH_SHA" \ | ||
quay.io/ceph/nvmeof:"$VERSION" \ | ||
quay.io/ceph/nvmeof-cli:"$VERSION" \ | ||
None None None None None None 1 1 4 1 1 2 4 1024 2 2 200M 0 1 20 10 1 \ | ||
--stopNvmeofDaemon \ | ||
--stopNvmeofSystemctl \ | ||
--stopMonLeader \ | ||
--rmNvmeofDaemon \ | ||
--gitHubActionDeployment \ | ||
--dontUseMTLS \ | ||
--skiplbTest \ | ||
--journalctlToConsole \ | ||
--dontPowerOffCloudVMs noKey noKey \ | ||
--multiIBMCloudServers_m6 | ||
else | ||
sudo docker run \ | ||
-v /root/.ssh:/root/.ssh \ | ||
nvmeof_atom:"$ATOM_SHA" \ | ||
python3 cephnvme_atom.py \ | ||
quay.ceph.io/ceph-ci/ceph:"$CEPH_SHA" \ | ||
quay.io/ceph/nvmeof:"$VERSION" \ | ||
quay.io/ceph/nvmeof-cli:"$VERSION" \ | ||
None None None None None None 1 1 4 1 1 10 90 1024 6 2 200M 0 1 20 10 1 \ | ||
--stopNvmeofDaemon \ | ||
--stopNvmeofSystemctl \ | ||
--stopMonLeader \ | ||
--rmNvmeofDaemon \ | ||
--gitHubActionDeployment \ | ||
--dontUseMTLS \ | ||
--skiplbTest \ | ||
--journalctlToConsole \ | ||
--dontPowerOffCloudVMs noKey noKey \ | ||
--multiIBMCloudServers_m6 | ||
fi | ||
set +x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,16 @@ | ||
#!/bin/bash | ||
|
||
sudo rm -rf /tmp/artifact/multiIBMCloudServers_m2 | ||
sudo cp -r /root/.ssh/atom_backup/artifact/multiIBMCloudServers_m2 /tmp/artifact | ||
sudo ls -lta /tmp/artifact | ||
sudo chmod -R +rx /tmp/artifact | ||
rm -rf /home/cephnvme/busyServer.txt | ||
sudo rm -rf /home/cephnvme/artifact/* | ||
sudo ls -lta /home/cephnvme/artifact | ||
|
||
sudo rm -rf /home/cephnvme/artifact.tar.gz | ||
sudo ls -lta /home/cephnvme/ | ||
|
||
sudo cp -r /root/.ssh/atom_backup/artifact/multiIBMCloudServers_m6 /home/cephnvme/artifact | ||
sudo ls -lta /home/cephnvme/artifact | ||
|
||
sudo tar -czf /home/cephnvme/artifact.tar.gz -C /home/cephnvme/artifact . | ||
sudo ls -lta /home/cephnvme/artifact | ||
sudo ls -lta /home/cephnvme | ||
sudo chmod +rx /home/cephnvme/artifact.tar.gz | ||
sudo rm -rf /home/cephnvme/busyServer.txt |