]> review.fuel-infra Code Review - openstack-build/heat-build.git/log
openstack-build/heat-build.git
12 years agoUse cached keystoneclient
Steven Dake [Thu, 16 Aug 2012 17:50:05 +0000 (10:50 -0700)]
Use cached keystoneclient

Change-Id: I787edd10bcc29746a08878fd371204f81f0400db
Signed-off-by: Steven Dake <sdake@redhat.com>
12 years agoheat cli : Workaround inconsistent boto return type
Steven Hardy [Wed, 15 Aug 2012 14:16:23 +0000 (15:16 +0100)]
heat cli : Workaround inconsistent boto return type

Work around the inconsistent boto return type for DescribeStackResource
action, upstream patch pending but not yet merged, so this provides
a simple workaround

Fixes #175

Change-Id: I026ec7b1845fb591a47a5fb12cfcb25705b33909
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat cli : Rework to separate cli tool from client-API wrappers
Steven Hardy [Wed, 15 Aug 2012 13:09:54 +0000 (14:09 +0100)]
heat cli : Rework to separate cli tool from client-API wrappers

Rework to remove duplication between heat and heat-boto, and to
provide better separation between the CLI tool logic and the
underlying client API (should allow easier porting to new ReST API)

Ref #175 (partially fixes)
Fixes #192

Change-Id: Ib1f821667c40c78770a345204af923163daeffae
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat cli : remove some duplication from parameter formatting
Steven Hardy [Tue, 14 Aug 2012 16:27:16 +0000 (17:27 +0100)]
heat cli : remove some duplication from parameter formatting

Cleanup - bin/heat move some duplicated code into a function

Change-Id: Ib74077c557a2b8d7c640ee1686237bb5223b2a85
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat cli : remove unused paths from heat cli tool
Steven Hardy [Tue, 14 Aug 2012 16:15:08 +0000 (17:15 +0100)]
heat cli : remove unused paths from heat cli tool

Cleanup the the jeos and cfntools paths which are no longer needed

Change-Id: Idc7d37446a0072e38369939cbd3fd5fb374c15c9
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoUpdate Getting started to match change to heat-jeos
Steven Dake [Tue, 14 Aug 2012 16:07:44 +0000 (09:07 -0700)]
Update Getting started to match change to heat-jeos

heat-jeos list will no longer list jeos in the image name.  As a result,
we can't specify "-jeos" in the getting started guide.

Signed-off-by: Steven Dake <sdake@redhat.com>
12 years agoheat api : bugfix, save config correctly in EC2Token
Steven Hardy [Tue, 14 Aug 2012 14:56:13 +0000 (15:56 +0100)]
heat api : bugfix, save config correctly in EC2Token

Fix issue where EC2Token fails to save the config correctly,
which breaks AWS Authentication

Fixes #191

Change-Id: I77dfe182aac81c55b7d487d88073b40eac1faadd
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat templates : Add openshift template for pre-built jeos
Steven Hardy [Mon, 13 Aug 2012 13:31:12 +0000 (14:31 +0100)]
heat templates : Add openshift template for pre-built jeos

Add new openshift template which uses a pre-built JEOS
also creates the example application allowing a fairly
quick full demo of a two-instance openshift setup

Fixes #186

Change-Id: I9bd886b0717c8b0d810eff036b76883b537c2421
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoGetting Started: Add configuration info for the metadata server
Zane Bitter [Mon, 13 Aug 2012 11:54:52 +0000 (13:54 +0200)]
Getting Started: Add configuration info for the metadata server

Change-Id: Ie99bfd1c5e7bcaedd7757872d7d618d2cf29b137
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoGetting Started: Use install.sh script
Zane Bitter [Fri, 10 Aug 2012 17:16:01 +0000 (19:16 +0200)]
Getting Started: Use install.sh script

Change-Id: I7f189f8d3e0557503eca23a5489a98589bfff4f3
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoMake template params resolution standalone
Tomas Sedovic [Mon, 13 Aug 2012 13:59:49 +0000 (15:59 +0200)]
Make template params resolution standalone

This makes the two functions for resolving template data (Fn::FindInMap,
Ref, etc.) available outside of a Stack object.

Other programs can then import these functions and see how the template
parameters get resolved.

Change-Id: I92de937a3fb25f907404335cb71554036a807c50
Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
12 years agoMerge "change amd64 reference to x86_64 to match latest cfntools"
Jenkins [Fri, 10 Aug 2012 19:06:22 +0000 (19:06 +0000)]
Merge "change amd64 reference to x86_64 to match latest cfntools"

12 years agochange amd64 reference to x86_64 to match latest cfntools
Steven Dake [Fri, 10 Aug 2012 18:39:31 +0000 (11:39 -0700)]
change amd64 reference to x86_64 to match latest cfntools

Change-Id: I11f4bd974326c7f1b4e287389b22c5ec3f20bdf9
Signed-off-by: Steven Dake <sdake@redhat.com>
12 years agoRemove crankcase patch since fix was merged upstream
Steven Dake [Wed, 8 Aug 2012 21:58:51 +0000 (14:58 -0700)]
Remove crankcase patch since fix was merged upstream

Added a patch to force yum to retry indefinately on crankcase builds
because the OpenShift repositories were too busy.  I submitted this upstream
in:

  https://github.com/openshift/crankcase/pull/336

and it was merged.

As a result, removing this workaround.

Change-Id: I26e0a162d5cfb4bc23843c93678318ff21610973
Signed-off-by: Steven Dake <sdake@redhat.com>
12 years agoAdd calculate_properties() to update() and restart_resource()
Angus Salkeld [Mon, 6 Aug 2012 07:17:31 +0000 (17:17 +1000)]
Add calculate_properties() to update() and restart_resource()

This is the same fix as 783b1112490ef07db05251c1258c04f8b1caa5a0

Change-Id: I17a30b0c670dee5b228b4af8dad06ad109471e5d
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
12 years agoMerge "Log all startup operations to /var/log/heat-startup.log"
Jenkins [Sat, 4 Aug 2012 03:14:00 +0000 (03:14 +0000)]
Merge "Log all startup operations to /var/log/heat-startup.log"

12 years agoForce rpm to retry indefinately during crankcase build
Steven Dake [Sat, 4 Aug 2012 02:31:22 +0000 (19:31 -0700)]
Force rpm to retry indefinately during crankcase build

If RPM is not forced, sometimes packages will fail to download within the
default 10 retries.  This results in crankcase failing to build OpenShift.

Change-Id: I5174928fc2ac205dcd7818ecf1da6b8e32f48e08
Signed-off-by: Steven Dake <sdake@redhat.com>
12 years agoLog all startup operations to /var/log/heat-startup.log
Steven Dake [Fri, 3 Aug 2012 23:42:46 +0000 (16:42 -0700)]
Log all startup operations to /var/log/heat-startup.log

Change-Id: I0e7f415e7aee60c09d0b5b172742af7a5b313191
Signed-off-by: Steven Dake <sdake@redhat.com>
12 years agoPort existing rpc calls to use the new RPC client API.
Steve Baker [Thu, 2 Aug 2012 05:32:07 +0000 (17:32 +1200)]
Port existing rpc calls to use the new RPC client API.

Patch 2/2, this implements github heat issue 181.

test_api_v1 was modified to handle the extra rpc arguments.

metadata_register_address hasn't been included in EngineAPI, and it
possibly doesn't deserve to. This means that bin/heat-metadata has the
only remaining raw rpc call.

12 years agoImplements a client side engine RPC API.
Steve Baker [Fri, 27 Jul 2012 09:57:59 +0000 (21:57 +1200)]
Implements a client side engine RPC API.

Patch 1/2, this implements github heat issue 181.

The topic string for the rpc call is built from the cfg.CONF parameters 'host'
and 'engine_topic' defined in heat.common.config.engine_opts.

delete_stack seems to be the only method which returns nothing, so it can be
invoked as cast or call, with cast being the default.

The tests exercise each api method with the same approach found in
nova/nova/tests/compute/test_rpcapi.py

Change-Id: Ia20850821083d1236ad628172db00d01f073313c

12 years agoheat templates : update Openshift template to add node instance
Steven Hardy [Wed, 1 Aug 2012 13:27:55 +0000 (14:27 +0100)]
heat templates : update Openshift template to add node instance

Update openshift templat to add a second instance running
the node to the existing broker.  Move to crankcase master
and attempt to work around build issues.

Ref #186

Change-Id: If7d1b39e1072d3934f37817be3d7773edd7785c3
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat : Make instance flavors consistent
Steven Hardy [Thu, 2 Aug 2012 13:37:13 +0000 (14:37 +0100)]
heat : Make instance flavors consistent

Add additional instance flavors to align templates with
nova

Fixes #179

Change-Id: I586e57748c9b0a0c7594746399d5328da788efcd
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : raise appropriate error for incorrect stack_name
Steven Hardy [Thu, 2 Aug 2012 12:15:53 +0000 (13:15 +0100)]
heat engine : raise appropriate error for incorrect stack_name

Raise an AttributeError instead of returning a string when passed
an incorrect stack name, this then maps to the appropriate error
in the API.

Fixes #182

Change-Id: I7fe80496883bfbe515d9c235de812aaa14c41c12
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat API : Return correct AWS error response for invalid parameter
Steven Hardy [Fri, 27 Jul 2012 13:43:37 +0000 (14:43 +0100)]
heat API : Return correct AWS error response for invalid parameter

