224 Commits

Author SHA1 Message Date
Steven Hardy
4743749b80 heat-keystone-setup add instance role
Add "heat_instance" role which we will assign all "instance users"
to in the engine when we create them

Ref #279

Change-Id: If7cc07c605f7696c1e9f617dbfca1b81d5b04196
Signed-off-by: Steven Hardy <shardy@redhat.com>
2012-10-25 10:16:29 +01:00
Steven Hardy
f5099e02d5 heat-keystone-setup workaround keystone arg syntax
Keystone user-role-add syntax is not the same on essex
and folsom, so try both formats so we can work with either
Removes potentially unreliable approach to detecting keystone
version, and also avoids error on folsom when the user already
has the specified role

Fixes #272

Change-Id: Iece52223a29069a1fd517018cc49613be6fac318
Signed-off-by: Steven Hardy <shardy@redhat.com>
2012-10-25 10:01:19 +01:00
Steven Hardy
b3b56ff59d heat-keystone-setup workaround keystone output reordering
Folsom version of keystoneclient orders the columns for
keystone user-list differently, so we need to detect the
new format to extract the correct field

Fixes #273

Change-Id: I46f653dd3a8f7b5a68648fbd72671f95b386a547
Signed-off-by: Steven Hardy <shardy@redhat.com>
2012-10-25 10:01:19 +01:00
Zane Bitter
7036a387f4 ReST API: Add a keystone endpoint
Change-Id: I2770279ec50822c106d3ae23ce2f736a49139443
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-10-22 14:06:40 +02:00
Zane Bitter
567128f594 Handle %(tenant_id)s in endpoints when updating
Change-Id: I61112f02b60b6bb63f33d5459edec1f44a49bdd5
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-10-22 14:06:23 +02:00
Zane Bitter
0c81d9dbef Handle upgrades in heat-keystone-setup
Handle upgrades of Heat by removing any outdated endpoints that exist in
keystone and adding any existing "heat" service user to an admin role in
the service tenant.

Change-Id: If6393417b5404a56b4723f42fb1a1b394d01cc6a
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-10-17 14:39:49 +02:00
Zane Bitter
bae47db460 Rename CloudFormation service to heat-cfn
This is consistent with what is implemented in devstack.

Change-Id: If47c28ddbef1d6c61e2d741f359d850e4ecffaa9
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-10-17 10:35:53 +02:00
Steven Hardy
cd512f5e91 heat : heat cli pep cleanups
Fix some pep whitespace issues, which were not picked
up by the jenkins gate for some reason..

Change-Id: I9a3488d61a3cde4bb8038f3f1927eb0c1ad0f60c
Signed-off-by: Steven Hardy <shardy@redhat.com>
2012-10-16 14:34:38 +01:00
Steven Hardy
46a41590fb heat : add template-swift-url option to client
Add option to bin/heat to retrieve template body from swift

Fixes #216

Change-Id: I425d7cd0f01875d85d97906f4f91c3a3b2fcf851
Signed-off-by: Steven Hardy <shardy@redhat.com>
2012-10-16 11:11:30 +01:00
Steven Hardy
84ddb9fb65 heat cli: encapsulate template arg-parsing
Encapsulate template argument parsing in a helper function
cleans up some duplication and provides a single place to add
swift-template-url logic

Ref #216

Change-Id: I36515f318ed79899a2710899ffca83e4452c61f4
Signed-off-by: Steven Hardy <shardy@redhat.com>
2012-10-15 18:57:48 +01:00
Steve Baker
a34b9ef5ab Change endpoint service type from orchestration to cloudformation.
This is required so that the REST API can take over the orchestration service type.

This will break exiting setups until heat-keystone-setup is re-run.

There will be a corresponding update to devstack, which may be out of sync to this one.
2012-10-10 13:21:47 +13:00
Jeff Peeler
4651be7838 Remove unnecessary keystone scripts
Make remaining keystone script check installed version of Nova and use
proper arguments to keystone.

closes #252

Change-Id: Ie4709891c7ca89d73390a3474e3d10beab449395
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
2012-10-09 16:51:56 +01:00
Zane Bitter
9e237f5a66 Add the beginnings of an OpenStack ReST API
So far only access to stacks (not resources and events) is implemented.

