diff --git a/nodepool/elements/nodepool-base/install.d/90-venv-swift-logs b/nodepool/elements/nodepool-base/install.d/90-venv-swift-logs new file mode 100644 index 0000000000..822d4e1831 --- /dev/null +++ b/nodepool/elements/nodepool-base/install.d/90-venv-swift-logs @@ -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 diff --git a/nodepool/scripts/prepare_node.sh b/nodepool/scripts/prepare_node.sh index 7a170490a1..03b0ef492c 100755 --- a/nodepool/scripts/prepare_node.sh +++ b/nodepool/scripts/prepare_node.sh @@ -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