OLD | NEW |
---|---|
1 DESIGN | 1 DESIGN |
2 ====== | 2 ====== |
3 | 3 |
4 | 4 |
5 Overview | 5 Overview |
6 -------- | 6 -------- |
7 Provides interactive dashboard for Skia performance data. | 7 Provides interactive dashboard for Skia performance data. |
8 | 8 |
9 Code Locations | 9 Code Locations |
10 -------------- | 10 -------------- |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
190 $ mysql -h 173.194.104.24 -u root -p | 190 $ mysql -h 173.194.104.24 -u root -p |
191 | 191 |
192 | 192 |
193 mysql> use skia | 193 mysql> use skia |
194 | 194 |
195 mysql> show tables; | 195 mysql> show tables; |
196 | 196 |
197 Initial setup of the database, the users, and the tables: | 197 Initial setup of the database, the users, and the tables: |
198 | 198 |
199 * Create the database and set up permissions. Execute the following after | 199 * Create the database and set up permissions. Execute the following after |
200 you connect to a MySQL database (not necessary for SQLite). | 200 you connect to a MySQL database. |
201 | 201 |
202 CREATE DATABASE skia; | 202 CREATE DATABASE skia; |
203 USE skia; | 203 USE skia; |
204 CREATE USER 'readonly'@'%' IDENTIFIED BY <password in valentine>; | 204 CREATE USER 'readonly'@'%' IDENTIFIED BY <password in valentine>; |
205 GRANT SELECT ON *.* TO 'readonly'@'%'; | 205 GRANT SELECT ON *.* TO 'readonly'@'%'; |
206 CREATE USER 'readwrite'@'%' IDENTIFIED BY <password in valentine>; | 206 CREATE USER 'readwrite'@'%' IDENTIFIED BY <password in valentine>; |
207 GRANT SELECT, DELETE, UPDATE, INSERT ON *.* TO 'readwrite'@'%'; | 207 GRANT SELECT, DELETE, UPDATE, INSERT ON *.* TO 'readwrite'@'%'; |
208 | 208 |
209 * Create the versioned database tables. | 209 * Create the versioned database tables. |
210 | 210 |
211 We use the 'migratedb' tool to keep the database in a well defined (versioned) | 211 We use the 'migratedb' tool to keep the database in a well defined (versioned) |
212 state. The 'db_conn_string' flag allows to specify the target database. | 212 state. The db_host, db_port, db_user, and db_name flags allow you to specify |
213 By default it will try to connect to the production environment. | 213 the target database. By default it will try to connect to the production |
214 But for testing a local MySQL database can be provided. If it cannot | 214 environment. But for testing a local MySQL database can be provided. |
215 connect to MySQL it will fall back to SQLite. | |
216 | 215 |
217 Bring the production database to the latest schema version: | 216 Bring the production database to the latest schema version: |
218 | 217 |
219 $ migratedb -logtostderr=true | 218 $ migratedb -logtostderr=true |
220 | 219 |
221 Bring a local database to the latest schema version: | 220 Bring a local database to the latest schema version: |
222 | 221 |
223 $ migratedb -logtostderr=true -db_conn_string="root:%s@tcp(localhost:3306)/ skia?parseTime=true" | 222 $ migratedb -logtostderr=true -db_host=localhost |
jcgregorio
2014/12/19 20:27:06
$ perf_migratedb -logtostderr=true -db_host=localh
borenet
2014/12/19 20:39:15
Done.
| |
224 | |
225 Bring a local SQLite database to the latest schema version: | |
226 | |
227 $ migratedb -logtostderr=true -db_conn_string="" | |
228 | 223 |
229 | 224 |
230 Nginx | 225 Nginx |
231 ----- | 226 ----- |
232 | 227 |
233 Nginx acts as a proxy to the backend app, which is configured to run on port | 228 Nginx acts as a proxy to the backend app, which is configured to run on port |
234 8000, and serves the app on port 443 (HTTPS). Port 80 just redirects to 443. | 229 8000, and serves the app on port 443 (HTTPS). Port 80 just redirects to 443. |
235 The config for the nginx server is held in setup/sys/perf_nginx, which is copied | 230 The config for the nginx server is held in setup/sys/perf_nginx, which is copied |
236 into place during installation. Nginx is monitored and kept running by monit. | 231 into place during installation. Nginx is monitored and kept running by monit. |
237 | 232 |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
462 | 457 |
463 But sysv init only handles starting and stopping a program once, so we use | 458 But sysv init only handles starting and stopping a program once, so we use |
464 Monit to monitor the application and restart it if it crashes. The config | 459 Monit to monitor the application and restart it if it crashes. The config |
465 is in: | 460 is in: |
466 | 461 |
467 /etc/monit/conf.d/perf | 462 /etc/monit/conf.d/perf |
468 | 463 |
469 Installation | 464 Installation |
470 ------------ | 465 ------------ |
471 See the README file. | 466 See the README file. |
OLD | NEW |