Update elements to use os-svc-daemon -i.

Globally updates all the elements so we explicitly set the
virtualenv install directory with the os-svc-daemon -i option.

This allows us to support both isolated and shared venvs
(which some people would like to use).

Change-Id: Ie264ff58d7e733542ba32853f5c0f593b64ffe4a
This commit is contained in:
Dan Prince 2014-02-27 15:08:38 -05:00
parent 848f2b881b
commit a794c4cc2f
28 changed files with 49 additions and 50 deletions

View File

@ -1,4 +1,4 @@
#!/bin/bash
set -eux
os-svc-daemon ceilometer-agent-central ceilometer ceilometer-agent-central --config-dir /etc/ceilometer
os-svc-daemon -i "$CEILOMETER_VENV_DIR" ceilometer-agent-central ceilometer ceilometer-agent-central --config-dir /etc/ceilometer

View File

@ -4,4 +4,4 @@ set -eux
install-packages libvirt-dev
$CEILOMETER_VENV_DIR/bin/pip install libvirt-python
os-svc-daemon ceilometer-agent-compute ceilometer ceilometer-agent-compute --config-dir /etc/ceilometer
os-svc-daemon -i "$CEILOMETER_VENV_DIR" ceilometer-agent-compute ceilometer ceilometer-agent-compute --config-dir /etc/ceilometer

View File

@ -1,4 +1,4 @@
#!/bin/bash
set -eux
os-svc-daemon ceilometer-agent-notification ceilometer ceilometer-agent-notification --config-dir /etc/ceilometer
os-svc-daemon -i "$CEILOMETER_VENV_DIR" ceilometer-agent-notification ceilometer ceilometer-agent-notification --config-dir /etc/ceilometer

View File

@ -1,4 +1,4 @@
#!/bin/bash
set -eux
os-svc-daemon ceilometer-api ceilometer ceilometer-api --config-dir /etc/ceilometer
os-svc-daemon -i "$CEILOMETER_VENV_DIR" ceilometer-api ceilometer ceilometer-api --config-dir /etc/ceilometer

View File

@ -1,4 +1,4 @@
#!/bin/bash
set -eux
os-svc-daemon ceilometer-collector ceilometer ceilometer-collector --config-dir /etc/ceilometer
os-svc-daemon -i "$CEILOMETER_VENV_DIR" ceilometer-collector ceilometer ceilometer-collector --config-dir /etc/ceilometer

View File

@ -3,5 +3,5 @@ set -eux
ln -s $CINDER_VENV_DIR/bin/cinder-manage /usr/local/bin/cinder-manage
os-svc-daemon cinder-api cinder cinder-api "--config-dir /etc/cinder"
os-svc-daemon cinder-scheduler cinder cinder-scheduler "--config-dir /etc/cinder"
os-svc-daemon -i "$CINDER_VENV_DIR" cinder-api cinder cinder-api "--config-dir /etc/cinder"
os-svc-daemon -i "$CINDER_VENV_DIR" cinder-scheduler cinder cinder-scheduler "--config-dir /etc/cinder"

View File

@ -1,4 +1,4 @@
#!/bin/bash
set -eux
os-svc-daemon cinder-volume cinder cinder-volume "--config-dir /etc/cinder"
os-svc-daemon -i "$CINDER_VENV_DIR" cinder-volume cinder cinder-volume "--config-dir /etc/cinder"

View File

@ -12,5 +12,5 @@ cp /opt/stack/glance/etc/schema-image.json /etc/glance/schema-image.json
cp /opt/stack/glance/etc/glance-api-paste.ini /etc/glance/glance-api-paste.ini
cp /opt/stack/glance/etc/glance-registry-paste.ini /etc/glance/glance-registry-paste.ini
os-svc-daemon glance-api glance glance-api
os-svc-daemon glance-reg glance glance-registry
os-svc-daemon -i "$GLANCE_VENV_DIR" glance-api glance glance-api
os-svc-daemon -i "$GLANCE_VENV_DIR" glance-reg glance glance-registry

View File

@ -1,7 +1,7 @@
#!/bin/bash
set -e
os-svc-daemon heat-api heat heat-api
os-svc-daemon heat-api-cfn heat heat-api-cfn
os-svc-daemon heat-api-cloudwatch heat heat-api-cloudwatch
os-svc-daemon -i "$HEAT_VENV_DIR" heat-api heat heat-api
os-svc-daemon -i "$HEAT_VENV_DIR" heat-api-cfn heat heat-api-cfn
os-svc-daemon -i "$HEAT_VENV_DIR" heat-api-cloudwatch heat heat-api-cloudwatch
cp /opt/stack/heat/etc/heat/api-paste.ini /etc/heat/api-paste.ini

