[gae.py] Add a hacky support for parameterizing GAE YAMLs.

We need something to avoid mistakes when deploying GAEv2 apps. They
consume configuration via flags which currently must be hardcoded
into YAMLs. There's only one YAML, but there are multiple
environments it can be deployed into. This CL adds a very adhoc way
of parameterizing YAML based on where it is being deployed to.

Should be superseded by a real GAE deployment automation.

Usage example:

luci_gae_vars:
  commit-queue-dev:
    AUTH_SERVICE_HOST: chrome-infra-auth-dev.appspot.com
  commit-queue:
    AUTH_SERVICE_HOST: chrome-infra-auth.appspot.com

entrypoint: >
  /usr/local/bin/start
  -auth-service-host ${AUTH_SERVICE_HOST}
  ...

Note that trying to use such YAML directly with
"gcloud app deploy" or with older version of gae.py fails.

R=tandrii@chromium.org

Change-Id: I06aa538c8fc4a73ebc79fd9ec0b066edfb0a86b7
Reviewed-on: https://chromium-review.googlesource.com/c/infra/luci/luci-py/+/2065424
Reviewed-by: Andrii Shyshkalov <tandrii@google.com>
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
1 file changed
tree: 3080d73c67b9da0db3f52b67003f9f73cd356e9b
  1. appengine/
  2. client/
  3. .gitattributes
  4. .gitignore
  5. .style.yapf
  6. .vpython
  7. .vpython3
  8. .yapfignore
  9. AUTHORS
  10. codereview.settings
  11. CODING_STYLE.md
  12. CONTRIBUTORS
  13. DEPS
  14. LICENSE
  15. OWNERS
  16. PRESUBMIT.py
  17. README.md
  18. WATCHLISTS
README.md

LUCI

LUCI is an ensemble of services that work together to run large scale CI (continuous integration) infrastructure to get results in O(1). It is used by the Chromium project.

See appengine/ for the services provided.

Overview

A complete CI toolkit:

  • Strict separation between task distribution and file distribution.
    • Swarming distributes tasks across an army (thousands) of Swarming bots.
    • Isolate server distributes 10s of thousands of files per task.
  • Federated authentication and ACL.
  • git based configuration data propagation.
  • Automatic Google Compute Engine VM recycling.
  • Windows, OSX and Linux (Ubuntu), used with Android, iOS, ChromeOS.
  • Written in python 2.7 along Go tools.
  • Used by the Chromium infrastructure and other teams.

Installing

  1. Install Google AppEngine SDK.
  2. git clone https://chromium.googlesource.com/infra/luci/luci-py

Code layout

Versioning

  • Branch master constains the latest code.
  • Branch stable contains the stable code.

Contributing

  • Sign the Google CLA.
  • See the coding style.
  • Make sure your user.email and user.name are configured in git config.

Run the following to setup the code review tool and create your first review:

git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git $HOME/src/depot_tools
export PATH="$PATH:$HOME/src/depot_tools"
cd luci-py
git checkout -b work origin/master

# hack hack

git commit -a -m "This is awesome\nR=joe@example.com"
# This will ask for your Google Account credentials.
git cl upload -s
# Wait for LGTM over email.
# Check the commit queue box in codereview website.
# Wait for the change to be tested and landed automatically.

Use git cl help and git cl help <cmd> for more details.

Style

The preferred style is PEP8 with two-space indent; that is, the Chromium Python style, except functions use lowercase_with_underscores. Use yapf (git cl format) to autoformat new code.

License

This project is licensed under Apache v2.0 license. See LICENSE for details.