aboutsummaryrefslogtreecommitdiff
path: root/docker/nova/nova-scheduler
diff options
context:
space:
mode:
Diffstat (limited to 'docker/nova/nova-scheduler')
-rw-r--r--docker/nova/nova-scheduler/Dockerfile.j218
-rwxr-xr-xdocker/nova/nova-scheduler/config-external.sh10
-rwxr-xr-xdocker/nova/nova-scheduler/start.sh13
3 files changed, 41 insertions, 0 deletions
diff --git a/docker/nova/nova-scheduler/Dockerfile.j2 b/docker/nova/nova-scheduler/Dockerfile.j2
new file mode 100644
index 000000000..5dd0fd507
--- /dev/null
+++ b/docker/nova/nova-scheduler/Dockerfile.j2
@@ -0,0 +1,18 @@
+FROM {{ namespace }}/{{ base_distro }}-{{ install_type }}-nova-base:{{ tag }}
+MAINTAINER Kolla Project (https://launchpad.net/kolla)
+
+{% if install_type == 'binary' %}
+ {% if base_distro in ['fedora', 'centos', 'oraclelinux'] %}
+
+RUN yum -y install openstack-nova-scheduler \
+ && yum clean all
+
+ {% endif %}
+{% endif %}
+
+COPY start.sh /
+COPY config-external.sh /opt/kolla/
+
+CMD ["/start.sh"]
+
+{{ include_footer }}
diff --git a/docker/nova/nova-scheduler/config-external.sh b/docker/nova/nova-scheduler/config-external.sh
new file mode 100755
index 000000000..3df0f9b7b
--- /dev/null
+++ b/docker/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/nova/nova-scheduler/start.sh b/docker/nova/nova-scheduler/start.sh
new file mode 100755
index 000000000..d9b3e14eb
--- /dev/null
+++ b/docker/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