]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
* Fixed debian/heat-common.postinst.in
authorThomas Goirand <thomas@goirand.fr>
Fri, 7 Dec 2012 08:51:46 +0000 (08:51 +0000)
committerThomas Goirand <thomas@goirand.fr>
Fri, 7 Dec 2012 10:19:35 +0000 (10:19 +0000)
* 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

12 files changed:
trusty/debian/heat-api-cfn.postrm
trusty/debian/heat-api-cloudwatch.postrm
trusty/debian/heat-api.config.in
trusty/debian/heat-api.postinst.in
trusty/debian/heat-api.postrm
trusty/debian/heat-api.templates
trusty/debian/heat-common.install
trusty/debian/heat-common.postinst.in
trusty/debian/heat-common.postrm
trusty/debian/heat-engine.postinst.in
trusty/debian/heat-engine.postrm
trusty/debian/heat-engine.templates

index 64de5a8d177d2b3d93befce4e56ce0af6930b436..413152342310ad7eea29e1d69424a02eea0fccff 100644 (file)
@@ -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#
index 229b4208e75bbe669544b9ed2154dc3cdd851a89..7c59aa93c5978b8e06a44082e6a0075e30657b71 100644 (file)
@@ -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#
index a8c0b17487da642584d4c5eca84e260932aed162..dfcefe9db544ec56314d8d12fc7a76098167883e 100644 (file)
@@ -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
index d034a7ad08ddecaf5b6c1ffbbf6289d091414e56..6e02afaa4808e2abb38d67442977632005a1213b 100644 (file)
@@ -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
index aa2e6aa9d79c311bcbcbbc2b421b838f6cfc37f8..6f98991436cb7115a38da4a5afee70e7d17277f4 100644 (file)
@@ -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#
index 8513ba34335e878578a3a216d855fb8b42ec4898..7c81a84bb1846b4746f701b44dfde92b78b92d73 100644 (file)
@@ -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.
index ba2545930262b38c27139a3c685b7ed94b5f2364..21c339d722a88100f6c50f8bc311125416bcec96 100644 (file)
@@ -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
index f4c6d0e3eb704e869f528774c246c28f8fe8b1fa..59673b3e2cfc2cab38111d57480058aad71b99dc 100644 (file)
@@ -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
 
index 6d1e71baf488a2a3131faaf3a884c0e761e2ad18..1c8b7f061e89454055bf83ff5d7c1626195cce59 100644 (file)
@@ -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#
index ef07511f2010dc36f916e702c81763f632e2c13d..c76f0eeedf5ff6da6dad4b6954de8d78fab8cfc6 100644 (file)
@@ -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#
index 439082b5751d23922a1fc58d7a8c5d7224f72972..a4fe1e4173cd0f969cb4e0a04fbdfd03a63f5e38 100644 (file)
@@ -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#
index ccc0755ae36a2fef0bc6bf75f626e2cacbd4ffd9..1efe74fb826384b748ec82af3592a742d377b7a9 100644 (file)
@@ -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?