Set up venv for zuul-swift-logs

Set up a venv for zuul-swift-logs and install its dependencies
(python-magic) there instead of as system packages.

For DIB use 90 as uploading logs may be considered more important
than installing zuul.

Change-Id: Id0fc01729853e65c81cdd50e4ffa4d0d6de00ae9
This commit is contained in:
Joshua Hesketh 2014-12-17 14:55:53 +11:00
parent 4fca1987a9
commit 8bc108140e
2 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,21 @@
#!/bin/bash -xe
# Copyright (C) 2015 Rackspace Australia
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# Create a virtualenv for zuul-swift-logs
# This is in /usr instead of /usr/local due to this bug on precise:
# https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/839588
# Be explicit about the Python version since py3k-precise nodes default
# to using 3.3 with virtualenv.
sudo -H virtualenv -p python2 /usr/zuul-swift-logs-env
sudo -H /usr/zuul-swift-logs-env/bin/pip install python-magic

View File

@ -163,5 +163,13 @@ sudo virtualenv -p python2 /usr/zuul-env
sudo -H /usr/zuul-env/bin/pip install /tmp/zuul
sudo rm -fr /tmp/zuul
# Create a virtualenv for zuul-swift-logs
# This is in /usr instead of /usr/local due to this bug on precise:
# https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/839588
# Be explicit about the Python version since py3k-precise nodes default
# to using 3.3 with virtualenv.
sudo -H virtualenv -p python2 /usr/zuul-swift-logs-env
sudo -H /usr/zuul-swift-logs-env/bin/pip install python-magic
sync
sleep 5