| Sean Dague | e263c82 | 2014-12-05 14:25:28 -0500 | [diff] [blame] | 1 | #!/bin/bash | 
|  | 2 | # | 
| Mate Lakat | 45ea081 | 2013-09-25 10:00:29 +0100 | [diff] [blame] | 3 | # lib/heat | 
| Dean Troyer | 6d04fd7 | 2012-12-21 11:03:37 -0600 | [diff] [blame] | 4 | # Install and start **Heat** service | 
|  | 5 |  | 
| Steve Baker | bfdad75 | 2012-08-18 09:00:42 +1200 | [diff] [blame] | 6 | # To enable, add the following to localrc | 
| Adam Spiers | 6a5aa7c | 2013-10-24 11:27:02 +0100 | [diff] [blame] | 7 | # | 
|  | 8 | #   ENABLED_SERVICES+=,heat,h-api,h-api-cfn,h-api-cw,h-eng | 
| Steve Baker | bfdad75 | 2012-08-18 09:00:42 +1200 | [diff] [blame] | 9 |  | 
|  | 10 | # Dependencies: | 
| Steve Baker | 249e36d | 2015-03-05 14:01:45 +1300 | [diff] [blame] | 11 | # (none) | 
| Steve Baker | bfdad75 | 2012-08-18 09:00:42 +1200 | [diff] [blame] | 12 |  | 
|  | 13 | # stack.sh | 
|  | 14 | # --------- | 
| Adam Spiers | 6a5aa7c | 2013-10-24 11:27:02 +0100 | [diff] [blame] | 15 | # - install_heatclient | 
|  | 16 | # - install_heat | 
|  | 17 | # - configure_heatclient | 
|  | 18 | # - configure_heat | 
| Oleksii Chuprykov | a692810 | 2015-06-11 08:56:58 -0400 | [diff] [blame] | 19 | # - _config_heat_apache_wsgi | 
| Adam Spiers | 6a5aa7c | 2013-10-24 11:27:02 +0100 | [diff] [blame] | 20 | # - init_heat | 
|  | 21 | # - start_heat | 
|  | 22 | # - stop_heat | 
|  | 23 | # - cleanup_heat | 
| Steve Baker | bfdad75 | 2012-08-18 09:00:42 +1200 | [diff] [blame] | 24 |  | 
| Dean Troyer | 7903b79 | 2012-09-13 17:16:12 -0500 | [diff] [blame] | 25 | # Save trace setting | 
|  | 26 | XTRACE=$(set +o | grep xtrace) | 
|  | 27 | set +o xtrace | 
| Steve Baker | bfdad75 | 2012-08-18 09:00:42 +1200 | [diff] [blame] | 28 |  | 
|  | 29 |  | 
|  | 30 | # Defaults | 
|  | 31 | # -------- | 
| Dean Troyer | cc6b443 | 2013-04-08 15:38:03 -0500 | [diff] [blame] | 32 |  | 
|  | 33 | # set up default directories | 
| Sean Dague | e08ab10 | 2014-11-13 17:09:28 -0500 | [diff] [blame] | 34 | GITDIR["python-heatclient"]=$DEST/python-heatclient | 
| Sean Dague | 5cb1906 | 2014-11-01 01:37:45 +0100 | [diff] [blame] | 35 |  | 
| Oleksii Chuprykov | a692810 | 2015-06-11 08:56:58 -0400 | [diff] [blame] | 36 | # Toggle for deploying Heat-API under HTTPD + mod_wsgi | 
|  | 37 | HEAT_USE_MOD_WSGI=${HEAT_USE_MOD_WSGI:-False} | 
|  | 38 |  | 
| Steve Baker | bfdad75 | 2012-08-18 09:00:42 +1200 | [diff] [blame] | 39 | HEAT_DIR=$DEST/heat | 
| Steve Baker | 315971d | 2014-05-27 12:24:18 +1200 | [diff] [blame] | 40 | HEAT_CFNTOOLS_DIR=$DEST/heat-cfntools | 
|  | 41 | HEAT_TEMPLATES_REPO_DIR=$DEST/heat-templates | 
| Steve Baker | 249e36d | 2015-03-05 14:01:45 +1300 | [diff] [blame] | 42 | OCC_DIR=$DEST/os-collect-config | 
| Steve Baker | 1681995 | 2015-03-18 13:45:40 +1300 | [diff] [blame] | 43 | DIB_UTILS_DIR=$DEST/dib-utils | 
| Steve Baker | 249e36d | 2015-03-05 14:01:45 +1300 | [diff] [blame] | 44 | ORC_DIR=$DEST/os-refresh-config | 
|  | 45 | OAC_DIR=$DEST/os-apply-config | 
|  | 46 |  | 
|  | 47 | HEAT_PIP_REPO=$DATA_DIR/heat-pip-repo | 
|  | 48 | HEAT_PIP_REPO_PORT=${HEAT_PIP_REPO_PORT:-8899} | 
|  | 49 |  | 
| Steve Baker | c324908 | 2013-04-09 13:41:47 +1200 | [diff] [blame] | 50 | HEAT_AUTH_CACHE_DIR=${HEAT_AUTH_CACHE_DIR:-/var/cache/heat} | 
| Sean Dague | 5375329 | 2014-12-04 19:38:15 -0500 | [diff] [blame] | 51 | HEAT_STANDALONE=$(trueorfalse False HEAT_STANDALONE) | 
|  | 52 | HEAT_ENABLE_ADOPT_ABANDON=$(trueorfalse False HEAT_ENABLE_ADOPT_ABANDON) | 
| Angus Salkeld | f645a85 | 2013-08-26 10:13:36 +1000 | [diff] [blame] | 53 | HEAT_CONF_DIR=/etc/heat | 
| Angus Salkeld | a213e2c | 2013-08-30 10:48:46 +1000 | [diff] [blame] | 54 | HEAT_CONF=$HEAT_CONF_DIR/heat.conf | 
| Angus Salkeld | f645a85 | 2013-08-26 10:13:36 +1000 | [diff] [blame] | 55 | HEAT_ENV_DIR=$HEAT_CONF_DIR/environment.d | 
| Angus Salkeld | fb71a27 | 2013-08-26 10:15:38 +1000 | [diff] [blame] | 56 | HEAT_TEMPLATES_DIR=$HEAT_CONF_DIR/templates | 
| Steve Baker | e389aed | 2014-09-23 17:10:39 +1200 | [diff] [blame] | 57 | HEAT_API_HOST=${HEAT_API_HOST:-$HOST_IP} | 
|  | 58 | HEAT_API_PORT=${HEAT_API_PORT:-8004} | 
| Steven Hardy | 3163c17 | 2015-01-23 13:26:29 +0000 | [diff] [blame] | 59 |  | 
| Sirushti Murugesan | 9e68af7 | 2015-06-16 23:25:17 +0530 | [diff] [blame] | 60 | # Support entry points installation of console scripts | 
|  | 61 | HEAT_BIN_DIR=$(get_python_exec_prefix) | 
| Dean Troyer | cc6b443 | 2013-04-08 15:38:03 -0500 | [diff] [blame] | 62 |  | 
| Steven Hardy | f83cf93 | 2014-03-12 16:54:01 +0000 | [diff] [blame] | 63 | # other default options | 
| Steve Baker | 744c2af | 2014-12-16 12:00:40 +1300 | [diff] [blame] | 64 | if [[ "$HEAT_STANDALONE" = "True" ]]; then | 
|  | 65 | # for standalone, use defaults which require no service user | 
| Ian Wienand | e82bac0 | 2015-08-25 14:29:08 +1000 | [diff] [blame] | 66 | HEAT_STACK_DOMAIN=$(trueorfalse False HEAT_STACK_DOMAIN) | 
| Steve Baker | 744c2af | 2014-12-16 12:00:40 +1300 | [diff] [blame] | 67 | HEAT_DEFERRED_AUTH=${HEAT_DEFERRED_AUTH:-password} | 
|  | 68 | else | 
| Ian Wienand | e82bac0 | 2015-08-25 14:29:08 +1000 | [diff] [blame] | 69 | HEAT_STACK_DOMAIN=$(trueorfalse True HEAT_STACK_DOMAIN) | 
| Steve Baker | 744c2af | 2014-12-16 12:00:40 +1300 | [diff] [blame] | 70 | HEAT_DEFERRED_AUTH=${HEAT_DEFERRED_AUTH:-trusts} | 
|  | 71 | fi | 
| Nicolas Simonds | 347dbac | 2015-01-21 13:40:42 -0800 | [diff] [blame^] | 72 | HEAT_PLUGIN_DIR=${HEAT_PLUGIN_DIR:-$DATA_DIR/heat/plugins} | 
|  | 73 | ENABLE_HEAT_PLUGINS=${ENABLE_HEAT_PLUGINS:-} | 
| Steven Hardy | f83cf93 | 2014-03-12 16:54:01 +0000 | [diff] [blame] | 74 |  | 
| Dean Troyer | cc6b443 | 2013-04-08 15:38:03 -0500 | [diff] [blame] | 75 | # Functions | 
|  | 76 | # --------- | 
| Steve Baker | bfdad75 | 2012-08-18 09:00:42 +1200 | [diff] [blame] | 77 |  | 
| Sean Dague | 29870cc | 2014-03-14 14:32:01 -0400 | [diff] [blame] | 78 | # Test if any Heat services are enabled | 
|  | 79 | # is_heat_enabled | 
|  | 80 | function is_heat_enabled { | 
|  | 81 | [[ ,${ENABLED_SERVICES} =~ ,"h-" ]] && return 0 | 
|  | 82 | return 1 | 
|  | 83 | } | 
|  | 84 |  | 
| Steve Baker | bfdad75 | 2012-08-18 09:00:42 +1200 | [diff] [blame] | 85 | # cleanup_heat() - Remove residual data files, anything left over from previous | 
|  | 86 | # runs that a clean run would need to clean up | 
| Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame] | 87 | function cleanup_heat { | 
| Steve Baker | c324908 | 2013-04-09 13:41:47 +1200 | [diff] [blame] | 88 | sudo rm -rf $HEAT_AUTH_CACHE_DIR | 
| Angus Salkeld | f645a85 | 2013-08-26 10:13:36 +1000 | [diff] [blame] | 89 | sudo rm -rf $HEAT_ENV_DIR | 
| Angus Salkeld | fb71a27 | 2013-08-26 10:15:38 +1000 | [diff] [blame] | 90 | sudo rm -rf $HEAT_TEMPLATES_DIR | 
| Steve Baker | 744c2af | 2014-12-16 12:00:40 +1300 | [diff] [blame] | 91 | sudo rm -rf $HEAT_CONF_DIR | 
| Steve Baker | bfdad75 | 2012-08-18 09:00:42 +1200 | [diff] [blame] | 92 | } | 
|  | 93 |  | 
|  | 94 | # configure_heat() - Set config files, create data dirs, etc | 
| Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame] | 95 | function configure_heat { | 
| Steve Baker | bfdad75 | 2012-08-18 09:00:42 +1200 | [diff] [blame] | 96 |  | 
| Dean Troyer | 8421c2b | 2015-03-16 13:52:19 -0500 | [diff] [blame] | 97 | sudo install -d -o $STACK_USER $HEAT_CONF_DIR | 
| Angus Salkeld | a213e2c | 2013-08-30 10:48:46 +1000 | [diff] [blame] | 98 | # remove old config files | 
|  | 99 | rm -f $HEAT_CONF_DIR/heat-*.conf | 
| Steve Baker | bfdad75 | 2012-08-18 09:00:42 +1200 | [diff] [blame] | 100 |  | 
| Steve Baker | e61bc61 | 2014-01-27 15:21:29 +1300 | [diff] [blame] | 101 | HEAT_API_CFN_HOST=${HEAT_API_CFN_HOST:-$HOST_IP} | 
| Angus Salkeld | e279021 | 2012-09-11 11:24:09 +1000 | [diff] [blame] | 102 | HEAT_API_CFN_PORT=${HEAT_API_CFN_PORT:-8000} | 
| Steve Baker | bfdad75 | 2012-08-18 09:00:42 +1200 | [diff] [blame] | 103 | HEAT_ENGINE_HOST=${HEAT_ENGINE_HOST:-$SERVICE_HOST} | 
|  | 104 | HEAT_ENGINE_PORT=${HEAT_ENGINE_PORT:-8001} | 
| Steve Baker | e61bc61 | 2014-01-27 15:21:29 +1300 | [diff] [blame] | 105 | HEAT_API_CW_HOST=${HEAT_API_CW_HOST:-$HOST_IP} | 
| Angus Salkeld | e279021 | 2012-09-11 11:24:09 +1000 | [diff] [blame] | 106 | HEAT_API_CW_PORT=${HEAT_API_CW_PORT:-8003} | 
| Steve Baker | d5cd79b | 2013-04-13 11:14:41 -0700 | [diff] [blame] | 107 | HEAT_API_PASTE_FILE=$HEAT_CONF_DIR/api-paste.ini | 
|  | 108 | HEAT_POLICY_FILE=$HEAT_CONF_DIR/policy.json | 
|  | 109 |  | 
|  | 110 | cp $HEAT_DIR/etc/heat/api-paste.ini $HEAT_API_PASTE_FILE | 
|  | 111 | cp $HEAT_DIR/etc/heat/policy.json $HEAT_POLICY_FILE | 
| Steve Baker | bfdad75 | 2012-08-18 09:00:42 +1200 | [diff] [blame] | 112 |  | 
| Angus Salkeld | a213e2c | 2013-08-30 10:48:46 +1000 | [diff] [blame] | 113 | # common options | 
| Brant Knudson | 2dd110c | 2015-03-14 12:39:14 -0500 | [diff] [blame] | 114 | iniset_rpc_backend heat $HEAT_CONF | 
| Angus Salkeld | a213e2c | 2013-08-30 10:48:46 +1000 | [diff] [blame] | 115 | iniset $HEAT_CONF DEFAULT heat_metadata_server_url http://$HEAT_API_CFN_HOST:$HEAT_API_CFN_PORT | 
|  | 116 | iniset $HEAT_CONF DEFAULT heat_waitcondition_server_url http://$HEAT_API_CFN_HOST:$HEAT_API_CFN_PORT/v1/waitcondition | 
|  | 117 | iniset $HEAT_CONF DEFAULT heat_watch_server_url http://$HEAT_API_CW_HOST:$HEAT_API_CW_PORT | 
| Angus Salkeld | e231438 | 2013-11-14 14:36:46 +1100 | [diff] [blame] | 118 | iniset $HEAT_CONF database connection `database_connection_url heat` | 
| Attila Fazekas | f71b500 | 2014-05-28 09:52:22 +0200 | [diff] [blame] | 119 | iniset $HEAT_CONF DEFAULT auth_encryption_key $(generate_hex_string 16) | 
| Steve Baker | bfdad75 | 2012-08-18 09:00:42 +1200 | [diff] [blame] | 120 |  | 
| Bartosz Górski | 0abde39 | 2014-02-28 14:15:19 +0100 | [diff] [blame] | 121 | iniset $HEAT_CONF DEFAULT region_name_for_services "$REGION_NAME" | 
|  | 122 |  | 
| Angus Salkeld | a213e2c | 2013-08-30 10:48:46 +1000 | [diff] [blame] | 123 | # logging | 
|  | 124 | iniset $HEAT_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL | 
|  | 125 | iniset $HEAT_CONF DEFAULT use_syslog $SYSLOG | 
| Oleksii Chuprykov | a692810 | 2015-06-11 08:56:58 -0400 | [diff] [blame] | 126 | if [ "$LOG_COLOR" == "True" ] && [ "$SYSLOG" == "False" ] && [ "$HEAT_USE_MOD_WSGI" == "False" ]  ; then | 
| Steve Baker | 556ffe4 | 2013-08-06 16:42:38 +1200 | [diff] [blame] | 127 | # Add color to logging output | 
| Arata Notsu | 4897ff5 | 2013-10-09 18:49:32 +0900 | [diff] [blame] | 128 | setup_colorized_logging $HEAT_CONF DEFAULT tenant user | 
| Steve Baker | 556ffe4 | 2013-08-06 16:42:38 +1200 | [diff] [blame] | 129 | fi | 
|  | 130 |  | 
| Angus Salkeld | 93b906d | 2015-03-26 12:53:51 +1000 | [diff] [blame] | 131 | iniset $HEAT_CONF DEFAULT deferred_auth_method $HEAT_DEFERRED_AUTH | 
|  | 132 |  | 
| Oleksii Chuprykov | a692810 | 2015-06-11 08:56:58 -0400 | [diff] [blame] | 133 | if [ "$HEAT_USE_MOD_WSGI" == "True" ]; then | 
|  | 134 | _config_heat_apache_wsgi | 
|  | 135 | fi | 
|  | 136 |  | 
| Jamie Lennox | 78b7726 | 2014-12-19 12:56:01 +1000 | [diff] [blame] | 137 | # NOTE(jamielennox): heat re-uses specific values from the | 
|  | 138 | # keystone_authtoken middleware group and so currently fails when using the | 
|  | 139 | # auth plugin setup. This should be fixed in heat.  Heat is also the only | 
|  | 140 | # service that requires the auth_uri to include a /v2.0. Remove this custom | 
|  | 141 | # setup when bug #1300246 is resolved. | 
| Jamie Lennox | 78b7726 | 2014-12-19 12:56:01 +1000 | [diff] [blame] | 142 | iniset $HEAT_CONF keystone_authtoken auth_uri $KEYSTONE_SERVICE_URI/v2.0 | 
| Steve Baker | 744c2af | 2014-12-16 12:00:40 +1300 | [diff] [blame] | 143 | if [[ "$HEAT_STANDALONE" = "True" ]]; then | 
|  | 144 | iniset $HEAT_CONF paste_deploy flavor standalone | 
|  | 145 | iniset $HEAT_CONF clients_heat url "http://$HEAT_API_HOST:$HEAT_API_PORT/v1/%(tenant_id)s" | 
|  | 146 | else | 
|  | 147 | iniset $HEAT_CONF keystone_authtoken identity_uri $KEYSTONE_AUTH_URI | 
|  | 148 | iniset $HEAT_CONF keystone_authtoken admin_user heat | 
|  | 149 | iniset $HEAT_CONF keystone_authtoken admin_password $SERVICE_PASSWORD | 
|  | 150 | iniset $HEAT_CONF keystone_authtoken admin_tenant_name $SERVICE_TENANT_NAME | 
|  | 151 | iniset $HEAT_CONF keystone_authtoken cafile $SSL_BUNDLE_FILE | 
|  | 152 | iniset $HEAT_CONF keystone_authtoken signing_dir $HEAT_AUTH_CACHE_DIR | 
|  | 153 | fi | 
| Angus Salkeld | e279021 | 2012-09-11 11:24:09 +1000 | [diff] [blame] | 154 |  | 
| Angus Salkeld | a213e2c | 2013-08-30 10:48:46 +1000 | [diff] [blame] | 155 | # ec2authtoken | 
| Jamie Lennox | 3561d7f | 2014-05-21 17:18:43 +1000 | [diff] [blame] | 156 | iniset $HEAT_CONF ec2authtoken auth_uri $KEYSTONE_SERVICE_URI/v2.0 | 
| Angus Salkeld | a213e2c | 2013-08-30 10:48:46 +1000 | [diff] [blame] | 157 |  | 
| Angus Salkeld | a213e2c | 2013-08-30 10:48:46 +1000 | [diff] [blame] | 158 | # OpenStack API | 
| Angus Salkeld | a213e2c | 2013-08-30 10:48:46 +1000 | [diff] [blame] | 159 | iniset $HEAT_CONF heat_api bind_port $HEAT_API_PORT | 
| Davanum Srinivas | 905275e | 2015-01-24 19:21:34 -0500 | [diff] [blame] | 160 | iniset $HEAT_CONF heat_api workers "$API_WORKERS" | 
| Angus Salkeld | a213e2c | 2013-08-30 10:48:46 +1000 | [diff] [blame] | 161 |  | 
|  | 162 | # Cloudformation API | 
| Angus Salkeld | a213e2c | 2013-08-30 10:48:46 +1000 | [diff] [blame] | 163 | iniset $HEAT_CONF heat_api_cfn bind_port $HEAT_API_CFN_PORT | 
|  | 164 |  | 
|  | 165 | # Cloudwatch API | 
| Angus Salkeld | a213e2c | 2013-08-30 10:48:46 +1000 | [diff] [blame] | 166 | iniset $HEAT_CONF heat_api_cloudwatch bind_port $HEAT_API_CW_PORT | 
| Angus Salkeld | e279021 | 2012-09-11 11:24:09 +1000 | [diff] [blame] | 167 |  | 
| Rob Crittenden | 18d4778 | 2014-03-19 17:47:42 -0400 | [diff] [blame] | 168 | if is_ssl_enabled_service "key" || is_service_enabled tls-proxy; then | 
|  | 169 | iniset $HEAT_CONF clients_keystone ca_file $SSL_BUNDLE_FILE | 
|  | 170 | fi | 
|  | 171 |  | 
|  | 172 | if is_ssl_enabled_service "nova" || is_service_enabled tls-proxy; then | 
|  | 173 | iniset $HEAT_CONF clients_nova ca_file $SSL_BUNDLE_FILE | 
|  | 174 | fi | 
|  | 175 |  | 
|  | 176 | if is_ssl_enabled_service "cinder" || is_service_enabled tls-proxy; then | 
|  | 177 | iniset $HEAT_CONF clients_cinder ca_file $SSL_BUNDLE_FILE | 
|  | 178 | fi | 
|  | 179 |  | 
| Angus Salkeld | 826e450 | 2015-01-07 17:52:05 +1000 | [diff] [blame] | 180 | if [[ "$HEAT_ENABLE_ADOPT_ABANDON" = "True" ]]; then | 
|  | 181 | iniset $HEAT_CONF DEFAULT enable_stack_adopt true | 
|  | 182 | iniset $HEAT_CONF DEFAULT enable_stack_abandon true | 
|  | 183 | fi | 
|  | 184 |  | 
| Dean Troyer | 8421c2b | 2015-03-16 13:52:19 -0500 | [diff] [blame] | 185 | sudo install -d -o $STACK_USER $HEAT_ENV_DIR $HEAT_TEMPLATES_DIR | 
|  | 186 |  | 
| Angus Salkeld | f645a85 | 2013-08-26 10:13:36 +1000 | [diff] [blame] | 187 | # copy the default environment | 
|  | 188 | cp $HEAT_DIR/etc/heat/environment.d/* $HEAT_ENV_DIR/ | 
|  | 189 |  | 
| Angus Salkeld | fb71a27 | 2013-08-26 10:15:38 +1000 | [diff] [blame] | 190 | # copy the default templates | 
|  | 191 | cp $HEAT_DIR/etc/heat/templates/* $HEAT_TEMPLATES_DIR/ | 
|  | 192 |  | 
| Nicolas Simonds | 347dbac | 2015-01-21 13:40:42 -0800 | [diff] [blame^] | 193 | # Enable heat plugins. | 
|  | 194 | # NOTE(nic): The symlink nonsense is necessary because when | 
|  | 195 | # plugins are installed in "developer mode", the final component | 
|  | 196 | # of their target directory is always "resources", which confuses | 
|  | 197 | # Heat's plugin loader into believing that all plugins are named | 
|  | 198 | # "resources", and therefore are all the same plugin; so it | 
|  | 199 | # will only load one of them.  Linking them all to a common | 
|  | 200 | # location with unique names avoids that type of collision, | 
|  | 201 | # while still allowing the plugins to be edited in-tree. | 
|  | 202 | local err_count=0 | 
|  | 203 |  | 
|  | 204 | if [ -n "$ENABLE_HEAT_PLUGINS" ]; then | 
|  | 205 | mkdir -p $HEAT_PLUGIN_DIR | 
|  | 206 | # Clean up cruft from any previous runs | 
|  | 207 | rm -f $HEAT_PLUGIN_DIR/* | 
|  | 208 | iniset $HEAT_CONF DEFAULT plugin_dirs $HEAT_PLUGIN_DIR | 
|  | 209 | fi | 
|  | 210 |  | 
|  | 211 | for heat_plugin in $ENABLE_HEAT_PLUGINS; do | 
|  | 212 | if [ -d $HEAT_DIR/contrib/$heat_plugin ]; then | 
|  | 213 | setup_package $HEAT_DIR/contrib/$heat_plugin -e | 
|  | 214 | ln -s $HEAT_DIR/contrib/$heat_plugin/$heat_plugin/resources $HEAT_PLUGIN_DIR/$heat_plugin | 
|  | 215 | else | 
|  | 216 | : # clear retval on the test so that we can roll up errors | 
|  | 217 | err $LINENO "Requested Heat plugin(${heat_plugin}) not found." | 
|  | 218 | err_count=$(($err_count + 1)) | 
|  | 219 | fi | 
|  | 220 | done | 
|  | 221 | [ $err_count -eq 0 ] || die $LINENO "$err_count of the requested Heat plugins could not be installed." | 
| Steve Baker | bfdad75 | 2012-08-18 09:00:42 +1200 | [diff] [blame] | 222 | } | 
|  | 223 |  | 
|  | 224 | # init_heat() - Initialize database | 
| Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame] | 225 | function init_heat { | 
| Steve Baker | bfdad75 | 2012-08-18 09:00:42 +1200 | [diff] [blame] | 226 |  | 
|  | 227 | # (re)create heat database | 
| Ihar Hrachyshka | 157c84b | 2014-10-06 13:29:39 +0200 | [diff] [blame] | 228 | recreate_database heat | 
| Steve Baker | bfdad75 | 2012-08-18 09:00:42 +1200 | [diff] [blame] | 229 |  | 
| Sirushti Murugesan | 9e68af7 | 2015-06-16 23:25:17 +0530 | [diff] [blame] | 230 | $HEAT_BIN_DIR/heat-manage db_sync | 
| Steve Baker | c324908 | 2013-04-09 13:41:47 +1200 | [diff] [blame] | 231 | create_heat_cache_dir | 
|  | 232 | } | 
|  | 233 |  | 
|  | 234 | # create_heat_cache_dir() - Part of the init_heat() process | 
| Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame] | 235 | function create_heat_cache_dir { | 
| Steve Baker | c324908 | 2013-04-09 13:41:47 +1200 | [diff] [blame] | 236 | # Create cache dirs | 
| Dean Troyer | 8421c2b | 2015-03-16 13:52:19 -0500 | [diff] [blame] | 237 | sudo install -d -o $STACK_USER $HEAT_AUTH_CACHE_DIR | 
| Steve Baker | bfdad75 | 2012-08-18 09:00:42 +1200 | [diff] [blame] | 238 | } | 
|  | 239 |  | 
| Steve Baker | 32761a4 | 2012-11-05 09:57:57 +1300 | [diff] [blame] | 240 | # install_heatclient() - Collect source and prepare | 
| Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame] | 241 | function install_heatclient { | 
| Sean Dague | e08ab10 | 2014-11-13 17:09:28 -0500 | [diff] [blame] | 242 | if use_library_from_git "python-heatclient"; then | 
|  | 243 | git_clone_by_name "python-heatclient" | 
|  | 244 | setup_dev_lib "python-heatclient" | 
|  | 245 | sudo install -D -m 0644 -o $STACK_USER {${GITDIR["python-heatclient"]}/tools/,/etc/bash_completion.d/}heat.bash_completion | 
| Sean Dague | 5cb1906 | 2014-11-01 01:37:45 +0100 | [diff] [blame] | 246 | fi | 
| Steve Baker | 32761a4 | 2012-11-05 09:57:57 +1300 | [diff] [blame] | 247 | } | 
|  | 248 |  | 
| Steve Baker | bfdad75 | 2012-08-18 09:00:42 +1200 | [diff] [blame] | 249 | # install_heat() - Collect source and prepare | 
| Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame] | 250 | function install_heat { | 
| Steve Baker | bfdad75 | 2012-08-18 09:00:42 +1200 | [diff] [blame] | 251 | git_clone $HEAT_REPO $HEAT_DIR $HEAT_BRANCH | 
| Sergey Kraynev | a38bc5b | 2014-12-16 04:25:11 -0500 | [diff] [blame] | 252 | setup_develop $HEAT_DIR | 
| Oleksii Chuprykov | a692810 | 2015-06-11 08:56:58 -0400 | [diff] [blame] | 253 | if [ "$HEAT_USE_MOD_WSGI" == "True" ]; then | 
|  | 254 | install_apache_wsgi | 
|  | 255 | fi | 
| Steve Baker | bfdad75 | 2012-08-18 09:00:42 +1200 | [diff] [blame] | 256 | } | 
|  | 257 |  | 
| Steve Baker | 315971d | 2014-05-27 12:24:18 +1200 | [diff] [blame] | 258 | # install_heat_other() - Collect source and prepare | 
|  | 259 | function install_heat_other { | 
|  | 260 | git_clone $HEAT_CFNTOOLS_REPO $HEAT_CFNTOOLS_DIR $HEAT_CFNTOOLS_BRANCH | 
|  | 261 | git_clone $HEAT_TEMPLATES_REPO $HEAT_TEMPLATES_REPO_DIR $HEAT_TEMPLATES_BRANCH | 
| Steve Baker | 1681995 | 2015-03-18 13:45:40 +1300 | [diff] [blame] | 262 | git_clone $OAC_REPO $OAC_DIR $OAC_BRANCH | 
|  | 263 | git_clone $OCC_REPO $OCC_DIR $OCC_BRANCH | 
|  | 264 | git_clone $ORC_REPO $ORC_DIR $ORC_BRANCH | 
|  | 265 | git_clone $DIB_UTILS_REPO $DIB_UTILS_DIR $DIB_UTILS_BRANCH | 
| Steve Baker | 315971d | 2014-05-27 12:24:18 +1200 | [diff] [blame] | 266 | } | 
|  | 267 |  | 
| Steve Baker | bfdad75 | 2012-08-18 09:00:42 +1200 | [diff] [blame] | 268 | # start_heat() - Start running processes, including screen | 
| Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame] | 269 | function start_heat { | 
| Sirushti Murugesan | 9e68af7 | 2015-06-16 23:25:17 +0530 | [diff] [blame] | 270 | run_process h-eng "$HEAT_BIN_DIR/heat-engine --config-file=$HEAT_CONF" | 
| Oleksii Chuprykov | a692810 | 2015-06-11 08:56:58 -0400 | [diff] [blame] | 271 |  | 
|  | 272 | # If the site is not enabled then we are in a grenade scenario | 
| Ian Wienand | 5cdee8d | 2015-10-19 14:17:18 +1100 | [diff] [blame] | 273 | local enabled_site_file | 
|  | 274 | enabled_site_file=$(apache_site_config_for heat-api) | 
| Oleksii Chuprykov | a692810 | 2015-06-11 08:56:58 -0400 | [diff] [blame] | 275 | if [ -f ${enabled_site_file} ] && [ "$HEAT_USE_MOD_WSGI" == "True" ]; then | 
|  | 276 | enable_apache_site heat-api | 
|  | 277 | enable_apache_site heat-api-cfn | 
|  | 278 | enable_apache_site heat-api-cloudwatch | 
|  | 279 | restart_apache_server | 
|  | 280 | tail_log heat-api /var/log/$APACHE_NAME/heat-api.log | 
|  | 281 | tail_log heat-api-cfn /var/log/$APACHE_NAME/heat-api-cfn.log | 
|  | 282 | tail_log heat-api-cloudwatch /var/log/$APACHE_NAME/heat-api-cloudwatch.log | 
|  | 283 | else | 
|  | 284 | run_process h-api "$HEAT_BIN_DIR/heat-api --config-file=$HEAT_CONF" | 
|  | 285 | run_process h-api-cfn "$HEAT_BIN_DIR/heat-api-cfn --config-file=$HEAT_CONF" | 
|  | 286 | run_process h-api-cw "$HEAT_BIN_DIR/heat-api-cloudwatch --config-file=$HEAT_CONF" | 
|  | 287 | fi | 
| Steve Baker | bfdad75 | 2012-08-18 09:00:42 +1200 | [diff] [blame] | 288 | } | 
|  | 289 |  | 
| Dean Troyer | 699a29f | 2012-09-10 14:10:27 -0500 | [diff] [blame] | 290 | # stop_heat() - Stop running processes | 
| Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame] | 291 | function stop_heat { | 
| Kieran Spear | 7033829 | 2013-05-28 11:31:31 +1000 | [diff] [blame] | 292 | # Kill the screen windows | 
| Oleksii Chuprykov | a692810 | 2015-06-11 08:56:58 -0400 | [diff] [blame] | 293 | stop_process h-eng | 
|  | 294 |  | 
|  | 295 | if [ "$HEAT_USE_MOD_WSGI" == "True" ]; then | 
|  | 296 | disable_apache_site heat-api | 
|  | 297 | disable_apache_site heat-api-cfn | 
|  | 298 | disable_apache_site heat-api-cloudwatch | 
|  | 299 | restart_apache_server | 
|  | 300 | else | 
|  | 301 | local serv | 
|  | 302 | for serv in h-api h-api-cfn h-api-cw; do | 
|  | 303 | stop_process $serv | 
|  | 304 | done | 
|  | 305 | fi | 
|  | 306 |  | 
| Steve Baker | bfdad75 | 2012-08-18 09:00:42 +1200 | [diff] [blame] | 307 | } | 
| Dean Troyer | 7903b79 | 2012-09-13 17:16:12 -0500 | [diff] [blame] | 308 |  | 
| Oleksii Chuprykov | a692810 | 2015-06-11 08:56:58 -0400 | [diff] [blame] | 309 | # _cleanup_heat_apache_wsgi() - Remove wsgi files, disable and remove apache vhost file | 
|  | 310 | function _cleanup_heat_apache_wsgi { | 
|  | 311 | sudo rm -f $(apache_site_config_for heat-api) | 
|  | 312 | sudo rm -f $(apache_site_config_for heat-api-cfn) | 
|  | 313 | sudo rm -f $(apache_site_config_for heat-api-cloudwatch) | 
|  | 314 | } | 
|  | 315 |  | 
|  | 316 | # _config_heat_apache_wsgi() - Set WSGI config files of Heat | 
|  | 317 | function _config_heat_apache_wsgi { | 
|  | 318 |  | 
| Ian Wienand | 5cdee8d | 2015-10-19 14:17:18 +1100 | [diff] [blame] | 319 | local heat_apache_conf | 
|  | 320 | heat_apache_conf=$(apache_site_config_for heat-api) | 
|  | 321 | local heat_cfn_apache_conf | 
|  | 322 | heat_cfn_apache_conf=$(apache_site_config_for heat-api-cfn) | 
|  | 323 | local heat_cloudwatch_apache_conf | 
|  | 324 | heat_cloudwatch_apache_conf=$(apache_site_config_for heat-api-cloudwatch) | 
| Oleksii Chuprykov | a692810 | 2015-06-11 08:56:58 -0400 | [diff] [blame] | 325 | local heat_ssl="" | 
|  | 326 | local heat_certfile="" | 
|  | 327 | local heat_keyfile="" | 
|  | 328 | local heat_api_port=$HEAT_API_PORT | 
|  | 329 | local heat_cfn_api_port=$HEAT_API_CFN_PORT | 
|  | 330 | local heat_cw_api_port=$HEAT_API_CW_PORT | 
|  | 331 | local venv_path="" | 
|  | 332 |  | 
|  | 333 | sudo cp $FILES/apache-heat-api.template $heat_apache_conf | 
|  | 334 | sudo sed -e " | 
|  | 335 | s|%PUBLICPORT%|$heat_api_port|g; | 
|  | 336 | s|%APACHE_NAME%|$APACHE_NAME|g; | 
|  | 337 | s|%HEAT_BIN_DIR%|$HEAT_BIN_DIR|g; | 
|  | 338 | s|%SSLENGINE%|$heat_ssl|g; | 
|  | 339 | s|%SSLCERTFILE%|$heat_certfile|g; | 
|  | 340 | s|%SSLKEYFILE%|$heat_keyfile|g; | 
|  | 341 | s|%USER%|$STACK_USER|g; | 
|  | 342 | s|%VIRTUALENV%|$venv_path|g | 
|  | 343 | " -i $heat_apache_conf | 
|  | 344 |  | 
|  | 345 | sudo cp $FILES/apache-heat-api-cfn.template $heat_cfn_apache_conf | 
|  | 346 | sudo sed -e " | 
|  | 347 | s|%PUBLICPORT%|$heat_cfn_api_port|g; | 
|  | 348 | s|%APACHE_NAME%|$APACHE_NAME|g; | 
|  | 349 | s|%HEAT_BIN_DIR%|$HEAT_BIN_DIR|g; | 
|  | 350 | s|%SSLENGINE%|$heat_ssl|g; | 
|  | 351 | s|%SSLCERTFILE%|$heat_certfile|g; | 
|  | 352 | s|%SSLKEYFILE%|$heat_keyfile|g; | 
|  | 353 | s|%USER%|$STACK_USER|g; | 
|  | 354 | s|%VIRTUALENV%|$venv_path|g | 
|  | 355 | " -i $heat_cfn_apache_conf | 
|  | 356 |  | 
|  | 357 | sudo cp $FILES/apache-heat-api-cloudwatch.template $heat_cloudwatch_apache_conf | 
|  | 358 | sudo sed -e " | 
|  | 359 | s|%PUBLICPORT%|$heat_cw_api_port|g; | 
|  | 360 | s|%APACHE_NAME%|$APACHE_NAME|g; | 
|  | 361 | s|%HEAT_BIN_DIR%|$HEAT_BIN_DIR|g; | 
|  | 362 | s|%SSLENGINE%|$heat_ssl|g; | 
|  | 363 | s|%SSLCERTFILE%|$heat_certfile|g; | 
|  | 364 | s|%SSLKEYFILE%|$heat_keyfile|g; | 
|  | 365 | s|%USER%|$STACK_USER|g; | 
|  | 366 | s|%VIRTUALENV%|$venv_path|g | 
|  | 367 | " -i $heat_cloudwatch_apache_conf | 
|  | 368 | } | 
|  | 369 |  | 
|  | 370 |  | 
| Steven Hardy | 33d1f86 | 2014-02-13 15:00:33 +0000 | [diff] [blame] | 371 | # create_heat_accounts() - Set up common required heat accounts | 
| Ian Wienand | aee18c7 | 2014-02-21 15:35:08 +1100 | [diff] [blame] | 372 | function create_heat_accounts { | 
| Steve Baker | 744c2af | 2014-12-16 12:00:40 +1300 | [diff] [blame] | 373 | if [[ "$HEAT_STANDALONE" != "True" ]]; then | 
| Bartosz Górski | 0abde39 | 2014-02-28 14:15:19 +0100 | [diff] [blame] | 374 |  | 
| Steve Baker | 744c2af | 2014-12-16 12:00:40 +1300 | [diff] [blame] | 375 | create_service_user "heat" "admin" | 
| Bartosz Górski | 0abde39 | 2014-02-28 14:15:19 +0100 | [diff] [blame] | 376 |  | 
| Steve Baker | 744c2af | 2014-12-16 12:00:40 +1300 | [diff] [blame] | 377 | if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then | 
| Bartosz Górski | 0abde39 | 2014-02-28 14:15:19 +0100 | [diff] [blame] | 378 |  | 
| Jamie Lennox | b17ad75 | 2015-05-29 06:04:47 +0000 | [diff] [blame] | 379 | get_or_create_service "heat" "orchestration" "Heat Orchestration Service" | 
|  | 380 | get_or_create_endpoint "orchestration" \ | 
| Steve Baker | 744c2af | 2014-12-16 12:00:40 +1300 | [diff] [blame] | 381 | "$REGION_NAME" \ | 
|  | 382 | "$SERVICE_PROTOCOL://$HEAT_API_HOST:$HEAT_API_PORT/v1/\$(tenant_id)s" \ | 
|  | 383 | "$SERVICE_PROTOCOL://$HEAT_API_HOST:$HEAT_API_PORT/v1/\$(tenant_id)s" \ | 
|  | 384 | "$SERVICE_PROTOCOL://$HEAT_API_HOST:$HEAT_API_PORT/v1/\$(tenant_id)s" | 
|  | 385 |  | 
| Jamie Lennox | b17ad75 | 2015-05-29 06:04:47 +0000 | [diff] [blame] | 386 | get_or_create_service "heat-cfn" "cloudformation" "Heat CloudFormation Service" | 
|  | 387 | get_or_create_endpoint "cloudformation"  \ | 
| Steve Baker | 744c2af | 2014-12-16 12:00:40 +1300 | [diff] [blame] | 388 | "$REGION_NAME" \ | 
|  | 389 | "$SERVICE_PROTOCOL://$HEAT_API_CFN_HOST:$HEAT_API_CFN_PORT/v1" \ | 
|  | 390 | "$SERVICE_PROTOCOL://$HEAT_API_CFN_HOST:$HEAT_API_CFN_PORT/v1" \ | 
|  | 391 | "$SERVICE_PROTOCOL://$HEAT_API_CFN_HOST:$HEAT_API_CFN_PORT/v1" | 
|  | 392 | fi | 
|  | 393 |  | 
|  | 394 | # heat_stack_user role is for users created by Heat | 
|  | 395 | get_or_create_role "heat_stack_user" | 
| Steven Hardy | 57d478d | 2014-02-28 16:37:43 +0000 | [diff] [blame] | 396 | fi | 
|  | 397 |  | 
| Steve Baker | 16aca8a | 2014-03-11 14:01:57 +1300 | [diff] [blame] | 398 | if [[ "$HEAT_STACK_DOMAIN" == "True" ]]; then | 
|  | 399 | # Note we have to pass token/endpoint here because the current endpoint and | 
|  | 400 | # version negotiation in OSC means just --os-identity-api-version=3 won't work | 
| Steve Martinelli | b74e01c | 2014-12-18 01:35:35 -0500 | [diff] [blame] | 401 | D_ID=$(openstack --os-token $OS_TOKEN --os-url=$KEYSTONE_SERVICE_URI_V3 \ | 
| Bartosz Górski | 0abde39 | 2014-02-28 14:15:19 +0100 | [diff] [blame] | 402 | --os-identity-api-version=3 domain list | grep ' heat ' | get_field 1) | 
|  | 403 |  | 
|  | 404 | if [[ -z "$D_ID" ]]; then | 
| Steve Martinelli | b74e01c | 2014-12-18 01:35:35 -0500 | [diff] [blame] | 405 | D_ID=$(openstack --os-token $OS_TOKEN --os-url=$KEYSTONE_SERVICE_URI_V3 \ | 
| Bartosz Górski | 0abde39 | 2014-02-28 14:15:19 +0100 | [diff] [blame] | 406 | --os-identity-api-version=3 domain create heat \ | 
|  | 407 | --description "Owns users and projects created by heat" \ | 
|  | 408 | | grep ' id ' | get_field 2) | 
| Sirushti Murugesan | 2f92c8d | 2014-10-09 14:35:38 +0530 | [diff] [blame] | 409 | iniset $HEAT_CONF DEFAULT stack_user_domain_id ${D_ID} | 
| Bartosz Górski | 0abde39 | 2014-02-28 14:15:19 +0100 | [diff] [blame] | 410 |  | 
| Steve Martinelli | b74e01c | 2014-12-18 01:35:35 -0500 | [diff] [blame] | 411 | openstack --os-token $OS_TOKEN --os-url=$KEYSTONE_SERVICE_URI_V3 \ | 
| Bartosz Górski | 0abde39 | 2014-02-28 14:15:19 +0100 | [diff] [blame] | 412 | --os-identity-api-version=3 user create --password $SERVICE_PASSWORD \ | 
|  | 413 | --domain $D_ID heat_domain_admin \ | 
|  | 414 | --description "Manages users and projects created by heat" | 
| Steve Martinelli | b74e01c | 2014-12-18 01:35:35 -0500 | [diff] [blame] | 415 | openstack --os-token $OS_TOKEN --os-url=$KEYSTONE_SERVICE_URI_V3 \ | 
| Bartosz Górski | 0abde39 | 2014-02-28 14:15:19 +0100 | [diff] [blame] | 416 | --os-identity-api-version=3 role add \ | 
|  | 417 | --user heat_domain_admin --domain ${D_ID} admin | 
|  | 418 | iniset $HEAT_CONF DEFAULT stack_domain_admin heat_domain_admin | 
|  | 419 | iniset $HEAT_CONF DEFAULT stack_domain_admin_password $SERVICE_PASSWORD | 
|  | 420 | fi | 
| Steve Baker | 16aca8a | 2014-03-11 14:01:57 +1300 | [diff] [blame] | 421 | fi | 
| Steven Hardy | 33d1f86 | 2014-02-13 15:00:33 +0000 | [diff] [blame] | 422 | } | 
|  | 423 |  | 
| Steve Baker | 249e36d | 2015-03-05 14:01:45 +1300 | [diff] [blame] | 424 | # build_heat_pip_mirror() - Build a pip mirror containing heat agent projects | 
|  | 425 | function build_heat_pip_mirror { | 
| Steve Baker | 1681995 | 2015-03-18 13:45:40 +1300 | [diff] [blame] | 426 | local project_dirs="$OCC_DIR $OAC_DIR $ORC_DIR $HEAT_CFNTOOLS_DIR $DIB_UTILS_DIR" | 
| Steve Baker | 249e36d | 2015-03-05 14:01:45 +1300 | [diff] [blame] | 427 | local projpath proj package | 
| Steve Baker | 2a6009c | 2014-05-05 16:13:39 +1200 | [diff] [blame] | 428 |  | 
| Steve Baker | 249e36d | 2015-03-05 14:01:45 +1300 | [diff] [blame] | 429 | rm -rf $HEAT_PIP_REPO | 
|  | 430 | mkdir -p $HEAT_PIP_REPO | 
| Steve Baker | 2a6009c | 2014-05-05 16:13:39 +1200 | [diff] [blame] | 431 |  | 
| Steve Baker | 249e36d | 2015-03-05 14:01:45 +1300 | [diff] [blame] | 432 | echo "<html><body>" > $HEAT_PIP_REPO/index.html | 
|  | 433 | for projpath in $project_dirs; do | 
|  | 434 | proj=$(basename $projpath) | 
|  | 435 | mkdir -p $HEAT_PIP_REPO/$proj | 
|  | 436 | pushd $projpath | 
|  | 437 | rm -rf dist | 
|  | 438 | python setup.py sdist | 
|  | 439 | pushd dist | 
|  | 440 | package=$(ls *) | 
|  | 441 | mv $package $HEAT_PIP_REPO/$proj/$package | 
|  | 442 | popd | 
|  | 443 |  | 
|  | 444 | echo "<html><body><a href=\"$package\">$package</a></body></html>" > $HEAT_PIP_REPO/$proj/index.html | 
|  | 445 | echo "<a href=\"$proj\">$proj</a><br/>" >> $HEAT_PIP_REPO/index.html | 
|  | 446 |  | 
|  | 447 | popd | 
|  | 448 | done | 
|  | 449 |  | 
|  | 450 | echo "</body></html>" >> $HEAT_PIP_REPO/index.html | 
|  | 451 |  | 
| Ian Wienand | ada886d | 2015-10-07 14:06:26 +1100 | [diff] [blame] | 452 | local heat_pip_repo_apache_conf | 
|  | 453 | heat_pip_repo_apache_conf=$(apache_site_config_for heat_pip_repo) | 
| Steve Baker | 249e36d | 2015-03-05 14:01:45 +1300 | [diff] [blame] | 454 |  | 
|  | 455 | sudo cp $FILES/apache-heat-pip-repo.template $heat_pip_repo_apache_conf | 
|  | 456 | sudo sed -e " | 
|  | 457 | s|%HEAT_PIP_REPO%|$HEAT_PIP_REPO|g; | 
|  | 458 | s|%HEAT_PIP_REPO_PORT%|$HEAT_PIP_REPO_PORT|g; | 
|  | 459 | s|%APACHE_NAME%|$APACHE_NAME|g; | 
|  | 460 | " -i $heat_pip_repo_apache_conf | 
|  | 461 | enable_apache_site heat_pip_repo | 
|  | 462 | restart_apache_server | 
| Steve Baker | 11cf7b6 | 2015-03-27 09:08:53 +1300 | [diff] [blame] | 463 | sudo iptables -I INPUT -d $HOST_IP -p tcp --dport $HEAT_PIP_REPO_PORT -j ACCEPT || true | 
| Steve Baker | 2a6009c | 2014-05-05 16:13:39 +1200 | [diff] [blame] | 464 | } | 
|  | 465 |  | 
| Dean Troyer | 7903b79 | 2012-09-13 17:16:12 -0500 | [diff] [blame] | 466 | # Restore xtrace | 
|  | 467 | $XTRACE | 
| Sean Dague | 584d90e | 2013-03-29 14:34:53 -0400 | [diff] [blame] | 468 |  | 
| Adam Spiers | 6a5aa7c | 2013-10-24 11:27:02 +0100 | [diff] [blame] | 469 | # Tell emacs to use shell-script-mode | 
|  | 470 | ## Local variables: | 
|  | 471 | ## mode: shell-script | 
|  | 472 | ## End: |