Skip to content

Commit

Permalink
Merge pull request #44 from balajismaniam/demo-updates
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue

Updated demo.

Fixes #30. 
- Updated pod templates with new label prefix.
- Minor changes to job scripts and readme.
  • Loading branch information
nfd-merge-bot authored Nov 17, 2016
2 parents 3073484 + 0d31ad8 commit e98eb99
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 20 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ such as restricting discovered features with the --label-whitelist option._
| SSE4.2 | Streaming SIMD Extensions 4.2 (SSE4.2)
| SGX | Software Guard Extensions (SGX)

### System Requirements
## Getting started
### System requirements

1. Linux (x86_64)
1. [kubectl] [kubectl-setup] (properly set up and configured to work with your
Expand Down
15 changes: 8 additions & 7 deletions demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,22 @@ Scripts to reproduce our demo results can be found in [helper-scripts](helper-sc
Follow these easy steps to reproduce the demo.

1. `cd <helper-script-root>`
2. `./run-with-discovery.sh -v <node-feature-discovery-version> -a parsec`
3. `./run-with-discovery.sh -v <node-feature-discovery-version> -a cloverleaf`
4. `/aggregate-logs-and-plot.sh -a parsec`
5. `/aggregate-logs-and-plot.sh -a cloverleaf`
2. `./run-with-discovery.sh -a parsec`
3. `./run-with-discovery.sh -a cloverleaf`
4. `./run-without-discovery.sh -a parsec`
5. `./run-without-discovery.sh -a cloverleaf`
6. `/aggregate-logs-and-plot.sh -a parsec`
7. `/aggregate-logs-and-plot.sh -a cloverleaf`

Following the above steps will produce the performance and normalized performance logs and their corresponding plots for each application.

### Script Documentation
`run-with-discovery.sh` takes the node feature discovery version and the application name as the input and runs ten application instances using node feature discovery.
`run-with-discovery.sh` takes the application name as the input and runs ten application instances using node feature discovery.
```sh
> ./run-with-discovery.sh -h
Usage: run-with-discovery.sh [-v DISCOVERY_VERSION] [-a APPLICATION_NAME]
Usage: run-with-discovery.sh [-a APPLICATION_NAME]
Runs pods ten times with discovery enabled.

-v DISCOVERY_VERSION target discovery version DISCOVERY_VERSION.
-a APPLICATION_NAME run the pods with APPLICATION_NAME application.
APPLICATION_NAME can be one of parsec or cloverleaf.
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
],
"nodeSelector": {
"node.alpha.intel.com/VER-pstate-turbo": "true"
"node.alpha.kubernetes-incubator.io/nfd-pstate-turbo": "true"
},
"restartPolicy": "Never"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ metadata:
{
"matchExpressions": [
{
"key": "node.alpha.intel.com/VER-pstate-turbo",
"key": "node.alpha.kubernetes-incubator.io/nfd-pstate-turbo",
"operator": "DoesNotExist"
}
]
Expand Down
15 changes: 5 additions & 10 deletions demo/helper-scripts/run-with-discovery.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#!/usr/bin/env bash
show_help() {
cat << EOF
Usage: ${0##*/} [-v DISCOVERY_VERSION] [-a APPLICATION_NAME]
Usage: ${0##*/} [-a APPLICATION_NAME]
Runs pods ten times with discovery enabled.
-v DISCOVERY_VERSION target discovery version DISCOVERY_VERSION.
-a APPLICATION_NAME run the pods with APPLICATION_NAME application.
APPLICATION_NAME can be one of parsec or cloverleaf.
EOF
Expand All @@ -16,17 +15,13 @@ then
exit 1
fi

version="0.1.0"
app="parsec"

OPTIND=1
options="hv:a:"
options="ha:"
while getopts $options option
do
case $option in
v)
version=$OPTARG
;;
a)
if [ "$OPTARG" == "parsec" ] || [ "$OPTARG" == "cloverleaf" ]
then
Expand All @@ -48,16 +43,16 @@ do
esac
done

echo "Using discovery verion = $version and application name = $app."
echo "Using application name = $app."
echo "Creating pods with node feature discovery enabled."
for i in {1..10}
do
if [ "$app" == "parsec" ]
then
sed -e "s/NUM/$i-with-discovery/" -e "s/VER/$version/" -e "s/APP/demo-1/" demo-pod-with-discovery.json.parsec.template > demo-pod-with-discovery.json
sed -e "s/NUM/$i-with-discovery/" -e "s/APP/demo-1/" demo-pod-with-discovery.json.parsec.template > demo-pod-with-discovery.json
kubectl create -f demo-pod-with-discovery.json
else
sed -e "s/NUM/$i-with-discovery/" -e "s/VER/$version/" -e "s/APP/demo-2/" demo-pod-with-discovery.yaml.cloverleaf.template > demo-pod-with-discovery.yaml
sed -e "s/NUM/$i-with-discovery/" -e "s/APP/demo-2/" demo-pod-with-discovery.yaml.cloverleaf.template > demo-pod-with-discovery.yaml
kubectl create -f demo-pod-with-discovery.yaml
fi
echo "WithDiscovery" >> labels-with-discovery-$app.log
Expand Down

0 comments on commit e98eb99

Please sign in to comment.