Remove config-internal for Magnum

Change-Id: I766a434c736eb712818a31ae86a346706e8627d8
Partially-implements: blueprint remove-config-internal
This commit is contained in:
Sam Yaple 2015-08-07 18:29:38 +00:00
parent a5e907a8e9
commit 1581874da6
21 changed files with 13 additions and 171 deletions

View File

@ -5,9 +5,7 @@ RUN yum -y install \
openstack-magnum-api \ openstack-magnum-api \
&& yum clean all && yum clean all
COPY ./start.sh /start.sh COPY start.sh /
COPY ./check.sh /check.sh COPY config-external.sh /opt/kolla/
COPY config-internal.sh config-external.sh /opt/kolla/
CMD ["/start.sh"] CMD ["/start.sh"]

View File

@ -1 +0,0 @@
../../../../common/magnum/magnum-api/check.sh

View File

@ -1 +0,0 @@
../../../../common/magnum/magnum-api/config-internal.sh

View File

@ -4,5 +4,3 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla)
# Magnum is not yet in upstream RDO packaging # Magnum is not yet in upstream RDO packaging
RUN curl https://copr.fedoraproject.org/coprs/sdake/openstack-magnum/repo/epel-7/sdake-openstack-magnum-epel-7.repo -o /etc/yum.repos.d/sdake-openstack-magnum-epel-7.repo RUN curl https://copr.fedoraproject.org/coprs/sdake/openstack-magnum/repo/epel-7/sdake-openstack-magnum-epel-7.repo -o /etc/yum.repos.d/sdake-openstack-magnum-epel-7.repo
COPY config-magnum.sh /opt/kolla/

View File

@ -1 +0,0 @@
../../../../common/magnum/magnum-base/config-magnum.sh

View File

@ -9,8 +9,7 @@ RUN yum -y install \
# Install kubectl binary (ugh) # Install kubectl binary (ugh)
RUN cd /tmp && curl -L https://github.com/GoogleCloudPlatform/kubernetes/releases/download/v0.15.0/kubernetes.tar.gz -o /tmp/kubernetes.tar.gz && /usr/bin/tar -xzvf /tmp/kubernetes.tar.gz && cp -a /tmp/kubernetes/platforms/linux/amd64/kubectl /usr/bin/kubectl && rm -rf /tmp/kubernetes RUN cd /tmp && curl -L https://github.com/GoogleCloudPlatform/kubernetes/releases/download/v0.15.0/kubernetes.tar.gz -o /tmp/kubernetes.tar.gz && /usr/bin/tar -xzvf /tmp/kubernetes.tar.gz && cp -a /tmp/kubernetes/platforms/linux/amd64/kubectl /usr/bin/kubectl && rm -rf /tmp/kubernetes
COPY ./start.sh /start.sh COPY start.sh /
COPY config-external.sh /opt/kolla/
COPY config-internal.sh config-external.sh /opt/kolla/
CMD ["/start.sh"] CMD ["/start.sh"]

View File

@ -1 +0,0 @@
../../../../common/magnum/magnum-conductor/config-internal.sh

View File