View File

@ -8,4 +8,4 @@ cp -r /opt/stack/heat/etc/heat/templates /etc/heat
ln -s $HEAT_VENV_DIR/bin/heat-manage /usr/local/bin/heat-manage
os-svc-daemon heat-engine heat heat-engine
os-svc-daemon -i "$HEAT_VENV_DIR" heat-engine heat heat-engine

View File

@ -1,4 +1,4 @@
#!/bin/bash
set -eux
os-svc-daemon ironic-api ironic ironic-api "--debug --verbose --log-config /etc/ironic/logging-api.conf --config-file /etc/ironic/ironic.conf"
os-svc-daemon -i "$IRONIC_VENV_DIR" ironic-api ironic ironic-api "--debug --verbose --log-config /etc/ironic/logging-api.conf --config-file /etc/ironic/ironic.conf"

View File

@ -5,4 +5,4 @@ echo "ironic ALL=(root) NOPASSWD: $IRONIC_VENV_DIR/bin/ironic-rootwrap" > /etc/s
chmod 0440 /etc/sudoers.d/ironic
visudo -c
os-svc-daemon ironic-conductor ironic ironic-conductor "--debug --verbose --log-config /etc/ironic/logging-conductor.conf --config-file /etc/ironic/ironic.conf"
os-svc-daemon -i "$IRONIC_VENV_DIR" ironic-conductor ironic ironic-conductor "--debug --verbose --log-config /etc/ironic/logging-conductor.conf --config-file /etc/ironic/ironic.conf"

View File

@ -5,7 +5,7 @@ DISTRO=`lsb_release -si` || true
RELEASE=`lsb_release -r` || true
os-svc-install -u keystone -r /opt/stack/keystone
os-svc-daemon keystone keystone keystone-all "--config-dir /etc/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
ln -s $KEYSTONE_VENV_DIR/bin/keystone-manage /usr/local/bin/keystone-manage

View File

@ -4,4 +4,4 @@ set -eux
install-packages openstack-neutron
os-svc-daemon -n neutron-dhcp-agent -u neutron -c noop -d
os-svc-daemon -i "$NEUTRON_VENV_DIR" -n neutron-dhcp-agent -u neutron -c noop -d

View File

@ -3,4 +3,4 @@ set -eux
install-packages dnsmasq dnsmasq-utils
os-svc-daemon -n neutron-dhcp-agent -u neutron -c neutron-dhcp-agent -- --config-file /etc/neutron/dhcp_agent.ini --config-dir /etc/neutron
os-svc-daemon -i "$NEUTRON_VENV_DIR" -n neutron-dhcp-agent -u neutron -c neutron-dhcp-agent -- --config-file /etc/neutron/dhcp_agent.ini --config-dir /etc/neutron

View File

@ -1,8 +1,8 @@
#!/bin/bash
set -eux
os-svc-daemon -n neutron-l3-agent -u neutron -c neutron-l3-agent -- --config-file /etc/neutron/l3_agent.ini --config-dir /etc/neutron
os-svc-daemon -n neutron-metadata-agent -u neutron -c neutron-metadata-agent -- --config-file /etc/neutron/metadata_agent.ini --config-dir /etc/neutron
os-svc-daemon -i "$NEUTRON_VENV_DIR" -n neutron-l3-agent -u neutron -c neutron-l3-agent -- --config-file /etc/neutron/l3_agent.ini --config-dir /etc/neutron
os-svc-daemon -i "$NEUTRON_VENV_DIR" -n neutron-metadata-agent -u neutron -c neutron-metadata-agent -- --config-file /etc/neutron/metadata_agent.ini --config-dir /etc/neutron
# This has to be on the path of the agent that runs it http://pad.lv/1182704
ln -sf $NEUTRON_VENV_DIR/bin/neutron-ns-metadata-proxy /usr/bin

View File

@ -1,4 +1,4 @@
#!/bin/bash
set -eux
os-svc-daemon neutron-openvswitch-agent neutron neutron-openvswitch-agent \
os-svc-daemon -i "$NEUTRON_VENV_DIR" neutron-openvswitch-agent neutron neutron-openvswitch-agent \
"--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini --config-dir /etc/neutron"

View File

