Create os-cloud-config element

Create an element for installing os-cloud-config, in case there is
ever a time when it is intended to be run from a deployed image,
rather than on the host that is running devtest.

Change-Id: Id126495a4ead2aba00fb33619352dc2daae4acc5
Co-Authored-By: Jon-Paul Sullivan <jonpaul.sullivan@hp.com>
This commit is contained in:
Tom Hancock 2014-06-17 10:55:21 +01:00 committed by Jon-Paul Sullivan
parent db4b22ec17
commit 788c293d2c
5 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,4 @@
Install os-cloud-config
=======================
os-cloud-config contains useful utilities such as init-keystone, register-nodes

View File

@ -0,0 +1,2 @@
pip-and-virtualenv
pip-manifest

View File

@ -0,0 +1,3 @@
#!/bin/bash
export DIB_INSTALLTYPE_os_cloud_config="${DIB_INSTALLTYPE_os_cloud_config:-"pip"}"

View File

@ -0,0 +1,6 @@
#!/bin/bash
set -eux
set -o pipefail
install-packages os-cloud-config

View File

@ -0,0 +1,31 @@
#!/bin/bash
set -eux
set -o pipefail
manifest=$(get-pip-manifest os-cloud-config)
VENV=/opt/stack/venvs/os-cloud-config
virtualenv --setuptools $VENV
set +u
source ${VENV}/bin/activate
set -u
if [ -n "$manifest" ]; then
use-pip-manifest $manifest
else
# bug #1201253 : virtualenv-1.10.1 embeds setuptools-0.9.8, which
# doesn't manage correctly HTTPS sockets when downloading pbr from
# https://pypi.python.org/simple/ if using http_proxy and https_proxy
# envvars
${VENV}/bin/pip install -U 'setuptools>=1.0'
# bug #1293812 : Avoid easy_install triggering on pbr.
${VENV}/bin/pip install -U 'pbr>=0.6,<1.0'
${VENV}/bin/pip install --install-option="--install-scripts=/usr/local/bin" -U os-cloud-config
fi
# Write the manifest of what was installed
write-pip-manifest os-cloud-config
set +u
deactivate
set -u