Changeset 196190 in webkit
- Timestamp:
- Feb 5, 2016 2:28:20 PM (8 years ago)
- Location:
- trunk/Websites/perf.webkit.org
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Websites/perf.webkit.org/ChangeLog
r194935 r196190 1 2016-02-04 Ryosuke Niwa <rniwa@webkit.org> 2 3 Perf dashboard should have a script to setup database 4 https://bugs.webkit.org/show_bug.cgi?id=153906 5 6 Reviewed by Chris Dumez. 7 8 Added tools/setup-database.py to setup the database. It retrieves the database name, username, password 9 and initializes a database at the specified location. 10 11 * Install.md: Updated instruction to setup postgres to use setup-database.py. 12 * tools/setup-database.py: Added. 13 (main): 14 (load_database_config): 15 (determine_psql_dir): 16 (start_or_stop_database): 17 (execute_psql_command): 18 1 19 2016-01-12 Ryosuke Niwa <rniwa@webkit.org> 2 20 -
trunk/Websites/perf.webkit.org/Install.md
r190645 r196190 40 40 # Configuring Apache 41 41 42 You can use apachectl to start/stop/restart apache server from the command line:43 44 - Starting httpd: `sudo apachectl start`45 - Stopping httpd: `sudo apachectl stop`46 - Restarting httpd: `sudo apachectl restart`47 48 The apache logs are located at `/private/var/log/apache2`.49 50 42 ## Instructions if you're using Server.app 51 43 … … 68 60 - In El Capitan and later, comment out the `LockFile` directive in `/private/etc/apache2/extra/httpd-mpm.conf` 69 61 since the directive has been superseded by `Mutex` directive. 62 63 ## Starting Apache 64 65 You can use apachectl to start/stop/restart apache server from the command line: 66 67 - Starting httpd: `sudo apachectl start` 68 - Stopping httpd: `sudo apachectl stop` 69 - Restarting httpd: `sudo apachectl restart` 70 71 The apache logs are located at `/private/var/log/apache2`. 70 72 71 73 ## Production Configurations … … 103 105 # Configuring PostgreSQL 104 106 105 1. Create database: `/Applications/Server.app/Contents/ServerRoot/usr/bin/initdb /Volumes/Data/perf.webkit.org/PostgresSQL` 106 2. Start database: `/Applications/Server.app/Contents/ServerRoot/usr/bin/pg_ctl -D /Volumes/Data/perf.webkit.org/PostgresSQL -l logfile -o "-k /Volumes/Data/perf.webkit.org/PostgresSQL" start`107 Run the following command to setup a Postgres server at `/Volumes/Data/perf.webkit.org/PostgresSQL` (or wherever you'd prefer): 108 `python ./setup-database.py /Volumes/Data/perf.webkit.org/PostgresSQL` 107 109 108 ## Creating a Database and a User 110 It automatically retrieves the database name, the username, and the password from `config.json`. 109 111 110 The binaries located in PostgreSQL's directory, or if you're using Server.app in /Applications/Server.app/Contents/ServerRoot/usr/bin/ 112 ## Starting PostgreSQL 111 113 112 1. Create a database: `/Applications/Server.app/Contents/ServerRoot/usr/bin/createdb webkit-perf-db -h localhost` 113 2. Create a user: `/Applications/Server.app/Contents/ServerRoot/usr/bin/createuser -P -S -e webkit-perf-db-user -h localhost` 114 3. Connect to database: `/Applications/Server.app/Contents/ServerRoot/usr/bin/psql webkit-perf-db -h localhost` 115 4. Grant all permissions to the new user: `grant all privileges on database "webkit-perf-db" to "webkit-perf-db-user";` 116 5. Update database/config.json. 114 The setup script automatically starts the database but you may need to run the following command to manually start the database after reboot. 115 116 - Starting the database: `/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` 117 - Stopping the database: `/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` 117 118 118 119 ## Initializing the Database … … 123 124 ## Making a Backup and Restoring 124 125 125 Run `/Applications/Server.app/Contents/ServerRoot/usr/bin/pg_dump -h localhost --no-owner -f <filepath> webkit-perf-db | gzip > backup.gz` 126 127 To restore, setup a new database and run 128 `gunzip backup.gz | /Applications/Server.app/Contents/ServerRoot/usr/bin/psql webkit-perf-db -h localhost --username webkit-perf-db-user` 126 - Backing up the database: `/Applications/Server.app/Contents/ServerRoot/usr/bin/pg_dump -h localhost --no-owner -f <filepath> webkit-perf-db | gzip > backup.gz` 127 - Restoring the database: `gunzip -c backup.gz | /Applications/Server.app/Contents/ServerRoot/usr/bin/psql webkit-perf-db -h localhost --username webkit-perf-db-user`
Note: See TracChangeset
for help on using the changeset viewer.