From c77b932e16398eebb810501973f6c8a706a3ba58 Mon Sep 17 00:00:00 2001 From: Dean Troyer Date: Fri, 29 Mar 2013 10:51:01 -0500 Subject: [PATCH] Move glace's swift config to lib/glance Change-Id: Icbb355c15bfffe17725ea5cc64cfa5e76c1e74e6 --- lib/glance | 9 +++++++++ stack.sh | 10 ---------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/lib/glance b/lib/glance index edf6982a63..e9d05622f8 100644 --- a/lib/glance +++ b/lib/glance @@ -116,6 +116,15 @@ function configure_glance() { iniset_rpc_backend glance $GLANCE_API_CONF DEFAULT iniset $GLANCE_API_CONF keystone_authtoken signing_dir $GLANCE_AUTH_CACHE_DIR/api + # Store the images in swift if enabled. + if is_service_enabled s-proxy; then + iniset $GLANCE_API_CONF DEFAULT default_store swift + iniset $GLANCE_API_CONF DEFAULT swift_store_auth_address $KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_SERVICE_PORT/v2.0/ + iniset $GLANCE_API_CONF DEFAULT swift_store_user $SERVICE_TENANT_NAME:glance + iniset $GLANCE_API_CONF DEFAULT swift_store_key $SERVICE_PASSWORD + iniset $GLANCE_API_CONF DEFAULT swift_store_create_container_on_put True + fi + cp -p $GLANCE_DIR/etc/glance-registry-paste.ini $GLANCE_REGISTRY_PASTE_INI cp -p $GLANCE_DIR/etc/glance-api-paste.ini $GLANCE_API_PASTE_INI diff --git a/stack.sh b/stack.sh index 0407c30df6..baf44b000e 100755 --- a/stack.sh +++ b/stack.sh @@ -826,17 +826,7 @@ fi if is_service_enabled g-reg; then echo_summary "Configuring Glance" - init_glance - - # Store the images in swift if enabled. - if is_service_enabled s-proxy; then - iniset $GLANCE_API_CONF DEFAULT default_store swift - iniset $GLANCE_API_CONF DEFAULT swift_store_auth_address $KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_SERVICE_PORT/v2.0/ - iniset $GLANCE_API_CONF DEFAULT swift_store_user $SERVICE_TENANT_NAME:glance - iniset $GLANCE_API_CONF DEFAULT swift_store_key $SERVICE_PASSWORD - iniset $GLANCE_API_CONF DEFAULT swift_store_create_container_on_put True - fi fi