Change-Id: I9655e9441087ef60c06e67e2d6ae68ec4a3b2d11
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-09-27 21:37:37 +02:00
Zane Bitter
715a62d2b4 Move CloudFormation API to heat.api.cfn package
Change-Id: Ib0adf6f38da298b0b87d80272904767066b41087
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-09-27 15:00:30 +02:00
Steven Dake
5208008db0 Add a Folsom specific heat-keystone-setup binary to bin
Fixes issue #253

Change-Id: Ie223c43c15ac806da393e3d532ef410526ac16ce
Signed-off-by: Steven Dake <sdake@redhat.com>
2012-09-26 10:11:07 -07:00
Zane Bitter
2f9a1310e3 Rename heat-api to heat-api-cfn
The previous heat-api is, in fact, a CloudFormation-compatible API. Rename
it to heat-api-cfn, analogous to how the EC2 API in Nova is named
nova-api-ec2.

Change-Id: I9759f10cee6a60cdc9cb917966eb9fb95a618f85
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-09-06 16:11:24 +02:00
Angus Salkeld
5655589895 Fix pep8 warning
Change-Id: Ia0b4336e7e861fefc7afebc99a3c6ddf48841d71
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-09-05 23:47:44 +00:00
Steven Hardy
51dc63bb07 heat cli : initial heat-watch cloudwatch API client
Implements new client to demonstrate new Cloudwatch API

Currently only provides options for DescribeAlarms,
ListMetrics, PutMetricData and SetAlarmState

Signed-off-by: Steven Hardy <shardy@redhat.com>
Change-Id: I3963a07694cec9af96d9d7369cc7d18d629fcd2d
2012-08-31 18:27:48 +01:00
Steven Hardy
311092a294 heat API : Implement initial CloudWatch API
Initial AWS-compatible CloudWatch API implementation
Supports the following API actions:
- DescribeAlarms : describe alarm/watch details
- ListMetrics : List watch metric datapoints
- PutMetricData : Create metric datapoint
- SetAlarmState : temporarily set alarm state

Skeleton implementation of all other TODO actions which
returns HeatAPINotImplementedError.

Only basic filtering parameters supported at this time.

Signed-off-by: Steven Hardy <shardy@redhat.com>
Change-Id: I8628854a135fff07b675e85150ea0b50184ed2e1
2012-08-31 18:27:48 +01:00
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
Tomas Sedovic
6029c031ea 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>
2012-07-18 13:34:35 +02:00
Steven Dake
e9eee939c7 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>
2012-07-17 08:27:19 -07:00
Steven Dake
b0a0f0c24e 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>
2012-07-17 07:18:42 -07:00
Steven Dake
c7ec88f2c7 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>
2012-07-14 13:51:38 -07:00
Zane Bitter
8cbd065bf0 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>
2012-07-11 15:18:18 -04:00
Steven Hardy
b96c15c96f heat cli : Align resource-list-details usage with other commands
Align resource-list-details usage with the other heat commands,
and provide better usage info on failure
Fixes #156

Change-Id: Id80b377151eca64e5f7dbfb436f5a5da5213c8b3
Signed-off-by: Steven Hardy <shardy@redhat.com>
2012-07-10 15:17:02 +01:00
Steven Hardy
637875f729 heat : heat-boto remove boto.cfg reading
Remove code directly reading boto.cfg, looks like the problem
with boto not reading the config file internally is fixed upstream

Signed-off-by: Steven Hardy <shardy@redhat.com>

Change-Id: I57e1d89d0fa83793d51d5cf6266c200d7abc7d57
2012-07-06 14:41:58 +01:00
Steven Hardy
9d0a22f92b heat : add heat-boto test client
Add initial version of the heat cli tool which uses boto
- revised following review comments to remove jeos/cfn paths
ref #92

Change-Id: I61b5815b250f3b01d33844ff46dd1612000d51fd
Signed-off-by: Steven Hardy <shardy@redhat.com>
2012-07-04 17:43:35 +01:00
Steven Hardy
b7eee6c64e heat API : DescribeStacks return all when no stack name specified
The AWS DescribeStacks API documentation says if no stack name specified,
we should return results for all stacks created.
fixes #142

Change-Id: I3d17fef7f1b660bf399e8ff82ff39ca2b2d6f046
Signed-off-by: Steven Hardy <shardy@redhat.com>
2012-06-29 09:34:30 +01:00
Zane Bitter
b942be0e36 Tidy up create timeout code
- Change the parameter name to 'TimeoutInMinutes' to match CloudFormation
- Don't hack parameters into the template, just pass them as parameters

