diff --git a/elements/os-cloud-config/README.md b/elements/os-cloud-config/README.md new file mode 100644 index 000000000..2806f6d59 --- /dev/null +++ b/elements/os-cloud-config/README.md @@ -0,0 +1,4 @@ +Install os-cloud-config +======================= + +os-cloud-config contains useful utilities such as init-keystone, register-nodes diff --git a/elements/os-cloud-config/element-deps b/elements/os-cloud-config/element-deps new file mode 100644 index 000000000..9770f9ba6 --- /dev/null +++ b/elements/os-cloud-config/element-deps @@ -0,0 +1,2 @@ +pip-and-virtualenv +pip-manifest diff --git a/elements/os-cloud-config/environment.d/10-os-cloud-config-install-options.bash b/elements/os-cloud-config/environment.d/10-os-cloud-config-install-options.bash new file mode 100644 index 000000000..65aae5777 --- /dev/null +++ b/elements/os-cloud-config/environment.d/10-os-cloud-config-install-options.bash @@ -0,0 +1,3 @@ +#!/bin/bash + +export DIB_INSTALLTYPE_os_cloud_config="${DIB_INSTALLTYPE_os_cloud_config:-"pip"}" diff --git a/elements/os-cloud-config/install.d/os-cloud-config-package-install/90-os-cloud-config b/elements/os-cloud-config/install.d/os-cloud-config-package-install/90-os-cloud-config new file mode 100755 index 000000000..883743e3f --- /dev/null +++ b/elements/os-cloud-config/install.d/os-cloud-config-package-install/90-os-cloud-config @@ -0,0 +1,6 @@ +#!/bin/bash + +set -eux +set -o pipefail + +install-packages os-cloud-config diff --git a/elements/os-cloud-config/install.d/os-cloud-config-pip-install/90-os-cloud-config b/elements/os-cloud-config/install.d/os-cloud-config-pip-install/90-os-cloud-config new file mode 100755 index 000000000..b78e99a5e --- /dev/null +++ b/elements/os-cloud-config/install.d/os-cloud-config-pip-install/90-os-cloud-config @@ -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