Commit Graph

783 Commits

Author SHA1 Message Date
Steven Hardy
a9252c9b05 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>
2012-08-16 13:02:09 +01:00
Steven Hardy
5aa80047b6 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>
2012-08-16 12:23:50 +01:00
Steven Hardy
619239527f 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>
2012-08-16 10:51:29 +01:00
Steven Hardy
c2382317de 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>
2012-08-15 15:20:14 +01:00
Steven Dake
08836e3249 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>
2012-08-14 09:07:44 -07:00
Steven Hardy
ff96719404 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>
2012-08-14 15:56:13 +01:00
Steven Hardy
005b613f8b 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>
2012-08-13 19:27:53 +01:00
Zane Bitter
a013d1dc9e Getting Started: Add configuration info for the metadata server
Change-Id: Ie99bfd1c5e7bcaedd7757872d7d618d2cf29b137
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-08-13 18:32:57 +02:00
Zane Bitter
aa21f73f3e Getting Started: Use install.sh script
Change-Id: I7f189f8d3e0557503eca23a5489a98589bfff4f3
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-08-13 18:32:57 +02:00
Tomas Sedovic
e611c7a517 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>
2012-08-13 16:37:38 +02:00
Jenkins
70bdc38a44 Merge "change amd64 reference to x86_64 to match latest cfntools" 2012-08-10 19:06:22 +00:00
Steven Dake
7f8c5fabed change amd64 reference to x86_64 to match latest cfntools
Change-Id: I11f4bd974326c7f1b4e287389b22c5ec3f20bdf9
Signed-off-by: Steven Dake <sdake@redhat.com>
2012-08-10 11:43:02 -07:00
Steven Dake
69cfc124bc 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>
2012-08-08 15:01:47 -07:00
Angus Salkeld
ec45dd77c0 Add calculate_properties() to update() and restart_resource()
This is the same fix as 783b111249

Change-Id: I17a30b0c670dee5b228b4af8dad06ad109471e5d
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-08-06 17:17:31 +10:00
Jenkins
e432874d5f Merge "Log all startup operations to /var/log/heat-startup.log" 2012-08-04 03:14:00 +00:00
Steven Dake
31718b1e14 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>
2012-08-03 19:33:38 -07:00
Steven Dake
dedb9475a9 Log all startup operations to /var/log/heat-startup.log
Change-Id: I0e7f415e7aee60c09d0b5b172742af7a5b313191
Signed-off-by: Steven Dake <sdake@redhat.com>
2012-08-03 16:43:59 -07:00
Steve Baker
c8b47d80ed 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.
2012-08-03 10:00:07 +12:00
Steve Baker
e05f39c37b 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
2012-08-03 10:00:07 +12:00
Steven Hardy
ea2db73166 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>
2012-08-02 18:58:32 +01:00
Steven Hardy
044887521e 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>
2012-08-02 17:52:24 +01:00
Steven Hardy
1ed94e1382 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>
2012-08-02 17:52:03 +01:00
Steven Hardy
c69f3892c2 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>
2012-08-01 14:28:10 +01:00
Tomas Sedovic
e3e011b9cb 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>
2012-07-31 14:51:55 +02:00
Steven Hardy
2779760de5 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>
2012-07-30 18:59:25 +01:00
Tomas Sedovic
8f0caacf8a 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>
2012-07-30 18:02:07 +02:00
Ian Main
bdf59084b6 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>
2012-07-27 09:41:25 -07:00
Tomas Sedovic
b6d2608dd2 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>
2012-07-27 14:37:17 +02:00
Ian Main
58cd52624b 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>
2012-07-26 18:40:18 -07:00
Ian Main
e646e66728 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>
2012-07-25 12:02:53 -07:00
Angus Salkeld
3c6e40f2bb 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>
2012-07-25 21:45:09 +10:00
Angus Salkeld
783b111249 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
2012-07-25 12:36:35 +10:00
Angus Salkeld
8c3f0f14a5 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>
2012-07-25 08:32:22 +10:00
Steven Hardy
f1eabe8073 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>
2012-07-24 17:58:06 +01:00
Angus Salkeld
f95e459e80 delete duplicate validate() method
probably a merge conflict.

Change-Id: Ibe8941ab471943b7385ceb4b4d4559719a7092b6
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-07-24 16:48:55 +10:00
Angus Salkeld
8a7ea792b0 loadbalancer: implement Interval and Timeout
Change-Id: I74abc742371cb23ddfe38f83812662a9d42f3d43
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-07-24 16:47:45 +10:00
Angus Salkeld
27e612a77b autoscaling: implement DesiredCapacity
Change-Id: I1403f7857e03795aa4773f9a3f1fc8f082526477
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-07-24 16:47:45 +10:00
Jenkins
591377489f Merge "Get rid of PyCrypto dependency" 2012-07-24 04:54:19 +00:00
Zane Bitter
1206b18cbd Update GettingStarted guide to use correct state name
This changed from IN_PROGRESS to CREATE_IN_PROGRESS in
0191587ac6.

Change-Id: If1cb20f6a16e719ee423db937b591b575fd4a038
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-07-23 19:41:06 -04:00
Jeff Peeler
8bd9ed0bd8 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>
2012-07-23 18:15:49 -04:00
Jenkins
025b5f907d Merge "Add AWS::RDS::DBInstance" 2012-07-23 17:47:48 +00:00
Steven Hardy
64f9b72c8e 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>
2012-07-23 17:44:25 +01:00
Tomas Sedovic
9c75b6d3b0 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>
2012-07-23 18:38:16 +02:00
Angus Salkeld
312a84ec70 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>
2012-07-23 20:12:05 +10:00
Angus Salkeld
deebc5c42a 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>
2012-07-23 14:58:11 +10:00
Angus Salkeld
c91b8d53f2 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>
2012-07-23 14:48:29 +10:00
Angus Salkeld
b48d869244 Add python-psutil and fix cfn-push-stats options
Change-Id: Ic88e1e886c5f8ccbcbc5bc49fa612366c7faeae5
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-07-23 13:09:19 +10:00
Steven Dake
b34a5cd51d Add an EC2Token_filter_factory and use it as the default paste filter
Change-Id: I70989ff6be655832497e1e8a3019497438a739fb
Signed-off-by: Steven Dake <sdake@redhat.com>
2012-07-20 10:40:53 -07:00
Steven Hardy
0191587ac6 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
2012-07-20 15:31:03 +01:00
Jenkins
8fb2ad1e28 Merge "heat db : fix per-object delete" 2012-07-20 14:20:23 +00:00