Change-Id: If938b51a0fcb36bb76efeea3527ee7f8eaae9f81
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-06-28 18:02:08 +02:00
Angus Salkeld
0d9052ef4f Don't use json.dumps() on the output of get_template
Change-Id: I913e9f9e2b90cd983fb9674b18b6c81d66129e6c
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-22 14:11:01 +10:00
Angus Salkeld
cfd1232038 Remove duplicate setup_logging()
This is already done in load_paste_app()

Fixes #146

Change-Id: I3631b7ade06c8b142960abbf9c172461fae93a56
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-20 14:01:29 +10:00
Tomas Sedovic
247cc2bb9a Add describe resource API calls
Fixes #62.

This commit implements the `DescribeStackResource`,
`DescribeStackResources` and `ListStackResources` AWS API calls.

Change-Id: Id9161b3c3eb527d5936c5b8978e32a67ba6c12bb
2012-06-18 13:36:10 +02:00
Steven Hardy
1fc9ff4a0b heat API : return response body as XML not JSON
AWS API returns response as XML, this implements a new response serializer which
turns dicts returned from the engine into AWS style XML responses.  Ref #125.
Updated following review comment.

Change-Id: I8170ed814be0b5cea98761a2723e12be216374a3
Signed-off-by: Steven Hardy <shardy@redhat.com>
2012-06-14 07:48:26 +01:00
Angus Salkeld
0b7feab00b Add EstimateTemplateCost API
see #1

Change-Id: Ib362b5320b5fa050dfb70202838042e222287534
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-08 12:06:50 +10:00
Angus Salkeld
3601fb263c Add the GetTemplate API
see #1

Change-Id: I178a1d9a19570296b62381548434fb4fcf836fee
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-08 11:37:08 +10:00
Steven Dake
4c359db1b0 Remove cfntools and jeos
These files are now available in the heat-jeos repository.

Change-Id: I392e7443348a31e8454ae14d957b0b54560c2ec3
Signed-off-by: Steven Dake <sdake@redhat.com>
2012-06-07 07:47:47 -07:00
Angus Salkeld
aca71be770 Add a Timeout (-t) to the heat options (and make -f for templates).
This makes the cli more consistent with AWS and implements
the timeout feature.

Note: the timeout is in minutes and defaults to 60 minutes.

Change-Id: I41dea75170c871c1ee47948643311752d9d5e41e
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-07 11:41:03 +10:00
Angus Salkeld
7e02a65f79 Fix the setup of daemon config
Change-Id: I02d4a3da63d2438067cf64c15432d66b539c30bc
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-06 23:07:54 +10:00
Angus Salkeld
93ea554c0e Teach heat-api about the bind_host
Change-Id: Ica32693373a87f01c41755a2b041c187bddd034d
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-06-04 21:16:31 +10:00
Ian Main
6b0e7a4314 Fix new pep8 warnings.
With the new release of pep8 we have some different requirements.
This patch fixes them all.

Change-Id: Ief16becba47007460f8b125907b055aa51de999e
Signed-off-by: Ian Main <imain@redhat.com>
2012-06-01 11:50:36 -07:00
Angus Salkeld
d1f71f6d5d Remove _authenticate() check for metadata calls (temp)
To be replaced by proper AWS auth, which needs AWS::IAM::AccessKey
resource type to be hooked up.

Change-Id: Icbdb08493fb51add5e6d3d5f4a153595f93c8f75
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-31 14:30:48 +10:00
Angus Salkeld
07018fe88a Fix jeos_path when not intalled as an egg
Also use os.path.join() to sort out trailing "/"

Change-Id: I212cffacc018f456894e9b7921fef75256edcf45
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2012-05-25 11:51:21 +10:00
Tomas Sedovic
67203a5497 Allow engine and metadata server start in any order
When the metadata server starts first, it will wait for the engine to come up
and only then registers it's hostname and port and becomes available.

Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
2012-05-17 16:49:15 +02:00
Zane Bitter
0720684956 Modify command names for consistency
Replace 'events_list' with 'event-list' and 'jeos_create' with
'jeos-create'. This makes things consistent with the conventions of
OpenStack projects. The old versions will continue to work for now.

Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-05-15 11:42:37 +02:00
Zane Bitter
7a28ec601e Make 'heat help' show a list of commands
Previously we just printed an error message about not specifying a command
to get help about, and no hint about how to work out which commands even
existed.

Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-05-14 19:25:11 +02:00
Zane Bitter
645d093c45 Allow the Getting Started script to run non-interactively
Related: #84

Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-05-14 16:03:49 +02:00