OSSperf with S3Ninja server and aws cli client #1
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
name: OSSperf with S3Ninja server and aws cli client | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
schedule: | |
- cron: '15 18 * * *' | |
workflow_dispatch: | |
jobs: | |
run-workflow: | |
runs-on: self-hosted | |
env: | |
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE | |
AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY | |
S3_ENDPOINT: "http://localhost:9444/s3" # S3Ninja's default endpoint | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Remove Existing S3ninja Container | |
run: | | |
if [ $(docker ps -aq -f name=s3ninja) ]; then | |
docker stop s3ninja | |
docker rm s3ninja | |
fi | |
sleep 5 | |
- name: Start S3 Ninja Server | |
run: | | |
docker run -d --name s3ninja \ | |
-p 9444:9000 \ | |
scireum/s3-ninja:6.1 | |
docker logs s3ninja | |
- name: Wait for S3 Ninja Server to Start | |
run: | | |
for i in {1..10}; do | |
if curl -s $S3_ENDPOINT; then | |
echo "S3Ninja is ready!"; | |
break; | |
fi | |
echo "Waiting for S3Ninja to start..."; | |
sleep 5; | |
done | |
- name: Run ossperf.sh | |
run: | | |
cd $GITHUB_WORKSPACE | |
chmod +x ossperf.sh | |
./ossperf.sh -n 5 -s 1048576 -b ossperf-testbucket -p -w -d http://localhost:9444 |