155 Commits

Author SHA1 Message Date
Mark McLoughlin
117e73ba57 Remove engine_topic configuration option
Fixes bug #1173575

This is currently broken since heat-engine always listens to the
'engine' topic and there isn't actually a good use case for this to be
configurable, so let's kill it.

Change-Id: I35c0292c921f81857f80a7f111df5ac330d54ecf
2013-04-27 13:27:26 +01:00
Zane Bitter
16cd2030aa Use internal DB management
Use our own internal code for managing database migrations, rather than
calling sqlalchemy-migrate's command line directly. This allows us to
automatically specify the initial version of the database, which is
required in order to be able to squash migrations (bug 1072949).

Change-Id: I88206f8b55fe6fe4016cee8e5bf1d5eeb0ae30d2
2013-03-12 10:03:37 +01:00
Steven Hardy
2e000a6d28 heat clients : make --host option error for heat-boto
The --host option cannot work for heat-boto, so print a helpful
error if the user tries to use it.

ref bug 1102101

Change-Id: I63129b314eabd7bc84647efb96e9f10b1963b8b2
2013-03-07 12:12:42 +00:00
Jenkins
4f4e948e3e Merge "Use oslo logging setup." 2013-03-05 01:16:01 +00:00
Steven Hardy
0aea9429bf heat clients : Change --disable-rollback to --enable-rollback
Since the engine default is now rollback disabled, flip this
switch so the user can opt-in to rollback functionality via
the --enable-rollback cli option to heat-cfn/heat-boto

ref bug 1131303

Change-Id: I3965de9a2beb510d5623d0c7cd8ff3aea9d4364a
2013-03-04 20:48:54 +00:00
Angus Salkeld
f9f11a5bc3 Use oslo logging setup.
The one reason we kept our own version was because of the qpid
logging that is quite useful. But this is now easily done via
the "default_log_levels" option.

I have setup the api servers with:
 ampqlib,qpid.messaging,keystone,eventlet
and the engine with:
 ampqlib,qpid.messaging,keystone,eventlet,sqlalchemy

bug: 1143629
Change-Id: I04eeab469ab59da550e08188d53b2cfbb576c04d
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
2013-03-04 17:00:47 +11:00
Steven Dake
eea4a6d16d Add heat-watch to pep8 checks
heat-watch was missing from pep8 checks in the past.  Tidy up heat-watch
and add to run_pep8.sh.

Change-Id: I36680b24ee90a5daeb7f8d7418b665a215026325
Fixes: Bug #1131275
2013-02-28 20:20:04 +00:00
Jenkins
a3daa3fd99 Merge "Use oslo-config-2013.1b3" 2013-02-21 08:49:28 +00:00
Steven Hardy
df6bd799da heat cli : Add --disable-rollback option to heat-cfn
When rollback is implemented it will default on, like aws
so this option allows stack rollback on create to be disabled

blueprint stack-rollback

Change-Id: I02fcaaa656219b1c65729cecdd473e0a5bd86036
2013-02-18 20:21:10 +00:00
Mark McLoughlin
150d2ca694 Use oslo-config-2013.1b3
The cfg API is now available via the oslo-config library, so switch to
it and remove the copied-and-pasted version.

Add the 2013.1b3 tarball to tools/pip-requires - this will be changed
to 'oslo-config>=2013.1' when oslo-config is published to pypi. This
will happen in time for grizzly final.

Add dependency_links to setup.py so that oslo-config can be installed
from the tarball URL specified in pip-requires.

Remove the 'deps = pep8==1.3.4' from tox.ini as it means all the other
deps get installed with easy_install which can't install oslo-config
from the URL.

Excluded code from oslo-incubator in the pep8 check.

Retain dummy cfg.py file until keystoneclient middleware has been
updated (I18c450174277c8e2d15ed93879da6cd92074c27a).

Change-Id: I4815aeb8a9341a31a250e920157f15ee15cfc5bc
2013-02-18 17:27:14 +00:00
sdake
b9ed62c6b4 Escape awk + sign so heat-keystone-setup works on Ubuntu 12.04
plus sign needs escaping

Change-Id: Ia03f1eb213c806d13e88a435023ede8511ddfa4f
Fixes: bug #126723
2013-02-15 16:25:34 -07:00
Jeff Peeler
0a37f56972 Change install scripts to use cinder
Fixes bug #1073164

Change-Id: Id483b028d19dbbc30984299120b87fd020f19903
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
2013-02-04 14:33:36 -05:00
Steven Hardy
2979270a41 heat api : add register_api_opts to init.py
Add register_api_opts to api/__init__.py, slightly simplifying
the api executables, and also solving an issue with some tests
which were not working via nosetests -s due to the required
options not being registered in cfg.CONF

Change-Id: I70b16aae1f73f72518013dbcda37defa79fc5649
Signed-off-by: Steven Hardy <shardy@redhat.com>
2013-01-31 15:41:16 +00:00
Steven Hardy
55c90321b4 openstack/common : rebase to latest oslo
Rebased to latest oslo, now at 8837013, note a few interfaces
changed requiring a some tweaks to the heat code

Change-Id: I7dfc634b7c459edebca19dee522b396e3736aecc
Signed-off-by: Steven Hardy <shardy@redhat.com>
2013-01-18 15:31:45 +00:00
Steven Hardy
c1bf924c0f heat cleanups to align with pep8 1.3.4
Lots of (mostly whitespace) cleanups to align all the non-test code with
pep8 v1.3.4