Passing template parameter values which are not in AllowedValues
makes the engine throw a ValueError exception, which should be
mapped back to HeatInvalidParameterValueError so that the API
error response is correctly formatted.

Fixes #180

Change-Id: I8615cb7fbbbfd21a403a4973fe0a63300c6cf852
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoBump to v6
Tomas Sedovic [Tue, 31 Jul 2012 12:50:17 +0000 (14:50 +0200)]
Bump to v6

Heat version 5 is released, let's start working on 6.

Change-Id: Icd0db5c0a9317d17ae4c2f161d50da8b5c50c40e
Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
12 years agoheat engine : Avoid writing to class-scope parameters schema
Steven Hardy [Mon, 30 Jul 2012 17:53:23 +0000 (18:53 +0100)]
heat engine : Avoid writing to class-scope parameters schema

Fixes issue where multiple instances of the same resource types
which have different parameters break, because the parser is
writing back to the class-scope properties_schema which should
be immutable.  This patch fixes by making a per-instance copy.

Fixes #183

Change-Id: Ia29f67465acbcfaf8dfe511ddaa9075bc48157ad
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoUpdate getting started with credential crypto
Tomas Sedovic [Mon, 30 Jul 2012 15:56:44 +0000 (17:56 +0200)]
Update getting started with credential crypto

We encrypt the sensitive information in the database now. This updates
the Getting Started guide to generate an encryption key.

Change-Id: I44a96302e736997a747f82c9d23006425396633f
Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
12 years agoAdd tools directory to python package.
Ian Main [Fri, 27 Jul 2012 16:41:25 +0000 (09:41 -0700)]
Add tools directory to python package.

This adds the tools/ dir to the tarball for distribution.

Change-Id: I82a18df568bf2d7421a49e057e80a7bc236e2078
Signed-off-by: Ian Main <imain@redhat.com>
12 years agoDon't use uuidgen in install.sh
Tomas Sedovic [Fri, 27 Jul 2012 12:37:17 +0000 (14:37 +0200)]
Don't use uuidgen in install.sh

uuidgen is not present in Ubuntu. This simply reads 16 bytes from
/dev/random and stores their hex representation.

Change-Id: If1152242b024218f20bd4c787e03836f0d5f49cf
Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
12 years agoAdd encryption support for authentication information in db.
Ian Main [Thu, 26 Jul 2012 19:57:57 +0000 (12:57 -0700)]
Add encryption support for authentication information in db.

This patch uses an encryption key generated in install.sh to perform
symmetrical encryption on sensitive authentication information stored
in the database for HA operations.

Change-Id: Ifd09f3f566ba3ebd941a6f453953576011b518b9
Signed-off-by: Ian Main <imain@redhat.com>
12 years agoChange to per-tenant stacks.
Ian Main [Wed, 25 Jul 2012 19:02:53 +0000 (12:02 -0700)]
Change to per-tenant stacks.

This patch switches from per-user stacks to per-tenant stacks.

Change-Id: Ia7ac65033560bcff1db83d4d673945029e06ea6a
Signed-off-by: Ian Main <imain@redhat.com>
12 years agoMake a template that demonstrates instance monitoring and restarting.
Angus Salkeld [Wed, 25 Jul 2012 11:45:09 +0000 (21:45 +1000)]
Make a template that demonstrates instance monitoring and restarting.

We use cfn-push-stats to send a heartbeat and if we don't get
it within the set interval we restart the instance.

Other changes to make this work:
- clear the waitcondition when it is deleted.
- set the resource id to None when deleted, else it won't re-create
  properly.
- don't run watch alarms if the stack is not completed.

Change-Id: I5dfc8b372f557cf43379c6c5b7436d1010f83e3c
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
12 years agoCall calulate_properties() before calling FnGetAtt()
Angus Salkeld [Wed, 25 Jul 2012 02:36:35 +0000 (12:36 +1000)]
Call calulate_properties() before calling FnGetAtt()

The problem is that in the delete the order of resolution is reversed
so in delete loop we have not yet done a calulate_properties() on the
resource that we are about to call FnGetAtt() for.

Fixes #178
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Change-Id: I8af6f8a78086a7b1f2bcc280d57af0b4311f08cc

12 years agoLog the error when a resouce fails to delete
Angus Salkeld [Tue, 24 Jul 2012 09:04:07 +0000 (19:04 +1000)]
Log the error when a resouce fails to delete

Also bail out of handle_delete if instance_id is None

Change-Id: I2bd77345ac35860201006a23999a06dd81ac6fe0
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
12 years agoheat API : Add more tests covering error paths
Steven Hardy [Tue, 24 Jul 2012 16:58:06 +0000 (17:58 +0100)]
heat API : Add more tests covering error paths

Add some more tests testing error path responses

Change-Id: I10f3b599f8a0f5daad84752042079a591968de09
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agodelete duplicate validate() method
Angus Salkeld [Tue, 24 Jul 2012 06:48:55 +0000 (16:48 +1000)]
delete duplicate validate() method

probably a merge conflict.

Change-Id: Ibe8941ab471943b7385ceb4b4d4559719a7092b6
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
12 years agoloadbalancer: implement Interval and Timeout
Angus Salkeld [Tue, 24 Jul 2012 04:09:29 +0000 (14:09 +1000)]
loadbalancer: implement Interval and Timeout

Change-Id: I74abc742371cb23ddfe38f83812662a9d42f3d43
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
12 years agoautoscaling: implement DesiredCapacity
Angus Salkeld [Tue, 24 Jul 2012 04:03:24 +0000 (14:03 +1000)]
autoscaling: implement DesiredCapacity

Change-Id: I1403f7857e03795aa4773f9a3f1fc8f082526477
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
12 years agoMerge "Get rid of PyCrypto dependency"
Jenkins [Tue, 24 Jul 2012 04:54:19 +0000 (04:54 +0000)]
Merge "Get rid of PyCrypto dependency"

12 years agoUpdate GettingStarted guide to use correct state name
Zane Bitter [Mon, 23 Jul 2012 23:39:41 +0000 (19:39 -0400)]
Update GettingStarted guide to use correct state name

This changed from IN_PROGRESS to CREATE_IN_PROGRESS in
0191587ac6a79509576e2043412020d9c4257b47.

Change-Id: If1cb20f6a16e719ee423db937b591b575fd4a038
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoGet rid of PyCrypto dependency
Jeff Peeler [Mon, 23 Jul 2012 22:15:49 +0000 (18:15 -0400)]
Get rid of PyCrypto dependency

The origin of this code is from Glance and is not used in Heat.

Change-Id: I4a22974e24fb277aea79212f0aee2f7e85a0ea76
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
12 years agoMerge "Add AWS::RDS::DBInstance"
Jenkins [Mon, 23 Jul 2012 17:47:48 +0000 (17:47 +0000)]
Merge "Add AWS::RDS::DBInstance"

12 years agoheat API : Add more unit tests
Steven Hardy [Mon, 23 Jul 2012 16:43:39 +0000 (17:43 +0100)]
heat API : Add more unit tests

Add more unit tests to improve API test coverage

Change-Id: I5f3a8933a9a09acb6b904ccc76ec20ad210a5974
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoAdd AWS::RDS::DBInstance
Tomas Sedovic [Wed, 18 Jul 2012 13:39:37 +0000 (15:39 +0200)]
Add AWS::RDS::DBInstance

Fixes #163

This is an initial implementation of the DBInstance resource type and a
sample Wordpress template showing it off.

Change-Id: I5e156dc58eee563ae9de068664bafa1af1fb5ffe
Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
12 years agoautoscaling: don't kill all instances when scaling down
Angus Salkeld [Mon, 23 Jul 2012 10:12:05 +0000 (20:12 +1000)]
autoscaling: don't kill all instances when scaling down

only delete the difference between the old capacity and the new capacity

doh!

Change-Id: Idbb16b2fa93abcad2793d5b4365c18a01e588b99
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
12 years agomake the autoscaling template easier to debug
Angus Salkeld [Mon, 23 Jul 2012 04:58:11 +0000 (14:58 +1000)]
make the autoscaling template easier to debug

shorten the period and lower the thresholds

Change-Id: I3d621fadacc6e77002d100cf725d970671475106
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
12 years agoReturn the name from the autoscaling group not the instance.
Angus Salkeld [Mon, 23 Jul 2012 04:48:29 +0000 (14:48 +1000)]
Return the name from the autoscaling group not the instance.

the default is to return an instance_id if it is  not none.

Change-Id: Ide5dcb3da5d992683dd235f1b53b264455a9fd07
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
12 years agoAdd python-psutil and fix cfn-push-stats options
Angus Salkeld [Mon, 23 Jul 2012 03:09:19 +0000 (13:09 +1000)]
Add python-psutil and fix cfn-push-stats options

Change-Id: Ic88e1e886c5f8ccbcbc5bc49fa612366c7faeae5
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
12 years agoAdd an EC2Token_filter_factory and use it as the default paste filter
Steven Dake [Fri, 20 Jul 2012 17:40:22 +0000 (10:40 -0700)]
Add an EC2Token_filter_factory and use it as the default paste filter

Change-Id: I70989ff6be655832497e1e8a3019497438a739fb
Signed-off-by: Steven Dake <sdake@redhat.com>
12 years agoheat api/engine : Implement UpdateStack functionality
Steven Hardy [Tue, 17 Jul 2012 14:46:49 +0000 (15:46 +0100)]
heat api/engine : Implement UpdateStack functionality

