blob: c9a3f7e6e2ee84f86e4874401b8c6fc948aeca7f [file] [log] [blame]
Sean Daguee263c822014-12-05 14:25:28 -05001#!/bin/bash
2#
Mate Lakat45ea0812013-09-25 10:00:29 +01003# lib/heat
Dean Troyer6d04fd72012-12-21 11:03:37 -06004# Install and start **Heat** service
5
Steve Bakerbfdad752012-08-18 09:00:42 +12006# To enable, add the following to localrc
Adam Spiers6a5aa7c2013-10-24 11:27:02 +01007#
8# ENABLED_SERVICES+=,heat,h-api,h-api-cfn,h-api-cw,h-eng
Steve Bakerbfdad752012-08-18 09:00:42 +12009
10# Dependencies:
Adam Spiers6a5aa7c2013-10-24 11:27:02 +010011#
Steve Bakerbfdad752012-08-18 09:00:42 +120012# - functions
Steven Hardy1f3f4b02015-01-14 10:52:03 +000013# - dib (if HEAT_CREATE_TEST_IMAGE=True)
Steve Bakerbfdad752012-08-18 09:00:42 +120014
15# stack.sh
16# ---------
Adam Spiers6a5aa7c2013-10-24 11:27:02 +010017# - install_heatclient
18# - install_heat
19# - configure_heatclient
20# - configure_heat
21# - init_heat
22# - start_heat
23# - stop_heat
24# - cleanup_heat
Steve Bakerbfdad752012-08-18 09:00:42 +120025
Dean Troyer7903b792012-09-13 17:16:12 -050026# Save trace setting
27XTRACE=$(set +o | grep xtrace)
28set +o xtrace
Steve Bakerbfdad752012-08-18 09:00:42 +120029
30
31# Defaults
32# --------
Dean Troyercc6b4432013-04-08 15:38:03 -050033
34# set up default directories
Sean Daguee08ab102014-11-13 17:09:28 -050035GITDIR["python-heatclient"]=$DEST/python-heatclient
Sean Dague5cb19062014-11-01 01:37:45 +010036
Steve Bakerbfdad752012-08-18 09:00:42 +120037HEAT_DIR=$DEST/heat
Steve Baker315971d2014-05-27 12:24:18 +120038HEAT_CFNTOOLS_DIR=$DEST/heat-cfntools
39HEAT_TEMPLATES_REPO_DIR=$DEST/heat-templates
Steve Bakerc3249082013-04-09 13:41:47 +120040HEAT_AUTH_CACHE_DIR=${HEAT_AUTH_CACHE_DIR:-/var/cache/heat}
Sean Dague53753292014-12-04 19:38:15 -050041HEAT_STANDALONE=$(trueorfalse False HEAT_STANDALONE)
42HEAT_ENABLE_ADOPT_ABANDON=$(trueorfalse False HEAT_ENABLE_ADOPT_ABANDON)
Angus Salkeldf645a852013-08-26 10:13:36 +100043HEAT_CONF_DIR=/etc/heat
Angus Salkelda213e2c2013-08-30 10:48:46 +100044HEAT_CONF=$HEAT_CONF_DIR/heat.conf
Angus Salkeldf645a852013-08-26 10:13:36 +100045HEAT_ENV_DIR=$HEAT_CONF_DIR/environment.d
Angus Salkeldfb71a272013-08-26 10:15:38 +100046HEAT_TEMPLATES_DIR=$HEAT_CONF_DIR/templates
Sean Dague53753292014-12-04 19:38:15 -050047HEAT_STACK_DOMAIN=$(trueorfalse True HEAT_STACK_DOMAIN)
Steve Bakere389aed2014-09-23 17:10:39 +120048HEAT_API_HOST=${HEAT_API_HOST:-$HOST_IP}
49HEAT_API_PORT=${HEAT_API_PORT:-8004}
Dean Troyercc6b4432013-04-08 15:38:03 -050050
Steven Hardyf83cf932014-03-12 16:54:01 +000051# other default options
52HEAT_DEFERRED_AUTH=${HEAT_DEFERRED_AUTH:-trusts}
53
Dean Troyer4237f592014-01-29 16:22:11 -060054# Tell Tempest this project is present
55TEMPEST_SERVICES+=,heat
56
57
Dean Troyercc6b4432013-04-08 15:38:03 -050058# Functions
59# ---------
Steve Bakerbfdad752012-08-18 09:00:42 +120060
Sean Dague29870cc2014-03-14 14:32:01 -040061# Test if any Heat services are enabled
62# is_heat_enabled
63function is_heat_enabled {
64 [[ ,${ENABLED_SERVICES} =~ ,"h-" ]] && return 0
65 return 1
66}
67
Steve Bakerbfdad752012-08-18 09:00:42 +120068# cleanup_heat() - Remove residual data files, anything left over from previous
69# runs that a clean run would need to clean up
Ian Wienandaee18c72014-02-21 15:35:08 +110070function cleanup_heat {
Steve Bakerc3249082013-04-09 13:41:47 +120071 sudo rm -rf $HEAT_AUTH_CACHE_DIR
Angus Salkeldf645a852013-08-26 10:13:36 +100072 sudo rm -rf $HEAT_ENV_DIR
Angus Salkeldfb71a272013-08-26 10:15:38 +100073 sudo rm -rf $HEAT_TEMPLATES_DIR
Steve Bakerbfdad752012-08-18 09:00:42 +120074}
75
76# configure_heat() - Set config files, create data dirs, etc
Ian Wienandaee18c72014-02-21 15:35:08 +110077function configure_heat {
Steve Bakere389aed2014-09-23 17:10:39 +120078 if [[ "$HEAT_STANDALONE" = "True" ]]; then
79 setup_develop $HEAT_DIR/contrib/heat_keystoneclient_v2
80 fi
Steve Bakerbfdad752012-08-18 09:00:42 +120081
Steve Bakerbfdad752012-08-18 09:00:42 +120082 if [[ ! -d $HEAT_CONF_DIR ]]; then
83 sudo mkdir -p $HEAT_CONF_DIR
84 fi
Attila Fazekas91b8d132013-01-06 22:40:09 +010085 sudo chown $STACK_USER $HEAT_CONF_DIR
Angus Salkelda213e2c2013-08-30 10:48:46 +100086 # remove old config files
87 rm -f $HEAT_CONF_DIR/heat-*.conf
Steve Bakerbfdad752012-08-18 09:00:42 +120088
Steve Bakere61bc612014-01-27 15:21:29 +130089 HEAT_API_CFN_HOST=${HEAT_API_CFN_HOST:-$HOST_IP}
Angus Salkelde2790212012-09-11 11:24:09 +100090 HEAT_API_CFN_PORT=${HEAT_API_CFN_PORT:-8000}
Steve Bakerbfdad752012-08-18 09:00:42 +120091 HEAT_ENGINE_HOST=${HEAT_ENGINE_HOST:-$SERVICE_HOST}
92 HEAT_ENGINE_PORT=${HEAT_ENGINE_PORT:-8001}
Steve Bakere61bc612014-01-27 15:21:29 +130093 HEAT_API_CW_HOST=${HEAT_API_CW_HOST:-$HOST_IP}
Angus Salkelde2790212012-09-11 11:24:09 +100094 HEAT_API_CW_PORT=${HEAT_API_CW_PORT:-8003}
Steve Bakerd5cd79b2013-04-13 11:14:41 -070095 HEAT_API_PASTE_FILE=$HEAT_CONF_DIR/api-paste.ini
96 HEAT_POLICY_FILE=$HEAT_CONF_DIR/policy.json
97
98 cp $HEAT_DIR/etc/heat/api-paste.ini $HEAT_API_PASTE_FILE
99 cp $HEAT_DIR/etc/heat/policy.json $HEAT_POLICY_FILE
Steve Bakerbfdad752012-08-18 09:00:42 +1200100
Angus Salkelda213e2c2013-08-30 10:48:46 +1000101 # common options
102 iniset_rpc_backend heat $HEAT_CONF DEFAULT
103 iniset $HEAT_CONF DEFAULT heat_metadata_server_url http://$HEAT_API_CFN_HOST:$HEAT_API_CFN_PORT
104 iniset $HEAT_CONF DEFAULT heat_waitcondition_server_url http://$HEAT_API_CFN_HOST:$HEAT_API_CFN_PORT/v1/waitcondition
105 iniset $HEAT_CONF DEFAULT heat_watch_server_url http://$HEAT_API_CW_HOST:$HEAT_API_CW_PORT
Angus Salkelde2314382013-11-14 14:36:46 +1100106 iniset $HEAT_CONF database connection `database_connection_url heat`
Attila Fazekasf71b5002014-05-28 09:52:22 +0200107 iniset $HEAT_CONF DEFAULT auth_encryption_key $(generate_hex_string 16)
Steve Bakerbfdad752012-08-18 09:00:42 +1200108
Bartosz Górski0abde392014-02-28 14:15:19 +0100109 iniset $HEAT_CONF DEFAULT region_name_for_services "$REGION_NAME"
110
Angus Salkelda213e2c2013-08-30 10:48:46 +1000111 # logging
112 iniset $HEAT_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
113 iniset $HEAT_CONF DEFAULT use_syslog $SYSLOG
Steve Baker556ffe42013-08-06 16:42:38 +1200114 if [ "$LOG_COLOR" == "True" ] && [ "$SYSLOG" == "False" ]; then
115 # Add color to logging output
Arata Notsu4897ff52013-10-09 18:49:32 +0900116 setup_colorized_logging $HEAT_CONF DEFAULT tenant user
Steve Baker556ffe42013-08-06 16:42:38 +1200117 fi
118
Brant Knudson05952372014-09-19 17:22:22 -0500119 configure_auth_token_middleware $HEAT_CONF heat $HEAT_AUTH_CACHE_DIR
Angus Salkelde2790212012-09-11 11:24:09 +1000120
Rob Crittendenfefd64b2014-05-27 22:27:15 -0400121 if is_ssl_enabled_service "key"; then
Rob Crittenden18d47782014-03-19 17:47:42 -0400122 iniset $HEAT_CONF clients_keystone ca_file $SSL_BUNDLE_FILE
Rob Crittendenfefd64b2014-05-27 22:27:15 -0400123 fi
124
Angus Salkelda213e2c2013-08-30 10:48:46 +1000125 # ec2authtoken
Jamie Lennox3561d7f2014-05-21 17:18:43 +1000126 iniset $HEAT_CONF ec2authtoken auth_uri $KEYSTONE_SERVICE_URI/v2.0
Angus Salkelda213e2c2013-08-30 10:48:46 +1000127
128 # paste_deploy
Steve Bakere389aed2014-09-23 17:10:39 +1200129 if [[ "$HEAT_STANDALONE" = "True" ]]; then
130 iniset $HEAT_CONF paste_deploy flavor standalone
131 iniset $HEAT_CONF DEFAULT keystone_backend heat_keystoneclient_v2.client.KeystoneClientV2
132 iniset $HEAT_CONF clients_heat url "http://$HEAT_API_HOST:$HEAT_API_PORT/v1/%(tenant_id)s"
133 fi
Angus Salkelda213e2c2013-08-30 10:48:46 +1000134
135 # OpenStack API
Angus Salkelda213e2c2013-08-30 10:48:46 +1000136 iniset $HEAT_CONF heat_api bind_port $HEAT_API_PORT
137
138 # Cloudformation API
Angus Salkelda213e2c2013-08-30 10:48:46 +1000139 iniset $HEAT_CONF heat_api_cfn bind_port $HEAT_API_CFN_PORT
140
141 # Cloudwatch API
Angus Salkelda213e2c2013-08-30 10:48:46 +1000142 iniset $HEAT_CONF heat_api_cloudwatch bind_port $HEAT_API_CW_PORT
Angus Salkelde2790212012-09-11 11:24:09 +1000143
Rob Crittenden18d47782014-03-19 17:47:42 -0400144 if is_ssl_enabled_service "key" || is_service_enabled tls-proxy; then
145 iniset $HEAT_CONF clients_keystone ca_file $SSL_BUNDLE_FILE
146 fi
147
148 if is_ssl_enabled_service "nova" || is_service_enabled tls-proxy; then
149 iniset $HEAT_CONF clients_nova ca_file $SSL_BUNDLE_FILE
150 fi
151
152 if is_ssl_enabled_service "cinder" || is_service_enabled tls-proxy; then
153 iniset $HEAT_CONF clients_cinder ca_file $SSL_BUNDLE_FILE
154 fi
155
Angus Salkeld826e4502015-01-07 17:52:05 +1000156 if [[ "$HEAT_ENABLE_ADOPT_ABANDON" = "True" ]]; then
157 iniset $HEAT_CONF DEFAULT enable_stack_adopt true
158 iniset $HEAT_CONF DEFAULT enable_stack_abandon true
159 fi
160
Angus Salkeldf645a852013-08-26 10:13:36 +1000161 # heat environment
162 sudo mkdir -p $HEAT_ENV_DIR
163 sudo chown $STACK_USER $HEAT_ENV_DIR
164 # copy the default environment
165 cp $HEAT_DIR/etc/heat/environment.d/* $HEAT_ENV_DIR/
166
Angus Salkeldfb71a272013-08-26 10:15:38 +1000167 # heat template resources.
168 sudo mkdir -p $HEAT_TEMPLATES_DIR
169 sudo chown $STACK_USER $HEAT_TEMPLATES_DIR
170 # copy the default templates
171 cp $HEAT_DIR/etc/heat/templates/* $HEAT_TEMPLATES_DIR/
172
Steve Bakerbfdad752012-08-18 09:00:42 +1200173}
174
175# init_heat() - Initialize database
Ian Wienandaee18c72014-02-21 15:35:08 +1100176function init_heat {
Steve Bakerbfdad752012-08-18 09:00:42 +1200177
178 # (re)create heat database
Ihar Hrachyshka157c84b2014-10-06 13:29:39 +0200179 recreate_database heat
Steve Bakerbfdad752012-08-18 09:00:42 +1200180
Steve Bakere3111322013-06-19 13:57:31 +1200181 $HEAT_DIR/bin/heat-manage db_sync
Steve Bakerc3249082013-04-09 13:41:47 +1200182 create_heat_cache_dir
183}
184
185# create_heat_cache_dir() - Part of the init_heat() process
Ian Wienandaee18c72014-02-21 15:35:08 +1100186function create_heat_cache_dir {
Steve Bakerc3249082013-04-09 13:41:47 +1200187 # Create cache dirs
Angus Salkelde1186552013-09-06 13:35:09 +1000188 sudo mkdir -p $HEAT_AUTH_CACHE_DIR
189 sudo chown $STACK_USER $HEAT_AUTH_CACHE_DIR
Steve Bakerbfdad752012-08-18 09:00:42 +1200190}
191
Steve Baker32761a42012-11-05 09:57:57 +1300192# install_heatclient() - Collect source and prepare
Ian Wienandaee18c72014-02-21 15:35:08 +1100193function install_heatclient {
Sean Daguee08ab102014-11-13 17:09:28 -0500194 if use_library_from_git "python-heatclient"; then
195 git_clone_by_name "python-heatclient"
196 setup_dev_lib "python-heatclient"
197 sudo install -D -m 0644 -o $STACK_USER {${GITDIR["python-heatclient"]}/tools/,/etc/bash_completion.d/}heat.bash_completion
Sean Dague5cb19062014-11-01 01:37:45 +0100198 fi
Steve Baker32761a42012-11-05 09:57:57 +1300199}
200
Steve Bakerbfdad752012-08-18 09:00:42 +1200201# install_heat() - Collect source and prepare
Ian Wienandaee18c72014-02-21 15:35:08 +1100202function install_heat {
Steve Bakerbfdad752012-08-18 09:00:42 +1200203 git_clone $HEAT_REPO $HEAT_DIR $HEAT_BRANCH
Sergey Krayneva38bc5b2014-12-16 04:25:11 -0500204 setup_develop $HEAT_DIR
Steve Bakerbfdad752012-08-18 09:00:42 +1200205}
206
Steve Baker315971d2014-05-27 12:24:18 +1200207# install_heat_other() - Collect source and prepare
208function install_heat_other {
209 git_clone $HEAT_CFNTOOLS_REPO $HEAT_CFNTOOLS_DIR $HEAT_CFNTOOLS_BRANCH
210 git_clone $HEAT_TEMPLATES_REPO $HEAT_TEMPLATES_REPO_DIR $HEAT_TEMPLATES_BRANCH
211}
212
Steve Bakerbfdad752012-08-18 09:00:42 +1200213# start_heat() - Start running processes, including screen
Ian Wienandaee18c72014-02-21 15:35:08 +1100214function start_heat {
Chris Dent2f27a0e2014-09-09 13:46:02 +0100215 run_process h-eng "$HEAT_DIR/bin/heat-engine --config-file=$HEAT_CONF"
216 run_process h-api "$HEAT_DIR/bin/heat-api --config-file=$HEAT_CONF"
217 run_process h-api-cfn "$HEAT_DIR/bin/heat-api-cfn --config-file=$HEAT_CONF"
218 run_process h-api-cw "$HEAT_DIR/bin/heat-api-cloudwatch --config-file=$HEAT_CONF"
Steve Bakerbfdad752012-08-18 09:00:42 +1200219}
220
Dean Troyer699a29f2012-09-10 14:10:27 -0500221# stop_heat() - Stop running processes
Ian Wienandaee18c72014-02-21 15:35:08 +1100222function stop_heat {
Kieran Spear70338292013-05-28 11:31:31 +1000223 # Kill the screen windows
Dean Troyer7d31bdc2014-07-25 12:50:05 -0500224 local serv
Kieran Spear70338292013-05-28 11:31:31 +1000225 for serv in h-eng h-api h-api-cfn h-api-cw; do
Chris Dent2f27a0e2014-09-09 13:46:02 +0100226 stop_process $serv
Dean Troyer699a29f2012-09-10 14:10:27 -0500227 done
Steve Bakerbfdad752012-08-18 09:00:42 +1200228}
Dean Troyer7903b792012-09-13 17:16:12 -0500229
Steven Hardy33d1f862014-02-13 15:00:33 +0000230# create_heat_accounts() - Set up common required heat accounts
Ian Wienandaee18c72014-02-21 15:35:08 +1100231function create_heat_accounts {
Steven Hardy57d478d2014-02-28 16:37:43 +0000232 # migrated from files/keystone_data.sh
Dean Troyer7d31bdc2014-07-25 12:50:05 -0500233 local service_tenant=$(openstack project list | awk "/ $SERVICE_TENANT_NAME / { print \$2 }")
234 local admin_role=$(openstack role list | awk "/ admin / { print \$2 }")
Steven Hardy57d478d2014-02-28 16:37:43 +0000235
Dean Troyer7d31bdc2014-07-25 12:50:05 -0500236 local heat_user=$(get_or_create_user "heat" \
237 "$SERVICE_PASSWORD" $service_tenant)
238 get_or_add_user_role $admin_role $heat_user $service_tenant
Bartosz Górski0abde392014-02-28 14:15:19 +0100239
Steven Hardy57d478d2014-02-28 16:37:43 +0000240 if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then
Bartosz Górski0abde392014-02-28 14:15:19 +0100241
Dean Troyer7d31bdc2014-07-25 12:50:05 -0500242 local heat_service=$(get_or_create_service "heat" \
Bartosz Górski0abde392014-02-28 14:15:19 +0100243 "orchestration" "Heat Orchestration Service")
Dean Troyer7d31bdc2014-07-25 12:50:05 -0500244 get_or_create_endpoint $heat_service \
Bartosz Górski0abde392014-02-28 14:15:19 +0100245 "$REGION_NAME" \
246 "$SERVICE_PROTOCOL://$HEAT_API_HOST:$HEAT_API_PORT/v1/\$(tenant_id)s" \
247 "$SERVICE_PROTOCOL://$HEAT_API_HOST:$HEAT_API_PORT/v1/\$(tenant_id)s" \
248 "$SERVICE_PROTOCOL://$HEAT_API_HOST:$HEAT_API_PORT/v1/\$(tenant_id)s"
249
Dean Troyer7d31bdc2014-07-25 12:50:05 -0500250 local heat_cfn_service=$(get_or_create_service "heat-cfn" \
Bartosz Górski0abde392014-02-28 14:15:19 +0100251 "cloudformation" "Heat CloudFormation Service")
Dean Troyer7d31bdc2014-07-25 12:50:05 -0500252 get_or_create_endpoint $heat_cfn_service \
Bartosz Górski0abde392014-02-28 14:15:19 +0100253 "$REGION_NAME" \
254 "$SERVICE_PROTOCOL://$HEAT_API_CFN_HOST:$HEAT_API_CFN_PORT/v1" \
255 "$SERVICE_PROTOCOL://$HEAT_API_CFN_HOST:$HEAT_API_CFN_PORT/v1" \
256 "$SERVICE_PROTOCOL://$HEAT_API_CFN_HOST:$HEAT_API_CFN_PORT/v1"
Steven Hardy57d478d2014-02-28 16:37:43 +0000257 fi
258
259 # heat_stack_user role is for users created by Heat
Bartosz Górski0abde392014-02-28 14:15:19 +0100260 get_or_create_role "heat_stack_user"
Steven Hardy57d478d2014-02-28 16:37:43 +0000261
Steven Hardyf83cf932014-03-12 16:54:01 +0000262 if [[ $HEAT_DEFERRED_AUTH == trusts ]]; then
Steven Hardyf83cf932014-03-12 16:54:01 +0000263 iniset $HEAT_CONF DEFAULT deferred_auth_method trusts
264 fi
Steven Hardy2ca3bf12014-03-03 18:07:33 +0000265
Steve Baker16aca8a2014-03-11 14:01:57 +1300266 if [[ "$HEAT_STACK_DOMAIN" == "True" ]]; then
267 # Note we have to pass token/endpoint here because the current endpoint and
268 # version negotiation in OSC means just --os-identity-api-version=3 won't work
Steve Martinellib74e01c2014-12-18 01:35:35 -0500269 D_ID=$(openstack --os-token $OS_TOKEN --os-url=$KEYSTONE_SERVICE_URI_V3 \
Bartosz Górski0abde392014-02-28 14:15:19 +0100270 --os-identity-api-version=3 domain list | grep ' heat ' | get_field 1)
271
272 if [[ -z "$D_ID" ]]; then
Steve Martinellib74e01c2014-12-18 01:35:35 -0500273 D_ID=$(openstack --os-token $OS_TOKEN --os-url=$KEYSTONE_SERVICE_URI_V3 \
Bartosz Górski0abde392014-02-28 14:15:19 +0100274 --os-identity-api-version=3 domain create heat \
275 --description "Owns users and projects created by heat" \
276 | grep ' id ' | get_field 2)
Sirushti Murugesan2f92c8d2014-10-09 14:35:38 +0530277 iniset $HEAT_CONF DEFAULT stack_user_domain_id ${D_ID}
Bartosz Górski0abde392014-02-28 14:15:19 +0100278
Steve Martinellib74e01c2014-12-18 01:35:35 -0500279 openstack --os-token $OS_TOKEN --os-url=$KEYSTONE_SERVICE_URI_V3 \
Bartosz Górski0abde392014-02-28 14:15:19 +0100280 --os-identity-api-version=3 user create --password $SERVICE_PASSWORD \
281 --domain $D_ID heat_domain_admin \
282 --description "Manages users and projects created by heat"
Steve Martinellib74e01c2014-12-18 01:35:35 -0500283 openstack --os-token $OS_TOKEN --os-url=$KEYSTONE_SERVICE_URI_V3 \
Bartosz Górski0abde392014-02-28 14:15:19 +0100284 --os-identity-api-version=3 role add \
285 --user heat_domain_admin --domain ${D_ID} admin
286 iniset $HEAT_CONF DEFAULT stack_domain_admin heat_domain_admin
287 iniset $HEAT_CONF DEFAULT stack_domain_admin_password $SERVICE_PASSWORD
288 fi
Steve Baker16aca8a2014-03-11 14:01:57 +1300289 fi
Steven Hardy33d1f862014-02-13 15:00:33 +0000290}
291
Steve Baker2a6009c2014-05-05 16:13:39 +1200292# build_heat_functional_test_image() - Build and upload functional test image
293function build_heat_functional_test_image {
Steven Hardy1f3f4b02015-01-14 10:52:03 +0000294 if is_service_enabled dib; then
295 build_dib_pip_repo "$OCC_DIR $OAC_DIR $ORC_DIR $HEAT_CFNTOOLS_DIR"
296 local image_name=heat-functional-tests-image
Steve Baker2a6009c2014-05-05 16:13:39 +1200297
Steven Hardy1f3f4b02015-01-14 10:52:03 +0000298 # The elements to invoke disk-image-create with
299 local image_elements="vm fedora selinux-permissive pypi \
300 os-collect-config os-refresh-config os-apply-config heat-cfntools \
301 heat-config heat-config-cfn-init heat-config-puppet heat-config-script"
Steve Baker2a6009c2014-05-05 16:13:39 +1200302
Steven Hardy1f3f4b02015-01-14 10:52:03 +0000303 # Elements path for tripleo-image-elements and heat-templates software-config
304 local elements_path=$TIE_DIR/elements:$HEAT_TEMPLATES_REPO_DIR/hot/software-config/elements
Steve Baker2a6009c2014-05-05 16:13:39 +1200305
Steven Hardy1f3f4b02015-01-14 10:52:03 +0000306 disk_image_create_upload "$image_name" "$image_elements" "$elements_path"
307 iniset $TEMPEST_CONFIG orchestration image_ref $image_name
308 else
309 echo "Error, HEAT_CREATE_TEST_IMAGE=True requires dib" >&2
310 echo "Add \"enable_service dib\" to your localrc" >&2
311 exit 1
312 fi
Steve Baker2a6009c2014-05-05 16:13:39 +1200313}
314
Dean Troyer7903b792012-09-13 17:16:12 -0500315# Restore xtrace
316$XTRACE
Sean Dague584d90e2013-03-29 14:34:53 -0400317
Adam Spiers6a5aa7c2013-10-24 11:27:02 +0100318# Tell emacs to use shell-script-mode
319## Local variables:
320## mode: shell-script
321## End: