if [ "${1}" = "purge" ] ; then
rm -f /etc/heat/heat-api-cfn-paste.ini
- rmdir --ignore-fail-on-non-empty /etc/heat
+ [ -d /etc/heat ] && rmdir --ignore-fail-on-non-empty /etc/heat
rm -rf /var/log/heat/api-cfn*
- rmdir --ignore-fail-on-non-empty /var/log/heat
+ [ -d /var/log/heat ] && rmdir --ignore-fail-on-non-empty /var/log/heat
fi
#DEBHELPER#
if [ "${1}" = "purge" ] ; then
rm -f /etc/heat/heat-api-cloudwatch-paste.ini
- rmdir --ignore-fail-on-non-empty /etc/heat
+ [ -d /etc/heat ] && rmdir --ignore-fail-on-non-empty /etc/heat
rm -rf /var/log/heat/api-cloudwatch*
- rmdir --ignore-fail-on-non-empty /var/log/heat
+ [ -d /var/log/heat ] && rmdir --ignore-fail-on-non-empty /var/log/heat
fi
#DEBHELPER#
pkgos_var_user_group heat
pkgos_read_admin_creds ${APIPASTE_CONF} heat filter:authtoken
+pkgos_register_endpoint_config heat
exit 0
if [ "$1" = "configure" ] ; then
. /usr/share/debconf/confmodule
+
pkgos_var_user_group heat
+
pkgos_write_new_conf heat heat-api-paste.ini
pkgos_write_admin_creds /etc/heat/heat-api-paste.ini heat filter:authtoken
+
+ pkgos_register_endpoint_postinst heat heat orchestration "Heat Orchestration API" 8004 /v1/'%(tenant_id)s'
+
chown -R heat:adm /var/log/heat
chmod 0750 /var/log/heat
fi
if [ "${1}" = "purge" ] ; then
rm -f /etc/heat/heat-api-paste.ini
- rmdir --ignore-fail-on-non-empty /etc/heat
+ [ -d /etc/heat ] && rmdir --ignore-fail-on-non-empty /etc/heat
rm -rf /var/log/heat/api.*
- rmdir --ignore-fail-on-non-empty /var/log/heat
+ [ -d /var/log/heat ] && rmdir --ignore-fail-on-non-empty /var/log/heat
fi
#DEBHELPER#
-Template: heat-api/auth-host
+Template: heat/auth-host
Type: string
Default: 127.0.0.1
_Description: Auth server hostname:
Please specify the URL of your authentication server. Typically this is also
the URL of your OpenStack Identity Service (Keystone).
-Template: heat-api/admin-tenant-name
+Template: heat/admin-tenant-name
Type: string
Default: admin
_Description: Auth server tenant name:
-Template: heat-api/admin-user
+Template: heat/admin-user
Type: string
Default: admin
_Description: Auth server username:
-Template: heat-api/admin-password
+Template: heat/admin-password
Type: password
_Description: Auth server password:
+
+Template: heat/register-endpoint
+Type: boolean
+Default: false
+_Description: Register Heat in the keystone endpoint catalog?
+ Each Openstack services (each API) should be registered in order to be
+ accessible. This is done using "keystone service-create" and "keystone
+ endpoint-create". Select if you want to run these commands now.
+ .
+ Note that you will need to have an up and running keystone server on which to
+ connect using the Keystone auth token.
+
+Template: heat/keystone-ip
+Type: string
+_Description: Keystone IP address:
+ Enter the IP address of your keystone server, so that heat-api can
+ contact Keystone to do the Heat service and endpoint creation.
+
+Template: heat/keystone-auth-token
+Type: password
+_Description: Keystone Auth Token:
+ To configure its endpoint in Keystone, heat-api needs the Keystone auth
+ token.
+
+Template: heat/endpoint-ip
+Type: string
+_Description: Heat endpoint IP address:
+ Enter the IP address that will be used to contact Heat (eg: the Heat
+ endpoint IP address).
+ .
+ This IP address should be accessible from the clients that will use this
+ service, so if you are installing a public cloud, this should be a public
+ IP address.
+
+Template: heat/region-name
+Type: string
+Default: regionOne
+_Description: Name of the region to register:
+ Openstack can be used using availability zones, with each region representing
+ a location. Please enter the zone that you wish to use when registering the
+ endpoint.
/usr/bin/heat
/usr/bin/heat-boto
-/usr/bin/heat-db-setup
-/usr/bin/heat-keystone-setup
/usr/bin/heat-watch
pkgos_var_user_group heat
chown -R heat:adm /var/log/heat
chmod 0750 /var/log/heat
+ mkdir -p /etc/heat
+ mkdir -p /var/lib/heat
chown heat:heat -R /var/lib/heat /etc/heat
fi
set -e
if [ "${1}" = "purge" ] ; then
- rmdir --ignore-fail-on-non-empty /etc/heat
+ [ -d /etc/heat ] && rmdir --ignore-fail-on-non-empty /etc/heat
rm -rf /var/log/heat/engine*
- rmdir --ignore-fail-on-non-empty /var/log/heat
+ [ -d /var/log/heat ] && rmdir --ignore-fail-on-non-empty /var/log/heat
fi
#DEBHELPER#
pkgos_var_user_group heat
pkgos_write_new_conf heat heat-engine.conf
pkgos_dbc_postinst ${CONF} heat DEFAULT sql_connection $@
+
fi
#DEBHELPER#
if [ "${1}" = "purge" ] ; then
rm -f /etc/heat/heat-engine.conf
- rmdir --ignore-fail-on-non-empty /etc/heat
+ [ -d /etc/heat ] && rmdir --ignore-fail-on-non-empty /etc/heat
rm -rf /var/log/heat/engine*
- rmdir --ignore-fail-on-non-empty /var/log/heat
+ [ -d /var/log/heat ] && rmdir --ignore-fail-on-non-empty /var/log/heat
fi
#DEBHELPER#
-Template: heat-engine/configure_db
+Template: heat/configure_db
Type: boolean
Default: true
_Description: Set up a database for heat-engine?