Implements initial support for UpdateStack, currently
all resources default to delete/create on update.
Ref #171

Change-Id: I3e6e63143d554c21ccdee19879c4dfb8b6e693d7

12 years agoMerge "heat db : fix per-object delete"
Jenkins [Fri, 20 Jul 2012 14:20:23 +0000 (14:20 +0000)]
Merge "heat db : fix per-object delete"

12 years agoheat db : fix per-object delete
Steven Hardy [Fri, 20 Jul 2012 10:17:08 +0000 (11:17 +0100)]
heat db : fix per-object delete

Fixes problem where per-resource destroy() operations do not
delete the underlying database row because the model delete
method is broken

Change-Id: I3562c9048f8d4e54c1ea51090e74abe982ffb330
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoCombined autoscaling and loadbalancer
Angus Salkeld [Fri, 20 Jul 2012 06:08:32 +0000 (16:08 +1000)]
Combined autoscaling and loadbalancer

Change-Id: Ib2cff867eb5d9fbee8cedb828e9c35a93436cbe5

12 years agoOptimize filter context
Steven Dake [Fri, 20 Jul 2012 02:51:47 +0000 (19:51 -0700)]
Optimize filter context

Just use a direct filter factory for ContextMiddleware

Change-Id: Ie17bb88c331bdb4354d0abb24346ab80f13cd323
Signed-off-by: Steven Dake <sdake@redhat.com>
12 years agoconvert to float instead of int in the watch rule
Angus Salkeld [Thu, 19 Jul 2012 05:01:01 +0000 (15:01 +1000)]
convert to float instead of int in the watch rule

as the data sent from the guests are likely to be floats.

Change-Id: Ice17c23997150db8c52c50767ed94fce8b182d4b
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
12 years agoAllow nested stacks to be retrieved by name
Angus Salkeld [Thu, 19 Jul 2012 08:35:59 +0000 (18:35 +1000)]
Allow nested stacks to be retrieved by name

When getting the stack by name in the metadata server
we don't know the owner_id so allow retrieval just by name.

I suspect this will be a short term solution until we get proper
stack names.

Change-Id: I8845b2b33a5bae30aae66c06af01c1a27c990305
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
12 years agoMerge "Don't require user params on template validation"
Jenkins [Wed, 18 Jul 2012 11:58:09 +0000 (11:58 +0000)]
Merge "Don't require user params on template validation"

12 years agoUse eventlet's wsgi again
Tomas Sedovic [Wed, 18 Jul 2012 11:34:03 +0000 (13:34 +0200)]
Use eventlet's wsgi again

Ref #55

This adds a monkey patch for the eventlet's maximum url length issue (ref #18).
With it, we can use eventlet as our wsgi server again.

Once Eventlet releases a new version (the fix is already in master) we'll drop
the monkey patch and set the limit proper.

Change-Id: Ia122af8d53b49587ade0ead6897fdd10107f4a87
Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
12 years agoDon't require user params on template validation
Tomas Sedovic [Thu, 12 Jul 2012 16:04:54 +0000 (18:04 +0200)]
Don't require user params on template validation

Fixes #161

Change-Id: Ia7e1a83043f8d175e320bfd52aa64cb6f62ead90
Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
12 years agotools: erase openstack-utils only after using it.
Angus Salkeld [Wed, 18 Jul 2012 02:09:22 +0000 (12:09 +1000)]
tools: erase openstack-utils only after using it.

else we just get: "sudo: openstack-db: command not found"

Change-Id: Iaad3353a7f3c64fe8fbb2f0686c24e97467efb66
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
12 years agoUpdate openstack-common
Steven Dake [Wed, 18 Jul 2012 00:38:50 +0000 (17:38 -0700)]
Update openstack-common

Change-Id: I2d7e169adb9205faa109634a9ae15a9f34e4bd75
Signed-off-by: Steven Dake <sdake@redhat.com>
12 years agoErase openstack-utils when uninstalling OpenStack
Zane Bitter [Tue, 17 Jul 2012 18:55:10 +0000 (14:55 -0400)]
Erase openstack-utils when uninstalling OpenStack

Change-Id: I219a57fdd1b600f185cafdb31d611f16c92698c9
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoheat : update config files with new rpc backend
Steven Hardy [Tue, 17 Jul 2012 16:33:49 +0000 (17:33 +0100)]
heat : update config files with new rpc backend

heat-engine.conf, heat-api.conf, heat-metadata.conf
should have:
rpc_backend=heat.openstack.common.rpc.impl_qpid
to work with the reworked rpc code.