@ -14,5 +14,4 @@ if [[ "RedHatEnterpriseServer CentOS Fedora" =~ "$DISTRO" ]]; then
# https://bugzilla.redhat.com/show_bug.cgi?id=1057615
rm -f /usr/lib/python2.7/site-packages/neutron-*.egg-info/requires.txt
fi
os-svc-daemon -n neutron-server -u neutron -c noop -d
os-svc-daemon -i "$NEUTRON_VENV_DIR" -n neutron-server -u neutron -c noop -d

View File

@ -1,3 +1,3 @@
#!/bin/bash
os-svc-daemon neutron-server neutron neutron-server \
os-svc-daemon -i "$NEUTRON_VENV_DIR" neutron-server neutron neutron-server \
"--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini --config-dir /etc/neutron"

View File

@ -1,10 +1,10 @@
#!/bin/bash
set -eux
os-svc-daemon nova-api nova nova-api "--config-dir /etc/nova"
os-svc-daemon nova-cert nova nova-cert "--config-dir /etc/nova"
os-svc-daemon nova-scheduler nova nova-scheduler "--config-dir /etc/nova --debug"
os-svc-daemon nova-consoleauth nova nova-consoleauth "--config-dir /etc/nova"
os-svc-daemon nova-conductor nova nova-conductor "--config-dir /etc/nova"
os-svc-daemon -i "$NOVA_VENV_DIR" nova-api nova nova-api "--config-dir /etc/nova"
os-svc-daemon -i "$NOVA_VENV_DIR" nova-cert nova nova-cert "--config-dir /etc/nova"
os-svc-daemon -i "$NOVA_VENV_DIR" nova-scheduler nova nova-scheduler "--config-dir /etc/nova --debug"
os-svc-daemon -i "$NOVA_VENV_DIR" nova-consoleauth nova nova-consoleauth "--config-dir /etc/nova"
os-svc-daemon -i "$NOVA_VENV_DIR" nova-conductor nova nova-conductor "--config-dir /etc/nova"
ln -s $NOVA_VENV_DIR/bin/nova-manage /usr/local/bin/nova-manage

View File

@ -8,7 +8,7 @@ if [[ "RedHatEnterpriseServer CentOS Fedora" =~ "$DISTRO" ]]; then
# This is a fix so that we can use the service file from the source install
# with our packaged nova-baremetal-deploy-helper, which is missing the service:
# https://bugzilla.redhat.com/show_bug.cgi?id=1055788
os-svc-daemon nova-baremetal-deploy-helper nova nova-baremetal-deploy-helper "--config-dir /etc/nova"
os-svc-daemon -i "$NOVA_VENV_DIR" nova-baremetal-deploy-helper nova nova-baremetal-deploy-helper "--config-dir /etc/nova"
mkdir -p $NOVA_VENV_DIR/bin/
ln -s /bin/nova-baremetal-deploy-helper $NOVA_VENV_DIR/bin/nova-baremetal-deploy-helper

View File

@ -1,6 +1,6 @@
#!/bin/bash
set -eux
os-svc-daemon nova-baremetal-deploy-helper nova nova-baremetal-deploy-helper "--config-dir /etc/nova"
os-svc-daemon -i "$NOVA_VENV_DIR" nova-baremetal-deploy-helper nova nova-baremetal-deploy-helper "--config-dir /etc/nova"
ln -s $NOVA_VENV_DIR/bin/nova-baremetal-manage /usr/local/bin/nova-baremetal-manage

View File

@ -11,4 +11,4 @@ install-packages openstack-nova-compute
rm -f /etc/libvirt/qemu/networks/autostart/default.xml
rm -f /etc/libvirt/qemu/networks/default.xml
os-svc-daemon -n nova-compute -u nova -c noop -d
os-svc-daemon -i "$NOVA_VENV_DIR" -n nova-compute -u nova -c noop -d

View File

@ -6,7 +6,7 @@ install-packages ebtables qemu-utils syslinux
# LIBVIRT_DEFAULT_URI needs to be set due to
# https://bugs.launchpad.net/tripleo/+bug/1226310
os-svc-daemon -e "LIBVIRT_DEFAULT_URI=qemu:///system" nova-compute nova nova-compute "--config-dir /etc/nova"
os-svc-daemon -i "$NOVA_VENV_DIR" -e "LIBVIRT_DEFAULT_URI=qemu:///system" nova-compute nova nova-compute "--config-dir /etc/nova"
# Use the rootwrap config from the source repo.
install -o root -g root -m 0755 -d /etc/nova/rootwrap.d

View File

