By default, when starting local server by ./manage.py runserver
, Minijack read datas from local sqlite3 database named minijack_db, search in current directory, frontend/
, /var/db/factory/
.
Copy app.yaml.TEMPLATE
to app.yaml
, and change the application name to the real application name deploying to.
We need a Google API Service Account's PEM key on GAE.
Generate and download the PKCS12 format private key from API console, and execute openssl pkcs12 -in privatekey.p12 -nodes -nocerts > privatekey.pem
to convert the key from PKCS12 to PEM. Then manually delete anything before -----BEGIN PRIVATE KEY-----
from privatekey.pem
.
Use dump_db.py
to dump all datas to json files, and upload them with schemas in the directory schemas/
to Google BigQuery tables. The tables must be named Device, Test, Event, Component (case sensitive)
The script for progressive adding data is not available yet.
Copy settings_bigquery.py.TEMPLATE
to settings_bigquery.py
, and set the settings accordingly.
Google Cloud SQL is a MySQL server, which may run faster than BigQuery when the data size is small, but it can't be run as backend for local server.
The script for dumping data to Google Cloud SQL is not available yet, but basically it is sqlite3 to MySQL. Some point to notice:
VARCHAR
rather than TEXT
when the column is indexed or used as primary key, so the CREATE TABLE
command needs to be changed accordingly.CHARACTER SET utf8 COLLATE utf8_bin
to CREATE DATABASE
solves the problem.The commands that can be used to create database and tables are located in schemas/cloud_sql.schema
Set permission of Google Cloud SQL for the application deploying to.
Copy settings_cloud_sql.py.TEMPLATE
to settings_cloud_sql.py
, and set the settings accordingly.