Change-Id: I2e5b136240db2fe8f6dfad27da7e31b2a5053a1c
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoImport openstack.common.rpc
Steven Dake [Tue, 17 Jul 2012 15:27:19 +0000 (08:27 -0700)]
Import openstack.common.rpc

Use openstack.common routines.  One of the parameters changed to
create_consumer().

Thanks to Russell Bryant for assistance with sorting out that problem.

Change-Id: I4badc7ca22298cd0aafc57a2335b3d6801289be8
Signed-off-by: Steven Dake <sdake@redhat.com>
12 years agoUse global cfg.CONF instead of config classes
Steven Dake [Tue, 17 Jul 2012 14:17:20 +0000 (07:17 -0700)]
Use global cfg.CONF instead of config classes

Importing rpc.common requires the use of the global cfg.CONF.
In fact, most of common requires the use of this global.  This
patch removes all the object specific access to config options
and directly accesses the global in prep for rpc openstack-common
import.

Change-Id: I5989a436964c199df0dc38dbb191dc3d867e5ce7
Signed-off-by: Steven Dake <sdake@redhat.com>
12 years agoGet rid of eval() in authentication code
Zane Bitter [Mon, 16 Jul 2012 20:59:41 +0000 (16:59 -0400)]
Get rid of eval() in authentication code

This was not secure. Pass the auth data in JSON format rather than as a
serialised Python object.

Fixes #124

Change-Id: I8e1e9aef790b0af026da2a2d6194da19345be8b0
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoheat engine/API : Internal API rework
Steven Hardy [Tue, 10 Jul 2012 17:13:23 +0000 (18:13 +0100)]
heat engine/API : Internal API rework

Refactor engine-api code so that AWS specific
details like key names are handled in the API
Fixes #172

Change-Id: I4c5b153557216c03e5a98193e54cf75e3c7b97dd
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoMerge "Import openstack.common.log and use inside heat infrastructure"
Jenkins [Mon, 16 Jul 2012 03:08:41 +0000 (03:08 +0000)]
Merge "Import openstack.common.log and use inside heat infrastructure"

12 years agoAccount for XML output in Getting Started script
Zane Bitter [Sun, 15 Jul 2012 21:04:45 +0000 (17:04 -0400)]
Account for XML output in Getting Started script

The output format of heat commands has changed from JSON to XML

Change-Id: I68b4011e31fdb14306e88506dc6ff819b041b054
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoFix directory changes in Getting Started script
Zane Bitter [Sun, 15 Jul 2012 20:18:23 +0000 (16:18 -0400)]
Fix directory changes in Getting Started script

Change-Id: I3b23b2c0de18d72f91d4a0254e9dbf689ac91be3
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoAllow non-interactive installation of OpenStack
Zane Bitter [Sun, 15 Jul 2012 20:18:22 +0000 (16:18 -0400)]
Allow non-interactive installation of OpenStack

Pass the arguments to the tools/openstack script through to openstack-db so
that scripts can use e.g. --yes and --rootpw.

Also use openstack-db --drop rather than heat-db-drop to drop the databases
for OpenStack services.

Change-Id: I87811ee02d3bfd7cc2dca8b9ab20ea3cfc220e3e
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoDocument Metadata server in Getting Started guide
Zane Bitter [Fri, 1 Jun 2012 12:42:12 +0000 (14:42 +0200)]
Document Metadata server in Getting Started guide

Change-Id: Id0995df10f329ee3076a2c60ed5eb1548eaa315a
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoImport openstack.common.log and use inside heat infrastructure
Steven Dake [Sat, 14 Jul 2012 19:18:32 +0000 (12:18 -0700)]
Import openstack.common.log and use inside heat infrastructure

Allows heat to match openstack-common log calling conventions such
as using a context object or instance UUID for better traceability.

Change-Id: Idaa6c04270d9d7143c85988d685c0f9e241b635b
Signed-off-by: Steven Dake <sdake@redhat.com>
12 years agoUpdate openstack-common in prep for pulling in common.rpc
Steven Dake [Fri, 13 Jul 2012 22:30:03 +0000 (15:30 -0700)]
Update openstack-common in prep for pulling in common.rpc

Change-Id: Ib3444d97967c807cb96175ce23d4b670a028e9a7
Signed-off-by: Steven Dake <sdake@redhat.com>
12 years agoSet the stack updated time through the Timestamp
Zane Bitter [Fri, 13 Jul 2012 20:46:20 +0000 (16:46 -0400)]
Set the stack updated time through the Timestamp

Don't allow the resource class to modify the parent stack's database
representation directly.

Change-Id: Iff93d1430f4cb0695e729d0cf8f784ccb2ed7598
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoEliminate DB access from the engine API
Zane Bitter [Fri, 13 Jul 2012 20:46:20 +0000 (16:46 -0400)]
Eliminate DB access from the engine API

