If heat is enabled, replace nova flavors.

All heat users will need to run heat/tools/nova_create_flavors.sh as an admin
user. This change runs nova_create_flavors.sh if heat is enabled.

This saves the hassle of switching to an admin user and running this every time
devstack is started.

Flavors are changed in heat_init, so heat_init is deferred until after nova
is running.

Change-Id: I4576c83f5ef55809567e40e56c25eb0e1bbe6d45
This commit is contained in:
Steve Baker 2012-10-25 14:49:47 +13:00
parent 58ffa670cd
commit bad9d89fa0
2 changed files with 11 additions and 10 deletions

View File

@ -189,6 +189,7 @@ function init_heat() {
mysql -u$MYSQL_USER -p$MYSQL_PASSWORD -e 'CREATE DATABASE heat CHARACTER SET utf8;' mysql -u$MYSQL_USER -p$MYSQL_PASSWORD -e 'CREATE DATABASE heat CHARACTER SET utf8;'
$HEAT_DIR/bin/heat-db-setup $os_PACKAGE -r $MYSQL_PASSWORD $HEAT_DIR/bin/heat-db-setup $os_PACKAGE -r $MYSQL_PASSWORD
$HEAT_DIR/tools/nova_create_flavors.sh
} }
# install_heat() - Collect source and prepare # install_heat() - Collect source and prepare

View File

@ -1889,15 +1889,6 @@ else
fi fi
# Heat
# ----
if is_service_enabled heat; then
echo_summary "Configuring Heat"
init_heat
fi
# Launch Services # Launch Services
# =============== # ===============
@ -2017,8 +2008,12 @@ screen_it swift "cd $SWIFT_DIR && $SWIFT_DIR/bin/swift-proxy-server ${SWIFT_CONF
is_service_enabled swift3 || \ is_service_enabled swift3 || \
screen_it n-obj "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-objectstore" screen_it n-obj "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-objectstore"
# launch heat engine, api and metadata
# Configure and launch heat engine, api and metadata
if is_service_enabled heat; then if is_service_enabled heat; then
# Initialize heat, including replacing nova flavors
echo_summary "Configuring Heat"
init_heat
echo_summary "Starting Heat" echo_summary "Starting Heat"
start_heat start_heat
fi fi
@ -2090,6 +2085,11 @@ if is_service_enabled horizon; then
echo "Horizon is now available at http://$SERVICE_HOST/" echo "Horizon is now available at http://$SERVICE_HOST/"
fi fi
# Warn that the default flavors have been changed by Heat
if is_service_enabled heat; then
echo "Heat has replaced the default flavors. View by running: nova flavor-list"
fi
# If Keystone is present you can point ``nova`` cli to this server # If Keystone is present you can point ``nova`` cli to this server
if is_service_enabled key; then if is_service_enabled key; then
echo "Keystone is serving at $KEYSTONE_AUTH_PROTOCOL://$SERVICE_HOST:$KEYSTONE_API_PORT/v2.0/" echo "Keystone is serving at $KEYSTONE_AUTH_PROTOCOL://$SERVICE_HOST:$KEYSTONE_API_PORT/v2.0/"