@ -1,9 +1,7 @@
FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%magnum-base:%%KOLLA_TAG%% FROM %%KOLLA_NAMESPACE%%/%%KOLLA_PREFIX%%magnum-base:%%KOLLA_TAG%%
MAINTAINER Kolla Project (https://launchpad.net/kolla) MAINTAINER Kolla Project (https://launchpad.net/kolla)
COPY ./start.sh /start.sh COPY start.sh /
COPY ./check.sh /check.sh COPY config-external.sh /opt/kolla/
COPY config-internal.sh config-external.sh /opt/kolla/
CMD ["/start.sh"] CMD ["/start.sh"]

View File

@ -1 +0,0 @@
../../../../common/magnum/magnum-api/check.sh

View File

@ -1 +0,0 @@
../../../../common/magnum/magnum-api/config-internal.sh

View File

@ -11,5 +11,3 @@ RUN cd /magnum \
&& mkdir /etc/magnum /var/log/magnum \ && mkdir /etc/magnum /var/log/magnum \
&& cp -r /magnum/etc/* /etc/magnum/ \ && cp -r /magnum/etc/* /etc/magnum/ \
&& rm -rf /root/.cache && rm -rf /root/.cache
COPY config-magnum.sh /opt/kolla/

View File

@ -1 +0,0 @@
../../../../common/magnum/magnum-base/config-magnum.sh

View File

@ -4,8 +4,7 @@ MAINTAINER Kolla Project (https://launchpad.net/kolla)
# Install kubectl binary (ugh) # Install kubectl binary (ugh)
RUN cd /tmp && curl -L https://github.com/GoogleCloudPlatform/kubernetes/releases/download/v0.15.0/kubernetes.tar.gz -o /tmp/kubernetes.tar.gz && /usr/bin/tar -xzvf /tmp/kubernetes.tar.gz && cp -a /tmp/kubernetes/platforms/linux/amd64/kubectl /usr/bin/kubectl && rm -rf /tmp/kubernetes RUN cd /tmp && curl -L https://github.com/GoogleCloudPlatform/kubernetes/releases/download/v0.15.0/kubernetes.tar.gz -o /tmp/kubernetes.tar.gz && /usr/bin/tar -xzvf /tmp/kubernetes.tar.gz && cp -a /tmp/kubernetes/platforms/linux/amd64/kubectl /usr/bin/kubectl && rm -rf /tmp/kubernetes
COPY ./start.sh /start.sh COPY start.sh /
COPY config-external.sh /opt/kolla/
COPY config-internal.sh config-external.sh /opt/kolla/
CMD ["/start.sh"] CMD ["/start.sh"]

View File

@ -1 +0,0 @@
../../../../common/magnum/magnum-conductor/config-internal.sh

View File

@ -1,16 +0,0 @@
#!/bin/bash
RES=0
. /openrc
if ! keystone token-get > /dev/null; then
echo "ERROR: keystone token-get failed" >&2
RES=1
else
if ! heat stack-list > /dev/null; then
echo "ERROR: heat stack-list failed" >&2
RES=1
fi
fi
exit $RES

View File

@ -1,31 +0,0 @@
#!/bin/bash
set -e
. /opt/kolla/kolla-common.sh
. /opt/kolla/config-magnum.sh
check_required_vars ADMIN_TENANT_NAME \
KEYSTONE_ADMIN_SERVICE_HOST \
KEYSTONE_ADMIN_SERVICE_PORT \
KEYSTONE_ADMIN_TOKEN \
KEYSTONE_AUTH_PROTOCOL \
MAGNUM_API_SERVICE_HOST \
MAGNUM_API_SERVICE_PORT \
MAGNUM_KEYSTONE_PASSWORD \
MAGNUM_KEYSTONE_USER
fail_unless_os_service_running keystone
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 ${MAGNUM_KEYSTONE_USER} \
-p ${MAGNUM_KEYSTONE_PASSWORD} \
-t ${ADMIN_TENANT_NAME} \
-r admin
crux endpoint-create --remove-all -n ${MAGNUM_KEYSTONE_USER} -t container \
-I "${KEYSTONE_AUTH_PROTOCOL}://${MAGNUM_API_SERVICE_HOST}:${MAGNUM_API_SERVICE_PORT}/v1" \
-P "${KEYSTONE_AUTH_PROTOCOL}://${MAGNUM_API_SERVICE_HOST}:${MAGNUM_API_SERVICE_PORT}/v1" \
-A "${KEYSTONE_AUTH_PROTOCOL}://${MAGNUM_API_SERVICE_HOST}:${MAGNUM_API_SERVICE_PORT}/v1"
exec /usr/bin/magnum-api

View File

@ -7,7 +7,7 @@ ARGS=""
# Loading common functions. # Loading common functions.
source /opt/kolla/kolla-common.sh source /opt/kolla/kolla-common.sh
# Config-internal script exec out of this function, it does not return here. # Execute config strategy
set_configs set_configs
# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases # Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases

View File

@ -1,52 +0,0 @@
#!/bin/bash
set -e
. /opt/kolla/kolla-common.sh
check_required_vars ADMIN_TENANT_NAME \
DEBUG_LOGGING \
KEYSTONE_AUTH_PROTOCOL \
KEYSTONE_PUBLIC_SERVICE_HOST \
KEYSTONE_PUBLIC_SERVICE_PORT \
MAGNUM_DB_NAME \
MAGNUM_DB_PASSWORD \
MAGNUM_DB_USER \
MAGNUM_KEYSTONE_PASSWORD \
MAGNUM_KEYSTONE_USER \
RABBITMQ_SERVICE_HOST \
VERBOSE_LOGGING
fail_unless_db
dump_vars
cat > /openrc <<EOF
export OS_AUTH_URL="http://${KEYSTONE_PUBLIC_SERVICE_HOST}:${KEYSTONE_PUBLIC_SERVICE_PORT}/v2.0"
export OS_USERNAME="${MAGNUM_KEYSTONE_USER}"
export OS_PASSWORD="${MAGNUM_KEYSTONE_PASSWORD}"
export OS_TENANT_NAME="${ADMIN_TENANT_NAME}"
EOF
cfg=/etc/magnum/magnum.conf
crudini --set $cfg DEFAULT log_file ""
crudini --set $cfg DEFAULT verbose "${VERBOSE_LOGGING}"
crudini --set $cfg DEFAULT debug "${DEBUG_LOGGING}"
crudini --set $cfg DEFAULT use_stderr true
crudini --set $cfg DEFAULT rpc_backend magnum.openstack.common.rpc.impl_kombu
crudini --set $cfg DEFAULT admin_user admin
crudini --set $cfg oslo_messaging_rabbit rabbit_host ${RABBITMQ_SERVICE_HOST}
crudini --set $cfg oslo_messaging_rabbit rabbit_userid ${RABBIT_USER}
crudini --set $cfg oslo_messaging_rabbit rabbit_password ${RABBIT_PASSWORD}
crudini --set $cfg database connection \
mysql://${MAGNUM_DB_USER}:${MAGNUM_DB_PASSWORD}@${MARIADB_SERVICE_HOST}/${MAGNUM_DB_NAME}
crudini --set $cfg keystone_authtoken auth_protocol "${KEYSTONE_AUTH_PROTOCOL}"
crudini --set $cfg keystone_authtoken auth_host "${KEYSTONE_PUBLIC_SERVICE_HOST}"
crudini --set $cfg keystone_authtoken auth_port "${KEYSTONE_PUBLIC_SERVICE_PORT}"
crudini --set $cfg keystone_authtoken auth_uri \
"${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_PUBLIC_SERVICE_HOST}:${KEYSTONE_PUBLIC_SERVICE_PORT}/v2.0"
crudini --set $cfg keystone_authtoken admin_tenant_name "${ADMIN_TENANT_NAME}"
crudini --set $cfg keystone_authtoken admin_user "${MAGNUM_KEYSTONE_USER}"
crudini --set $cfg keystone_authtoken admin_password \
"${MAGNUM_KEYSTONE_PASSWORD}"
crudini --set $cfg api host ${MAGNUM_API_SERVICE_HOST}

View File

@ -1,20 +0,0 @@
#!/bin/bash
. /opt/kolla/kolla-common.sh
. /opt/kolla/config-magnum.sh
check_required_vars MAGNUM_DB_NAME \
MAGNUM_DB_PASSWORD \
MAGNUM_DB_USER
fail_unless_db
mysql -h ${MARIADB_SERVICE_HOST} -u root -p${DB_ROOT_PASSWORD} mysql <<EOF
CREATE DATABASE IF NOT EXISTS ${MAGNUM_DB_NAME} DEFAULT CHARACTER SET utf8;
GRANT ALL PRIVILEGES ON ${MAGNUM_DB_NAME}.* TO
'${MAGNUM_DB_USER}'@'%' IDENTIFIED BY '${MAGNUM_DB_PASSWORD}'
EOF
/usr/bin/magnum-db-manage upgrade
exec /usr/bin/magnum-conductor

View File

@ -8,7 +8,7 @@ ARGS=""
# Loading common functions. # Loading common functions.
source /opt/kolla/kolla-common.sh source /opt/kolla/kolla-common.sh
# Config-internal script exec out of this function, it does not return here. # Execute config strategy
set_configs set_configs
exec $CMD $ARGS exec $CMD $ARGS

View File

@ -335,36 +335,15 @@ In order for each service to function, there is a minimum set of required variab
# Magnum-api # Magnum-api
ADMIN_TENANT_NAME None
KEYSTONE_ADMIN_SERVICE_HOST
KEYSTONE_ADMIN_SERVICE_PORT
KEYSTONE_ADMIN_TOKEN
KEYSTONE_AUTH_PROTOCOL
MAGNUM_API_SERVICE_HOST
MAGNUM_API_SERVICE_PORT
MAGNUM_KEYSTONE_PASSWORD
MAGNUM_KEYSTONE_USER
# Magnum-base # Magnum-base
ADMIN_TENANT_NAME None
DEBUG_LOGGING
KEYSTONE_AUTH_PROTOCOL
KEYSTONE_PUBLIC_SERVICE_HOST
KEYSTONE_PUBLIC_SERVICE_PORT
MAGNUM_DB_NAME
MAGNUM_DB_PASSWORD
MAGNUM_DB_USER
MAGNUM_KEYSTONE_PASSWORD
MAGNUM_KEYSTONE_USER
RABBITMQ_SERVICE_HOST
VERBOSE_LOGGING
# Magnum-conductor # Magnum-conductor
MAGNUM_DB_NAME None
MAGNUM_DB_PASSWORD
MAGNUM_DB_USER
# Mariadb # Mariadb