Skip to content

Commit 7d797bf

Browse files
authored
Merge pull request #83 from plessbd/gw2020-additions
Add historical data for gateways2020
2 parents a549ed5 + 260eb50 commit 7d797bf

7 files changed

Lines changed: 96 additions & 1 deletion

File tree

database/create-xdmod-db.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ EOF
1111

1212
echo "Creating xdmod databases.."
1313

14-
for db in mod_hpcdb mod_logger mod_shredder moddb modw modw_aggregates modw_filters modw_supremm modw_etl modw_jobefficiency
14+
for db in mod_hpcdb mod_logger mod_shredder moddb modw modw_aggregates modw_filters modw_supremm modw_etl modw_jobefficiency modw_cloud
1515
do
1616
echo "Creating $db database.."
1717
echo "create database if not exists $db" | mysql -uroot

xdmod/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ RUN /build/install.sh && rm -rf /build
66
COPY conf/httpd.conf /etc/httpd/conf.d/xdmod.conf
77
COPY conf/simplesamlphp /etc/xdmod/simplesamlphp
88
COPY hierarchy.csv /srv/xdmod/hierarchy.csv
9+
COPY historical/ /srv/xdmod/historical
910
COPY scripts/ /srv/xdmod/scripts
1011
COPY bin/sendmail /usr/sbin/sendmail
1112
COPY entrypoint.sh /usr/local/bin/entrypoint.sh

xdmod/historical/add-historical.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
3+
if [ `whoami` != 'root' ]; then
4+
echo "ERROR: This script should only be run as root" >&2
5+
exit 1
6+
fi
7+
historicaldir='/srv/xdmod/historical'
8+
if [ -f $historicaldir/.hasrun ]; then
9+
echo "ERROR: This has already been run once. Trying to do it again will cause errors" >&2
10+
exit 2
11+
fi
12+
touch $historicaldir/.hasrun
13+
tar -zxf $historicaldir/historical-data.tgz -C $historicaldir/
14+
jq --argfile f1 /etc/xdmod/resources.json --argfile f2 $historicaldir/resources.json -n '$f1 + $f2' | tee /etc/xdmod/resources.json
15+
jq --argfile f1 /etc/xdmod/resource_specs.json --argfile f2 $historicaldir/resource_specs.json -n '$f1 + $f2' | tee /etc/xdmod/resource_specs.json
16+
types='Cloud Jobs Storage'
17+
for resource in $historicaldir/Jobs/*.log; do
18+
sudo -u xdmod xdmod-shredder -r `basename $resource .log` -f slurm -i $resource;
19+
done
20+
last_modified_start_date=$(date +'%F %T')
21+
sudo -u xdmod xdmod-shredder -r cumulonimbus -d $historicaldir/Cloud/ -f openstack
22+
sudo -u xdmod xdmod-ingestor --last-modified-start-date "$last_modified_start_date"
23+
for storage_dir in $historicaldir/Storage/*; do
24+
sudo -u xdmod xdmod-shredder -f storage -r $(basename $storage_dir) -d $storage_dir
25+
done
26+
last_modified_start_date=$(date +'%F %T')
27+
sudo -u xdmod xdmod-ingestor --datatype storage
28+
cat $historicaldir/names.slurm.csv $historicaldir/names.csv > /tmp/historical.names.csv
29+
sudo -u xdmod xdmod-import-csv -t names -i /tmp/historical.names.csv
30+
sudo -u xdmod xdmod-ingestor
82.4 MB
Binary file not shown.

xdmod/historical/names.slurm.csv

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
cgray,Carl,Gray
2+
sfoster,Stephanie,Foster
3+
csimmons,Charles,Simmons
4+
astewart,Andrea,Stewart
5+
hpcadmin,,HPC Administrators
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
[
2+
{
3+
"resource": "compsci",
4+
"processors": 9000,
5+
"nodes": 900,
6+
"ppn": 10
7+
},
8+
{
9+
"resource": "maths",
10+
"processors": 5500,
11+
"nodes": 550,
12+
"ppn": 10
13+
},
14+
{
15+
"resource": "humanities",
16+
"processors": 2500,
17+
"nodes": 250,
18+
"ppn": 10
19+
},
20+
{
21+
"resource": "parallelfs",
22+
"processors": 1,
23+
"nodes": 1,
24+
"ppn": 1
25+
},
26+
{
27+
"resource": "cumulonimbus",
28+
"processors": 10000,
29+
"nodes": 1000,
30+
"ppn": 10
31+
}
32+
]

xdmod/historical/resources.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
[
2+
{
3+
"resource": "compsci",
4+
"resource_type": "HPC",
5+
"name": "Computer Science"
6+
},
7+
{
8+
"resource": "maths",
9+
"resource_type": "HPC",
10+
"name": "Mathematics"
11+
},
12+
{
13+
"resource": "humanities",
14+
"resource_type": "HPC",
15+
"name": "Humanities"
16+
},
17+
{
18+
"resource": "parallelfs",
19+
"resource_type": "Disk",
20+
"name": "GPFS Parallel FS"
21+
},
22+
{
23+
"resource": "cumulonimbus",
24+
"resource_type": "Cloud",
25+
"name": "Cumulonimbus Cloud"
26+
}
27+
]

0 commit comments

Comments
 (0)