From 9fe28bd22018bc140b5202786a3cecd6337ca973 Mon Sep 17 00:00:00 2001 From: Steven Dake Date: Thu, 27 Aug 2015 18:54:29 -0700 Subject: Move scripts for nova to docker_templates Change-Id: If00f0f2e3258b7b2876b42b4fbda3681c49c8127 Partially-Implements: blueprint remove-docker-dir --- docker_templates/nova/nova-api/config-external.sh | 11 ++++++++++- docker_templates/nova/nova-api/start.sh | 21 ++++++++++++++++++++- .../nova/nova-compute/config-external.sh | 11 ++++++++++- docker_templates/nova/nova-compute/start.sh | 14 +++++++++++++- .../nova/nova-conductor/config-external.sh | 11 ++++++++++- docker_templates/nova/nova-conductor/start.sh | 14 +++++++++++++- .../nova/nova-consoleauth/config-external.sh | 11 ++++++++++- docker_templates/nova/nova-consoleauth/start.sh | 14 +++++++++++++- .../nova/nova-libvirt/config-external.sh | 11 ++++++++++- docker_templates/nova/nova-libvirt/start.sh | 21 ++++++++++++++++++++- .../nova/nova-network/config-external.sh | 11 ++++++++++- docker_templates/nova/nova-network/start.sh | 14 +++++++++++++- .../nova/nova-novncproxy/config-external.sh | 11 ++++++++++- docker_templates/nova/nova-novncproxy/start.sh | 14 +++++++++++++- .../nova/nova-scheduler/config-external.sh | 11 ++++++++++- docker_templates/nova/nova-scheduler/start.sh | 14 +++++++++++++- 16 files changed, 198 insertions(+), 16 deletions(-) mode change 120000 => 100755 docker_templates/nova/nova-api/config-external.sh mode change 120000 => 100755 docker_templates/nova/nova-api/start.sh mode change 120000 => 100755 docker_templates/nova/nova-compute/config-external.sh mode change 120000 => 100755 docker_templates/nova/nova-compute/start.sh mode change 120000 => 100755 docker_templates/nova/nova-conductor/config-external.sh mode change 120000 => 100755 docker_templates/nova/nova-conductor/start.sh mode change 120000 => 100755 docker_templates/nova/nova-consoleauth/config-external.sh mode change 120000 => 100755 docker_templates/nova/nova-consoleauth/start.sh mode change 120000 => 100755 docker_templates/nova/nova-libvirt/config-external.sh mode change 120000 => 100755 docker_templates/nova/nova-libvirt/start.sh mode change 120000 => 100755 docker_templates/nova/nova-network/config-external.sh mode change 120000 => 100755 docker_templates/nova/nova-network/start.sh mode change 120000 => 100755 docker_templates/nova/nova-novncproxy/config-external.sh mode change 120000 => 100755 docker_templates/nova/nova-novncproxy/start.sh mode change 120000 => 100755 docker_templates/nova/nova-scheduler/config-external.sh mode change 120000 => 100755 docker_templates/nova/nova-scheduler/start.sh (limited to 'docker_templates/nova') diff --git a/docker_templates/nova/nova-api/config-external.sh b/docker_templates/nova/nova-api/config-external.sh deleted file mode 120000 index bfa5b09c0..000000000 --- a/docker_templates/nova/nova-api/config-external.sh +++ /dev/null @@ -1 +0,0 @@ -../../../docker/common/nova/nova-api/config-external.sh \ No newline at end of file diff --git a/docker_templates/nova/nova-api/config-external.sh b/docker_templates/nova/nova-api/config-external.sh new file mode 100755 index 000000000..d0859893d --- /dev/null +++ b/docker_templates/nova/nova-api/config-external.sh @@ -0,0 +1,10 @@ +#!/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 deleted file mode 120000 index e4407856e..000000000 --- a/docker_templates/nova/nova-api/start.sh +++ /dev/null @@ -1 +0,0 @@ -../../../docker/common/nova/nova-api/start.sh \ No newline at end of file diff --git a/docker_templates/nova/nova-api/start.sh b/docker_templates/nova/nova-api/start.sh new file mode 100755 index 000000000..ad25ba65c --- /dev/null +++ b/docker_templates/nova/nova-api/start.sh @@ -0,0 +1,20 @@ +#!/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 deleted file mode 120000 index f04828004..000000000 --- a/docker_templates/nova/nova-compute/config-external.sh +++ /dev/null @@ -1 +0,0 @@ -../../../docker/common/nova/nova-compute/config-external.sh \ No newline at end of file diff --git a/docker_templates/nova/nova-compute/config-external.sh b/docker_templates/nova/nova-compute/config-external.sh new file mode 100755 index 000000000..e844bf50c --- /dev/null +++ b/docker_templates/nova/nova-compute/config-external.sh @@ -0,0 +1,10 @@ +#!/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 deleted file mode 120000 index 6745e03e6..000000000 --- a/docker_templates/nova/nova-compute/start.sh +++ /dev/null @@ -1 +0,0 @@ -../../../docker/common/nova/nova-compute/start.sh \ No newline at end of file diff --git a/docker_templates/nova/nova-compute/start.sh b/docker_templates/nova/nova-compute/start.sh new file mode 100755 index 000000000..48e77542b --- /dev/null +++ b/docker_templates/nova/nova-compute/start.sh @@ -0,0 +1,13 @@ +#!/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 deleted file mode 120000 index 0f8937e2d..000000000 --- a/docker_templates/nova/nova-conductor/config-external.sh +++ /dev/null @@ -1 +0,0 @@ -../../../docker/common/nova/nova-conductor/config-external.sh \ No newline at end of file diff --git a/docker_templates/nova/nova-conductor/config-external.sh b/docker_templates/nova/nova-conductor/config-external.sh new file mode 100755 index 000000000..ea3b123ec --- /dev/null +++ b/docker_templates/nova/nova-conductor/config-external.sh @@ -0,0 +1,10 @@ +#!/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 deleted file mode 120000 index bd27c2681..000000000 --- a/docker_templates/nova/nova-conductor/start.sh +++ /dev/null @@ -1 +0,0 @@ -../../../docker/common/nova/nova-conductor/start.sh \ No newline at end of file diff --git a/docker_templates/nova/nova-conductor/start.sh b/docker_templates/nova/nova-conductor/start.sh new file mode 100755 index 000000000..1fe7d0586 --- /dev/null +++ b/docker_templates/nova/nova-conductor/start.sh @@ -0,0 +1,13 @@ +#!/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 deleted file mode 120000 index 90fedb172..000000000 --- a/docker_templates/nova/nova-consoleauth/config-external.sh +++ /dev/null @@ -1 +0,0 @@ -../../../docker/common/nova/nova-consoleauth/config-external.sh \ No newline at end of file diff --git a/docker_templates/nova/nova-consoleauth/config-external.sh b/docker_templates/nova/nova-consoleauth/config-external.sh new file mode 100755 index 000000000..1da10d83f --- /dev/null +++ b/docker_templates/nova/nova-consoleauth/config-external.sh @@ -0,0 +1,10 @@ +#!/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 deleted file mode 120000 index 23339e5d9..000000000 --- a/docker_templates/nova/nova-consoleauth/start.sh +++ /dev/null @@ -1 +0,0 @@ -../../../docker/common/nova/nova-consoleauth/start.sh \ No newline at end of file diff --git a/docker_templates/nova/nova-consoleauth/start.sh b/docker_templates/nova/nova-consoleauth/start.sh new file mode 100755 index 000000000..1abccde19 --- /dev/null +++ b/docker_templates/nova/nova-consoleauth/start.sh @@ -0,0 +1,13 @@ +#!/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 deleted file mode 120000 index cdcc6cc68..000000000 --- a/docker_templates/nova/nova-libvirt/config-external.sh +++ /dev/null @@ -1 +0,0 @@ -../../../docker/common/nova/nova-libvirt/config-external.sh \ No newline at end of file diff --git a/docker_templates/nova/nova-libvirt/config-external.sh b/docker_templates/nova/nova-libvirt/config-external.sh new file mode 100755 index 000000000..acc1c5473 --- /dev/null +++ b/docker_templates/nova/nova-libvirt/config-external.sh @@ -0,0 +1,10 @@ +#!/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 deleted file mode 120000 index 8188547e1..000000000 --- a/docker_templates/nova/nova-libvirt/start.sh +++ /dev/null @@ -1 +0,0 @@ -../../../docker/common/nova/nova-libvirt/start.sh \ No newline at end of file diff --git a/docker_templates/nova/nova-libvirt/start.sh b/docker_templates/nova/nova-libvirt/start.sh new file mode 100755 index 000000000..ae0de867b --- /dev/null +++ b/docker_templates/nova/nova-libvirt/start.sh @@ -0,0 +1,20 @@ +#!/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 deleted file mode 120000 index 02cf8efee..000000000 --- a/docker_templates/nova/nova-network/config-external.sh +++ /dev/null @@ -1 +0,0 @@ -../../../docker/common/nova/nova-network/config-external.sh \ No newline at end of file diff --git a/docker_templates/nova/nova-network/config-external.sh b/docker_templates/nova/nova-network/config-external.sh new file mode 100755 index 000000000..7c1d6bb37 --- /dev/null +++ b/docker_templates/nova/nova-network/config-external.sh @@ -0,0 +1,10 @@ +#!/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 deleted file mode 120000 index ce608a5d4..000000000 --- a/docker_templates/nova/nova-network/start.sh +++ /dev/null @@ -1 +0,0 @@ -../../../docker/common/nova/nova-network/start.sh \ No newline at end of file diff --git a/docker_templates/nova/nova-network/start.sh b/docker_templates/nova/nova-network/start.sh new file mode 100755 index 000000000..88f941b33 --- /dev/null +++ b/docker_templates/nova/nova-network/start.sh @@ -0,0 +1,13 @@ +#!/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 deleted file mode 120000 index 87797c27c..000000000 --- a/docker_templates/nova/nova-novncproxy/config-external.sh +++ /dev/null @@ -1 +0,0 @@ -../../../docker/common/nova/nova-novncproxy/config-external.sh \ No newline at end of file diff --git a/docker_templates/nova/nova-novncproxy/config-external.sh b/docker_templates/nova/nova-novncproxy/config-external.sh new file mode 100755 index 000000000..fdc33a5bd --- /dev/null +++ b/docker_templates/nova/nova-novncproxy/config-external.sh @@ -0,0 +1,10 @@ +#!/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 deleted file mode 120000 index 36d3f1a45..000000000 --- a/docker_templates/nova/nova-novncproxy/start.sh +++ /dev/null @@ -1 +0,0 @@ -../../../docker/common/nova/nova-novncproxy/start.sh \ No newline at end of file diff --git a/docker_templates/nova/nova-novncproxy/start.sh b/docker_templates/nova/nova-novncproxy/start.sh new file mode 100755 index 000000000..6e59d1253 --- /dev/null +++ b/docker_templates/nova/nova-novncproxy/start.sh @@ -0,0 +1,13 @@ +#!/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 deleted file mode 120000 index 4021bbbda..000000000 --- a/docker_templates/nova/nova-scheduler/config-external.sh +++ /dev/null @@ -1 +0,0 @@ -../../../docker/common/nova/nova-scheduler/config-external.sh \ No newline at end of file diff --git a/docker_templates/nova/nova-scheduler/config-external.sh b/docker_templates/nova/nova-scheduler/config-external.sh new file mode 100755 index 000000000..3df0f9b7b --- /dev/null +++ b/docker_templates/nova/nova-scheduler/config-external.sh @@ -0,0 +1,10 @@ +#!/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 deleted file mode 120000 index cd2206191..000000000 --- a/docker_templates/nova/nova-scheduler/start.sh +++ /dev/null @@ -1 +0,0 @@ -../../../docker/common/nova/nova-scheduler/start.sh \ No newline at end of file diff --git a/docker_templates/nova/nova-scheduler/start.sh b/docker_templates/nova/nova-scheduler/start.sh new file mode 100755 index 000000000..d9b3e14eb --- /dev/null +++ b/docker_templates/nova/nova-scheduler/start.sh @@ -0,0 +1,13 @@ +#!/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 -- cgit v1.2.3