tree: 63d4099f73e79af1ae1d0b7f71526fff04efba54 [path history] [tgz]
  1. doc/
  2. proto/
  3. static/
  4. templates/
  5. tools/
  6. ui/
  7. acl.py
  8. app.yaml
  9. appengine_config.py
  10. config.py
  11. config_test.py
  12. cron.yaml
  13. gcs.py
  14. handlers_backend.py
  15. handlers_backend_test.py
  16. handlers_endpoints_v1.py
  17. handlers_endpoints_v1_test.py
  18. handlers_frontend.py
  19. handlers_frontend_test.py
  20. handlers_prpc.py
  21. handlers_prpc_test.py
  22. index.yaml
  23. main_backend.py
  24. main_frontend.py
  25. mapreduce.yaml
  26. mapreduce_jobs.py
  27. model.py
  28. model_test.py
  29. module-backend.yaml
  30. OWNERS
  31. PRESUBMIT.py
  32. queue.yaml
  33. README.md
  34. setup_bigquery.sh
  35. stats.py
  36. stats_test.py
  37. template.py
  38. test_env.py
appengine/isolate/README.md

Isolate Server

An AppEngine service to efficiently cache large set of large files over the internet with high level of duplication. The cache is content addressed and uses Cloud Storage as its backing store.

Isolate enables sending temporary files around. It is a pure cache, files will be deleted.

Isolate can be used standalone when only files need to be transfered but no task scheduler is needed.

Documentation

Setting up

  • Visit http://console.cloud.google.com and create a project. Replace <appid> below with your project id.
  • Visit Google Cloud Console
    • App Engine
      • Enable it and choose us-central.
    • IAM & Admin > IAM
      • Click Add Member and add someone else so you can safely be hit by a bus.
    • IAM & Admin > Service accounts
      • Click Create service account.
      • Service account name server
      • Service account ID server
      • Click Create.
      • Click Continue, no need to add a permission.
      • Click Create key.
      • Select P12 and click Create.
        • TODO(vadimsh): switch to JSON keys.
      • Click Done.
    • Storage
      • Click Create bucket.
      • Name it with the same . Do not use any pre-created bucket, they won't work.
      • Choose Multi-Regional, United States.
      • Click Create.
      • Click Permissions tab.
      • Click Add members.
      • Enter the user server@<appid>.iam.gserviceaccount.com.
      • Select Roles in Storage Legacy group: Storage Legacy Bucket Writer and Storage Legacy Object Reader.
      • Click Add.
    • Pub/Sub
      • Click Enable API.
    • App Engine > Memcache
      • Click Change.
      • Chose Dedicated.
      • Set the cache to Dedicated 5Gb.
      • Wait a day of steady state usage.
      • Set the limit to be lower than the value read at “Total cache size” in “Memcache Viewer”.
    • App Engine > Settings
      • Click Edit:
      • Set Google login Cookie expiration to: 2 weeks.
      • Click Save.
  • Upload the code with: ./tools/gae upl -x -A <appid>
  • Run setup_bigquery.sh to create the BigQuery isolated.stat table and grant write access to the AppEngine app. The cron job will fail meanwhile.
  • If you plan to use an auth_service,
  • _Else visit “https://<appid>.appspot.com/auth/bootstrap” and click Proceed.
  • Visit “https://<appid>.appspot.com/auth/groups
    • Create access groups as relevant. Visit the “IP Whitelists” tab and add bot external IP addresses if needed.
  • Visit “https://<appid>.appspot.com/restricted/config
    • Follow the on-screen instructions to generate the base64 encoded DER private key.
    • Click Submit.
  • If you plan to use a config service (the normal case):
  • If you are not using a config service, see Configuring using FS mode. You'll need to add an entry to settings.cfg like ui_client_id: "server@<appid>.iam.gserviceaccount.com"

Stats

Use prpc CLI client from https://go.chromium.org/luci/grpc/cmd/prpc:

echo '{"resolution":"MINUTE","limit":20}' | prpc call -verbose <host> isolated.Isolated.Stats