Wire in _EXTRA_INSTALL_OPTS...
Updates the various environment.d elements so that we can control with a high level of granularity whether we enable --system-site-packages in our virtualenvs. At a high level OPENSTACK_EXTRA_INSTALL_OPTS can be set to -s to allow os-svc-install to enable --system-site-packages globally. The per element environment variables if set will override this setting. A step towards supporting both isolated and global venvs for OpenStack elements installed from git source. Change-Id: Ic3dc42717a90f02a58af345c5564336b64f930e4
This commit is contained in:
parent
07bb1ad9eb
commit
e42f3fd674
@ -1,3 +1,6 @@
|
||||
if [ -z "${CEILOMETER_VENV_DIR:-}" ]; then
|
||||
export CEILOMETER_VENV_DIR=${OPENSTACK_VENV_DIR:-"/opt/stack/venvs/ceilometer"}
|
||||
fi
|
||||
if [ -z "${CEILOMETER_EXTRA_INSTALL_OPTS:-}" ]; then
|
||||
export CEILOMETER_EXTRA_INSTALL_OPTS=${OPENSTACK_EXTRA_INSTALL_OPTS:-""}
|
||||
fi
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -eux
|
||||
|
||||
os-svc-install -i "$CEILOMETER_VENV_DIR" -u ceilometer -r /opt/stack/ceilometer
|
||||
os-svc-install $CEILOMETER_EXTRA_INSTALL_OPTS -i "$CEILOMETER_VENV_DIR" -u ceilometer -r /opt/stack/ceilometer
|
||||
|
||||
|
||||
install -m 640 -o ceilometer -g ceilometer /opt/stack/ceilometer/etc/ceilometer/pipeline.yaml /etc/ceilometer
|
||||
|
@ -1,3 +1,6 @@
|
||||
if [ -z "${CINDER_VENV_DIR:-}" ]; then
|
||||
export CINDER_VENV_DIR=${OPENSTACK_VENV_DIR:-"/opt/stack/venvs/cinder"}
|
||||
fi
|
||||
if [ -z "${CINDER_EXTRA_INSTALL_OPTS:-}" ]; then
|
||||
export CINDER_EXTRA_INSTALL_OPTS=${OPENSTACK_EXTRA_INSTALL_OPTS:-""}
|
||||
fi
|
||||
|
@ -3,7 +3,7 @@ set -eux
|
||||
|
||||
install-packages lvm2 libssl-dev libffi-dev nfs-common
|
||||
echo "qpid-python" | tee -a /opt/stack/cinder/requirements.txt
|
||||
os-svc-install -i "$CINDER_VENV_DIR" -u cinder -r /opt/stack/cinder
|
||||
os-svc-install $CINDER_EXTRA_INSTALL_OPTS -i "$CINDER_VENV_DIR" -u cinder -r /opt/stack/cinder
|
||||
|
||||
cp -a /opt/stack/cinder/etc/cinder/rootwrap* /etc/cinder
|
||||
cp /opt/stack/cinder/etc/cinder/api-paste.ini /etc/cinder/api-paste.ini
|
||||
|
@ -1,3 +1,6 @@
|
||||
if [ -z "${GLANCE_VENV_DIR:-}" ]; then
|
||||
export GLANCE_VENV_DIR=${OPENSTACK_VENV_DIR:-"/opt/stack/venvs/glance"}
|
||||
fi
|
||||
if [ -z "${GLANCE_EXTRA_INSTALL_OPTS:-}" ]; then
|
||||
export GLANCE_EXTRA_INSTALL_OPTS=${OPENSTACK_EXTRA_INSTALL_OPTS:-""}
|
||||
fi
|
||||
|
@ -3,7 +3,7 @@ set -eux
|
||||
|
||||
install-packages python-mysqldb libssl-dev libffi-dev
|
||||
|
||||
os-svc-install -i "$GLANCE_VENV_DIR" -u glance -r /opt/stack/glance
|
||||
os-svc-install $GLANCE_EXTRA_INSTALL_OPTS -i "$GLANCE_VENV_DIR" -u glance -r /opt/stack/glance
|
||||
|
||||
ln -s $GLANCE_VENV_DIR/bin/glance-manage /usr/local/bin/glance-manage
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
if [ -z "${HEAT_VENV_DIR:-}" ]; then
|
||||
export HEAT_VENV_DIR=${OPENSTACK_VENV_DIR:-"/opt/stack/venvs/heat"}
|
||||
fi
|
||||
if [ -z "${HEAT_EXTRA_INSTALL_OPTS:-}" ]; then
|
||||
export HEAT_EXTRA_INSTALL_OPTS=${OPENSTACK_EXTRA_INSTALL_OPTS:-""}
|
||||
fi
|
||||
|
@ -4,7 +4,7 @@ install-packages python-setuptools python-eventlet python-greenlet \
|
||||
python-httplib2 python-iso8601 python-lxml python-sqlalchemy \
|
||||
python-paste python-routes python-webob python-yaml
|
||||
|
||||
os-svc-install -i "$HEAT_VENV_DIR" -u heat -r /opt/stack/heat
|
||||
os-svc-install $HEAT_EXTRA_INSTALL_OPTS -i "$HEAT_VENV_DIR" -u heat -r /opt/stack/heat
|
||||
|
||||
cp /opt/stack/heat/etc/heat/policy.json /etc/heat/policy.json
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
if [ -z "${HORIZON_VENV_DIR:-}" ]; then
|
||||
export HORIZON_VENV_DIR=${OPENSTACK_VENV_DIR:-"/opt/stack/venvs/horizon"}
|
||||
fi
|
||||
if [ -z "${HORIZON_EXTRA_INSTALL_OPTS:-}" ]; then
|
||||
export HORIZON_EXTRA_INSTALL_OPTS=${OPENSTACK_EXTRA_INSTALL_OPTS:-""}
|
||||
fi
|
||||
|
@ -16,7 +16,7 @@ if [ -d /etc/apache2 ]; then
|
||||
sed -e "s|HORIZON_VENV_DIR|$HORIZON_VENV_DIR|g" -i /etc/apache2/sites-available/horizon.conf
|
||||
fi
|
||||
|
||||
os-svc-install -i "$HORIZON_VENV_DIR" -u horizon -r /opt/stack/horizon
|
||||
os-svc-install $HORIZON_EXTRA_INSTALL_OPTS -i "$HORIZON_VENV_DIR" -u horizon -r /opt/stack/horizon
|
||||
|
||||
# Django won't start otherwise:
|
||||
touch /etc/horizon/.secret_key_store
|
||||
|
@ -1,3 +1,6 @@
|
||||
if [ -z "${HORIZON_VENV_DIR:-}" ]; then
|
||||
export HORIZON_VENV_DIR=${OPENSTACK_VENV_DIR:-"/opt/stack/venvs/horizon"}
|
||||
fi
|
||||
if [ -z "${HORIZON_EXTRA_INSTALL_OPTS:-}" ]; then
|
||||
export HORIZON_EXTRA_INSTALL_OPTS=${OPENSTACK_EXTRA_INSTALL_OPTS:-""}
|
||||
fi
|
||||
|
@ -1,3 +1,6 @@
|
||||
if [ -z "${IRONIC_VENV_DIR:-}" ]; then
|
||||
export IRONIC_VENV_DIR=${OPENSTACK_VENV_DIR:-"/opt/stack/venvs/ironic"}
|
||||
fi
|
||||
if [ -z "${IRONIC_EXTRA_INSTALL_OPTS:-}" ]; then
|
||||
export IRONIC_EXTRA_INSTALL_OPTS=${OPENSTACK_EXTRA_INSTALL_OPTS:-""}
|
||||
fi
|
||||
|
@ -4,7 +4,7 @@ set -eux
|
||||
# need the libssl header files
|
||||
install-packages libssl-dev
|
||||
|
||||
os-svc-install -i "$IRONIC_VENV_DIR" -u ironic -r /opt/stack/ironic
|
||||
os-svc-install $IRONIC_EXTRA_INSTALL_OPTS -i "$IRONIC_VENV_DIR" -u ironic -r /opt/stack/ironic
|
||||
|
||||
install -d -m 0750 -o ironic -g ironic /etc/ironic
|
||||
install -o root -g root -m 0644 /opt/stack/ironic/etc/ironic/policy.json /etc/ironic
|
||||
|
@ -1,3 +1,6 @@
|
||||
if [ -z "${KEYSTONE_VENV_DIR:-}" ]; then
|
||||
export KEYSTONE_VENV_DIR=${OPENSTACK_VENV_DIR:-"/opt/stack/venvs/keystone"}
|
||||
fi
|
||||
if [ -z "${KEYSTONE_EXTRA_INSTALL_OPTS:-}" ]; then
|
||||
export KEYSTONE_EXTRA_INSTALL_OPTS=${OPENSTACK_EXTRA_INSTALL_OPTS:-""}
|
||||
fi
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -eux
|
||||
os-svc-install -i "$KEYSTONE_VENV_DIR" -u keystone -r /opt/stack/keystone
|
||||
os-svc-install $KEYSTONE_EXTRA_INSTALL_OPTS -i "$KEYSTONE_VENV_DIR" -u keystone -r /opt/stack/keystone
|
||||
|
||||
# Workaround for https://bugs.launchpad.net/tripleo/+bug/1288425
|
||||
$KEYSTONE_VENV_DIR/bin/pip install -U kombu
|
||||
|
@ -4,7 +4,7 @@ set -eux
|
||||
DISTRO=`lsb_release -si` || true
|
||||
RELEASE=`lsb_release -r` || true
|
||||
|
||||
os-svc-install -i "$KEYSTONE_VENV_DIR" -u keystone -r /opt/stack/keystone
|
||||
os-svc-install $KEYSTONE_EXTRA_INSTALL_OPTS -i "$KEYSTONE_VENV_DIR" -u keystone -r /opt/stack/keystone
|
||||
os-svc-daemon -i "$KEYSTONE_VENV_DIR" keystone keystone keystone-all "--config-dir /etc/keystone"
|
||||
install -m 0755 -o keystone -g keystone -d /etc/keystone/ssl
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
if [ -z "${NEUTRON_VENV_DIR:-}" ]; then
|
||||
export NEUTRON_VENV_DIR=${OPENSTACK_VENV_DIR:-"/opt/stack/venvs/neutron"}
|
||||
fi
|
||||
if [ -z "${NEUTRON_EXTRA_INSTALL_OPTS:-}" ]; then
|
||||
export NEUTRON_EXTRA_INSTALL_OPTS=${OPENSTACK_EXTRA_INSTALL_OPTS:-""}
|
||||
fi
|
||||
|
@ -8,7 +8,7 @@ install-packages openvswitch-switch openvswitch-datapath-dkms
|
||||
# for BUG: https://bugs.launchpad.net/neutron/+bug/1225232
|
||||
echo "qpid-python" | tee -a /opt/stack/neutron/requirements.txt
|
||||
|
||||
os-svc-install -i "$NEUTRON_VENV_DIR" -u neutron -r /opt/stack/neutron
|
||||
os-svc-install $NEUTRON_EXTRA_INSTALL_OPTS -i "$NEUTRON_VENV_DIR" -u neutron -r /opt/stack/neutron
|
||||
|
||||
ln -sf $NEUTRON_VENV_DIR/bin/neutron-rootwrap /usr/bin/neutron-rootwrap
|
||||
ln -sf $NEUTRON_VENV_DIR/etc/neutron/rootwrap.d /etc/neutron/rootwrap.d
|
||||
|
@ -1,3 +1,7 @@
|
||||
if [ -z "${NOVA_VENV_DIR:-}" ]; then
|
||||
export NOVA_VENV_DIR=${OPENSTACK_VENV_DIR:-"/opt/stack/venvs/nova"}
|
||||
fi
|
||||
if [ -z "${NOVA_EXTRA_INSTALL_OPTS:-}" ]; then
|
||||
# use -s to enable --system-site-packages in the virtualenv
|
||||
export NOVA_EXTRA_INSTALL_OPTS=${OPENSTACK_EXTRA_INSTALL_OPTS:-"-s"}
|
||||
fi
|
||||
|
@ -4,7 +4,7 @@ set -eux
|
||||
install-packages build-essential python-dev libssl-dev libxml2-dev libxslt-dev libffi-dev
|
||||
|
||||
# -s enables system-site-packages explicitly for python-libvirt
|
||||
os-svc-install -i "$NOVA_VENV_DIR" -u nova -r /opt/stack/nova -s
|
||||
os-svc-install $NOVA_EXTRA_INSTALL_OPTS -i "$NOVA_VENV_DIR" -u nova -r /opt/stack/nova
|
||||
|
||||
cp /opt/stack/nova/etc/nova/policy.json /etc/nova/policy.json
|
||||
cp /opt/stack/nova/etc/nova/api-paste.ini /etc/nova/api-paste.ini
|
||||
|
@ -1,3 +1,6 @@
|
||||
if [ -z "${SWIFT_VENV_DIR:-}" ]; then
|
||||
export SWIFT_VENV_DIR=${OPENSTACK_VENV_DIR:-"/opt/stack/venvs/swift"}
|
||||
fi
|
||||
if [ -z "${SWIFT_EXTRA_INSTALL_OPTS:-}" ]; then
|
||||
export SWIFT_EXTRA_INSTALL_OPTS=${OPENSTACK_EXTRA_INSTALL_OPTS:-""}
|
||||
fi
|
||||
|
@ -4,6 +4,6 @@ set -eux
|
||||
|
||||
install-packages libffi-dev
|
||||
|
||||
os-svc-install -i "$SWIFT_VENV_DIR" -u swift -r /opt/stack/swift
|
||||
os-svc-install $SWIFT_EXTRA_INSTALL_OPTS -i "$SWIFT_VENV_DIR" -u swift -r /opt/stack/swift
|
||||
|
||||
install -m 0755 -o root -g root $SWIFT_VENV_DIR/bin/swift-ring-builder /usr/local/bin
|
||||
|
@ -1,3 +1,6 @@
|
||||
if [ -z "${TEMPEST_VENV_DIR:-}" ]; then
|
||||
export TEMPEST_VENV_DIR=${OPENSTACK_VENV_DIR:-"/opt/stack/venvs/tempest"}
|
||||
fi
|
||||
if [ -z "${TEMPEST_EXTRA_INSTALL_OPTS:-}" ]; then
|
||||
export TEMPEST_EXTRA_INSTALL_OPTS=${OPENSTACK_EXTRA_INSTALL_OPTS:-""}
|
||||
fi
|
||||
|
@ -4,7 +4,7 @@ set -ex
|
||||
|
||||
install-packages augeas-tools
|
||||
|
||||
os-svc-install -i "$TEMPEST_VENV_DIR" -u tempest -r /opt/stack/tempest
|
||||
os-svc-install $TEMPEST_EXTRA_INSTALL_OPTS -i "$TEMPEST_VENV_DIR" -u tempest -r /opt/stack/tempest
|
||||
|
||||
source $TEMPEST_VENV_DIR/bin/activate
|
||||
cd /opt/stack/tempest
|
||||
|
@ -1,3 +1,6 @@
|
||||
if [ -z "${TUSKAR_VENV_DIR:-}" ]; then
|
||||
export TUSKAR_VENV_DIR=${OPENSTACK_VENV_DIR:-"/opt/stack/venvs/tuskar"}
|
||||
fi
|
||||
if [ -z "${TUSKAR_EXTRA_INSTALL_OPTS:-}" ]; then
|
||||
export TUSKAR_EXTRA_INSTALL_OPTS=${OPENSTACK_EXTRA_INSTALL_OPTS:-""}
|
||||
fi
|
||||
|
@ -2,7 +2,7 @@
|
||||
set -eux
|
||||
|
||||
install-packages swig
|
||||
os-svc-install -i "$TUSKAR_VENV_DIR" -u tuskar -r /opt/stack/tuskar
|
||||
os-svc-install $TUSKAR_EXTRA_INSTALL_OPTS -i "$TUSKAR_VENV_DIR" -u tuskar -r /opt/stack/tuskar
|
||||
|
||||
install -d -m 0750 -o tuskar -g tuskar /etc/tuskar
|
||||
cp -a /opt/stack/tuskar/etc/tuskar/policy.json /etc/tuskar
|
||||
|
Loading…
Reference in New Issue
Block a user