ref bug 1092057

Change-Id: I444b288444dba4ec1da5854bd276d091c06d8489
Signed-off-by: Steven Hardy <shardy@redhat.com>
2012-12-20 09:26:16 +00:00
Zane Bitter
f531f6fb28 Get rid of unused imports
This cruft just tends to build up over time...

Change-Id: I61fd067b431aaa57164c7ff781c9cc8bab04bd4b
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-12-13 16:04:30 +01:00
Zane Bitter
5ef68bbc45 Move the cfn client code to a subpackage
This will make packaging easier.

Change-Id: I8e0f0a3d85bdf073a3b3272f920ad60f27e929e3
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-12-13 11:25:23 +01:00
Steve Baker
f24a2c27c5 Eventlet monkey-patch heat-api-cloudwatch.
Tested by getting responses from cloudwatch, but not with a full
end-to-end cloudwatch validation
Change-Id: I2d81adc8e63b9be7dec02083509ab706ae0c5a7f
2012-12-11 10:20:41 +13:00
Steve Baker
110f8bea28 Eventlet monkey-patch heat-api-cfn
Tested by running bin/heat-cfn commands
Change-Id: I158a0d8d9b545191001ecdabfa9f331cf937bf4e
2012-12-11 10:20:41 +13:00
Steve Baker
c4e73f1f55 Eventlet monkey-patch heat-api
I have a stress test which uses python-heatclient to create
an empty template, list the stacks, and delete the created stack.

Running 100 of these jobs concurrently takes 64 seconds without this patch,
and 17 seconds with it.

Change-Id: I8963da477aa8fcec724e2e5afcd5ec92ff5b07d1
2012-12-11 10:20:41 +13:00
Jenkins
65b02b2b3d Merge "Switch over missed file in version switch" 2012-12-10 17:08:12 +00:00
Jeff Peeler
10d23ef1d7 Switch over missed file in version switch
Bug 1078480

Change-Id: Ic196086467c68bfe718ba6845711da172b237688
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
2012-12-10 11:53:15 -05:00
Jeff Peeler
4e99d4d0bb Switch to openstack style versioning
Bug 1078480

Change-Id: I32471acc16e7ca6f60672474c9bf70537ba76fd2
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
2012-12-08 02:24:03 +00:00
Zane Bitter
180df199fe Automatically register engine options
Register the engine options as soon as we import something from the engine
package. This means we do not need to explicitly do it in all of the unit
tests.

Change-Id: I8fb0c8665d0e0255521e21a6aac223ad1e3b1b25
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-11-30 17:05:13 +01:00
Steven Hardy
6ae3ff0a4e Remove heat-metadata service
Remove heat-metadata service, since the last remaining function
(waitcondition handle notification) is now handled via the CFN
API

blueprint metsrv-remove
Signed-off-by: Steven Hardy <shardy@redhat.com>
Change-Id: Ie36c86ce86f6c47e8d9f8accf8ec17084fb8cffd
2012-11-30 08:45:02 +00:00
Zane Bitter
658a839665 Process engine config before initialisation
Don't import the heat-engine service module until the configuration options
have been initialised. This will allow us to read the configuration during
initialisation of the engine.

Change-Id: I2bc70d903434eac1fa248640018f038c5ef2bead
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-11-29 20:51:47 +01:00
Steve Baker
f77c09c2a5 Rename heat client to heat-cfn.
This is to allow python-heatclient to eventually become the default heat
client.

Documentation in heat.wiki will be updated to refer to heat-cfn when this
change is pushed.

Change-Id: I2209c36adf41fa5d0df0caf9200f7fedbdd51805
2012-11-05 12:23:17 +13:00
Angus Salkeld
8135da2fb4 Use openstack-common service.py
Change-Id: Idbc145209c039e9362cf97c9926e050f809ef0fa
2012-11-02 22:02:00 +11:00
Steven Hardy
e0bb98d4f5 heat-keystone-setup : fix error on folsom first-install
When running heat-keystone-setup for the first time after (re)installing
openstack folsom, it fails, because the user-role-list is running *as* the
heat user, not reading the roles assigned to the heat user, which fails
because on a new install the heat user does not have the admin role.
Using the credentials from the environment means we run the command as
admin, but --user_id selects the roles for the heat user.

Change-Id: Ib2733e63f664d75be1e2e3bd43038bbd1dbebde8
Signed-off-by: Steven Hardy <shardy@redhat.com>
2012-10-31 16:28:19 +00:00
Steven Hardy
997a2165e7 heat metadata : remove metadata_url logic
Remove logic where the heat-metadata server registers a
URL on startup with the engine.  The instance metadata is
now served via the CFN api, so we just have a config-file
option specifying the URL of the CFN API.  We don't want to
preserve the "register on startup" logic, because we need the
engine to have access to this information even if it is
restarted independent of some other service (avoid reliance on
services coming up in a particular order)

Change-Id: I690170977227ec96451d2a2fd25f7e507370b604
Signed-off-by: Steven Hardy <shardy@redhat.com>
2012-10-26 17:35:47 +01:00
Steven Hardy
70b609567d heat-keystone-setup : change role to heat_stack_user
Change heat_instance role name to heat_stack_user after discussions

Change-Id: I14e95df0e02d82566f4758510ae38f6b26ccb532
Signed-off-by: Steven Hardy <shardy@redhat.com>
2012-10-25 14:04:49 +01:00
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