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
| ... | ... |
@@ -189,6 +189,7 @@ function init_heat() {
|
| 189 | 189 |
mysql -u$MYSQL_USER -p$MYSQL_PASSWORD -e 'CREATE DATABASE heat CHARACTER SET utf8;' |
| 190 | 190 |
|
| 191 | 191 |
$HEAT_DIR/bin/heat-db-setup $os_PACKAGE -r $MYSQL_PASSWORD |
| 192 |
+ $HEAT_DIR/tools/nova_create_flavors.sh |
|
| 192 | 193 |
} |
| 193 | 194 |
|
| 194 | 195 |
# install_heat() - Collect source and prepare |
| ... | ... |
@@ -1889,15 +1889,6 @@ else |
| 1889 | 1889 |
fi |
| 1890 | 1890 |
|
| 1891 | 1891 |
|
| 1892 |
-# Heat |
|
| 1893 |
-# ---- |
|
| 1894 |
- |
|
| 1895 |
-if is_service_enabled heat; then |
|
| 1896 |
- echo_summary "Configuring Heat" |
|
| 1897 |
- init_heat |
|
| 1898 |
-fi |
|
| 1899 |
- |
|
| 1900 |
- |
|
| 1901 | 1892 |
# Launch Services |
| 1902 | 1893 |
# =============== |
| 1903 | 1894 |
|
| ... | ... |
@@ -2017,8 +2008,12 @@ screen_it swift "cd $SWIFT_DIR && $SWIFT_DIR/bin/swift-proxy-server ${SWIFT_CONF
|
| 2017 | 2017 |
is_service_enabled swift3 || \ |
| 2018 | 2018 |
screen_it n-obj "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-objectstore" |
| 2019 | 2019 |
|
| 2020 |
-# launch heat engine, api and metadata |
|
| 2020 |
+ |
|
| 2021 |
+# Configure and launch heat engine, api and metadata |
|
| 2021 | 2022 |
if is_service_enabled heat; then |
| 2023 |
+ # Initialize heat, including replacing nova flavors |
|
| 2024 |
+ echo_summary "Configuring Heat" |
|
| 2025 |
+ init_heat |
|
| 2022 | 2026 |
echo_summary "Starting Heat" |
| 2023 | 2027 |
start_heat |
| 2024 | 2028 |
fi |
| ... | ... |
@@ -2090,6 +2085,11 @@ if is_service_enabled horizon; then |
| 2090 | 2090 |
echo "Horizon is now available at http://$SERVICE_HOST/" |
| 2091 | 2091 |
fi |
| 2092 | 2092 |
|
| 2093 |
+# Warn that the default flavors have been changed by Heat |
|
| 2094 |
+if is_service_enabled heat; then |
|
| 2095 |
+ echo "Heat has replaced the default flavors. View by running: nova flavor-list" |
|
| 2096 |
+fi |
|
| 2097 |
+ |
|
| 2093 | 2098 |
# If Keystone is present you can point ``nova`` cli to this server |
| 2094 | 2099 |
if is_service_enabled key; then |
| 2095 | 2100 |
echo "Keystone is serving at $KEYSTONE_AUTH_PROTOCOL://$SERVICE_HOST:$KEYSTONE_API_PORT/v2.0/" |