diff options
| author | Paul Bourke <paul.bourke@oracle.com> | 2015-06-17 11:14:59 +0000 |
|---|---|---|
| committer | Paul Bourke <paul.bourke@oracle.com> | 2015-06-19 17:12:05 +0000 |
| commit | 897337cdd61f1702aa7e68da0466804bf0d21a86 (patch) | |
| tree | d8489ef0f286ff69f10ebe0b42eca6cf8b1cc123 /docker/centos/binary/ceilometer/ceilometer-api | |
| parent | c2b05b576f45ddf432571f817be45e6bcb188f75 (diff) | |
| download | kolla-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/ceilometer/ceilometer-api')
| l---------[-rw-r--r--] | docker/centos/binary/ceilometer/ceilometer-api/start.sh | 52 |
1 files changed, 1 insertions, 51 deletions
diff --git a/docker/centos/binary/ceilometer/ceilometer-api/start.sh b/docker/centos/binary/ceilometer/ceilometer-api/start.sh index f081c9f84..7acfa2cba 100644..120000 --- a/docker/centos/binary/ceilometer/ceilometer-api/start.sh +++ b/docker/centos/binary/ceilometer/ceilometer-api/start.sh @@ -1,51 +1 @@ -#!/bin/bash - -set -e - -. /opt/kolla/kolla-common.sh -. /opt/kolla/config-ceilometer.sh - -check_required_vars CEILOMETER_DB_USER CEILOMETER_DB_NAME \ - CEILOMETER_DB_PASSWORD KEYSTONE_ADMIN_TOKEN \ - KEYSTONE_AUTH_PROTOCOL KEYSTONE_ADMIN_SERVICE_HOST \ - KEYSTONE_ADMIN_SERVICE_PORT ADMIN_TENANT_NAME \ - CEILOMETER_KEYSTONE_USER CEILOMETER_ADMIN_PASSWORD \ - CEILOMETER_API_SERVICE_HOST PUBLIC_IP - -fail_unless_os_service_running keystone -fail_unless_db - -#TODO(pkilambi): Add mongodb support - -mysql -h ${MARIADB_SERVICE_HOST} -u root -p${DB_ROOT_PASSWORD} mysql <<EOF -CREATE DATABASE IF NOT EXISTS ${CEILOMETER_DB_NAME} DEFAULT CHARACTER SET utf8; -GRANT ALL PRIVILEGES ON ${CEILOMETER_DB_NAME}.* TO - '${CEILOMETER_DB_USER}'@'%' IDENTIFIED BY '${CEILOMETER_DB_PASSWORD}' - -EOF - - -export SERVICE_TOKEN="${KEYSTONE_ADMIN_TOKEN}" -export SERVICE_ENDPOINT="${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_ADMIN_SERVICE_HOST}:${KEYSTONE_ADMIN_SERVICE_PORT}/v2.0" - - -crux user-create -n ${CEILOMETER_KEYSTONE_USER} \ - -p ${CEILOMETER_ADMIN_PASSWORD} \ - -t ${ADMIN_TENANT_NAME} \ - -r admin - -crux service-create -n ${CEILOMETER_KEYSTONE_USER} -t metering \ - -d "Ceilometer Telemetry Service" - -crux endpoint-create i--remove-all -n ${CEILOMETER_KEYSTONE_USER} -t metering \ - -I "${KEYSTONE_AUTH_PROTOCOL}://${CEILOMETER_API_SERVICE_HOST}:8777" \ - -P "${KEYSTONE_AUTH_PROTOCOL}://${PUBLIC_IP}:8777" \ - -A "${KEYSTONE_AUTH_PROTOCOL}://${CEILOMETER_API_SERVICE_HOST}:8777" - -cfg=/etc/ceilometer/ceilometer.conf -crudini --set $cfg \ - DEFAULT connection - "mysql://${CEILOMETER_DB_USER}:${CEILOMETER_DB_PASSWORD}@${MARIADB_SERVICE_HOST}/${CEILOMETER_DB_NAME}" - - -exec /usr/bin/ceilometer-api +../../../../common/ceilometer/ceilometer-api/start.sh
\ No newline at end of file |
