PerfKit is a service & web front end for composing queries and dashboards, and sharing the results.
Note the installation instructions below are based on using a Google Cloud Platform Compute instance, using the Debian Backports image. Instructions for platform installation may vary depending on your operating system and patch levels.
-
Install the Python 2.7 SDK:
sudo apt-get install python2.7
-
Install the Java 7 SDK:
sudo apt-get install openjdk-7-jdk
-
Install Git:
sudo apt-get install git
-
Install the Google Cloud SDK:
curl https://sdk.cloud.google.com | bash
- note: Choose "Python & PHP" from the languages options.
- note: Restart your shell after installing gcloud to initialize the relevant paths.
-
Authorize your workstation to connect to Google Cloud resources:
gcloud auth login
-
Install the Google App Engine SDK for Python.
- note: You will need to add the App Engine SDK to your PATH so that you can find appcfg.py.
-
Create a root folder for your source code (i.e.:
~/projects
) and navigate to it. -
Create a GitHub account at http://www.github.com.
-
Clone this repository:
git clone https://github.com/GoogleCloudPlatform/PerfKitExplorer.git
If you have connected and authenticated correctly, the source code for PerfKit Explorer will download. Your projects folder will contain:
(projects) PerfKitExplorer bin client ... compile.sh app.yaml
-
Change to the PerfKitExplorer folder and download the Closure Tools, which are included as a submodule in the project:
git submodule update --init
- Create a Google Cloud project at https://console.developers.google.com/project.
- Under the API's tab, enable the BigQuery service.
-
Create a Google Cloud project, or user the same one you used for the App Engine project.
-
Enable billing for your Cloud Project (available from links on the left-hand side) https://console.developers.google.com/project/apps~MYPROJECT/settings
-
Create a dataset (ex: samples_mart):
bq mk --project=MYPROJECT samples_mart
-
Change folders to the sample data folder:
pushd ~/projects/PerfKitExplorer/data/samples_mart
-
Upload the sample data to a new table in your dataset (ex: results):
bq load --project=MYPROJECT \ --source_format=NEWLINE_DELIMITED_JSON \ samples_mart.results \ ./sample_results.json \ ./results_table_schema.json popd
-
Add the service account from your App Engine project as an authorized use of your BigQuery project.
Compile and Deploy PerfKit Explorer
-
Navigate to the PerfKitExplorer directory:
cd ~/projects/PerfKitExplorer
-
Modify the
app.yaml
file so that the application name matches the project id you created in the 'Create the App Engine project' step, and the version string is set appropriately. For example:application: perfkit-explorer-demo version: beta
-
Modify the
config/data_source_config.json
so that the production tags are appropriate for the repository you created in the previous step. For example:project_id: perfkit-explorer-demo project_name: perfkit-samples samples-mart: perfkit-samples.samples_mart analytics-key: UA-12345
-
Compile the application.
bash compile.sh
-
You will now find a
~/projects/PerfKitExplorer/deploy
folder. Navigate to it. -
Deploy PerfKit Explorer to App Engine.
appcfg.py --oauth2 update .
-
By default the application will be deployed to a build/version specific to your client. For example, with the following values:
version: 15 application: MYPERFKIT
will deploy to http://15-dot-MYPERFKIT.appspot.com