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

Added Unix benchmark #32

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Added Unix benchmark #32

wants to merge 3 commits into from

Conversation

Chris-green-stfc
Copy link
Contributor

Added unix-bench for more CPU/system benchmarking

Added unix-bench for more CPU/system benchmarking
bench1="${bench}_single_core"
bench2="${bench}_multi_core"
# Send data to DB
curl -H "Authorization: Basic `echo -n "{{ db_username }}:{{ db_password }}" | base64`" -d 'unix_bench,image='"$image"',flavor='"$flavor"' '"$bench1"'='"$r1"'' -X POST $DB --insecure

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a comment about --insecure flag?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the host has an invalid cert we can get a proper DNS record and TLS certificate?
That way we don't have to use the --insecure flag going forward

# Get VM infor
server_UUID=$(curl http://169.254.169.254/openstack/latest/meta_data.json -s | grep -ioP .{8}-.{4}-.{4}-.{4}-.{12})
vm_info=$(openstack server show $server_UUID --os-cloud openstack)
#hypervisor=$(echo $vm_info | grep -ioP "\w*.nubes.rl.ac.uk" | head -1)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this line commented out?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is there in case we ever want HV information, but it requires admin creds to do so

uses --insecure due to self signed cert
bench1="${bench}_single_core"
bench2="${bench}_multi_core"
# Send data to DB
curl -H "Authorization: Basic `echo -n "{{ db_username }}:{{ db_password }}" | base64`" -d 'unix_bench,image='"$image"',flavor='"$flavor"' '"$bench1"'='"$r1"'' -X POST $DB --insecure
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the host has an invalid cert we can get a proper DNS record and TLS certificate?
That way we don't have to use the --insecure flag going forward

@@ -0,0 +1,72 @@
#! /bin/bash

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set -euo pipefail so it will fail if something goes wrong

Additionally can we setup shell-check like so: https://github.com/stfc/SCD-OpenStack-Utils/blob/master/.github/workflows/gpu_benchmark.yaml#L11

Since this more scripts we add without linting the harder it will be in the future


# Get VM infor
server_UUID=$(curl http://169.254.169.254/openstack/latest/meta_data.json -s | grep -ioP .{8}-.{4}-.{4}-.{4}-.{12})
vm_info=$(openstack server show $server_UUID --os-cloud openstack)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we get this from the same meta_data.json or cloud-init which should contain all the relevant details rather than having to copy app creds to each VM

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will address this in future PR

added pipefail and comment explaining --insecure to unix bench script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants