-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test the different images in high concurrent. Signed-off-by: Yadong Ding <ding_yadong@foxmail.com>
- Loading branch information
1 parent
008e41c
commit 25d2301
Showing
2 changed files
with
83 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# Start acceld service | ||
sudo nohup ./acceld --config ./script/integration/concurrent/config.yaml &> acceld.log & | ||
sleep 1 | ||
|
||
images=("wordpress" "nginx" "mysql") | ||
|
||
# Convert image by accelctl | ||
for image in ${images[@]}; do | ||
./accelctl task create localhost/library/$image:latest | ||
done | ||
|
||
while true; do | ||
# Check tasks list | ||
./accelctl task list | ||
|
||
# Get tasks status | ||
status=$(./accelctl task list| tail -n +2 | awk '{print $4}') | ||
|
||
# Check any FAILED | ||
if echo "$status" | grep -q "FAILED"; then | ||
cat acceld.log | ||
echo "Found a task failed" | ||
exit 1 | ||
fi | ||
|
||
# Check if all tasks completed | ||
if echo "$status" | grep -q "PROCESSING"; then | ||
cat acceld.log | ||
else | ||
break | ||
fi | ||
done | ||
|
||
# check acceld log | ||
cat acceld.log | ||
|
||
# Gracefully exit acceld | ||
sudo pkill -SIGINT acceld |