skylab: move server_db_sync to infra/skylab_inventory

infra/skylab_inventory stores all the scripts and libs used for
skylab. This CL moves the server_db_sync script to this repo and teaches
it to read from the local git file to load the skylab server data.

BUG=chromium:826500
TEST=unittest

Change-Id: I91c6cec6037bb1579f417f27c6a73757dc8a8eec
Reviewed-on: https://chromium-review.googlesource.com/1006220
Commit-Ready: Shuqian Zhao <shuqianz@chromium.org>
Tested-by: Shuqian Zhao <shuqianz@chromium.org>
Reviewed-by: Shuqian Zhao <shuqianz@chromium.org>
9 files changed
tree: f7b0b33461cd8c405c74eee3bc23598ca8b0acb6
  1. bin/
  2. protos/
  3. venv/
  4. .gitignore
  5. PRESUBMIT.cfg
  6. README.md
README.md

Updating inventory schema

Inventory schema is stored as protobuf definitions in the proto/ directory. When you update these protobuf definitions, you must also update the generated python libraries for them.

You need the protoc compiler for this. On gLinux:

$ sudo apt-get install protobuf-compiler

Then, regenerated the libraries:

$ cd protos
$ protoc --python_out=../venv/skylab_inventory/protos/ *.proto