This repository was archived by the owner on Nov 28, 2020. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathdbmachine_setup.txt
116 lines (74 loc) · 3.02 KB
/
dbmachine_setup.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
1) machine dependencies setup
apt-get install libfontconfig
apt-get install mysql-server
mysql_secure_install
2) create user benchmark and ensure user's home directory is /home/benchmark
3) Database setup with mysql client
create database benchdb
CREATE USER 'xxxxxx'@'localhost' IDENTIFIED BY 'xxxxxxxxxx';
GRANT ALL PRIVILEGES ON *.* To 'bench1'@'localhost';
use benchdb
create TABLE benchresults (streamid INT NOT NULL, benchid INT NOT NULL, time INT(11) NOT NULL, value INT NOT NULL);
3) Install the lastest 4.X node version into
/home/benchmark/node-xxxx
where xxxx is related to the version. For example: node-v4.2.2-linux-x64
add symlink
ln -s /home/benchmark/node-xxxx /home/benchmark/node
4) in /home/benchmark do
git clone https://github.com/nodejs/benchmarking.git
chmod +x /home/benchmark/benchmarking/benchmarkdata/dobackup.sh
chmod +x /home/benchmark/chartcron.sh
chmod +x /home/benchmark/benchmarking/tools/acceptResults/start_bridge.sh
5) Backup setup
in /home/benchmark
create file called creds which contains
--user=xxxx --password=yyyy
where xxxx is user id created in 3) and yyyy is the password set for that user in 3
make sure it is only accesible to the user
chmod 600 /home/benchmark/creds
add the following crontab entry for the user
8 5 * * * /home/benchmark/benchmarking/benchmarkdata/dobackup.sh
6) Charts setup
Create the file /home/benchmark/benchmarking/tools/chartGen/dbconfig.json which includes
{
"host": "localhost",
"user": "xxxxxx",
"password": "yyyyy",
"database": "benchdb"
}
Where xxxxx and yyyyy are the userid and password set in step 3)
chmod 600 /home/benchmark/benchmarking/tools/chartGen/dbconfig.json
Add the following crontab entry
0 5 * * * /home/benchmark/benchmarking/tools/chartGen/chartcron.sh
Install the npm dependencies
cd /home/benchmark/benchmarking/tools/chartGen
npm install
Install chart.js and related files as documented in:
/home/benchmark/benchmarking/tools/chartGen/README.md
7) bridge setup
edit
/home/benchmark/benchmarking/tools/acceptResults/start_bridge.sh
to see the softlayer internal ip of the benchmark data machine
copy /home/benchmark/benchmarking/tools/chartGen/dbconfig.json from step 6)
to /home/benchmark/benchmarking/tools/acceptResults/dbconfig.json
chmod 600 /home/benchmark/benchmarking/tools/acceptResults/dbconfig.json
create the required keys/certs for the server
cd /home/benchmark/benchmarking/tools/acceptResults/
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout key.pem -out cert.pem
create /home/benchmark/benchmarking/tools/acceptResults/authconfig.json which
has the name/password as configured in the benchmark jobs
{
"name": "xxxxx",
"pass": "yyyyy",
"realm": "benchmark"
}
install the npm depenedencies
cd /home/benchmark/benchmarking/tools/acceptResults
npm install
8) add the file /home/benchmark/updaterepo.sh which contains:
#!/bin/bash
cd /home/benchmark/benchmarking
git pull
and add the execute permission (chmod +e. Then add the following
crontab entry
0 4 * * * /home/benchmark/updaterepo.sh