This removes all of the heat code from the devstack tree, in favor of the
devstack plugin in Heat's tree.
Depends-On: I4bed1e5cef5afa7b049b07640086a86a3f881e13
Depends-On: Ic392bcc24bc374ee8511a94f1d8f6ac23131c7e3
Change-Id: I5b60422bf1f5fa78aa8f3383f7a222e0356d9e42
... | ... |
@@ -49,7 +49,6 @@ source $TOP_DIR/lib/nova |
49 | 49 |
source $TOP_DIR/lib/placement |
50 | 50 |
source $TOP_DIR/lib/cinder |
51 | 51 |
source $TOP_DIR/lib/swift |
52 |
-source $TOP_DIR/lib/heat |
|
53 | 52 |
source $TOP_DIR/lib/neutron |
54 | 53 |
source $TOP_DIR/lib/neutron-legacy |
55 | 54 |
|
... | ... |
@@ -108,7 +107,7 @@ if is_service_enabled nova && [[ -r $NOVA_PLUGINS/hypervisor-$VIRT_DRIVER ]]; th |
108 | 108 |
fi |
109 | 109 |
|
110 | 110 |
# Clean out /etc |
111 |
-sudo rm -rf /etc/keystone /etc/glance /etc/nova /etc/cinder /etc/swift /etc/heat /etc/neutron /etc/openstack/ |
|
111 |
+sudo rm -rf /etc/keystone /etc/glance /etc/nova /etc/cinder /etc/swift /etc/neutron /etc/openstack/ |
|
112 | 112 |
|
113 | 113 |
# Clean out tgt |
114 | 114 |
sudo rm -f /etc/tgt/conf.d/* |
115 | 115 |
deleted file mode 100644 |
... | ... |
@@ -1,27 +0,0 @@ |
1 |
-Listen %PUBLICPORT% |
|
2 |
- |
|
3 |
-<VirtualHost *:%PUBLICPORT%> |
|
4 |
- WSGIDaemonProcess heat-api-cfn processes=2 threads=1 user=%USER% display-name=%{GROUP} %VIRTUALENV% |
|
5 |
- WSGIProcessGroup heat-api-cfn |
|
6 |
- WSGIScriptAlias / %HEAT_BIN_DIR%/heat-wsgi-api-cfn |
|
7 |
- WSGIApplicationGroup %{GLOBAL} |
|
8 |
- WSGIPassAuthorization On |
|
9 |
- AllowEncodedSlashes On |
|
10 |
- <IfVersion >= 2.4> |
|
11 |
- ErrorLogFormat "%{cu}t %M" |
|
12 |
- </IfVersion> |
|
13 |
- ErrorLog /var/log/%APACHE_NAME%/heat-api-cfn.log |
|
14 |
- %SSLENGINE% |
|
15 |
- %SSLCERTFILE% |
|
16 |
- %SSLKEYFILE% |
|
17 |
- |
|
18 |
- <Directory %HEAT_BIN_DIR%> |
|
19 |
- <IfVersion >= 2.4> |
|
20 |
- Require all granted |
|
21 |
- </IfVersion> |
|
22 |
- <IfVersion < 2.4> |
|
23 |
- Order allow,deny |
|
24 |
- Allow from all |
|
25 |
- </IfVersion> |
|
26 |
- </Directory> |
|
27 |
-</VirtualHost> |
28 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,27 +0,0 @@ |
1 |
-Listen %PUBLICPORT% |
|
2 |
- |
|
3 |
-<VirtualHost *:%PUBLICPORT%> |
|
4 |
- WSGIDaemonProcess heat-api-cloudwatch processes=2 threads=1 user=%USER% display-name=%{GROUP} %VIRTUALENV% |
|
5 |
- WSGIProcessGroup heat-api-cloudwatch |
|
6 |
- WSGIScriptAlias / %HEAT_BIN_DIR%/heat-wsgi-api-cloudwatch |
|
7 |
- WSGIApplicationGroup %{GLOBAL} |
|
8 |
- WSGIPassAuthorization On |
|
9 |
- AllowEncodedSlashes On |
|
10 |
- <IfVersion >= 2.4> |
|
11 |
- ErrorLogFormat "%{cu}t %M" |
|
12 |
- </IfVersion> |
|
13 |
- ErrorLog /var/log/%APACHE_NAME%/heat-api-cloudwatch.log |
|
14 |
- %SSLENGINE% |
|
15 |
- %SSLCERTFILE% |
|
16 |
- %SSLKEYFILE% |
|
17 |
- |
|
18 |
- <Directory %HEAT_BIN_DIR%> |
|
19 |
- <IfVersion >= 2.4> |
|
20 |
- Require all granted |
|
21 |
- </IfVersion> |
|
22 |
- <IfVersion < 2.4> |
|
23 |
- Order allow,deny |
|
24 |
- Allow from all |
|
25 |
- </IfVersion> |
|
26 |
- </Directory> |
|
27 |
-</VirtualHost> |
28 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,27 +0,0 @@ |
1 |
-Listen %PUBLICPORT% |
|
2 |
- |
|
3 |
-<VirtualHost *:%PUBLICPORT%> |
|
4 |
- WSGIDaemonProcess heat-api processes=3 threads=1 user=%USER% display-name=%{GROUP} %VIRTUALENV% |
|
5 |
- WSGIProcessGroup heat-api |
|
6 |
- WSGIScriptAlias / %HEAT_BIN_DIR%/heat-wsgi-api |
|
7 |
- WSGIApplicationGroup %{GLOBAL} |
|
8 |
- WSGIPassAuthorization On |
|
9 |
- AllowEncodedSlashes On |
|
10 |
- <IfVersion >= 2.4> |
|
11 |
- ErrorLogFormat "%{cu}t %M" |
|
12 |
- </IfVersion> |
|
13 |
- ErrorLog /var/log/%APACHE_NAME%/heat-api.log |
|
14 |
- %SSLENGINE% |
|
15 |
- %SSLCERTFILE% |
|
16 |
- %SSLKEYFILE% |
|
17 |
- |
|
18 |
- <Directory %HEAT_BIN_DIR%> |
|
19 |
- <IfVersion >= 2.4> |
|
20 |
- Require all granted |
|
21 |
- </IfVersion> |
|
22 |
- <IfVersion < 2.4> |
|
23 |
- Order allow,deny |
|
24 |
- Allow from all |
|
25 |
- </IfVersion> |
|
26 |
- </Directory> |
|
27 |
-</VirtualHost> |
28 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,15 +0,0 @@ |
1 |
-Listen %HEAT_PIP_REPO_PORT% |
|
2 |
- |
|
3 |
-<VirtualHost *:%HEAT_PIP_REPO_PORT%> |
|
4 |
- DocumentRoot %HEAT_PIP_REPO% |
|
5 |
- <Directory %HEAT_PIP_REPO%> |
|
6 |
- DirectoryIndex index.html |
|
7 |
- Require all granted |
|
8 |
- Order allow,deny |
|
9 |
- allow from all |
|
10 |
- </Directory> |
|
11 |
- |
|
12 |
- ErrorLog /var/log/%APACHE_NAME%/heat_pip_repo_error.log |
|
13 |
- LogLevel warn |
|
14 |
- CustomLog /var/log/%APACHE_NAME%/heat_pip_repo_access.log combined |
|
15 |
-</VirtualHost> |
2 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,467 +0,0 @@ |
1 |
-#!/bin/bash |
|
2 |
-# |
|
3 |
-# lib/heat |
|
4 |
-# Install and start **Heat** service |
|
5 |
- |
|
6 |
-# To enable, add the following to localrc |
|
7 |
-# |
|
8 |
-# ENABLED_SERVICES+=,heat,h-api,h-api-cfn,h-api-cw,h-eng |
|
9 |
- |
|
10 |
-# Dependencies: |
|
11 |
-# (none) |
|
12 |
- |
|
13 |
-# stack.sh |
|
14 |
-# --------- |
|
15 |
-# - install_heatclient |
|
16 |
-# - install_heat |
|
17 |
-# - configure_heatclient |
|
18 |
-# - configure_heat |
|
19 |
-# - _config_heat_apache_wsgi |
|
20 |
-# - init_heat |
|
21 |
-# - start_heat |
|
22 |
-# - stop_heat |
|
23 |
-# - cleanup_heat |
|
24 |
- |
|
25 |
-# Save trace setting |
|
26 |
-_XTRACE_HEAT=$(set +o | grep xtrace) |
|
27 |
-set +o xtrace |
|
28 |
- |
|
29 |
- |
|
30 |
-# Defaults |
|
31 |
-# -------- |
|
32 |
- |
|
33 |
-# set up default directories |
|
34 |
-GITDIR["python-heatclient"]=$DEST/python-heatclient |
|
35 |
- |
|
36 |
-# Toggle for deploying Heat-API under HTTPD + mod_wsgi |
|
37 |
-HEAT_USE_MOD_WSGI=${HEAT_USE_MOD_WSGI:-False} |
|
38 |
- |
|
39 |
-HEAT_DIR=$DEST/heat |
|
40 |
-HEAT_CFNTOOLS_DIR=$DEST/heat-cfntools |
|
41 |
-HEAT_TEMPLATES_REPO_DIR=$DEST/heat-templates |
|
42 |
-OCC_DIR=$DEST/os-collect-config |
|
43 |
-ORC_DIR=$DEST/os-refresh-config |
|
44 |
-OAC_DIR=$DEST/os-apply-config |
|
45 |
- |
|
46 |
-HEAT_PIP_REPO=$DATA_DIR/heat-pip-repo |
|
47 |
-HEAT_PIP_REPO_PORT=${HEAT_PIP_REPO_PORT:-8899} |
|
48 |
- |
|
49 |
-HEAT_AUTH_CACHE_DIR=${HEAT_AUTH_CACHE_DIR:-/var/cache/heat} |
|
50 |
-HEAT_STANDALONE=$(trueorfalse False HEAT_STANDALONE) |
|
51 |
-HEAT_ENABLE_ADOPT_ABANDON=$(trueorfalse False HEAT_ENABLE_ADOPT_ABANDON) |
|
52 |
-HEAT_CONF_DIR=/etc/heat |
|
53 |
-HEAT_CONF=$HEAT_CONF_DIR/heat.conf |
|
54 |
-HEAT_ENV_DIR=$HEAT_CONF_DIR/environment.d |
|
55 |
-HEAT_TEMPLATES_DIR=$HEAT_CONF_DIR/templates |
|
56 |
-HEAT_API_HOST=${HEAT_API_HOST:-$HOST_IP} |
|
57 |
-HEAT_API_PORT=${HEAT_API_PORT:-8004} |
|
58 |
-HEAT_SERVICE_USER=${HEAT_SERVICE_USER:-heat} |
|
59 |
-HEAT_TRUSTEE_USER=${HEAT_TRUSTEE_USER:-$HEAT_SERVICE_USER} |
|
60 |
-HEAT_TRUSTEE_PASSWORD=${HEAT_TRUSTEE_PASSWORD:-$SERVICE_PASSWORD} |
|
61 |
-HEAT_TRUSTEE_DOMAIN=${HEAT_TRUSTEE_DOMAIN:-default} |
|
62 |
- |
|
63 |
-# Support entry points installation of console scripts |
|
64 |
-HEAT_BIN_DIR=$(get_python_exec_prefix) |
|
65 |
- |
|
66 |
-# other default options |
|
67 |
-if [[ "$HEAT_STANDALONE" = "True" ]]; then |
|
68 |
- # for standalone, use defaults which require no service user |
|
69 |
- HEAT_STACK_DOMAIN=$(trueorfalse False HEAT_STACK_DOMAIN) |
|
70 |
- HEAT_DEFERRED_AUTH=${HEAT_DEFERRED_AUTH:-password} |
|
71 |
- if [[ ${HEAT_DEFERRED_AUTH} != "password" ]]; then |
|
72 |
- # Heat does not support keystone trusts when deployed in |
|
73 |
- # standalone mode |
|
74 |
- die $LINENO \ |
|
75 |
- 'HEAT_DEFERRED_AUTH can only be set to "password" when HEAT_STANDALONE is True.' |
|
76 |
- fi |
|
77 |
-else |
|
78 |
- HEAT_STACK_DOMAIN=$(trueorfalse True HEAT_STACK_DOMAIN) |
|
79 |
- HEAT_DEFERRED_AUTH=${HEAT_DEFERRED_AUTH:-} |
|
80 |
-fi |
|
81 |
-HEAT_PLUGIN_DIR=${HEAT_PLUGIN_DIR:-$DATA_DIR/heat/plugins} |
|
82 |
-ENABLE_HEAT_PLUGINS=${ENABLE_HEAT_PLUGINS:-} |
|
83 |
- |
|
84 |
-# Functions |
|
85 |
-# --------- |
|
86 |
- |
|
87 |
-# Test if any Heat services are enabled |
|
88 |
-# is_heat_enabled |
|
89 |
-function is_heat_enabled { |
|
90 |
- [[ ,${ENABLED_SERVICES} =~ ,"h-" ]] && return 0 |
|
91 |
- return 1 |
|
92 |
-} |
|
93 |
- |
|
94 |
-# cleanup_heat() - Remove residual data files, anything left over from previous |
|
95 |
-# runs that a clean run would need to clean up |
|
96 |
-function cleanup_heat { |
|
97 |
- sudo rm -rf $HEAT_AUTH_CACHE_DIR |
|
98 |
- sudo rm -rf $HEAT_ENV_DIR |
|
99 |
- sudo rm -rf $HEAT_TEMPLATES_DIR |
|
100 |
- sudo rm -rf $HEAT_CONF_DIR |
|
101 |
-} |
|
102 |
- |
|
103 |
-# configure_heat() - Set config files, create data dirs, etc |
|
104 |
-function configure_heat { |
|
105 |
- |
|
106 |
- sudo install -d -o $STACK_USER $HEAT_CONF_DIR |
|
107 |
- # remove old config files |
|
108 |
- rm -f $HEAT_CONF_DIR/heat-*.conf |
|
109 |
- |
|
110 |
- HEAT_API_CFN_HOST=${HEAT_API_CFN_HOST:-$HOST_IP} |
|
111 |
- HEAT_API_CFN_PORT=${HEAT_API_CFN_PORT:-8000} |
|
112 |
- HEAT_ENGINE_HOST=${HEAT_ENGINE_HOST:-$SERVICE_HOST} |
|
113 |
- HEAT_ENGINE_PORT=${HEAT_ENGINE_PORT:-8001} |
|
114 |
- HEAT_API_CW_HOST=${HEAT_API_CW_HOST:-$HOST_IP} |
|
115 |
- HEAT_API_CW_PORT=${HEAT_API_CW_PORT:-8003} |
|
116 |
- HEAT_API_PASTE_FILE=$HEAT_CONF_DIR/api-paste.ini |
|
117 |
- HEAT_POLICY_FILE=$HEAT_CONF_DIR/policy.json |
|
118 |
- |
|
119 |
- cp $HEAT_DIR/etc/heat/api-paste.ini $HEAT_API_PASTE_FILE |
|
120 |
- cp $HEAT_DIR/etc/heat/policy.json $HEAT_POLICY_FILE |
|
121 |
- |
|
122 |
- # common options |
|
123 |
- iniset_rpc_backend heat $HEAT_CONF |
|
124 |
- iniset $HEAT_CONF DEFAULT heat_metadata_server_url http://$HEAT_API_CFN_HOST:$HEAT_API_CFN_PORT |
|
125 |
- iniset $HEAT_CONF DEFAULT heat_waitcondition_server_url http://$HEAT_API_CFN_HOST:$HEAT_API_CFN_PORT/v1/waitcondition |
|
126 |
- iniset $HEAT_CONF DEFAULT heat_watch_server_url http://$HEAT_API_CW_HOST:$HEAT_API_CW_PORT |
|
127 |
- iniset $HEAT_CONF database connection `database_connection_url heat` |
|
128 |
- iniset $HEAT_CONF DEFAULT auth_encryption_key $(generate_hex_string 16) |
|
129 |
- |
|
130 |
- iniset $HEAT_CONF DEFAULT region_name_for_services "$REGION_NAME" |
|
131 |
- |
|
132 |
- # logging |
|
133 |
- iniset $HEAT_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL |
|
134 |
- iniset $HEAT_CONF DEFAULT use_syslog $SYSLOG |
|
135 |
- if [ "$LOG_COLOR" == "True" ] && [ "$SYSLOG" == "False" ] && [ "$HEAT_USE_MOD_WSGI" == "False" ] ; then |
|
136 |
- # Add color to logging output |
|
137 |
- setup_colorized_logging $HEAT_CONF DEFAULT tenant user |
|
138 |
- fi |
|
139 |
- |
|
140 |
- if [ ! -z "$HEAT_DEFERRED_AUTH" ]; then |
|
141 |
- iniset $HEAT_CONF DEFAULT deferred_auth_method $HEAT_DEFERRED_AUTH |
|
142 |
- fi |
|
143 |
- |
|
144 |
- if [ "$HEAT_USE_MOD_WSGI" == "True" ]; then |
|
145 |
- _config_heat_apache_wsgi |
|
146 |
- fi |
|
147 |
- |
|
148 |
- if [[ "$HEAT_STANDALONE" = "True" ]]; then |
|
149 |
- iniset $HEAT_CONF paste_deploy flavor standalone |
|
150 |
- iniset $HEAT_CONF clients_heat url "http://$HEAT_API_HOST:$HEAT_API_PORT/v1/%(tenant_id)s" |
|
151 |
- else |
|
152 |
- configure_auth_token_middleware $HEAT_CONF heat $HEAT_AUTH_CACHE_DIR |
|
153 |
- fi |
|
154 |
- |
|
155 |
- # If HEAT_DEFERRED_AUTH is unset or explicitly set to trusts, configure |
|
156 |
- # the section for the client plugin associated with the trustee |
|
157 |
- if [ -z "$HEAT_DEFERRED_AUTH" -o "trusts" == "$HEAT_DEFERRED_AUTH" ]; then |
|
158 |
- iniset $HEAT_CONF trustee auth_type password |
|
159 |
- iniset $HEAT_CONF trustee auth_url $KEYSTONE_AUTH_URI |
|
160 |
- iniset $HEAT_CONF trustee username $HEAT_TRUSTEE_USER |
|
161 |
- iniset $HEAT_CONF trustee password $HEAT_TRUSTEE_PASSWORD |
|
162 |
- iniset $HEAT_CONF trustee user_domain_id $HEAT_TRUSTEE_DOMAIN |
|
163 |
- fi |
|
164 |
- |
|
165 |
- # clients_keystone |
|
166 |
- iniset $HEAT_CONF clients_keystone auth_uri $KEYSTONE_AUTH_URI |
|
167 |
- |
|
168 |
- # OpenStack API |
|
169 |
- iniset $HEAT_CONF heat_api bind_port $HEAT_API_PORT |
|
170 |
- iniset $HEAT_CONF heat_api workers "$API_WORKERS" |
|
171 |
- |
|
172 |
- # Cloudformation API |
|
173 |
- iniset $HEAT_CONF heat_api_cfn bind_port $HEAT_API_CFN_PORT |
|
174 |
- |
|
175 |
- # Cloudwatch API |
|
176 |
- iniset $HEAT_CONF heat_api_cloudwatch bind_port $HEAT_API_CW_PORT |
|
177 |
- |
|
178 |
- if is_ssl_enabled_service "key" || is_service_enabled tls-proxy; then |
|
179 |
- iniset $HEAT_CONF clients_keystone ca_file $SSL_BUNDLE_FILE |
|
180 |
- fi |
|
181 |
- |
|
182 |
- if is_ssl_enabled_service "nova" || is_service_enabled tls-proxy; then |
|
183 |
- iniset $HEAT_CONF clients_nova ca_file $SSL_BUNDLE_FILE |
|
184 |
- fi |
|
185 |
- |
|
186 |
- if is_ssl_enabled_service "cinder" || is_service_enabled tls-proxy; then |
|
187 |
- iniset $HEAT_CONF clients_cinder ca_file $SSL_BUNDLE_FILE |
|
188 |
- fi |
|
189 |
- |
|
190 |
- if [[ "$HEAT_ENABLE_ADOPT_ABANDON" = "True" ]]; then |
|
191 |
- iniset $HEAT_CONF DEFAULT enable_stack_adopt true |
|
192 |
- iniset $HEAT_CONF DEFAULT enable_stack_abandon true |
|
193 |
- fi |
|
194 |
- |
|
195 |
- iniset $HEAT_CONF cache enabled "True" |
|
196 |
- iniset $HEAT_CONF cache backend "dogpile.cache.memory" |
|
197 |
- |
|
198 |
- sudo install -d -o $STACK_USER $HEAT_ENV_DIR $HEAT_TEMPLATES_DIR |
|
199 |
- |
|
200 |
- # copy the default environment |
|
201 |
- cp $HEAT_DIR/etc/heat/environment.d/* $HEAT_ENV_DIR/ |
|
202 |
- |
|
203 |
- # copy the default templates |
|
204 |
- cp $HEAT_DIR/etc/heat/templates/* $HEAT_TEMPLATES_DIR/ |
|
205 |
- |
|
206 |
- # Enable heat plugins. |
|
207 |
- # NOTE(nic): The symlink nonsense is necessary because when |
|
208 |
- # plugins are installed in "developer mode", the final component |
|
209 |
- # of their target directory is always "resources", which confuses |
|
210 |
- # Heat's plugin loader into believing that all plugins are named |
|
211 |
- # "resources", and therefore are all the same plugin; so it |
|
212 |
- # will only load one of them. Linking them all to a common |
|
213 |
- # location with unique names avoids that type of collision, |
|
214 |
- # while still allowing the plugins to be edited in-tree. |
|
215 |
- local err_count=0 |
|
216 |
- |
|
217 |
- if [ -n "$ENABLE_HEAT_PLUGINS" ]; then |
|
218 |
- mkdir -p $HEAT_PLUGIN_DIR |
|
219 |
- # Clean up cruft from any previous runs |
|
220 |
- rm -f $HEAT_PLUGIN_DIR/* |
|
221 |
- iniset $HEAT_CONF DEFAULT plugin_dirs $HEAT_PLUGIN_DIR |
|
222 |
- fi |
|
223 |
- |
|
224 |
- for heat_plugin in $ENABLE_HEAT_PLUGINS; do |
|
225 |
- if [ -d $HEAT_DIR/contrib/$heat_plugin ]; then |
|
226 |
- setup_package $HEAT_DIR/contrib/$heat_plugin -e |
|
227 |
- ln -s $HEAT_DIR/contrib/$heat_plugin/$heat_plugin/resources $HEAT_PLUGIN_DIR/$heat_plugin |
|
228 |
- else |
|
229 |
- : # clear retval on the test so that we can roll up errors |
|
230 |
- err $LINENO "Requested Heat plugin(${heat_plugin}) not found." |
|
231 |
- err_count=$(($err_count + 1)) |
|
232 |
- fi |
|
233 |
- done |
|
234 |
- [ $err_count -eq 0 ] || die $LINENO "$err_count of the requested Heat plugins could not be installed." |
|
235 |
-} |
|
236 |
- |
|
237 |
-# init_heat() - Initialize database |
|
238 |
-function init_heat { |
|
239 |
- |
|
240 |
- # (re)create heat database |
|
241 |
- recreate_database heat |
|
242 |
- |
|
243 |
- $HEAT_BIN_DIR/heat-manage --config-file $HEAT_CONF db_sync |
|
244 |
- create_heat_cache_dir |
|
245 |
-} |
|
246 |
- |
|
247 |
-# create_heat_cache_dir() - Part of the init_heat() process |
|
248 |
-function create_heat_cache_dir { |
|
249 |
- # Create cache dirs |
|
250 |
- sudo install -d -o $STACK_USER $HEAT_AUTH_CACHE_DIR |
|
251 |
-} |
|
252 |
- |
|
253 |
-# install_heatclient() - Collect source and prepare |
|
254 |
-function install_heatclient { |
|
255 |
- if use_library_from_git "python-heatclient"; then |
|
256 |
- git_clone_by_name "python-heatclient" |
|
257 |
- setup_dev_lib "python-heatclient" |
|
258 |
- sudo install -D -m 0644 -o $STACK_USER {${GITDIR["python-heatclient"]}/tools/,/etc/bash_completion.d/}heat.bash_completion |
|
259 |
- fi |
|
260 |
-} |
|
261 |
- |
|
262 |
-# install_heat() - Collect source and prepare |
|
263 |
-function install_heat { |
|
264 |
- git_clone $HEAT_REPO $HEAT_DIR $HEAT_BRANCH |
|
265 |
- setup_develop $HEAT_DIR |
|
266 |
- if [ "$HEAT_USE_MOD_WSGI" == "True" ]; then |
|
267 |
- install_apache_wsgi |
|
268 |
- fi |
|
269 |
-} |
|
270 |
- |
|
271 |
-# install_heat_other() - Collect source and prepare |
|
272 |
-function install_heat_other { |
|
273 |
- git_clone $HEAT_CFNTOOLS_REPO $HEAT_CFNTOOLS_DIR $HEAT_CFNTOOLS_BRANCH |
|
274 |
- git_clone $HEAT_TEMPLATES_REPO $HEAT_TEMPLATES_REPO_DIR $HEAT_TEMPLATES_BRANCH |
|
275 |
- git_clone $OAC_REPO $OAC_DIR $OAC_BRANCH |
|
276 |
- git_clone $OCC_REPO $OCC_DIR $OCC_BRANCH |
|
277 |
- git_clone $ORC_REPO $ORC_DIR $ORC_BRANCH |
|
278 |
-} |
|
279 |
- |
|
280 |
-# start_heat() - Start running processes, including screen |
|
281 |
-function start_heat { |
|
282 |
- run_process h-eng "$HEAT_BIN_DIR/heat-engine --config-file=$HEAT_CONF" |
|
283 |
- |
|
284 |
- # If the site is not enabled then we are in a grenade scenario |
|
285 |
- local enabled_site_file |
|
286 |
- enabled_site_file=$(apache_site_config_for heat-api) |
|
287 |
- if [ -f ${enabled_site_file} ] && [ "$HEAT_USE_MOD_WSGI" == "True" ]; then |
|
288 |
- enable_apache_site heat-api |
|
289 |
- enable_apache_site heat-api-cfn |
|
290 |
- enable_apache_site heat-api-cloudwatch |
|
291 |
- restart_apache_server |
|
292 |
- tail_log heat-api /var/log/$APACHE_NAME/heat-api.log |
|
293 |
- tail_log heat-api-cfn /var/log/$APACHE_NAME/heat-api-cfn.log |
|
294 |
- tail_log heat-api-cloudwatch /var/log/$APACHE_NAME/heat-api-cloudwatch.log |
|
295 |
- else |
|
296 |
- run_process h-api "$HEAT_BIN_DIR/heat-api --config-file=$HEAT_CONF" |
|
297 |
- run_process h-api-cfn "$HEAT_BIN_DIR/heat-api-cfn --config-file=$HEAT_CONF" |
|
298 |
- run_process h-api-cw "$HEAT_BIN_DIR/heat-api-cloudwatch --config-file=$HEAT_CONF" |
|
299 |
- fi |
|
300 |
-} |
|
301 |
- |
|
302 |
-# stop_heat() - Stop running processes |
|
303 |
-function stop_heat { |
|
304 |
- # Kill the screen windows |
|
305 |
- stop_process h-eng |
|
306 |
- |
|
307 |
- if [ "$HEAT_USE_MOD_WSGI" == "True" ]; then |
|
308 |
- disable_apache_site heat-api |
|
309 |
- disable_apache_site heat-api-cfn |
|
310 |
- disable_apache_site heat-api-cloudwatch |
|
311 |
- restart_apache_server |
|
312 |
- else |
|
313 |
- local serv |
|
314 |
- for serv in h-api h-api-cfn h-api-cw; do |
|
315 |
- stop_process $serv |
|
316 |
- done |
|
317 |
- fi |
|
318 |
- |
|
319 |
-} |
|
320 |
- |
|
321 |
-# _cleanup_heat_apache_wsgi() - Remove wsgi files, disable and remove apache vhost file |
|
322 |
-function _cleanup_heat_apache_wsgi { |
|
323 |
- sudo rm -f $(apache_site_config_for heat-api) |
|
324 |
- sudo rm -f $(apache_site_config_for heat-api-cfn) |
|
325 |
- sudo rm -f $(apache_site_config_for heat-api-cloudwatch) |
|
326 |
-} |
|
327 |
- |
|
328 |
-# _config_heat_apache_wsgi() - Set WSGI config files of Heat |
|
329 |
-function _config_heat_apache_wsgi { |
|
330 |
- |
|
331 |
- local heat_apache_conf |
|
332 |
- heat_apache_conf=$(apache_site_config_for heat-api) |
|
333 |
- local heat_cfn_apache_conf |
|
334 |
- heat_cfn_apache_conf=$(apache_site_config_for heat-api-cfn) |
|
335 |
- local heat_cloudwatch_apache_conf |
|
336 |
- heat_cloudwatch_apache_conf=$(apache_site_config_for heat-api-cloudwatch) |
|
337 |
- local heat_ssl="" |
|
338 |
- local heat_certfile="" |
|
339 |
- local heat_keyfile="" |
|
340 |
- local heat_api_port=$HEAT_API_PORT |
|
341 |
- local heat_cfn_api_port=$HEAT_API_CFN_PORT |
|
342 |
- local heat_cw_api_port=$HEAT_API_CW_PORT |
|
343 |
- local venv_path="" |
|
344 |
- |
|
345 |
- sudo cp $FILES/apache-heat-api.template $heat_apache_conf |
|
346 |
- sudo sed -e " |
|
347 |
- s|%PUBLICPORT%|$heat_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_apache_conf |
|
356 |
- |
|
357 |
- sudo cp $FILES/apache-heat-api-cfn.template $heat_cfn_apache_conf |
|
358 |
- sudo sed -e " |
|
359 |
- s|%PUBLICPORT%|$heat_cfn_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_cfn_apache_conf |
|
368 |
- |
|
369 |
- sudo cp $FILES/apache-heat-api-cloudwatch.template $heat_cloudwatch_apache_conf |
|
370 |
- sudo sed -e " |
|
371 |
- s|%PUBLICPORT%|$heat_cw_api_port|g; |
|
372 |
- s|%APACHE_NAME%|$APACHE_NAME|g; |
|
373 |
- s|%HEAT_BIN_DIR%|$HEAT_BIN_DIR|g; |
|
374 |
- s|%SSLENGINE%|$heat_ssl|g; |
|
375 |
- s|%SSLCERTFILE%|$heat_certfile|g; |
|
376 |
- s|%SSLKEYFILE%|$heat_keyfile|g; |
|
377 |
- s|%USER%|$STACK_USER|g; |
|
378 |
- s|%VIRTUALENV%|$venv_path|g |
|
379 |
- " -i $heat_cloudwatch_apache_conf |
|
380 |
-} |
|
381 |
- |
|
382 |
- |
|
383 |
-# create_heat_accounts() - Set up common required heat accounts |
|
384 |
-function create_heat_accounts { |
|
385 |
- if [[ "$HEAT_STANDALONE" != "True" ]]; then |
|
386 |
- |
|
387 |
- create_service_user "heat" "admin" |
|
388 |
- get_or_create_service "heat" "orchestration" "Heat Orchestration Service" |
|
389 |
- get_or_create_endpoint \ |
|
390 |
- "orchestration" \ |
|
391 |
- "$REGION_NAME" \ |
|
392 |
- "$SERVICE_PROTOCOL://$HEAT_API_HOST:$HEAT_API_PORT/v1/\$(project_id)s" \ |
|
393 |
- "$SERVICE_PROTOCOL://$HEAT_API_HOST:$HEAT_API_PORT/v1/\$(project_id)s" \ |
|
394 |
- "$SERVICE_PROTOCOL://$HEAT_API_HOST:$HEAT_API_PORT/v1/\$(project_id)s" |
|
395 |
- |
|
396 |
- get_or_create_service "heat-cfn" "cloudformation" "Heat CloudFormation Service" |
|
397 |
- get_or_create_endpoint \ |
|
398 |
- "cloudformation" \ |
|
399 |
- "$REGION_NAME" \ |
|
400 |
- "$SERVICE_PROTOCOL://$HEAT_API_CFN_HOST:$HEAT_API_CFN_PORT/v1" \ |
|
401 |
- "$SERVICE_PROTOCOL://$HEAT_API_CFN_HOST:$HEAT_API_CFN_PORT/v1" \ |
|
402 |
- "$SERVICE_PROTOCOL://$HEAT_API_CFN_HOST:$HEAT_API_CFN_PORT/v1" |
|
403 |
- |
|
404 |
- # heat_stack_user role is for users created by Heat |
|
405 |
- get_or_create_role "heat_stack_user" |
|
406 |
- fi |
|
407 |
- |
|
408 |
- if [[ "$HEAT_STACK_DOMAIN" == "True" ]]; then |
|
409 |
- # domain -> heat and user -> heat_domain_admin |
|
410 |
- domain_id=$(get_or_create_domain heat 'Owns users and projects created by heat') |
|
411 |
- iniset $HEAT_CONF DEFAULT stack_user_domain_id ${domain_id} |
|
412 |
- get_or_create_user heat_domain_admin $SERVICE_PASSWORD heat |
|
413 |
- get_or_add_user_domain_role admin heat_domain_admin heat |
|
414 |
- iniset $HEAT_CONF DEFAULT stack_domain_admin heat_domain_admin |
|
415 |
- iniset $HEAT_CONF DEFAULT stack_domain_admin_password $SERVICE_PASSWORD |
|
416 |
- fi |
|
417 |
-} |
|
418 |
- |
|
419 |
-# build_heat_pip_mirror() - Build a pip mirror containing heat agent projects |
|
420 |
-function build_heat_pip_mirror { |
|
421 |
- local project_dirs="$OCC_DIR $OAC_DIR $ORC_DIR $HEAT_CFNTOOLS_DIR" |
|
422 |
- local projpath proj package |
|
423 |
- |
|
424 |
- rm -rf $HEAT_PIP_REPO |
|
425 |
- mkdir -p $HEAT_PIP_REPO |
|
426 |
- |
|
427 |
- echo "<html><body>" > $HEAT_PIP_REPO/index.html |
|
428 |
- for projpath in $project_dirs; do |
|
429 |
- proj=$(basename $projpath) |
|
430 |
- mkdir -p $HEAT_PIP_REPO/$proj |
|
431 |
- pushd $projpath |
|
432 |
- rm -rf dist |
|
433 |
- python setup.py sdist |
|
434 |
- pushd dist |
|
435 |
- package=$(ls *) |
|
436 |
- mv $package $HEAT_PIP_REPO/$proj/$package |
|
437 |
- popd |
|
438 |
- |
|
439 |
- echo "<html><body><a href=\"$package\">$package</a></body></html>" > $HEAT_PIP_REPO/$proj/index.html |
|
440 |
- echo "<a href=\"$proj\">$proj</a><br/>" >> $HEAT_PIP_REPO/index.html |
|
441 |
- |
|
442 |
- popd |
|
443 |
- done |
|
444 |
- |
|
445 |
- echo "</body></html>" >> $HEAT_PIP_REPO/index.html |
|
446 |
- |
|
447 |
- local heat_pip_repo_apache_conf |
|
448 |
- heat_pip_repo_apache_conf=$(apache_site_config_for heat_pip_repo) |
|
449 |
- |
|
450 |
- sudo cp $FILES/apache-heat-pip-repo.template $heat_pip_repo_apache_conf |
|
451 |
- sudo sed -e " |
|
452 |
- s|%HEAT_PIP_REPO%|$HEAT_PIP_REPO|g; |
|
453 |
- s|%HEAT_PIP_REPO_PORT%|$HEAT_PIP_REPO_PORT|g; |
|
454 |
- s|%APACHE_NAME%|$APACHE_NAME|g; |
|
455 |
- " -i $heat_pip_repo_apache_conf |
|
456 |
- enable_apache_site heat_pip_repo |
|
457 |
- restart_apache_server |
|
458 |
- sudo iptables -I INPUT -d $HOST_IP -p tcp --dport $HEAT_PIP_REPO_PORT -j ACCEPT || true |
|
459 |
-} |
|
460 |
- |
|
461 |
-# Restore xtrace |
|
462 |
-$_XTRACE_HEAT |
|
463 |
- |
|
464 |
-# Tell emacs to use shell-script-mode |
|
465 |
-## Local variables: |
|
466 |
-## mode: shell-script |
|
467 |
-## End: |
... | ... |
@@ -572,7 +572,6 @@ source $TOP_DIR/lib/nova |
572 | 572 |
source $TOP_DIR/lib/placement |
573 | 573 |
source $TOP_DIR/lib/cinder |
574 | 574 |
source $TOP_DIR/lib/swift |
575 |
-source $TOP_DIR/lib/heat |
|
576 | 575 |
source $TOP_DIR/lib/neutron |
577 | 576 |
source $TOP_DIR/lib/neutron-legacy |
578 | 577 |
source $TOP_DIR/lib/ldap |
... | ... |
@@ -800,9 +799,6 @@ fi |
800 | 800 |
if is_service_enabled neutron nova horizon; then |
801 | 801 |
install_neutronclient |
802 | 802 |
fi |
803 |
-if is_service_enabled heat horizon; then |
|
804 |
- install_heatclient |
|
805 |
-fi |
|
806 | 803 |
|
807 | 804 |
# Install shared libraries |
808 | 805 |
if is_service_enabled cinder nova; then |
... | ... |
@@ -873,13 +869,6 @@ if is_service_enabled horizon; then |
873 | 873 |
stack_install_service horizon |
874 | 874 |
fi |
875 | 875 |
|
876 |
-if is_service_enabled heat; then |
|
877 |
- stack_install_service heat |
|
878 |
- install_heat_other |
|
879 |
- cleanup_heat |
|
880 |
- configure_heat |
|
881 |
-fi |
|
882 |
- |
|
883 | 876 |
if is_service_enabled tls-proxy || [ "$USE_SSL" == "True" ]; then |
884 | 877 |
configure_CA |
885 | 878 |
init_CA |
... | ... |
@@ -1071,10 +1060,6 @@ if is_service_enabled keystone; then |
1071 | 1071 |
create_swift_accounts |
1072 | 1072 |
fi |
1073 | 1073 |
|
1074 |
- if is_service_enabled heat; then |
|
1075 |
- create_heat_accounts |
|
1076 |
- fi |
|
1077 |
- |
|
1078 | 1074 |
fi |
1079 | 1075 |
|
1080 | 1076 |
# Write a clouds.yaml file |
... | ... |
@@ -1284,18 +1269,6 @@ if is_service_enabled cinder; then |
1284 | 1284 |
create_volume_types |
1285 | 1285 |
fi |
1286 | 1286 |
|
1287 |
-# Configure and launch Heat engine, api and metadata |
|
1288 |
-if is_service_enabled heat; then |
|
1289 |
- # Initialize heat |
|
1290 |
- echo_summary "Configuring Heat" |
|
1291 |
- init_heat |
|
1292 |
- echo_summary "Starting Heat" |
|
1293 |
- start_heat |
|
1294 |
- if [ "$HEAT_BUILD_PIP_MIRROR" = "True" ]; then |
|
1295 |
- echo_summary "Building Heat pip mirror" |
|
1296 |
- build_heat_pip_mirror |
|
1297 |
- fi |
|
1298 |
-fi |
|
1299 | 1287 |
|
1300 | 1288 |
if is_service_enabled horizon; then |
1301 | 1289 |
echo_summary "Starting Horizon" |
... | ... |
@@ -239,10 +239,6 @@ CINDER_BRANCH=${CINDER_BRANCH:-master} |
239 | 239 |
GLANCE_REPO=${GLANCE_REPO:-${GIT_BASE}/openstack/glance.git} |
240 | 240 |
GLANCE_BRANCH=${GLANCE_BRANCH:-master} |
241 | 241 |
|
242 |
-# heat service |
|
243 |
-HEAT_REPO=${HEAT_REPO:-${GIT_BASE}/openstack/heat.git} |
|
244 |
-HEAT_BRANCH=${HEAT_BRANCH:-master} |
|
245 |
- |
|
246 | 242 |
# django powered web control panel for openstack |
247 | 243 |
HORIZON_REPO=${HORIZON_REPO:-${GIT_BASE}/openstack/horizon.git} |
248 | 244 |
HORIZON_BRANCH=${HORIZON_BRANCH:-master} |
... | ... |
@@ -301,10 +297,6 @@ GITBRANCH["python-brick-cinderclient-ext"]=${BRICK_CINDERCLIENT_BRANCH:-master} |
301 | 301 |
GITREPO["python-glanceclient"]=${GLANCECLIENT_REPO:-${GIT_BASE}/openstack/python-glanceclient.git} |
302 | 302 |
GITBRANCH["python-glanceclient"]=${GLANCECLIENT_BRANCH:-master} |
303 | 303 |
|
304 |
-# python heat client library |
|
305 |
-GITREPO["python-heatclient"]=${HEATCLIENT_REPO:-${GIT_BASE}/openstack/python-heatclient.git} |
|
306 |
-GITBRANCH["python-heatclient"]=${HEATCLIENT_BRANCH:-master} |
|
307 |
- |
|
308 | 304 |
# ironic client |
309 | 305 |
GITREPO["python-ironicclient"]=${IRONICCLIENT_REPO:-${GIT_BASE}/openstack/python-ironicclient.git} |
310 | 306 |
GITBRANCH["python-ironicclient"]=${IRONICCLIENT_BRANCH:-master} |
... | ... |
@@ -32,7 +32,7 @@ done |
32 | 32 |
ALL_LIBS="python-novaclient oslo.config pbr oslo.context" |
33 | 33 |
ALL_LIBS+=" python-keystoneclient taskflow oslo.middleware pycadf" |
34 | 34 |
ALL_LIBS+=" python-glanceclient python-ironicclient" |
35 |
-ALL_LIBS+=" oslo.messaging oslo.log cliff python-heatclient stevedore" |
|
35 |
+ALL_LIBS+=" oslo.messaging oslo.log cliff stevedore" |
|
36 | 36 |
ALL_LIBS+=" python-cinderclient glance_store oslo.concurrency oslo.db" |
37 | 37 |
ALL_LIBS+=" oslo.versionedobjects oslo.vmware keystonemiddleware" |
38 | 38 |
ALL_LIBS+=" oslo.serialization django_openstack_auth" |
... | ... |
@@ -66,7 +66,6 @@ source $TOP_DIR/lib/nova |
66 | 66 |
source $TOP_DIR/lib/placement |
67 | 67 |
source $TOP_DIR/lib/cinder |
68 | 68 |
source $TOP_DIR/lib/swift |
69 |
-source $TOP_DIR/lib/heat |
|
70 | 69 |
source $TOP_DIR/lib/neutron |
71 | 70 |
source $TOP_DIR/lib/neutron-legacy |
72 | 71 |
source $TOP_DIR/lib/ldap |
... | ... |
@@ -99,10 +98,6 @@ run_phase unstack |
99 | 99 |
|
100 | 100 |
# Call service stop |
101 | 101 |
|
102 |
-if is_service_enabled heat; then |
|
103 |
- stop_heat |
|
104 |
-fi |
|
105 |
- |
|
106 | 102 |
if is_service_enabled nova; then |
107 | 103 |
stop_nova |
108 | 104 |
fi |