Enable git install of os-cloud-config
Add the ability to use a locally patched os-cloud-config in image installs. Change-Id: Ibebcdc187e9decfd0ff0fddc33dd2c5fc37ee5c9
This commit is contained in:
parent
788c293d2c
commit
51546cdb6c
|
@ -1,2 +1,3 @@
|
||||||
pip-and-virtualenv
|
pip-and-virtualenv
|
||||||
pip-manifest
|
pip-manifest
|
||||||
|
source-repositories
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
export DIB_INSTALLTYPE_os_cloud_config="${DIB_INSTALLTYPE_os_cloud_config:-"pip"}"
|
export DIB_INSTALLTYPE_os_cloud_config="${DIB_INSTALLTYPE_os_cloud_config:-"pip"}"
|
||||||
|
|
||||||
|
if [ -z "${OS_CLOUD_CONFIG_VENV_DIR:-}" ]; then
|
||||||
|
export OS_CLOUD_CONFIG_VENV_DIR="${OPENSTACK_VENV_DIR:-"/opt/stack/venvs/os-cloud-config"}"
|
||||||
|
fi
|
||||||
|
|
|
@ -3,11 +3,10 @@ set -eux
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
manifest=$(get-pip-manifest os-cloud-config)
|
manifest=$(get-pip-manifest os-cloud-config)
|
||||||
VENV=/opt/stack/venvs/os-cloud-config
|
|
||||||
|
|
||||||
virtualenv --setuptools $VENV
|
virtualenv --setuptools ${OS_CLOUD_CONFIG_VENV_DIR}
|
||||||
set +u
|
set +u
|
||||||
source ${VENV}/bin/activate
|
source ${OS_CLOUD_CONFIG_VENV_DIR}/bin/activate
|
||||||
set -u
|
set -u
|
||||||
|
|
||||||
if [ -n "$manifest" ]; then
|
if [ -n "$manifest" ]; then
|
||||||
|
@ -17,10 +16,11 @@ else
|
||||||
# doesn't manage correctly HTTPS sockets when downloading pbr from
|
# doesn't manage correctly HTTPS sockets when downloading pbr from
|
||||||
# https://pypi.python.org/simple/ if using http_proxy and https_proxy
|
# https://pypi.python.org/simple/ if using http_proxy and https_proxy
|
||||||
# envvars
|
# envvars
|
||||||
${VENV}/bin/pip install -U 'setuptools>=1.0'
|
${OS_CLOUD_CONFIG_VENV_DIR}/bin/pip install -U 'setuptools>=1.0'
|
||||||
# bug #1293812 : Avoid easy_install triggering on pbr.
|
# bug #1293812 : Avoid easy_install triggering on pbr.
|
||||||
${VENV}/bin/pip install -U 'pbr>=0.6,<1.0'
|
${OS_CLOUD_CONFIG_VENV_DIR}/bin/pip install -U 'pbr>=0.6,<1.0'
|
||||||
${VENV}/bin/pip install --install-option="--install-scripts=/usr/local/bin" -U os-cloud-config
|
${OS_CLOUD_CONFIG_VENV_DIR}/bin/pip install \
|
||||||
|
--install-option="--install-scripts=/usr/local/bin" -U os-cloud-config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Write the manifest of what was installed
|
# Write the manifest of what was installed
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
../os-cloud-config-source-install/91-os-cloud-config-links
|
|
@ -0,0 +1,41 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -eux
|
||||||
|
|
||||||
|
manifest=$(get-pip-manifest os-cloud-config)
|
||||||
|
|
||||||
|
virtualenv --setuptools ${OS_CLOUD_CONFIG_VENV_DIR}
|
||||||
|
set +u
|
||||||
|
source ${OS_CLOUD_CONFIG_VENV_DIR}/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
|
||||||
|
${OS_CLOUD_CONFIG_VENV_DIR}/bin/pip install -U 'setuptools>=1.0'
|
||||||
|
# bug #1293812 : Avoid easy_install triggering on pbr.
|
||||||
|
${OS_CLOUD_CONFIG_VENV_DIR}/bin/pip install -U 'pbr>=0.6,<1.0'
|
||||||
|
if [ -e /opt/stack/os-cloud-config/requirements.txt ]; then
|
||||||
|
reqs=/opt/stack/os-cloud-config/requirements.txt
|
||||||
|
elif [ -e /opt/stack/os-cloud-config/tools/pip-requires ]; then
|
||||||
|
reqs=/opt/stack/os-cloud-config/tools/pip-requires
|
||||||
|
else
|
||||||
|
reqs=""
|
||||||
|
fi
|
||||||
|
if [ -n "$reqs" ] ; then
|
||||||
|
pip install -r $reqs
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# All reqs are installed, install from source (dev versions are not installed from manifests)
|
||||||
|
pip install /opt/stack/os-cloud-config
|
||||||
|
|
||||||
|
# Write the manifest of what was installed
|
||||||
|
write-pip-manifest os-cloud-config
|
||||||
|
|
||||||
|
set +u
|
||||||
|
deactivate
|
||||||
|
set -u
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -eux
|
||||||
|
|
||||||
|
ln -s ${OS_CLOUD_CONFIG_VENV_DIR}/bin/init-keystone /usr/local/bin/init-keystone
|
||||||
|
ln -s ${OS_CLOUD_CONFIG_VENV_DIR}/bin/generate-keystone-pki /usr/local/bin/generate-keystone-pki
|
||||||
|
ln -s ${OS_CLOUD_CONFIG_VENV_DIR}/bin/register-nodes /usr/local/bin/register-nodes
|
|
@ -0,0 +1 @@
|
||||||
|
os-cloud-config git /opt/stack/os-cloud-config https://git.openstack.org/openstack/os-cloud-config
|
Loading…
Reference in New Issue