diff options
author | Prathmesh Prabhu <pprabhu@chromium.org> | 2015-03-02 21:15:12 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-03-04 23:47:34 +0000 |
commit | 82bc21e52a25117d313168339b9e1c2865e2c054 (patch) | |
tree | 6d1b73dbfa968b666070796faa002c6db85d41af /compute | |
parent | 8cb0c1da819f3e8779f490267d762811f1d6c53b (diff) | |
download | chromite-82bc21e52a25117d313168339b9e1c2865e2c054.tar.gz |
compute: Add python-statsd to CrOS gce image.
python-statsd is needed for stats collection from builders. This is a
new chromite dependency that needs to be added to the GCE image for CrOS
builders.
BUG=chromium:462100
TEST=(1) Create a --testing gce image.
$ BOT_CREDENTIALS_DIR=/path/to/creds \
./compute/cros_compute images create --debug --testing \
--chromeos --address=X.X.X.X
(2) pre-cq trybot on an instance running the testing image.
Change-Id: I23c3e9ff38e53a0540e92e4722553474e9481f55
Reviewed-on: https://chromium-review.googlesource.com/255410
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
Commit-Queue: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Diffstat (limited to 'compute')
-rw-r--r-- | compute/compute_configs.py | 2 | ||||
-rw-r--r-- | compute/setup_bot.py | 19 |
2 files changed, 20 insertions, 1 deletions
diff --git a/compute/compute_configs.py b/compute/compute_configs.py index de04c4da0..40ed28889 100644 --- a/compute/compute_configs.py +++ b/compute/compute_configs.py @@ -11,7 +11,7 @@ from chromite.cbuildbot import constants PROJECT = 'chromeos-bot' DEFAULT_BASE_IMAGE = 'ubuntu-14-04-server-v20141016' -DEFAULT_IMAGE_NAME = 'chromeos-bot-v2' +DEFAULT_IMAGE_NAME = 'chromeos-bot-v3' DEFAULT_ZONE = 'us-east1-a' DEFAULT_SCOPES = ('https://www.googleapis.com/auth/devstorage.full_control', 'https://www.googleapis.com/auth/gerritcodereview') diff --git a/compute/setup_bot.py b/compute/setup_bot.py index c7e7a91c7..bbd79d8dd 100644 --- a/compute/setup_bot.py +++ b/compute/setup_bot.py @@ -35,11 +35,30 @@ def SetupPrerequisites(): packages += ['python-sqlalchemy', 'python-mysqldb'] # Required for payload generation outside of the chroot. packages += ['python-protobuf'] + # Required to install python packages only available via pip. + packages += ['python-pip'] # Packages to monitor system performance and usage. packages += ['sysstat'] SudoRunCommand(['apt-get', '-y', 'install'] + packages) + SetupPipPrerequisites() + + +def SetupPipPrerequisites(): + """Installs python packages via pip. + + This assumes that pip itself is installed already. + """ + # dict of package to version. Provide version None if you don't care about the + # version installed. + packages = {'python-statsd': '1.7.0'} + + for package, version in packages.iteritems(): + install_atom = package + if version is not None: + install_atom += ('==' + version) + SudoRunCommand(['pip', 'install', install_atom]) def InstallChromeDependencies(): |