I broke metadata in bece6593f0 by no longer
updating the parsed template in the database. We need to resolve references
runtime data before storing the parsed template, because the metadata code
uses this directly.
Change-Id: I753fe199779ae1b0046366abadca0111a81463c6
Signed-off-by: Zane Bitter <zbitter@redhat.com>
This is important since /bin/sh is symlinked to dash by default on
Debian based systems.
Change-Id: I47b6317981ec020bed0bc45f7f68b636d71023d6
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
Resolve functions in templates by making a copy of the data rather than
modifying the original. This means that e.g. a resource resolving functions
in its own template data does not result in changes to the data held by the
Stack.
This patch also refactors all of the template resolution methods to operate
using a common parsing algorithm to move through the tree.
Finally, the resources have been worked to load data as it is needed,
rather than requiring external code to put them into the correct state
before using them.
Change-Id: I79eafaefc9ced07b652fac7162aa2edbfa7f547a
Signed-off-by: Zane Bitter <zbitter@redhat.com>
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>
With the new setup.py script, OpenStack must be installed before heat,
otherwise PIP will start importing bogus dependencies (at least on Fedora).
Also install stuff that was previously being installed by setup.py. This
will eventually be replaced with an install script (see #134).
Change-Id: I942def545f9351a1f3238dac49f34b13370e2597
Signed-off-by: Zane Bitter <zbitter@redhat.com>
Allow the Resource class to instantiate the correct type of object for each
resource.
Change-Id: I518f27fa27f675b9e497aac40962331833077aed
Signed-off-by: Zane Bitter <zbitter@redhat.com>
sys.exc_value has been deprecated since Python 1.5, and is not thread-safe.
The replacement is sys.exc_info(), but in this case we don't need even that
since we have the exception in question available.
Change-Id: Ibb4b354fd099fbf0d6390163eb4f7cc9e97db0e9
Signed-off-by: Zane Bitter <zbitter@redhat.com>
The CloudFormation documentation is very confusing on this point.
'CommaDelimitedList' is one of the data types that are valid for a
Parameter (the others are 'String' and 'Number'). A CommaDelimitedList
parameter takes the form of a string where the list members are delimted by
commas:
"item1,item2,item3"
However the documentation also uses the phrase "Comma Delimited List" to
refer to the type of some Resource Properties that are, in fact, simply
lists:
[ "item1" , "item2" , "item3" ]
...as if there were *another* way to represent lists. (Note that the
items here need not be strings, and in fact are usually objects of some
variety.)
So we need a different data type to represent the latter. (This patch
changes the name from 'TupleList' to just 'List', since the actual Python
sequence type is just an implementation detail.) In future, we should
probably also verify that only the 3 valid Parameter types are used, and
perhaps that list Properties contain only objects of the correct type.
Change-Id: I94054f588fc37f7d4ba245f2e92b86ac9c872c37
Signed-off-by: Zane Bitter <zbitter@redhat.com>
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>
rpm deps not available on ubuntu systems
fix apt-get install doesn't work (string vs list)
Change-Id: Ic2da1415f9bccb15321afd0ed5111041cbf2a2d0
Signed-off-by: Steven Dake <sdake@redhat.com>
This results in less data transferred during a glance registration.
Change-Id: I36d17c6e1bf12e3e0f37394d5522c6f4f59313de
Signed-off-by: Steven Dake <sdake@redhat.com>
This patch fixes the auth failed exception handler so that we
get back a meaningful result when authentication fails.
Change-Id: I2f37daed3890fd685fa6f701938b675460e76b0c
Signed-off-by: Ian Main <imain@redhat.com>
This patch updates the authentication system set up in heat:
- We now authenticate against the 'heat' service at the entry
point to each api call in the engine.
- We are now using the 'Context' class to contain the authentication
information as intended.
- The two context classes are unified and we now use the same one
for both WSGI and RPC. This is the intended design as the
context is loaded by the WSGI middleware and then passed into the
RPC methods.
- We are now doing token authentication in the API that works with
both native keystone and AWS style authentication. That token is
then passed on to the engine for further authentication for various
endpoints.
Note that the heat-api-paste.ini file requires updating in order for
this to work on your system. Admin user and password must be set
properly in the authtoken section in order to perform token based
authentication.
I suspect there will be a few bugs in here yet. This is just part of
the authentication/identification changes we need to make but I wanted
to get this in so we could continue to work with a boto based client.
Change-Id: Ib635ecd3088304e8d51d8e1fc31a8b1bf751caf3
Signed-off-by: Ian Main <imain@redhat.com>
Note: rpc_backend=heat.rpc.impl_kombu must be set in both heat-api.conf
and heat-engine.conf.
Change-Id: Ia7f5af8805240381f28ecae1efc0a677155f898e
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
The Wordpress HA template is now able to utilize the cfn-push-stats and send
alarm messages to the metadata server.
Change-Id: I52b615d3401dc2665e2b30e4a925d61ed204c827
Signed-off-by: Tomas Sedovic <tomas@sedovic.cz>
Fix watch db tables and silly programming errors.
get basic posting data to metadata server working
add watch_rule_get_all()
check for alarms in a periodic task
delete watch_data when the rule is deleted
add a last_evaluated field to the watch_rule
remove unused option to watch_data_get
take better account of the sample period.
- still much to be done here (evaluation periods).
add some useful stats to cfn-push-stats
fix how the metric is accessed
fix a divide by zero
Change-Id: Iaf98499d0e3ac6d6f951ea38b3b0f409669258da
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Also use os.path.join() to sort out trailing "/"
Change-Id: I212cffacc018f456894e9b7921fef75256edcf45
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
cloudinit on debian expects the user "ubuntu" - hard code to ec2-user
useradd doesn't create home directories on U10 without -m option
Change-Id: Iaaee6df560b60e203b17a36bba57ac410ad6ed56
Signed-off-by: Steven Dake <sdake@redhat.com>
This requires oz 0.9.0 (or latest master). 0.8.0 shipped with
most distros does not have customization support for Ubuntu
images.
fixes issue #23
Change-Id: I854aaf9657353b3fdb4768a277b527304e88ac8e
Signed-off-by: Steven Dake <sdake@redhat.com>