[heat] Resolves: RHBZ#860105 Signed-off-by: Steven Dake <sdake at redhat.com>

Steven Dake sdake at fedoraproject.org
Wed Sep 26 17:53:10 UTC 2012


commit 0eb628d79d304e43e6b786dd22e72841f760d830
Author: Steven Dake <sdake at redhat.com>
Date:   Wed Sep 26 10:52:40 2012 -0700

    Resolves: RHBZ#860105
    Signed-off-by: Steven Dake <sdake at redhat.com>

 ...m-specific-heat-keystone-setup-binary-to-.patch |   92 ++++++++++++++++++++
 heat.spec                                          |    7 ++
 2 files changed, 99 insertions(+), 0 deletions(-)
---
diff --git a/Add-a-Folsom-specific-heat-keystone-setup-binary-to-.patch b/Add-a-Folsom-specific-heat-keystone-setup-binary-to-.patch
new file mode 100644
index 0000000..3c995e1
--- /dev/null
+++ b/Add-a-Folsom-specific-heat-keystone-setup-binary-to-.patch
@@ -0,0 +1,92 @@
+From 5208008db047d8cda231100db817c6f0e1c190a5 Mon Sep 17 00:00:00 2001
+From: Steven Dake <sdake at redhat.com>
+Date: Wed, 26 Sep 2012 10:08:05 -0700
+Subject: [PATCH] Add a Folsom specific heat-keystone-setup binary to bin
+
+Fixes issue #253
+
+Change-Id: Ie223c43c15ac806da393e3d532ef410526ac16ce
+Signed-off-by: Steven Dake <sdake at redhat.com>
+---
+ bin/heat-keystone-setup | 56 +++++++++++++++++++++++++++++++++++++++++++++++++
+ setup.py                |  3 ++-
+ 2 files changed, 58 insertions(+), 1 deletion(-)
+ create mode 100755 bin/heat-keystone-setup
+
+diff --git a/bin/heat-keystone-setup b/bin/heat-keystone-setup
+new file mode 100755
+index 0000000..0c3d688
+--- /dev/null
++++ b/bin/heat-keystone-setup
+@@ -0,0 +1,56 @@
++#!/bin/bash
++
++set +e
++
++function get_id () {
++    echo `"$@" | grep ' id ' | awk '{print $4}'`
++}
++
++KEYSTONE_CONF=${KEYSTONE_CONF:-/etc/keystone/keystone.conf}
++
++# Extract some info from Keystone's configuration file
++if [[ -r "$KEYSTONE_CONF" ]]; then
++    CONFIG_SERVICE_TOKEN=$(sed 's/[[:space:]]//g' $KEYSTONE_CONF | grep ^admin_token= | cut -d'=' -f2)
++    CONFIG_ADMIN_PORT=$(sed 's/[[:space:]]//g' $KEYSTONE_CONF | grep ^admin_port= | cut -d'=' -f2)
++fi
++
++export SERVICE_TOKEN=${SERVICE_TOKEN:-$CONFIG_SERVICE_TOKEN}
++export SERVICE_ENDPOINT=${SERVICE_ENDPOINT:-http://127.0.0.1:${CONFIG_ADMIN_PORT:-35357}/v2.0}
++if [[ -z "$SERVICE_TOKEN" ]]; then
++    echo "No service token found."
++    echo "Set SERVICE_TOKEN manually from keystone.conf admin_token."
++    exit 1
++fi
++
++ADMIN_ROLE=$(keystone role-list | grep '\badmin\b' | awk '{ print $2 }')
++SERVICE_TENANT=$(keystone tenant-list | grep service | cut -d\| -f2)
++SERVICE_PASSWORD=${SERVICE_PASSWORD:-$OS_PASSWORD}
++if [[ "$SERVICE_PASSWORD" == "$OS_PASSWORD" ]]; then
++    echo "Using the OS_PASSWORD for the SERVICE_PASSWORD."
++fi
++
++echo ADMIN_ROLE $ADMIN_ROLE
++echo SERVICE_TENANT $SERVICE_TENANT
++echo SERVICE_PASSWORD $SERVICE_PASSWORD
++echo SERVICE_TOKEN $SERVICE_TOKEN
++
++
++# Services
++HEAT_SERVICE=$(get_id \
++keystone service-create --name=heat \
++                        --type=orchestration \
++                        --description="Heat Service")
++HEAT_USER=$(get_id keystone user-create --name=heat \
++                                        --pass="$SERVICE_PASSWORD" \
++                                        --tenant_id $SERVICE_TENANT \
++                                        --email=heat at example.com)
++echo HEAT_USER $HEAT_USER
++keystone user-role-add --tenant_id $SERVICE_TENANT \
++                       --user_id $HEAT_USER \
++                       --role_id $ADMIN_ROLE
++
++keystone endpoint-create --region RegionOne --service_id $HEAT_SERVICE \
++    --publicurl 'http://localhost:8000/v1' \
++    --adminurl 'http://localhost:8000/v1' \
++    --internalurl 'http://localhost:8000/v1'
++
+diff --git a/setup.py b/setup.py
+index be3ece1..360eb4a 100755
+--- a/setup.py
++++ b/setup.py
+@@ -50,5 +50,6 @@ setuptools.setup(
+              'bin/heat-metadata',
+              'bin/heat-engine',
+              'bin/heat-watch',
+-             'bin/heat-db-setup'],
++             'bin/heat-db-setup',
++             'bin/heat-keystone-setup'],
+     py_modules=[])
+-- 
+1.7.11.4
+
diff --git a/heat.spec b/heat.spec
index c4c30a5..4d5e0a8 100644
--- a/heat.spec
+++ b/heat.spec
@@ -14,6 +14,7 @@ Source5: heat-api-cloudwatch.service
 
 Patch0: switch-to-using-m2crypto.patch
 Patch1: heat-fix-glanceclient-deprecation-warning.patch
+Patch2: Add-a-Folsom-specific-heat-keystone-setup-binary-to-.patch 
 
 BuildArch: noarch
 BuildRequires: python2-devel
@@ -48,6 +49,7 @@ Requires(pre): shadow-utils
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 %{__python} setup.py build
@@ -131,6 +133,11 @@ exit 0
 %systemd_postun_with_restart heat-api-cloudwatch.service
 
 %changelog
+* Wed Sep 26 2012 Steven Dake <sdake at redhat.com> 6-6
+- Merge upstream commit 5208008db047d8cda231100db817c6f0e1c190a5
+- Resolves: RHBZ#860105
+- fix "heat-keystone-setup not available in heat rpm"
+
 * Wed Sep 26 2012 Steven Dake <sdake at redhat.com> 6-5
 - Merge upstream commit d9f63269f1a0205811cd84487787c8c1291a952b
 - Resolves: RHBZ#860726


More information about the scm-commits mailing list