Telemetry: Upload to Cloud Storage

Telemetry: Upload to Cloud Storage

back to Telemetry Introduction



Install depot_tools

Follow instruction in this page to install depot_tools.

Authenticate into gsutil (not required if already authenticated)

Run the command below and follow the url and instruction for authentication with your @chromum.org account.

depot_tools/third_party/gsutil/gsutil config


When prompted with “What is your project-id?”, leave the project id empty and just press ENTER.

Check your files into the bucket “chromium-telemetry”

Put the target file in the directory you want it to be when downloaded from Cloud Storage, say /path/to/target. Use this command to upload:

depot_tools/upload_to_google_storage.py --bucket chromium-telemetry /path/to/target

A SHA1 file /path/to/target.sha1 will be generated for each uploaded file.


You may run the following command for more usage.

depot_tools/upload_to_google_storage.py -h

Check the .sha1 files into repository

svn add /path/to/target.sha1


svn rm /path/to/target  # If the file was previously in the repo.

or

git add /path/to/target.sha1


git rm /path/to/target  # If the file was previously in the repo.


Download the file in python

from telemetry.page import cloud_storage

cloud_storage.GetIfChanged(cloud_storage.CHROMIUM_TELEMETRY_BUCKET,

                                           '/path/to/target')

Comments