@ -11,7 +11,7 @@ fi
usermod -a -G libvirtd nova
os-svc-daemon nova-novncproxy nova nova-novncproxy "--config-dir /etc/nova"
os-svc-daemon -i "$NOVA_VENV_DIR" nova-novncproxy nova nova-novncproxy "--config-dir /etc/nova"
os-svc-enable -n nova-novncproxy
# On Fedora configure polkit to allow nova to use libvirt

View File

@ -5,4 +5,4 @@ set -eux
# This is only needed if using keystone auth, so isn't in requirements.txt
$SWIFT_VENV_DIR/bin/pip install python-keystoneclient
os-svc-daemon swift-proxy swift swift-proxy-server "/etc/swift/proxy-server.conf"
os-svc-daemon -i "$SWIFT_VENV_DIR" swift-proxy swift swift-proxy-server "/etc/swift/proxy-server.conf"

View File

@ -2,18 +2,18 @@
set -eux
os-svc-daemon swift-account swift swift-account-server /etc/swift/account-server.conf
os-svc-daemon swift-account-auditor swift swift-account-auditor /etc/swift/account-server.conf
os-svc-daemon swift-account-reaper swift swift-account-reaper /etc/swift/account-server.conf
os-svc-daemon swift-account-replicator swift swift-account-replicator /etc/swift/account-server.conf
os-svc-daemon -i "$SWIFT_VENV_DIR" swift-account swift swift-account-server /etc/swift/account-server.conf
os-svc-daemon -i "$SWIFT_VENV_DIR" swift-account-auditor swift swift-account-auditor /etc/swift/account-server.conf
os-svc-daemon -i "$SWIFT_VENV_DIR" swift-account-reaper swift swift-account-reaper /etc/swift/account-server.conf
os-svc-daemon -i "$SWIFT_VENV_DIR" swift-account-replicator swift swift-account-replicator /etc/swift/account-server.conf
os-svc-daemon swift-container swift swift-container-server /etc/swift/container-server.conf
os-svc-daemon swift-container-auditor swift swift-container-auditor /etc/swift/container-server.conf
os-svc-daemon swift-container-replicator swift swift-container-replicator /etc/swift/container-server.conf
os-svc-daemon swift-container-sync swift swift-container-sync /etc/swift/container-server.conf
os-svc-daemon swift-container-updater swift swift-container-updater /etc/swift/container-server.conf
os-svc-daemon -i "$SWIFT_VENV_DIR" swift-container swift swift-container-server /etc/swift/container-server.conf
os-svc-daemon -i "$SWIFT_VENV_DIR" swift-container-auditor swift swift-container-auditor /etc/swift/container-server.conf
os-svc-daemon -i "$SWIFT_VENV_DIR" swift-container-replicator swift swift-container-replicator /etc/swift/container-server.conf
os-svc-daemon -i "$SWIFT_VENV_DIR" swift-container-sync swift swift-container-sync /etc/swift/container-server.conf
os-svc-daemon -i "$SWIFT_VENV_DIR" swift-container-updater swift swift-container-updater /etc/swift/container-server.conf
os-svc-daemon swift-object swift swift-object-server /etc/swift/object-server.conf
os-svc-daemon swift-object-auditor swift swift-object-auditor /etc/swift/object-server.conf
os-svc-daemon swift-object-replicator swift swift-object-replicator /etc/swift/object-server.conf
os-svc-daemon swift-object-updater swift swift-object-updater /etc/swift/object-server.conf
os-svc-daemon -i "$SWIFT_VENV_DIR" swift-object swift swift-object-server /etc/swift/object-server.conf
os-svc-daemon -i "$SWIFT_VENV_DIR" swift-object-auditor swift swift-object-auditor /etc/swift/object-server.conf
os-svc-daemon -i "$SWIFT_VENV_DIR" swift-object-replicator swift swift-object-replicator /etc/swift/object-server.conf
os-svc-daemon -i "$SWIFT_VENV_DIR" swift-object-updater swift swift-object-updater /etc/swift/object-server.conf

View File

@ -8,6 +8,6 @@ install -d -m 0750 -o tuskar -g tuskar /etc/tuskar
cp -a /opt/stack/tuskar/etc/tuskar/policy.json /etc/tuskar
cp -a /opt/stack/tuskar/etc/tuskar/tripleo-heat-templates /etc/tuskar
os-svc-daemon tuskar-api tuskar tuskar-api "--config-dir /etc/tuskar"
os-svc-daemon -i "$TUSKAR_VENV_DIR" tuskar-api tuskar tuskar-api "--config-dir /etc/tuskar"
ln -s $TUSKAR_VENV_DIR/bin/tuskar-dbsync /usr/local/bin/tuskar-dbsync