Access all data through the Stack and Resource objects.

Fixes #168

Change-Id: I0331a0ad67bcd11bb678e026ddc7b7c954517bc4
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoMake timestamps available in Stack/Resource objects
Zane Bitter [Fri, 13 Jul 2012 20:46:19 +0000 (16:46 -0400)]
Make timestamps available in Stack/Resource objects

Provide the creation time and last-updated time as attributes of Stack and
Resource objects so that external code does not need to access the database
in order to retrieve them. Use a Descriptor class so that the latest values
are always fetched from the database.

Change-Id: Ic3fa173b1dc8f2e5dc676a9152e8928ed2290913
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoheat cli : Manpage updates
Steven Hardy [Fri, 13 Jul 2012 15:08:53 +0000 (16:08 +0100)]
heat cli : Manpage updates

The heat cli tool manpage had very little information,
this adds detail to the existing page and copies a version
of this page to cover the heat-boto version of the tool.

Change-Id: I5b64466878b719b49a9084f301b2c177ddef9a91
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : fix create_stack response format
Steven Hardy [Fri, 13 Jul 2012 09:31:42 +0000 (10:31 +0100)]
heat engine : fix create_stack response format

create_stack response is broken now the StackId formatting
is done in the API, modify response format to fix.

Change-Id: I013bdb5ed992ce735905225cc4415fc0cfc5ce92
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat API : Add missing StackId prefixes
Steven Hardy [Thu, 12 Jul 2012 16:46:46 +0000 (17:46 +0100)]
heat API : Add missing StackId prefixes

Align event-list and resource-list-details with
other calls which add a AWS-style prefix to the
StackId response element

Change-Id: I0b1951068448d141e04ddca44f1d4188d3dff360
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoheat engine : move StackId formatting into API
Steven Hardy [Thu, 12 Jul 2012 16:37:37 +0000 (17:37 +0100)]
heat engine : move StackId formatting into API

Move AWS specific StackId formatting into the API
Ref #172

Change-Id: I02f964b63c0489800300d8db92e1c800286c4bd3
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoBlock on instance delete until delete operation completes
Steven Dake [Thu, 12 Jul 2012 15:38:51 +0000 (08:38 -0700)]
Block on instance delete until delete operation completes

Fixes issue #160

During deletion of a stack, following would occur:
delete stack
delete instance
delete eip or security group

When the last operation occurred, the instance is still present in OpenStack
making a deletion of EIP or security groups not work properly.  Serialize
the operations in resources.

Change-Id: I6e1613f5a6f5db485dd8a5f381d7a96afb58188b
Signed-off-by: Steven Dake <sdake@redhat.com>
12 years agoheat engine : Store stack timeout in database
Steven Hardy [Thu, 12 Jul 2012 11:56:44 +0000 (12:56 +0100)]
heat engine : Store stack timeout in database

Store the TimeoutInMinutes common query parameter
value in the DB so it can be returned correctly
with show_stack/DescribeStacks
ref #125

Change-Id: I4ccc79b586087f61e415d5d2c24b7bd52844399a
Signed-off-by: Steven Hardy <shardy@redhat.com>
12 years agoMerge "Update JEOS example in Getting Started"
Jenkins [Thu, 12 Jul 2012 10:25:14 +0000 (10:25 +0000)]
Merge "Update JEOS example in Getting Started"

12 years agoDisplay better message on Keystone failure
Tomas Sedovic [Thu, 12 Jul 2012 09:52:02 +0000 (11:52 +0200)]
Display better message on Keystone failure

Fixes #148

When there's something wrong with Keystone, Heat reported a rather cryptic
message. Now it indicates that the problem is with Keystone and passes
its response to the user.

Change-Id: I791b5bdfa68faa1b17daa67b911253d8bf8a2bb8
Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
12 years agoSpeed up metadata server registration
Zane Bitter [Wed, 11 Jul 2012 19:12:23 +0000 (15:12 -0400)]
Speed up metadata server registration

If heat-engine and heat-metadata were started at approximately the same
time, such that heat-engine was not ready to receive the registration call
from heat-metadata on the first attempt, it would take a minute before the
next retry. Instead, start with a very short timeout (2s) and increase it
if the engine does not show up.

Fixes #159

Change-Id: Ie2efcce667f1dde9ae227a4bb19a1d6a2b7cf135
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoFix the WordPress puppet template syntax
Zane Bitter [Tue, 10 Jul 2012 22:21:56 +0000 (18:21 -0400)]
Fix the WordPress puppet template syntax

The template was not valid JSON due to an apparent copy-and-paste error.

Change-Id: I5fb4afe6597b2f469fb5219494feb745d083bf52
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoOptimise DB lookups by ID
Zane Bitter [Thu, 5 Jul 2012 12:12:46 +0000 (14:12 +0200)]
Optimise DB lookups by ID

