From: Thomas Goirand Date: Fri, 7 Dec 2012 08:51:46 +0000 (+0000) Subject: * Fixed debian/heat-common.postinst.in X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=4eb0b905f4894d5d898805195bd6a3c31c5f2b60;p=openstack-build%2Fheat-build.git * Fixed debian/heat-common.postinst.in * Fixed all debian/heat-*.postrm rmdir calls (checks for dir before rmdir) * Fixed debian/heat-engine.templates (wrong prefix name) * Removed stupid script /usr/bin/heat-db-setup and heat-keystone-setup (we use dbconfig-common and debconf instead...) * Added endpoint creation using debconf Rewritten-From: dba74fe708db6b0eccc3d73414ea738a1ffdf603 --- diff --git a/xenial/debian/heat-api-cfn.postrm b/xenial/debian/heat-api-cfn.postrm index 64de5a8d..41315234 100644 --- a/xenial/debian/heat-api-cfn.postrm +++ b/xenial/debian/heat-api-cfn.postrm @@ -4,9 +4,9 @@ set -e 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# diff --git a/xenial/debian/heat-api-cloudwatch.postrm b/xenial/debian/heat-api-cloudwatch.postrm index 229b4208..7c59aa93 100644 --- a/xenial/debian/heat-api-cloudwatch.postrm +++ b/xenial/debian/heat-api-cloudwatch.postrm @@ -4,9 +4,9 @@ set -e 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# diff --git a/xenial/debian/heat-api.config.in b/xenial/debian/heat-api.config.in index a8c0b174..dfcefe9d 100644 --- a/xenial/debian/heat-api.config.in +++ b/xenial/debian/heat-api.config.in @@ -11,5 +11,6 @@ APIPASTE_CONF=/etc/heat/heat-api-paste.ini pkgos_var_user_group heat pkgos_read_admin_creds ${APIPASTE_CONF} heat filter:authtoken +pkgos_register_endpoint_config heat exit 0 diff --git a/xenial/debian/heat-api.postinst.in b/xenial/debian/heat-api.postinst.in index d034a7ad..6e02afaa 100644 --- a/xenial/debian/heat-api.postinst.in +++ b/xenial/debian/heat-api.postinst.in @@ -8,9 +8,14 @@ ETC=/etc/heat 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 diff --git a/xenial/debian/heat-api.postrm b/xenial/debian/heat-api.postrm index aa2e6aa9..6f989914 100644 --- a/xenial/debian/heat-api.postrm +++ b/xenial/debian/heat-api.postrm @@ -4,9 +4,9 @@ set -e 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# diff --git a/xenial/debian/heat-api.templates b/xenial/debian/heat-api.templates index 8513ba34..7c81a84b 100644 --- a/xenial/debian/heat-api.templates +++ b/xenial/debian/heat-api.templates @@ -1,20 +1,61 @@ -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. diff --git a/xenial/debian/heat-common.install b/xenial/debian/heat-common.install index ba254593..21c339d7 100644 --- a/xenial/debian/heat-common.install +++ b/xenial/debian/heat-common.install @@ -1,5 +1,3 @@ /usr/bin/heat /usr/bin/heat-boto -/usr/bin/heat-db-setup -/usr/bin/heat-keystone-setup /usr/bin/heat-watch diff --git a/xenial/debian/heat-common.postinst.in b/xenial/debian/heat-common.postinst.in index f4c6d0e3..59673b3e 100644 --- a/xenial/debian/heat-common.postinst.in +++ b/xenial/debian/heat-common.postinst.in @@ -10,6 +10,8 @@ if [ "$1" = "configure" ] ; then 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 diff --git a/xenial/debian/heat-common.postrm b/xenial/debian/heat-common.postrm index 6d1e71ba..1c8b7f06 100644 --- a/xenial/debian/heat-common.postrm +++ b/xenial/debian/heat-common.postrm @@ -3,9 +3,9 @@ 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# diff --git a/xenial/debian/heat-engine.postinst.in b/xenial/debian/heat-engine.postinst.in index ef07511f..c76f0eee 100644 --- a/xenial/debian/heat-engine.postinst.in +++ b/xenial/debian/heat-engine.postinst.in @@ -13,6 +13,7 @@ if [ "$1" = "configure" ] ; then pkgos_var_user_group heat pkgos_write_new_conf heat heat-engine.conf pkgos_dbc_postinst ${CONF} heat DEFAULT sql_connection $@ + fi #DEBHELPER# diff --git a/xenial/debian/heat-engine.postrm b/xenial/debian/heat-engine.postrm index 439082b5..a4fe1e41 100644 --- a/xenial/debian/heat-engine.postrm +++ b/xenial/debian/heat-engine.postrm @@ -4,9 +4,9 @@ set -e 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# diff --git a/xenial/debian/heat-engine.templates b/xenial/debian/heat-engine.templates index ccc0755a..1efe74fb 100644 --- a/xenial/debian/heat-engine.templates +++ b/xenial/debian/heat-engine.templates @@ -1,4 +1,4 @@ -Template: heat-engine/configure_db +Template: heat/configure_db Type: boolean Default: true _Description: Set up a database for heat-engine?