blob: a61fd1f6679d176a264f86e2ba1562636acf8e64 [file] [log] [blame]
# Copyright 2015 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
This project contains the cros-cq-stats-sheet app.
WARNING: A word about using django: In general, don't.
We're still discussing whether django is a good choice for future apps. It's not
the standard template engine used by other infra apps. Before you start writing
a new app for infra, email chromeos-infra-discuss@.
Local development
=================
- We require cidb credentials to be made available to the app in a very specific
way. Create a directory / symlink to your *annotator* user credentials for the
*debug-cidb* instance named "annotator_cidb_creds.debug". Create another
directory / symlink for the prod credentials named "annotator_cidb_creds".
See go/cros-cidb-admin to obtain these credentials. The deploy script
will choose the right credential symlink based on the instance chosen.
- Then from chromite/appengine, you can launch the local dev_appserver using:
$ ./cq_stats/dev_appserver
- There are two kinds of changes that will not be picked up by the dev_appserver
automatically:
- changes to chromite/ outside of the cq_stats app. (Yes, chromite/ is
available to the app, just like to any other code under chromite)
- changes to static files.
Deploying the app.
=============
Simply use `deploy_app` provided in this directory.
- You should first deploy the the 'dbg' instance of the app, verify that
everything is as you expect by navigating to go/chromiumos-build-annotator-dbg
- Only then should you deploy to 'prod'.
The script requires you to obtain the secret key used to encrypt the cookies for
pages serverd from:
- debug: You can find the key in valentine under
Description/hostname: google.com:chromiumos-build-annotator-dbg
Purpose/username: build_annotations app secret_key
- prod: You can find the key in valentine under
Description/hostname: google.com:chromiumos-build-annotator
Purpose/username: build_annotations app secret_key
Deploy-Troubleshooting
===============
If deployment succeeds but the app fails for some reason, you'll get a very
unhelpful page without any stack trace. This is by design. You should redeploy
with DEBUG turned on. To do this, set DEBUG to True in the "DEPLOY OVERRIDES"
section in cq_stats/settings.py
Other settings autogenerated for deploy can also be overridden there.
pylint-pro-tip: Enter the ae_shell (chromite/appengine/ae_shell cq_stats) before
running pylint, so you it can resolve all imports.