The instructions assume you're using Mac OS X as the host server and installing this application at /Volumes/Data/perf.webkit.org
.
You can choose between using Server.app or install the required tools separately
svn co https://svn.webkit.org/repository/webkit/trunk/Websites/perf.webkit.org /Volumes/Data/perf.webkit.org
/Volumes/Data/perf.webkit.org
, run npm install pg
and mkdir -m 755 public/data/
The front end has the capability to pull data from a production server without replicating the database locally on OS X (Yosemite and later). To use this feature, modify config.json
's remoteServer
entry so that “remoteServer.url” points to your production server, and “remoteServer.basicAuth” specifies the username and the password that is used by the production sever.
Remove “basicAuth” entry for production servers that doesn't require a basic authentication (e.g. perf.webkit.org).
{ "url": "http://perf.webkit.org", "basicAuth": { "username": "webkitten", "password": "webkitten's secret password" } }
Then run tools/remote-cache-server.py start
. This launches a httpd server on port 8080.
The script caches remote server's responses under public/data/remote-cache
and never revalidates them (to allow offline work). If you needed the latest content, delete caches stored in this directory by running tools/remote-cache-server.py reset
.
/Volumes/Data/perf.webkit.org/public/
/Library/Server/Web/Config/apache2/sites/0000_any_80.conf
(and/or 0000_any_PORT#
.conf)Edit /private/etc/apache2/httpd.conf
/Volumes/Data/perf.webkit.org/public/
LoadModule php5_module libexec/apache2/libphp5.so
LoadModule rewrite_module libexec/apache2/mod_rewrite.so
LoadModule deflate_module libexec/apache2/mod_deflate.so
In Mavericks and later, copy php.ini to load pdo_pgsql.so pgsql.so. sudo cp /Applications/Server.app/Contents/ServerRoot/etc/php.ini /etc/
In El Capitan and later, comment out the LockFile
directive in /private/etc/apache2/extra/httpd-mpm.conf
since the directive has been superseded by Mutex
directive.
You can use apachectl to start/stop/restart apache server from the command line:
sudo apachectl start
sudo apachectl stop
sudo apachectl restart
The apache logs are located at /private/var/log/apache2
.
Update ServerAdmin to your email address
Add the following directives to enable gzip:
<IfModule mod_deflate.c> AddOutputFilterByType DEFLATE text/html text/xml text/plain application/json application/xml application/xhtml+xml </IfModule>
Add the following directives to enable zlib compression and MultiViews on DocumentRoot (perf.webkit.org/public):
Options Indexes MultiViews php_flag zlib.output_compression on
By default, the application gives the administrative privilege to everyone. Anyone can add, remove, or edit tests, builders, and other entities in the database.
We recommend protection via Digest Auth on https connection.
Generate a password file via htdigest -c <path> <realm> <username>
, and then create admin/.htaccess with the following directives where <Realm>
is replaced with the realm of your choice, which will be displayed on the username/password input box:
AuthType Digest AuthName "<Realm>" AuthDigestProvider file AuthUserFile "<Realm>" Require valid-user
Run the following command to setup a Postgres server at /Volumes/Data/perf.webkit.org/PostgresSQL
(or wherever you'd prefer): python ./tools/setup-database.py /Volumes/Data/perf.webkit.org/PostgresSQL
It automatically retrieves the database name, the username, and the password from config.json
.
The setup script automatically starts the database but you may need to run the following command to manually start the database after reboot.
/Applications/Server.app/Contents/ServerRoot/usr/bin/pg_ctl -D /Volumes/Data/perf.webkit.org/PostgresSQL -l /Volumes/Data/perf.webkit.org/PostgresSQL/logfile -o "-k /Volumes/Data/perf.webkit.org/PostgresSQL" start
/Applications/Server.app/Contents/ServerRoot/usr/bin/pg_ctl -D /Volumes/Data/perf.webkit.org/PostgresSQL -l /Volumes/Data/perf.webkit.org/PostgresSQL/logfile -o "-k /Volumes/Data/perf.webkit.org/PostgresSQL" stop
Run database/init-database.sql
in psql as webkit-perf-db-user
: /Applications/Server.app/Contents/ServerRoot/usr/bin/psql webkit-perf-db -h localhost --username webkit-perf-db-user -f init-database.sql
/Applications/Server.app/Contents/ServerRoot/usr/bin/pg_dump -h localhost --no-owner -f <filepath> webkit-perf-db | gzip > backup.gz
gunzip -c backup.gz | /Applications/Server.app/Contents/ServerRoot/usr/bin/psql webkit-perf-db -h localhost --username webkit-perf-db-user