aboutsummaryrefslogtreecommitdiff
path: root/docker/centos/binary/nova-controller/nova-api
diff options
context:
space:
mode:
authorPaul Bourke <paul.bourke@oracle.com>2015-06-17 11:14:59 +0000
committerPaul Bourke <paul.bourke@oracle.com>2015-06-19 17:12:05 +0000
commit897337cdd61f1702aa7e68da0466804bf0d21a86 (patch)
treed8489ef0f286ff69f10ebe0b42eca6cf8b1cc123 /docker/centos/binary/nova-controller/nova-api
parentc2b05b576f45ddf432571f817be45e6bcb188f75 (diff)
downloadkolla-897337cdd61f1702aa7e68da0466804bf0d21a86.tar.gz
kolla-897337cdd61f1702aa7e68da0466804bf0d21a86.zip
Symlink all non Dockerfile resources in images
The only files in the docker image directories that differ majorly between distros are the Dockerfiles (e.g. different package manager mechanisms, different repo sources, etc). The supporting files such as the start.sh/check.sh and config files should largely stay the same between base images. This change moves these files up into a "common" directory, and symlinks them in the same way that the build script is managed. This means when adding a new base distro only new Dockerfiles need to be created. Also, if a distro does happen to require a vastly different start.sh script for example, one can choose to simply not symlink to the common and instead drop in a custom one. Implements: blueprint refactor-base-image-layout Change-Id: Ic4db69d31ff54a1fb95af4853a2e5ae490064284
Diffstat (limited to 'docker/centos/binary/nova-controller/nova-api')
l---------[-rwxr-xr-x]docker/centos/binary/nova-controller/nova-api/check.sh18
l---------[-rwxr-xr-x]docker/centos/binary/nova-controller/nova-api/start.sh47
2 files changed, 2 insertions, 63 deletions
diff --git a/docker/centos/binary/nova-controller/nova-api/check.sh b/docker/centos/binary/nova-controller/nova-api/check.sh
index b250682d8..2a047038e 100755..120000
--- a/docker/centos/binary/nova-controller/nova-api/check.sh
+++ b/docker/centos/binary/nova-controller/nova-api/check.sh
@@ -1,17 +1 @@
-#!/bin/bash
-
-RES=0
-
-. /openrc
-if ! keystone token-get > /dev/null; then
- echo "ERROR: keystone token-get failed" >&2
- RES=1
-else
- if ! nova list > /dev/null; then
- echo "ERROR: nova list failed" >&2
- RES=1
- fi
-fi
-
-exit $RES
-
+../../../../common/nova-controller/nova-api/check.sh \ No newline at end of file
diff --git a/docker/centos/binary/nova-controller/nova-api/start.sh b/docker/centos/binary/nova-controller/nova-api/start.sh
index 7928370a4..7613d713a 100755..120000
--- a/docker/centos/binary/nova-controller/nova-api/start.sh
+++ b/docker/centos/binary/nova-controller/nova-api/start.sh
@@ -1,46 +1 @@
-#!/bin/bash
-
-set -e
-
-. /opt/kolla/config-nova.sh
-
-check_required_vars KEYSTONE_ADMIN_TOKEN KEYSTONE_ADMIN_SERVICE_HOST \
- NOVA_KEYSTONE_USER NOVA_KEYSTONE_PASSWORD \
- ADMIN_TENANT_NAME NOVA_API_SERVICE_HOST \
- NOVA_EC2_API_SERVICE_HOST PUBLIC_IP NOVA_DB_NAME
-fail_unless_os_service_running keystone
-fail_unless_db $NOVA_DB_NAME
-
-export SERVICE_TOKEN="${KEYSTONE_ADMIN_TOKEN}"
-export SERVICE_ENDPOINT="http://${KEYSTONE_ADMIN_SERVICE_HOST}:35357/v2.0"
-
-cfg=/etc/nova/nova.conf
-
-# configure logging
-crudini --set $cfg DEFAULT log_file "${NOVA_API_LOG_FILE}"
-
-crux user-create --update \
- -n "${NOVA_KEYSTONE_USER}" \
- -p "${NOVA_KEYSTONE_PASSWORD}" \
- -t "${ADMIN_TENANT_NAME}" \
- -r admin
-
-crux endpoint-create --remove-all \
- -n ec2 -t ec2 \
- -I "http://${NOVA_EC2_API_SERVICE_HOST}:8773/services/Cloud" \
- -P "http://${PUBLIC_IP}:8773/services/Cloud" \
- -A "http://${NOVA_EC2_API_SERVICE_HOST}:8773/services/Admin"
-
-crux endpoint-create --remove-all \
- -n nova -t compute \
- -I "http://${NOVA_API_SERVICE_HOST}:8774/v2/\$(tenant_id)s" \
- -P "http://${PUBLIC_IP}:8774/v2/\$(tenant_id)s" \
- -A "http://${NOVA_API_SERVICE_HOST}:8774/v2/\$(tenant_id)s"
-
-crux endpoint-create --remove-all \
- -n novav3 -t computev3 \
- -I "http://${NOVA_API_SERVICE_HOST}:8774/v3" \
- -P "http://${PUBLIC_IP}:8774/v3" \
- -A "http://${NOVA_API_SERVICE_HOST}:8774/v3"
-
-exec /usr/bin/nova-api --config-file /etc/nova/nova.conf
+../../../../common/nova-controller/nova-api/start.sh \ No newline at end of file