diff options
Diffstat (limited to 'docker_templates/nova')
16 files changed, 198 insertions, 16 deletions
diff --git a/docker_templates/nova/nova-api/config-external.sh b/docker_templates/nova/nova-api/config-external.sh index bfa5b09c0..d0859893d 120000..100755 --- a/docker_templates/nova/nova-api/config-external.sh +++ b/docker_templates/nova/nova-api/config-external.sh @@ -1 +1,10 @@ -../../../docker/common/nova/nova-api/config-external.sh
\ No newline at end of file +#!/bin/bash +SOURCE="/opt/kolla/nova-api/nova.conf" +TARGET="/etc/nova/nova.conf" +OWNER="nova" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker_templates/nova/nova-api/start.sh b/docker_templates/nova/nova-api/start.sh index e4407856e..ad25ba65c 120000..100755 --- a/docker_templates/nova/nova-api/start.sh +++ b/docker_templates/nova/nova-api/start.sh @@ -1 +1,20 @@ -../../../docker/common/nova/nova-api/start.sh
\ No newline at end of file +#!/bin/bash +set -o errexit + +CMD="/usr/bin/nova-api" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases +# of the KOLLA_BOOTSTRAP variable being set, including empty. +if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then + su -s /bin/sh -c "nova-manage db sync" nova + exit 0 +fi + +exec $CMD $ARGS diff --git a/docker_templates/nova/nova-compute/config-external.sh b/docker_templates/nova/nova-compute/config-external.sh index f04828004..e844bf50c 120000..100755 --- a/docker_templates/nova/nova-compute/config-external.sh +++ b/docker_templates/nova/nova-compute/config-external.sh @@ -1 +1,10 @@ -../../../docker/common/nova/nova-compute/config-external.sh
\ No newline at end of file +#!/bin/bash +SOURCE="/opt/kolla/nova-compute/nova.conf" +TARGET="/etc/nova/nova.conf" +OWNER="nova" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker_templates/nova/nova-compute/start.sh b/docker_templates/nova/nova-compute/start.sh index 6745e03e6..48e77542b 120000..100755 --- a/docker_templates/nova/nova-compute/start.sh +++ b/docker_templates/nova/nova-compute/start.sh @@ -1 +1,13 @@ -../../../docker/common/nova/nova-compute/start.sh
\ No newline at end of file +#!/bin/bash +set -o errexit + +CMD="/usr/bin/nova-compute" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker_templates/nova/nova-conductor/config-external.sh b/docker_templates/nova/nova-conductor/config-external.sh index 0f8937e2d..ea3b123ec 120000..100755 --- a/docker_templates/nova/nova-conductor/config-external.sh +++ b/docker_templates/nova/nova-conductor/config-external.sh @@ -1 +1,10 @@ -../../../docker/common/nova/nova-conductor/config-external.sh
\ No newline at end of file +#!/bin/bash +SOURCE="/opt/kolla/nova-conductor/nova.conf" +TARGET="/etc/nova/nova.conf" +OWNER="nova" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker_templates/nova/nova-conductor/start.sh b/docker_templates/nova/nova-conductor/start.sh index bd27c2681..1fe7d0586 120000..100755 --- a/docker_templates/nova/nova-conductor/start.sh +++ b/docker_templates/nova/nova-conductor/start.sh @@ -1 +1,13 @@ -../../../docker/common/nova/nova-conductor/start.sh
\ No newline at end of file +#!/bin/bash +set -o errexit + +CMD="/usr/bin/nova-conductor" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker_templates/nova/nova-consoleauth/config-external.sh b/docker_templates/nova/nova-consoleauth/config-external.sh index 90fedb172..1da10d83f 120000..100755 --- a/docker_templates/nova/nova-consoleauth/config-external.sh +++ b/docker_templates/nova/nova-consoleauth/config-external.sh @@ -1 +1,10 @@ -../../../docker/common/nova/nova-consoleauth/config-external.sh
\ No newline at end of file +#!/bin/bash +SOURCE="/opt/kolla/nova-consoleauth/nova.conf" +TARGET="/etc/nova/nova.conf" +OWNER="nova" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker_templates/nova/nova-consoleauth/start.sh b/docker_templates/nova/nova-consoleauth/start.sh index 23339e5d9..1abccde19 120000..100755 --- a/docker_templates/nova/nova-consoleauth/start.sh +++ b/docker_templates/nova/nova-consoleauth/start.sh @@ -1 +1,13 @@ -../../../docker/common/nova/nova-consoleauth/start.sh
\ No newline at end of file +#!/bin/bash +set -o errexit + +CMD="/usr/bin/nova-consoleauth" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker_templates/nova/nova-libvirt/config-external.sh b/docker_templates/nova/nova-libvirt/config-external.sh index cdcc6cc68..acc1c5473 120000..100755 --- a/docker_templates/nova/nova-libvirt/config-external.sh +++ b/docker_templates/nova/nova-libvirt/config-external.sh @@ -1 +1,10 @@ -../../../docker/common/nova/nova-libvirt/config-external.sh
\ No newline at end of file +#!/bin/bash +SOURCE="/opt/kolla/libvirt/libvirtd.conf" +TARGET="/etc/libvirt/libvirtd.conf" +OWNER="libvirt" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker_templates/nova/nova-libvirt/start.sh b/docker_templates/nova/nova-libvirt/start.sh index 8188547e1..ae0de867b 120000..100755 --- a/docker_templates/nova/nova-libvirt/start.sh +++ b/docker_templates/nova/nova-libvirt/start.sh @@ -1 +1,20 @@ -../../../docker/common/nova/nova-libvirt/start.sh
\ No newline at end of file +#!/bin/bash +set -o errexit + +CMD="/usr/sbin/libvirtd" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +# TODO(SamYaple): Tweak libvirt.conf rather than change permissions. +# Fix permissions for libvirt +if [[ -c /dev/kvm ]]; then + chmod 660 /dev/kvm + chown root:kvm /dev/kvm +fi + +exec $CMD $ARGS diff --git a/docker_templates/nova/nova-network/config-external.sh b/docker_templates/nova/nova-network/config-external.sh index 02cf8efee..7c1d6bb37 120000..100755 --- a/docker_templates/nova/nova-network/config-external.sh +++ b/docker_templates/nova/nova-network/config-external.sh @@ -1 +1,10 @@ -../../../docker/common/nova/nova-network/config-external.sh
\ No newline at end of file +#!/bin/bash +SOURCE="/opt/kolla/nova-network/nova.conf" +TARGET="/etc/nova/nova.conf" +OWNER="nova" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker_templates/nova/nova-network/start.sh b/docker_templates/nova/nova-network/start.sh index ce608a5d4..88f941b33 120000..100755 --- a/docker_templates/nova/nova-network/start.sh +++ b/docker_templates/nova/nova-network/start.sh @@ -1 +1,13 @@ -../../../docker/common/nova/nova-network/start.sh
\ No newline at end of file +#!/bin/bash +set -o errexit + +CMD="/usr/bin/nova-network" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker_templates/nova/nova-novncproxy/config-external.sh b/docker_templates/nova/nova-novncproxy/config-external.sh index 87797c27c..fdc33a5bd 120000..100755 --- a/docker_templates/nova/nova-novncproxy/config-external.sh +++ b/docker_templates/nova/nova-novncproxy/config-external.sh @@ -1 +1,10 @@ -../../../docker/common/nova/nova-novncproxy/config-external.sh
\ No newline at end of file +#!/bin/bash +SOURCE="/opt/kolla/nova-novncproxy/nova.conf" +TARGET="/etc/nova/nova.conf" +OWNER="nova" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker_templates/nova/nova-novncproxy/start.sh b/docker_templates/nova/nova-novncproxy/start.sh index 36d3f1a45..6e59d1253 120000..100755 --- a/docker_templates/nova/nova-novncproxy/start.sh +++ b/docker_templates/nova/nova-novncproxy/start.sh @@ -1 +1,13 @@ -../../../docker/common/nova/nova-novncproxy/start.sh
\ No newline at end of file +#!/bin/bash +set -o errexit + +CMD="/usr/bin/nova-novncproxy" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS diff --git a/docker_templates/nova/nova-scheduler/config-external.sh b/docker_templates/nova/nova-scheduler/config-external.sh index 4021bbbda..3df0f9b7b 120000..100755 --- a/docker_templates/nova/nova-scheduler/config-external.sh +++ b/docker_templates/nova/nova-scheduler/config-external.sh @@ -1 +1,10 @@ -../../../docker/common/nova/nova-scheduler/config-external.sh
\ No newline at end of file +#!/bin/bash +SOURCE="/opt/kolla/nova-scheduler/nova.conf" +TARGET="/etc/nova/nova.conf" +OWNER="nova" + +if [[ -f "$SOURCE" ]]; then + cp $SOURCE $TARGET + chown ${OWNER}: $TARGET + chmod 0644 $TARGET +fi diff --git a/docker_templates/nova/nova-scheduler/start.sh b/docker_templates/nova/nova-scheduler/start.sh index cd2206191..d9b3e14eb 120000..100755 --- a/docker_templates/nova/nova-scheduler/start.sh +++ b/docker_templates/nova/nova-scheduler/start.sh @@ -1 +1,13 @@ -../../../docker/common/nova/nova-scheduler/start.sh
\ No newline at end of file +#!/bin/bash +set -o errexit + +CMD="/usr/bin/nova-scheduler" +ARGS="" + +# Loading common functions. +source /opt/kolla/kolla-common.sh + +# Execute config strategy +set_configs + +exec $CMD $ARGS |