SQLAlchemy caches objects in the database per-session, but cannot cache
queries. A query just generates a list of object primary keys, which is
then used to fetch the corresponding objects from the cache (if possible)
or database. Therefore a query which filters by primary key is a waste of
time, since it just returns (surprise!) the key we started off with. If we
have the primary key (in this case the id field), just look up the object.

Change-Id: I7123c12372b26c0e1b91b2496921c54d9d992cd8
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoRaise the correct error when a stack is not found
Zane Bitter [Tue, 10 Jul 2012 21:53:58 +0000 (17:53 -0400)]
Raise the correct error when a stack is not found

Change-Id: Ia96d7b96f61e48d20ab080395365e770cf5bb1a8
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoAccess Resource metadata through the new attribute
Zane Bitter [Wed, 11 Jul 2012 15:02:13 +0000 (11:02 -0400)]
Access Resource metadata through the new attribute

Get rid of all the other code that was accessing this directly from the
database and use only the Metadata descriptor.

Change-Id: I36a7a00878d0b65f58ba282ebad78f77b37c4d07
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoAdd a helper class for metadata
Zane Bitter [Tue, 3 Jul 2012 16:17:05 +0000 (18:17 +0200)]
Add a helper class for metadata

With this patch we can now access resource metadata through the 'metadata'
attribute and have it always fetch the latest data from the database. This
reduces the chance of accidentally accessing stale data (due to the
metadata being updated in a different database session via the metadata
server) by providing a single implementation to access it through.

Change-Id: Id411ae891d3eace746d16008a7d58bb19b4f652d
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoAdd unit tests for metadata read/write in heat-engine API
Zane Bitter [Wed, 11 Jul 2012 14:54:41 +0000 (10:54 -0400)]
Add unit tests for metadata read/write in heat-engine API

Change-Id: I2b745a00a2110c794f6228976d3ed1cb9cf59d5f
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoAvoid unneccesary template parsing
Zane Bitter [Wed, 11 Jul 2012 14:41:40 +0000 (10:41 -0400)]
Avoid unneccesary template parsing

Only parse the parts of the resource template that we need.

Change-Id: I4628e699452dc390848fc15197a5e04a3095399a
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoAllow partial template parsing
Zane Bitter [Wed, 11 Jul 2012 14:37:47 +0000 (10:37 -0400)]
Allow partial template parsing

Make it possible to only parse the section we need when generating the
parsed template for a resource.

Change-Id: Ib4216d8d7bfdbca81f43690b6e8c53c15c71a232
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoRename resource_id to resource_name in metadata API
Zane Bitter [Mon, 9 Jul 2012 18:23:31 +0000 (14:23 -0400)]
Rename resource_id to resource_name in metadata API

This more accurately reflects what the parameter is, which is just the name
of the resource within the specified stack.

Change-Id: I6bc26c0046e0493c3b98c5753c04cc5a314678d7
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoReport errors from nested stacks
Zane Bitter [Fri, 6 Jul 2012 18:40:00 +0000 (20:40 +0200)]
Report errors from nested stacks

If creation of a nested stack fails, we need to raise an exception so that
creation of the nested stack resource (and hence the enclosing stack) also
fails.

Change-Id: Ic5eda7f8d044ed2c87fc0e785b1cd8fcf78071a4
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoSpeed up engine manager unit tests
Zane Bitter [Wed, 11 Jul 2012 13:53:40 +0000 (09:53 -0400)]
Speed up engine manager unit tests

Refactor the engine manager unit tests so that they all use a single stack
that is only set up once. This makes the tests run a lot faster, and also
makes them easier to write. Both should encourage increased testing.

Change-Id: I50d2ffff393d4049459c5c30e408961681c189c7
Signed-off-by: Zane Bitter <zbitter@redhat.com>
12 years agoMerge "Add DB refresh/expire on specific parameters"
Jenkins [Wed, 11 Jul 2012 12:31:53 +0000 (12:31 +0000)]
Merge "Add DB refresh/expire on specific parameters"

12 years agoMerge "Allow Status(Reason) access through Stack/Resource objects"
Jenkins [Wed, 11 Jul 2012 12:27:04 +0000 (12:27 +0000)]
Merge "Allow Status(Reason) access through Stack/Resource objects"

12 years agoUpdate JEOS example in Getting Started
Tomas Sedovic [Wed, 11 Jul 2012 10:42:58 +0000 (12:42 +0200)]
Update JEOS example in Getting Started

The heat-jeos usability branch has merged into master and the command
syntax for building new images is now a bit different.

Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
Change-Id: Ibd4e308fe6ef4d690b0408d59d8a9539a5c81f96